fix(engine): zone should not kill bots before activation
The executeZone function was killing bots outside the zone radius before the zone became active (ZoneStartTurn). This caused bots to die at turn 49 when the zone shouldn't start until turn 50. Added early return when ZoneActive is false, so zone killing only occurs after the zone has activated.
This commit is contained in:
parent
ea04f4debb
commit
f7752193fc
1 changed files with 5 additions and 1 deletions
|
|
@ -133,7 +133,11 @@ func (gs *GameState) executeZone() {
|
|||
}
|
||||
}
|
||||
|
||||
// Kill bots outside the zone
|
||||
// Kill bots outside the zone (only when zone is active)
|
||||
if !gs.ZoneActive {
|
||||
return
|
||||
}
|
||||
|
||||
for _, b := range gs.Bots {
|
||||
if !b.Alive {
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue