mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-10 10:42:05 +00:00
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 8d055bf038624fc61d965049832722555711af8a)
This commit is contained in:
parent
98cc5372a7
commit
ae9559d8f0
@ -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…
x
Reference in New Issue
Block a user