@@ -674,7 +674,11 @@ public enum ModeType
674674 Defend = 2
675675 }
676676
677- public string AttackerFaction { get ; set ; }
677+ /// <summary>
678+ /// Distinct attacker faction shortcuts across all <see cref="Options"/>. In parallel-turn PW every
679+ /// faction can be attacking simultaneously; each option also carries its own <see cref="VoteOption.AttackerFaction"/>.
680+ /// </summary>
681+ public List < string > AttackerFactions { get ; set ; }
678682
679683 public DateTime Deadline { get ; set ; }
680684
@@ -690,6 +694,7 @@ public PwMatchCommand(ModeType mode)
690694 Mode = mode ;
691695 Options = new List < VoteOption > ( ) ;
692696 DefenderFactions = new List < string > ( ) ;
697+ AttackerFactions = new List < string > ( ) ;
693698 }
694699
695700 public class VoteOption
@@ -705,32 +710,60 @@ public class VoteOption
705710 public bool CanSelectForBattle { get ; set ; }
706711 public bool PlayerIsAttacker { get ; set ; }
707712 public bool PlayerIsDefender { get ; set ; }
713+ /// <summary>
714+ /// Faction shortcut of the attacker. Together with <see cref="PlanetID"/> forms the (planet, attacker)
715+ /// key that identifies this attack slot. Clients must echo it back in <see cref="PwJoinPlanet"/>.
716+ /// </summary>
717+ public string AttackerFaction { get ; set ; }
718+ /// <summary>Average PW-WHR of the projected attacker squad (top-TeamSize volunteers). 0 when none.</summary>
719+ public int AttackerAvgWhr { get ; set ; }
720+ /// <summary>Average PW-WHR of the projected defender squad. Null in AttackCollect phase or when no volunteers.</summary>
721+ public int ? DefenderAvgWhr { get ; set ; }
722+ /// <summary>Attacker win chance 0-100 derived from WHR delta. Null when either side is empty.</summary>
723+ public int ? WinChance { get ; set ; }
708724 }
709725 }
710726
711727 [ Message ( Origin . Client ) ]
712728 public class PwJoinPlanet
713729 {
714730 public int PlanetID { get ; set ; }
731+ /// <summary>
732+ /// Which attack slot the player is interacting with. Required — a planet can be attacked by multiple
733+ /// factions simultaneously, each a separate slot. For an attacker this should equal the user's own
734+ /// faction; for a defender it identifies which incoming attack to defend against.
735+ /// </summary>
736+ public string AttackerFaction { get ; set ; }
737+ }
738+
739+ /// <summary>
740+ /// Client → server: cancel the player's current attack or defense commitment for the cycle.
741+ /// </summary>
742+ [ Message ( Origin . Client ) ]
743+ public class PwCancel
744+ {
715745 }
716746
717747 [ Message ( Origin . Server ) ]
718748 public class PwRequestJoinPlanet
719749 {
720750 public int PlanetID { get ; set ; }
751+ public string AttackerFaction { get ; set ; }
721752 }
722753
723754
724755 [ Message ( Origin . Server ) ]
725756 public class PwJoinPlanetSuccess
726757 {
727758 public int PlanetID { get ; set ; }
759+ public string AttackerFaction { get ; set ; }
728760 }
729761
730762 [ Message ( Origin . Server ) ]
731763 public class PwAttackingPlanet
732764 {
733765 public int PlanetID { get ; set ; }
766+ public string AttackerFaction { get ; set ; }
734767 }
735768
736769 [ Message ( Origin . Client ) ]
0 commit comments