mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-28 18:49:28 +00:00
Simplify an event
This commit is contained in:
parent
aa685d7e56
commit
2a1387186c
@ -430,16 +430,9 @@
|
|||||||
[/event]
|
[/event]
|
||||||
|
|
||||||
[event]
|
[event]
|
||||||
name=side turn
|
name=side 2 turn
|
||||||
first_time_only=no
|
first_time_only=no
|
||||||
|
|
||||||
[if]
|
|
||||||
[variable]
|
|
||||||
name=side_number
|
|
||||||
equals=2
|
|
||||||
[/variable]
|
|
||||||
|
|
||||||
[then]
|
|
||||||
[if]
|
[if]
|
||||||
[have_unit]
|
[have_unit]
|
||||||
side=1
|
side=1
|
||||||
@ -464,7 +457,7 @@
|
|||||||
# which is the aggressive side and thus the nearby enemies will begin
|
# which is the aggressive side and thus the nearby enemies will begin
|
||||||
# to pursue the player
|
# to pursue the player
|
||||||
|
|
||||||
[store_unit]
|
[modify_unit]
|
||||||
[filter]
|
[filter]
|
||||||
side=2
|
side=2
|
||||||
|
|
||||||
@ -477,30 +470,22 @@
|
|||||||
[/filter_location]
|
[/filter_location]
|
||||||
[/filter]
|
[/filter]
|
||||||
|
|
||||||
kill=yes
|
side=3
|
||||||
variable=side_2_units_nearby
|
[/modify_unit]
|
||||||
[/store_unit]
|
|
||||||
|
|
||||||
{FOREACH side_2_units_nearby i}
|
|
||||||
{VARIABLE side_2_units_nearby[$i].side 3}
|
|
||||||
|
|
||||||
[unstore_unit]
|
|
||||||
variable=side_2_units_nearby[$i]
|
|
||||||
find_vacant=no
|
|
||||||
[/unstore_unit]
|
|
||||||
{NEXT i}
|
|
||||||
|
|
||||||
{CLEAR_VARIABLE side_2_units_nearby}
|
|
||||||
[/then]
|
[/then]
|
||||||
|
|
||||||
[else]
|
[else]
|
||||||
# if player isn't seen by enemies anymore, make all enemies idle again
|
# if player isn't seen by enemies anymore, make all enemies idle again
|
||||||
|
|
||||||
{MODIFY_UNIT side=3 side 2}
|
[modify_unit]
|
||||||
|
[filter]
|
||||||
|
side=3
|
||||||
|
[/filter]
|
||||||
|
|
||||||
|
side=2
|
||||||
|
[/modify_unit]
|
||||||
[/else]
|
[/else]
|
||||||
[/if]
|
[/if]
|
||||||
[/then]
|
|
||||||
[/if]
|
|
||||||
[/event]
|
[/event]
|
||||||
|
|
||||||
[event]
|
[event]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user