diff --git a/data/test/scenarios/wml_tests/ScenarioWML/EventWML/ActionWML/DirectActionsWML/kill_fires_events.cfg b/data/test/scenarios/wml_tests/ScenarioWML/EventWML/ActionWML/DirectActionsWML/kill_fires_events.cfg new file mode 100644 index 00000000000..0fffaff2656 --- /dev/null +++ b/data/test/scenarios/wml_tests/ScenarioWML/EventWML/ActionWML/DirectActionsWML/kill_fires_events.cfg @@ -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] +)} diff --git a/wml_test_schedule b/wml_test_schedule index 6b9f585560f..4ef91895a5f 100644 --- a/wml_test_schedule +++ b/wml_test_schedule @@ -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