WHAT IS WRONG
HydragonGameMode.cpp:507 sets MaxPlayedTowerStages = 2. The exit test at case 13 reads
PushTowerStages >= MaxPlayedTowerStages. This counts stages SPENT and not towers KILLED. A stage
that ends with the hero dead has still been spent.
WHAT IT COSTS, read from the build 11 log
Stage tower1 logged: target=RedTower1 startHp=1800.0 endHp=129.1 elapsedSec=50.0 result=heroDied
PickPlayedPushTarget then returned the SAME tower, because it returns the living red tower
nearest the blue base and RedTower1 was still up at 129.1 hp. Stage tower2 finished that same
RedTower1. RedTower2 never got a stage. ForceTowersDown razed it:
structureDown name=RedTower2 killer=unattributed causerAlive=0 hits=1 damage=1800.0
lastHit=RedTower2 xp=0.0 credit=none
One hit for a whole health bar, and it paid 0.0 instead of TowerXpReward 260.0. The run then
finished 145.0 XP short of the old level 6, so the lost bounty was 1.79 times the whole shortfall.
Build 12 reproduced it in all four of its runs.
WHY IT IS NOT FIXED IN BUILD 12 OR BUILD 13
A third played stage adds up to PlayedPushStageBudgetSec plus a gap to the worst case.
ValidateRestartSec and the -hydragonquit argument of the HydragonRun scheduled task are both
derived from that chain. The quit argument lives on the build host and is NOT in the repository,
so raising the count alone would cut a run mid stage.
THE REPAIR
Count a stage against its TARGET, and add a separate hard cap on total stages so the script
cannot loop. Then move the -hydragonquit argument into the repository, or derive it, so the two
cannot drift apart.
NOTE
Build 13 moves the level 4 threshold so the hero should survive the first tower in one stage. If
that holds, stage 2 goes to RedTower2 on its own and the tower is played with no count change.
That makes this fault rarer. It does not fix it, because a hero that dies once still burns both
stages on one tower.