From d9a6cc94ed4915efe76c81f7fb1b1bc370b1fdef Mon Sep 17 00:00:00 2001 From: Simon Forsyth Date: Mon, 9 Jul 2012 00:04:47 +0000 Subject: [PATCH] Remove some redundant conditions --- .../11_Battle_for_Zocthanol_Isle.cfg | 110 +++++++----------- 1 file changed, 44 insertions(+), 66 deletions(-) diff --git a/data/campaigns/Under_the_Burning_Suns/scenarios/11_Battle_for_Zocthanol_Isle.cfg b/data/campaigns/Under_the_Burning_Suns/scenarios/11_Battle_for_Zocthanol_Isle.cfg index 31a4404c02d..888ad9fc1d4 100644 --- a/data/campaigns/Under_the_Burning_Suns/scenarios/11_Battle_for_Zocthanol_Isle.cfg +++ b/data/campaigns/Under_the_Burning_Suns/scenarios/11_Battle_for_Zocthanol_Isle.cfg @@ -1103,47 +1103,49 @@ [/if] [/event] - # Macro: defeat both leaders, now have to take keys back to citadel door + # Defeat both leaders, now have to take keys back to citadel door + [event] + name=found_both_keys_and_door -#define ELOH_MACRO + [filter_condition] + [variable] + name=num_keys_found + numerical_equals=2 + [/variable] - [if] - [variable] - name=found_door - boolean_equals=yes - [/variable] + [variable] + name=found_door + boolean_equals=yes + [/variable] + [/filter_condition] - [then] - [message] - speaker=Kaleh - message= _ "We’ve found both keys. Now we just have to take them and open the door to the black citadel. I tire of all this bloodshed. Wherever Yechnagoth hides, we will find her and make her pay for all she has done." - [/message] + [message] + speaker=Kaleh + message= _ "We’ve found both keys. Now we just have to take them and open the door to the black citadel. I tire of all this bloodshed. Wherever Yechnagoth hides, we will find her and make her pay for all she has done." + [/message] - [objectives] - summary= _ "New Objectives:" - [objective] - description= _ "Any unit must reach the black citadel" - condition=win - [/objective] - [objective] - description= _ "Death of Kaleh" - condition=lose - [/objective] - [objective] - description= _ "Death of Nym" - condition=lose - [/objective] - [objective] - description= _ "Death of Zhul" - condition=lose - [/objective] + [objectives] + summary= _ "New Objectives:" + [objective] + description= _ "Any unit must reach the black citadel" + condition=win + [/objective] + [objective] + description= _ "Death of Kaleh" + condition=lose + [/objective] + [objective] + description= _ "Death of Nym" + condition=lose + [/objective] + [objective] + description= _ "Death of Zhul" + condition=lose + [/objective] - note={NO_GOLD_CARRYOVER_NOTE} - [/objectives] - [/then] - [/if] - -#enddef + note={NO_GOLD_CARRYOVER_NOTE} + [/objectives] + [/event] # Event 9: Defeat the undead leader @@ -1188,21 +1190,9 @@ {VARIABLE_OP num_keys_found add 1} - [if] - [variable] - name=num_keys_found - numerical_equals=2 - [/variable] - - [variable] - name=found_door - boolean_equals=yes - [/variable] - - [then] - {ELOH_MACRO} - [/then] - [/if] + [fire_event] + name=found_both_keys_and_door + [/fire_event] [/event] # Event 10: Defeat the orc leader @@ -1248,21 +1238,9 @@ {VARIABLE_OP num_keys_found add 1} - [if] - [variable] - name=num_keys_found - numerical_equals=2 - [/variable] - - [variable] - name=found_door - boolean_equals=yes - [/variable] - - [then] - {ELOH_MACRO} - [/then] - [/if] + [fire_event] + name=found_both_keys_and_door + [/fire_event] [/event] # Event 11: An elf goes to open the doors