mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-16 02:15:19 +00:00
Test fire_event of kill unit on recall list (#7283)
This commit is contained in:
parent
d9be724690
commit
092fd23758
@ -0,0 +1,44 @@
|
||||
# wmllint: no translatables
|
||||
|
||||
#####
|
||||
# API(s) being tested: [kill]fire_event=yes
|
||||
##
|
||||
# Actions:
|
||||
# Create a last breath and die events. Put Alice to the recall list. Kill Bob and Alice, and detect with a variable which events have been triggered for whom.
|
||||
##
|
||||
# Expected end state:
|
||||
# A last breath event and a die event are triggered for Bob but not for Alice.
|
||||
#####
|
||||
{GENERIC_UNIT_TEST "kill_fires_events" (
|
||||
[event]
|
||||
name=last_breath
|
||||
first_time_only=no
|
||||
[set_variable]
|
||||
name=$unit.id|_breath
|
||||
value=yes
|
||||
[/set_variable]
|
||||
[/event]
|
||||
[event]
|
||||
name=die
|
||||
first_time_only=no
|
||||
[set_variable]
|
||||
name=$unit.id|_die
|
||||
value=yes
|
||||
[/set_variable]
|
||||
[/event]
|
||||
[event]
|
||||
name=start
|
||||
[put_to_recall_list]
|
||||
id=alice
|
||||
[/put_to_recall_list]
|
||||
[kill]
|
||||
id=alice,bob
|
||||
fire_event=yes
|
||||
[/kill]
|
||||
{ASSERT ({VARIABLE_CONDITIONAL bob_die boolean_equals yes})}
|
||||
{ASSERT ({VARIABLE_CONDITIONAL alice_die boolean_not_equals yes})}
|
||||
{ASSERT ({VARIABLE_CONDITIONAL bob_breath boolean_equals yes})}
|
||||
{ASSERT ({VARIABLE_CONDITIONAL alice_breath boolean_not_equals yes})}
|
||||
{SUCCEED}
|
||||
[/event]
|
||||
)}
|
@ -423,6 +423,7 @@
|
||||
0 order_of_variable_events3
|
||||
0 premature_end_turn1
|
||||
2 premature_end_turn2
|
||||
0 kill_fires_events
|
||||
# Game mechanics
|
||||
0 heal
|
||||
# Warnings about WML
|
||||
|
Loading…
x
Reference in New Issue
Block a user