From Guild Wars 2 Wiki
Allies can be divided into four groups:
- NPCs — all friendly NPCs and all of their pets and minions.
- PvE — all players and all of their pets and minions.
- WvW — all players from your homeworld and all of their pets and minions.
- PvP — all players on your team and all of their pets and minions.
- Effects that target allies prioritizes party members, then party members' pets and minions, then other players, then friendly NPCs.
- Area of effect skills that affect allies are usually limited to 5 or 10 allied targets. The player that cast the spell is also counted toward the limit.
- Some friendly-looking NPCs with green nameplates are immune to a damage from any source and are unaffected by other skills like players' area effects (don't confuse this immunity with the invulnerability and determined effects). They include all people in the capital cities, some service NPCs (many scouts, merchants etc), most of commoners and kids. Some NPCs may change their state from immune to non-immune depending on scenario.