@@ -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
@@ -702,32 +707,66 @@ public class VoteOption
702707 public List < string > StructureImages { get ; set ; }
703708 public int IconSize { get ; set ; }
704709 public string PlanetName { get ; set ; }
710+ public bool CanSelectForBattle { get ; set ; }
711+ public bool PlayerIsAttacker { get ; set ; }
712+ 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>Faction shortcut of the planet's current owner, or null for neutral planets. Lets the
719+ /// lobby surface "you own this", "ally owns this", "neutral" hints during attack/defense pick.</summary>
720+ public string OwnerFaction { get ; set ; }
721+ /// <summary>Average PW-WHR of the projected attacker squad (top-TeamSize volunteers). 0 when none.</summary>
722+ public int AttackerAvgWhr { get ; set ; }
723+ /// <summary>Average PW-WHR of the projected defender squad. Null in AttackCollect phase or when no volunteers.</summary>
724+ public int ? DefenderAvgWhr { get ; set ; }
725+ /// <summary>Attacker win chance 0-100 derived from WHR delta. Null when either side is empty.</summary>
726+ public int ? WinChance { get ; set ; }
705727 }
706728 }
707729
708730 [ Message ( Origin . Client ) ]
709731 public class PwJoinPlanet
710732 {
711733 public int PlanetID { get ; set ; }
734+ /// <summary>
735+ /// Which attack slot the player is interacting with. Required — a planet can be attacked by multiple
736+ /// factions simultaneously, each a separate slot. For an attacker this should equal the user's own
737+ /// faction; for a defender it identifies which incoming attack to defend against.
738+ /// </summary>
739+ public string AttackerFaction { get ; set ; }
740+ }
741+
742+ /// <summary>
743+ /// Client → server: cancel the player's current attack or defense commitment for the cycle.
744+ /// </summary>
745+ [ Message ( Origin . Client ) ]
746+ public class PwCancel
747+ {
712748 }
713749
714750 [ Message ( Origin . Server ) ]
715751 public class PwRequestJoinPlanet
716752 {
717753 public int PlanetID { get ; set ; }
754+ public string AttackerFaction { get ; set ; }
718755 }
719756
720757
721758 [ Message ( Origin . Server ) ]
722759 public class PwJoinPlanetSuccess
723760 {
724761 public int PlanetID { get ; set ; }
762+ public string AttackerFaction { get ; set ; }
725763 }
726764
727765 [ Message ( Origin . Server ) ]
728766 public class PwAttackingPlanet
729767 {
730768 public int PlanetID { get ; set ; }
769+ public string AttackerFaction { get ; set ; }
731770 }
732771
733772 [ Message ( Origin . Client ) ]
@@ -744,6 +783,19 @@ public class PwStatus
744783 public PlanetWarsModes ? PlanetWarsNextMode { get ; set ; }
745784 public DateTime ? PlanetWarsNextModeTime { get ; set ; }
746785 public int MinLevel { get ; set ; }
786+ public int AttackerPhaseMinutes { get ; set ; }
787+ public int DefenderPhaseMinutes { get ; set ; }
788+ /// <summary>Server's configured max attack charges. Lobby renders X/Max in the charges UI;
789+ /// before this field existed Chobby hardcoded 2 as the fallback default.</summary>
790+ public int MaxAttackCharges { get ; set ; }
791+ }
792+
793+ [ Message ( Origin . Server ) ]
794+ public class PwAttackCharges
795+ {
796+ public int Current { get ; set ; }
797+ /// <summary>UTC time at which the next charge will be granted, rounded up to a full minute. Null when at max or charges are disabled.</summary>
798+ public DateTime ? NextRechargeTime { get ; set ; }
747799 }
748800
749801
0 commit comments