Skip to content

Commit

Permalink
DiD S2: When ambushed by goblins, cancel any pending attack (#3227)
Browse files Browse the repository at this point in the history
This happens in a village-capture event, so the unit has finished
moving for this turn in any case.

(cherry-picked from commit 8d055bf)
  • Loading branch information
stevecotton authored and ln-zookeeper committed Oct 7, 2018
1 parent 98cc537 commit ae9559d
Showing 1 changed file with 13 additions and 0 deletions.
Expand Up @@ -255,6 +255,19 @@
[/then]
[/if]

# If there was a goblin next to the village before the guards spawned, the player may have
# already commanded their unit to attack. But as there are now more enemies, give the
# player a chance to choose a different opponent.
[if]
[variable]
name=number_of_guards
greater_than=0
[/variable]
[then]
[cancel_action][/cancel_action]
[/then]
[/if]

{CLEAR_VARIABLE number_of_guards,guard_location}
[/event]

Expand Down

0 comments on commit ae9559d

Please sign in to comment.