Skip to content

add per-player attack charges to planetwars#3040

Merged
Licho1 merged 3 commits intomasterfrom
pw-attack-charges
Apr 24, 2026
Merged

add per-player attack charges to planetwars#3040
Licho1 merged 3 commits intomasterfrom
pw-attack-charges

Conversation

@Licho1
Copy link
Copy Markdown
Member

@Licho1 Licho1 commented Apr 24, 2026

No description provided.

Licho1 added 3 commits April 23, 2026 23:24
Gate JoinPlanetAttack on having >=1 charge (when PwAttackChargesMax > 0
in DynamicConfig). Attackers spend 1 charge when their squad actually
launches (LaunchAllBattles), so merely clicking without forming a squad
does not cost anything. Defenders gain 1 charge at battle end (via
ProcessBattleResult). Passive recharge: a player who has sat below max
for PwAttackChargesRechargeMinutes gains 1 charge; fresh/zero-initialised
accounts get their recharge timer set lazily on the first passive pass.

PwCharges protocol message (Current, Max, SecondsUntilNextCharge) is
pushed to the player on login and after every change. Max=0 disables
the system. StartGalaxy seeds every account to the configured maximum.
@Licho1 Licho1 merged commit 7e2b8af into master Apr 24, 2026
2 checks passed
@Licho1 Licho1 deleted the pw-attack-charges branch April 24, 2026 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant