DiD S2: When ambushed by goblins, cancel any pending attack (#3227)
This happens in a village-capture event, so the unit has finished
moving for this turn in any case.
(cherry-picked from commit 8d055bf038
)
This commit is contained in:
parent
98cc5372a7
commit
ae9559d8f0
1 changed files with 13 additions and 0 deletions
|
@ -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]
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue