From 9730b4d28ee93160b9e66a0ba6d8f4efb3bd14ad Mon Sep 17 00:00:00 2001 From: Piotr Cychowski Date: Tue, 24 Apr 2007 11:38:16 +0000 Subject: [PATCH] Scenario 1 rewrite and relevant dependencies. Also bug update in Naga_Hunter.cfg. --- .../Under_the_Burning_Suns/changelog.txt | 22 + .../maps/1MorningAfter5 | 7 +- .../scenarios/1_Morning_After.cfg | 1120 +++++------------ .../scenarios/8_Frying_Pan.cfg | 647 +--------- .../units/Naga_Hunter.cfg | 1 - .../Under_the_Burning_Suns/utils/macros.cfg | 8 + 6 files changed, 361 insertions(+), 1444 deletions(-) create mode 100644 data/campaigns/Under_the_Burning_Suns/changelog.txt diff --git a/data/campaigns/Under_the_Burning_Suns/changelog.txt b/data/campaigns/Under_the_Burning_Suns/changelog.txt new file mode 100644 index 00000000000..8523f736b06 --- /dev/null +++ b/data/campaigns/Under_the_Burning_Suns/changelog.txt @@ -0,0 +1,22 @@ +1) Morning After + +*Scrapped explicit turns declaration in favour of {TURNS} +*Removed incorrect 'canrecruit' keys from side 2 and 3 declarations +*Corrected recruitment ai comment +*Optimised recruitment pattern declaration +*Removed unnecessary leader teleportation and obsoleted comment +*Scrapped explicit variable declarations in favour of {VARIABLE} +*Removed 9 redundant variables +*Rewritten mudcrawler encounter events to include the fact that you might see them for the first time at the barracks +*Abandoned use of {FREE_UNIT} and {UNIT_T} custom macros in favour of {CREATE_UNIT} +*Scrapped explicit incrementation in favour of custom {ADD} macro. Probably will be replaced by {VARIABLE_OP} in the future. +*Rewritten barracks encounter to set rocky horrors die event after this one fired. Reduces amount of events on startup. +Also the event now takes into account the fact that heroes might never seen mudcrawlers before. +*Rewritten finding druids and deep one event to allow delation of two redundant variables. +*Extracted dialogue from scouts events to a macro to save space. Rewritten the conditions to allow removal of redundant variable. +*Rewritten necromancer arrival events. Redundant variable removed, explicit gold and income modifications replaced by {GOLD} {INCOME} +*Scrapped unnecesary upkeep=full key +*Macroised outlying village capture event. Saved loads of space in removing redundant declarations. + +filesize before : 38KB +filesize after : 33KB \ No newline at end of file diff --git a/data/campaigns/Under_the_Burning_Suns/maps/1MorningAfter5 b/data/campaigns/Under_the_Burning_Suns/maps/1MorningAfter5 index 16fc7bf6e54..67830d58ef4 100644 --- a/data/campaigns/Under_the_Burning_Suns/maps/1MorningAfter5 +++ b/data/campaigns/Under_the_Burning_Suns/maps/1MorningAfter5 @@ -1,6 +1,6 @@ Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Hd , Hd , Hd , Hd , Hd , Dd , Hd , Dd , Dd , Dd , Dd , Hd , Hd , Hd , Dd , Dd , Hd Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Hd , Dd , Dd , Dd , Hd , Dd , Dd , Hd , Hd , Hd , Hd , Hd , Hd , Hd , Hd , Hd , Hd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Hd -Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Hd , Hd , Hd , Hd , Ce , 3 Ke , Ce , Hd , Hd , Hd , Dd , Dd , Dd^Vdt , Dd , Dd , Dd , Hd , Hd , Dd , Dd +Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Hd , Hd , Hd , Hd , Ce , Ke , Ce , Hd , Hd , Hd , Dd , Dd , Dd^Vdt , Dd , Dd , Dd , Hd , Hd , Dd , Dd Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Hd , Hd , Dd , Dd , Hd , Dd , Hd , Hd , Ce , Ce , Ce , Hd , Hd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Hd , Hd , Dd , Dd Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Hd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd^Vdt , Hd , Hd , Hd , Hd , Hd , Hd , Hd , Dd , Dd , Dd^Vdt , Ww , Ww , Dd , Dd , Dd , Dd , Dd , Hd Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Hd , Hd , Hd , Hd , Hd , Hd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Hd , Dd , Dd , Dd , Dd , Hd , Hd , Hd , Dd , Dd , Dd , Dd , Dd , Ww , Ww , Dd , Dd , Dd , Dd , Dd , Dd @@ -19,7 +19,7 @@ Dd , Dd , Dd , Dd , Dd , Dd Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Hd , Hd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd^Dc , Dd , Dd , Dd , Dd^Dr , Dd , Dd^Dc , Dd , Dd , Dd , Dd , Rd , Dd , Dd , Dd , Dd , Dd^Dr , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Hd Dd , Dd , Dd , Dd , Dd , Dd , Dd , Hd , Hd , Hd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd^Dc , Dd , Dd , Dd , Dd , Dd , Dd^Dr , Dd^Dc , Chr , Chr , Dd , Dd^Dr , Chr , Dd , Dd^Dr , Rd , Dd , Dd , Chr , Ch , Ch , Dd^Dr , Dd^Dc , Dd , Dd , Dd^Dc , Dd , Dd , Dd^Dc , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Hd , Hd , Hd , Hd , Hd Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Hd , Dd , Dd , Dd , Dd , Dd^Dc , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Chr , Dd^Dr , Dd , Dd , Dd^Dc , Dd , Dd , Dd^Dc , Chr , Rd , Chr , Dd^Dr , Dd^Dc , Dd , Dd , Dd^Dr , Dd^Dc , Dd , Dd^Dr , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd^Dc , Dd , Dd , Dd , Dd , Dd , Dd , Hd , Hd , Hd , Hd -Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd^Dr , Dd^Dr , Dd^Dc , Dd , Dd , Dd^Dr , Dd , Rd , Rd , Rd , Dd , Dd , Rd , Dd , Dd , Chr , Ch , Dd^Dr , Dd , Dd , Chr , Dd^Dr , Dd^Dc , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Hd , Dd +Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd^Dr , Dd^Dr , Dd^Dc , Dd , Dd , 1 Dd^Dr , Dd , Rd , Rd , Rd , Dd , Dd , Rd , Dd , Dd , Chr , Ch , Dd^Dr , Dd , Dd , Chr , Dd^Dr , Dd^Dc , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Hd , Dd Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd^Dc , Dd , Dd , Chr , Dd^Dc , Dd , Dd , Dd^Dc , Dd , Rd , Rd , Dd , Dd , Dd^Dr , Rd , Rd , Rd , Rd , Dd , Ch , Dd^Dc , Dd^Dr , Dd , Gg , Dd , Gg , Chr , Dd^Dr , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd^Dc , Dd , Dd , Dd , Dd , Chr , Chr , Dd^Dr , Dd , Dd^Vda , Dd , Rd , Rd , Dd , Dd^Dr , Dd , Dd , Dd , Dd^Dc , Dd , Rd , Dd , Rd , Dd^Dr , Chr , Dd , Dd^Dr , Dd^Dc , Gg , Gg , Gg , Dd^Dc , Dd^Dr , Dd , Dd , Dd^Dc , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Ch , Dd , Dd^Dc , Dd^Dr , Dd , Rd , Rd , Dd , Dd , Dd , Dd^Dc , Wo , Wo , Wo , Wo , Wo , Dd , Wo , Dd , Dd , Dd , Dd , Dd , Dd , Gg , Gg , Gg , Dd^Dr , Dd^Dc , Dd , Dd , Dd , Dd , Dd , Dd^Dc , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd @@ -47,5 +47,4 @@ Dd , Dd , Dd , Dd , Dd , Dd Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd -1 Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd - +Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd , Dd diff --git a/data/campaigns/Under_the_Burning_Suns/scenarios/1_Morning_After.cfg b/data/campaigns/Under_the_Burning_Suns/scenarios/1_Morning_After.cfg index b490af08d75..b96a0ed4ce8 100644 --- a/data/campaigns/Under_the_Burning_Suns/scenarios/1_Morning_After.cfg +++ b/data/campaigns/Under_the_Burning_Suns/scenarios/1_Morning_After.cfg @@ -1,3 +1,4 @@ + #Scenario 1: The Morning After [scenario] @@ -14,16 +15,8 @@ next_scenario=2_HarshSands #don't display snapshot of map in saved games snapshot="no" -#max turns in scenario varies depending on difficulty -#ifdef EASY -turns="34" -#endif -#ifdef MEDIUM -turns="32" -#endif -#ifdef HARD -turns="30" -#endif +{TURNS 34 32 30} + victory_when_enemies_defeated=no {DAWN1} @@ -106,7 +99,6 @@ name=revelation.ogg [side] no_leader=yes side=2 -canrecruit=0 controller=ai shroud=no fog=no @@ -116,7 +108,6 @@ team_name=evil [ai] aggression=1.0 caution=0.0 - [/ai] [/side] @@ -125,7 +116,6 @@ caution=0.0 [side] no_leader=yes side=3 - canrecruit=1 controller=ai shroud=no fog=no @@ -144,19 +134,13 @@ caution=0.0 #endif [ai] - #Need to make undead player more aggressive? +#!***This is used to force ai to recruit something else than bats and ghosts*** recruitment_ignore_bad_movement=yes - #ifdef EASY - recruitment_pattern=scout,fighter,archer,fighter - #endif - - #ifdef MEDIUM - recruitment_pattern=scout,fighter,archer,fighter - #endif - #ifdef HARD recruitment_pattern=scout,fighter,fighter,fighter,archer + #else + recruitment_pattern=scout,fighter,archer,fighter #endif aggression=0.80 @@ -192,85 +176,19 @@ name=prestart [/objective] [/objectives] -#Transport leader to starting position and erase keep he was created on -[teleport] - [filter] - description=Kaleh - [/filter] - x,y=26,22 -[/teleport] - - #There are 2 mudcrawler encounter spots, in the NW and SW corner. + #There are 3 mudcrawler encounter spots, in the NW and SW corner and in the barracks. #Depending on which way you circle around the village, you will - #encounter the NW or SW one first. This flag records if you - #have done encounter #1 already. + #encounter the NW or barracks first. - #At start never seen a mudcrawler is true - [set_variable] - name=never_seen_mudcrawler - value=1 - [/set_variable] + #At start seen a mudcrawler is false + {VARIABLE seen_mudcrawler 0} #At start, number of mudcrawlers killed is zero - [set_variable] - name=mudcrawlers_killed - value=0 - [/set_variable] + {VARIABLE mudcrawlers_killed 0} - #At start encountered druids is false - [set_variable] - name=encountered_druids - value=0 - [/set_variable] - - #At start encountered deep one is false - [set_variable] - name=encountered_deep_one - value=0 - [/set_variable] - - #At start encountered first scout in stable is false - [set_variable] - name=encountered_scout - value=0 - [/set_variable] #Can't end scenario until all elves have been rescued and counter=5 - [set_variable] - name=rescued_elves - value=0 - [/set_variable] - - #Flag to check if dark sorcerer has appeared yet - [set_variable] - name=dark_sorcerer_appeared - value=0 - [/set_variable] - - #used to make sure that deaths.cfg event fires correctly - [set_variable] - name=immortal_hero - value=0 - [/set_variable] - - #Four outer villages have flags to see if they have been - #Captured by side 1 or 3. start at 0. - [set_variable] - name=village1 - value=0 - [/set_variable] - [set_variable] - name=village2 - value=0 - [/set_variable] - [set_variable] - name=village3 - value=0 - [/set_variable] - [set_variable] - name=village4 - value=0 - [/set_variable] + {VARIABLE rescued_elves 0} [/event] @@ -351,6 +269,57 @@ name=moveto [/message] [/event] +#!*** Following two events use the same code with only speaking unit change, lets extract it to a macro*** +#!*** Or two to be exact, this way it will be useful in barracks encounter*** + +#define MUDCRAWLER_TALK SPEAKER + [if] + [variable] + name=seen_mudcrawler + numerical_equals=0 + [/variable] + + [then] + #Hasn't completed #1 encounter, do it now +#!***If (hasn't seen mudcrawler) then (perform what-the-hell-is-that routine)*** + + {VARIABLE seen_mudcrawler 1} + + [message] + description={SPEAKER} + message= _ "Kaleh, Nym, help us!" + [/message] + [message] + description=Nym + message= _ "What in Uria's name is that?" + [/message] + [message] + description={SPEAKER} + message= _ "It came out of the stones that fell from the sky. I know not what it is, but more seem to be emerging from the craters. If we don't stop them there will be nothing left of our village or our people." + [/message] + [message] + description=Kaleh + message= _ "To battle, my friends! There are still those left who can fight." + [/message] + [/then] +#enddef + +#define MUDCRAWLER_WARCRY + + [else] + #Has completed encounter #1 in SW corner, do #2 encounter +#!***else (Seen mudcrawler, do let's-kick-their-ass performance)*** + [message] + description=Kaleh + message= _ "There are more of our people fighting the mud monsters!" + [/message] + [message] + description=Nym + message= _ "Then let's join the battle!" + [/message] + [/else] + [/if] +#enddef # North-West mudcrawler/villager encounter # Elvish fighter and 2 archers fighting @@ -365,90 +334,37 @@ name=moveto side=1 [/filter] - [set_variable] - name=rescued_elves - add=1 - [/set_variable] + {ADD rescued_elves 1} - {UNIT_T (Desert Fighter) (Vecnu) ( _ "Vecnu") 1 24 25} - {UNIT_T (Desert Archer) (Eranor) ( _ "Eranor") 1 24 27} - {UNIT_T (Desert Archer) (Seela) ( _ "Seela") 1 21 25} - #Hack to make Seela female - [+unit] - gender=female - [/unit] + {CREATE_UNIT 1 "Desert Fighter" 24 25 "Vecnu" (user_description=_"Vecnu" +random_traits="yes")} + {CREATE_UNIT 1 "Desert Archer" 24 27 "Eranor" (user_description=_"Eranor" + random_traits="yes")} + {CREATE_UNIT 1 "Desert Archer" 21 25 "Seela" (user_description=_"Seela" + random_traits="yes" + gender="female")} - {CLEAR_VARIABLE tempelf} - - {FREE_UNIT (Giant Mudcrawler) () ("") 2 20 24} + {CREATE_UNIT 2 "Giant Mudcrawler" 20 24 "" ()} #ifdef HARD - {FREE_UNIT (Giant Mudcrawler) () ("") 2 20 25} + {CREATE_UNIT 2 "Giant Mudcrawler" 20 25 "" ()} #else - {FREE_UNIT (Small Mudcrawler) () ("") 2 20 25} + {CREATE_UNIT 2 "Small Mudcrawler" 20 25 "" ()} #endif #ifdef EASY - {FREE_UNIT (Small Mudcrawler) () ("") 2 23 27} + {CREATE_UNIT 2 "Small Mudcrawler" 23 27 "" ()} + {CREATE_UNIT 2 "Small Mudcrawler" 25 28 "" ()} #else - {FREE_UNIT (Giant Mudcrawler) () ("") 2 23 27} + {CREATE_UNIT 2 "Giant Mudcrawler" 23 27 "" ()} + {CREATE_UNIT 2 "Small Mudcrawler" 24 28 "" ()} #endif - #When not easy diff, mudcrawler is spawned on hills, not desert. - #ifdef EASY - {FREE_UNIT (Small Mudcrawler) () ("") 2 25 28} - #else - {FREE_UNIT (Small Mudcrawler) () ("") 2 24 28} - #endif + {MUDCRAWLER_TALK Vecnu} + {MUDCRAWLER_WARCRY} - [if] - [variable] - name=never_seen_mudcrawler - numerical_equals=1 - [/variable] - - [then] - #Hasn't completed #1 encounter, do it now - - [set_variable] - name=never_seen_mudcrawler - value=0 - [/set_variable] - - [message] - description=Vecnu - message= _ "Kaleh, Nym, help us!" - [/message] - [message] - description=Nym - message= _ "What in Uria's name is that?" - [/message] - [message] - description=Vecnu - message= _ "It came out of the stones that fell from the sky. I know not what it is, but more seem to be emerging from the craters. If we don't stop them there will be nothing left of our village or our people." - [/message] - [message] - description=Kaleh - message= _ "To battle, my friends! There are still those left who can fight." - [/message] - [/then] - - [else] - #Has completed encounter #1 in SW corner, do #2 encounter - - [message] - description=Kaleh - message= _ "There are more of our people fighting the mud monsters!" - [/message] - [message] - description=Nym - message= _ "Then let's join the battle!" - [/message] - [/else] - [/if] [/event] - # South-West mudcrawler/villager encounter # Elvish archer and 2 hunters fighting # Easy: 4 small mudcrawlers @@ -467,71 +383,32 @@ name=moveto add=1 [/set_variable] - {UNIT_T (Desert Hunter) (Eloshi) ( _ "Eloshi") 1 24 34} - {UNIT_T (Desert Archer) (Illuvia) ( _ "Illuvia") 1 19 33} - {UNIT_T (Desert Hunter) (Raynor) ( _ "Raynor") 1 21 35} + {CREATE_UNIT 1 "Desert Hunter" 24 34 "Eloshi" (user_description=_"Eloshi" +random_traits="yes")} + {CREATE_UNIT 1 "Desert Archer" 19 33 "Illuvia" (user_description=_"Illuvia" +random_traits="yes" +gender="female")} + {CREATE_UNIT 1 "Desert Hunter" 21 35 "Raynor" (user_description=_"Raynor" +random_traits="yes")} - {FREE_UNIT (Small Mudcrawler) () ("") 2 25 34} + {CREATE_UNIT 2 "Giant Mudcrawler" 25 34 "" ()} + {CREATE_UNIT 2 "Small Mudcrawler" 21 36 "" ()} #ifdef HARD - {FREE_UNIT (Giant Mudcrawler) () ("") 2 24 35} + {CREATE_UNIT 2 "Giant Mudcrawler" 24 35 "" ()} #else - {FREE_UNIT (Small Mudcrawler) () ("") 2 24 35} + {CREATE_UNIT 2 "Small Mudcrawler" 24 35 "" ()} #endif #ifdef EASY - {FREE_UNIT (Small Mudcrawler) () ("") 2 20 34} + {CREATE_UNIT 2 "Small Mudcrawler" 20 34 "" ()} #else - {FREE_UNIT (Giant Mudcrawler) () ("") 2 20 34} + {CREATE_UNIT 2 "Giant Mudcrawler" 20 34 "" ()} #endif - {FREE_UNIT (Giant Mudcrawler) () ("") 2 21 36} + {MUDCRAWLER_TALK Eloshi} + {MUDCRAWLER_WARCRY} - [if] - [variable] - name=never_seen_mudcrawler - numerical_equals=1 - [/variable] - - [then] - #Hasn't completed #1 encounter, do it now - - [set_variable] - name=never_seen_mudcrawler - value=0 - [/set_variable] - - [message] - description=Eloshi - message= _ "Kaleh, Nym, help us!" - [/message] - [message] - description=Kaleh - message= _ "What in Uria's name is that?" - [/message] - [message] - description=Eloshi - message= _ "It came out of the stones that fell from the sky. I know not what it is, but more seem to be emerging from the craters. If we don't stop them there will be nothing left of our village or our people." - [/message] - [message] - description=Nym - message= _ "To battle, my friends! There are still those left who can fight." - [/message] - [/then] - - [else] - #Has completed encounter #1 in SW corner, do #2 encounter - - [message] - description=Kaleh - message= _ "There are more of our people fighting the mud monsters!" - [/message] - [message] - description=Nym - message= _ "Then let's join the battle!" - [/message] - [/else] - [/if] [/event] #Training ground encounter @@ -551,29 +428,24 @@ name=moveto x,y=36,34 [/capture_village] - [set_variable] - name=rescued_elves - add=1 - [/set_variable] + {ADD rescued_elves 1} - {FREE_UNIT (Giant Mudcrawler) (Rocky Horror) ( _ "Rocky Horror") 2 34 33} + {CREATE_UNIT 2 "Giant Mudcrawler" 34 33 "Rocky Horror" (user_description=_"Rocky Horror")} + {CREATE_UNIT 2 "Giant Mudcrawler" 34 34 "Rocky Horror" (user_description=_"Rocky Horror")} + {CREATE_UNIT 2 "Small Mudcrawler" 34 35 "Rocky Horror" (user_description=_"Rocky Horror")} #ifdef HARD - {FREE_UNIT (Giant Mudcrawler) (Rocky Horror) ( _ "Rocky Horror") 2 35 33} + {CREATE_UNIT 2 "Giant Mudcrawler" 35 33 "Rocky Horror" (user_description=_"Rocky Horror")} #else - {FREE_UNIT (Small Mudcrawler) (Rocky Horror) ( _ "Rocky Horror") 2 35 33} + {CREATE_UNIT 2 "Small Mudcrawler" 35 33 "Rocky Horror" (user_description=_"Rocky Horror")} #endif - {FREE_UNIT (Giant Mudcrawler) (Rocky Horror) ( _ "Rocky Horror") 2 34 34} - #ifdef EASY - {FREE_UNIT (Small Mudcrawler) (Rocky Horror) ( _ "Rocky Horror") 2 36 32} + {CREATE_UNIT 2 "Small Mudcrawler" 36 32 "Rocky Horror" (user_description=_"Rocky Horror")} #else - {FREE_UNIT (Giant Mudcrawler) (Rocky Horror) ( _ "Rocky Horror") 2 36 32} + {CREATE_UNIT 2 "Giant Mudcrawler" 36 32 "Rocky Horror" (user_description=_"Rocky Horror")} #endif - {FREE_UNIT (Small Mudcrawler) (Rocky Horror) ( _ "Rocky Horror") 2 34 35} - [unit] type=Desert Captain description=Garak @@ -602,34 +474,37 @@ name=moveto {IS_HERO} [/unit] - {UNIT_T (Desert Fighter) (Jorazan) ( _ "Jorazan") 1 36 33} - {UNIT_T (Desert Fighter) (Zyara) ( _ "Zyara") 1 35 35} + {CREATE_UNIT 1 "Desert Fighter" 36 33 "Jorazan" (user_description=_"Jorazan" +random_traits="yes")} + {CREATE_UNIT 1 "Desert Fighter" 35 35 "Zyara" (user_description=_"Zyara" +random_traits="yes" +gender="female")} [message] speaker=unit message= _ "This is our training ground. And look, there is Garak, the captain of the guard. He and his fighters have survived the night!" [/message] + {MUDCRAWLER_TALK Garak} + [else] [message] description=Kaleh message= _ "But they are fighting many mud creatures. Quick, we must help them!" [/message] + [/else] + [/if] -[/event] - -#Garak's speech when they kill the Giant Mudcrawler -[event] -name=die -first_time_only=no + #Garak's speech when they kill the Giant Mudcrawler + + [event] + name=die + first_time_only=no [filter] description=Rocky Horror [/filter] - [set_variable] - name=mudcrawlers_killed - add=1 - [/set_variable] + {ADD mudcrawlers_killed 1} [if] [variable] @@ -648,6 +523,7 @@ first_time_only=no [/message] [/then] [/if] + [/event] [/event] #Approaching bridge dialogue @@ -687,15 +563,7 @@ name=moveto side=1 [/filter] - [set_variable] - name=rescued_elves - add=1 - [/set_variable] - - [set_variable] - name=encountered_druids - value=1 - [/set_variable] + {ADD rescued_elves 1} [message] speaker=Kaleh @@ -722,8 +590,10 @@ name=moveto {IS_HERO} [/unit] - {UNIT_T (Desert Shaman) (Ryoko) ( _ "Ryoko") 1 30 27} - {UNIT_T (Desert Shaman) (Yuni) ( _ "Yuni") 1 32 27} + {CREATE_UNIT 1 "Desert Shaman" 30 27 "Ryoko" (user_description=_"Ryoko" +random_traits="yes")} + {CREATE_UNIT 1 "Desert Shaman" 32 27 "Yuni" (user_description=_"Yuni" +random_traits="yes")} [message] speaker=Zhul @@ -749,13 +619,9 @@ name=moveto speaker=Zhul message= _ "All things of this world come to an end, but the power of Eloh endures. A new one shall grow in its place. Come now, let us see to the needs of our people." [/message] -[/event] -#Cuttlefish attacks as player leaves island - -[event] -name=moveto -first_time_only=no + [event] + name=moveto [filter] x=30-32 @@ -763,58 +629,90 @@ first_time_only=no side=1 [/filter] - [if] - [variable] - name=encountered_druids - numerical_equals=1 - [/variable] + [unit] + type=Deep One + upkeep=free + x=32 + y=30 + side=2 + [/unit] - [variable] - name=encountered_deep_one - numerical_equals=0 - [/variable] + [message] + type=Deep One + message= _ "Raaaar!" + [/message] - [then] + [message] + speaker=Nym + message= _ "What in Uria's name is that?" + [/message] - [unit] - type=Deep One - upkeep=free - x=32 - y=30 - side=2 - [/unit] + [message] + speaker=Zhul + message= _ "I felt a great darkness in this lake, but I knew not what it was. The falling rocks must have woken it from its sleep." + [/message] - [message] - type=Deep One - message= _ "Raaaar!" - [/message] + [message] + speaker=Kaleh + message= _ "Protect the priestesses, we shall send this monstrosity back to the depths it came from!" + [/message] - [message] - speaker=Nym - message= _ "What in Uria's name is that?" - [/message] - - [message] - speaker=Zhul - message= _ "I felt a great darkness in this lake, but I knew not what it was. The falling rocks must have woken it from its sleep." - [/message] - - [message] - speaker=Kaleh - message= _ "Protect the priestesses, we shall send this monstrosity back to the depths it came from!" - [/message] - - [set_variable] - name=encountered_deep_one - value=1 - [/set_variable] - - [/then] - [/if] + [/event] [/event] #Grasslands dialogue, when Kaleh and Nym approach the eastern fields +#define STABLE_TALK_IF FINDING FOUND X Y + [message] + description={FINDING} + message= _ "Hey {FOUND}, the rocks have stopped falling. You can come out now!" + [/message] + + {CREATE_UNIT 1 "Desert Scout" {X} {Y} {FOUND} (user_description=_{FOUND} +random_traits="yes")} + + [message] + description={FOUND} + message= _ "Oh, thank Eloh, I thought they would never stop." + [/message] +#enddef + +#define STABLE_TALK_ELSE FOUND X Y + + [message] + description=Nym + message= _ "I think I see movement in the stables. Is anyone there?" + [/message] + + {CREATE_UNIT 1 "Desert Scout" {X} {Y} {FOUND} (user_description=_{FOUND} +random_traits="yes")} + + [message] + description={FOUND} + message= _ "Is it safe to come out? I was so scared." + [/message] + + [message] + description=Kaleh + message= _ "Where are all the other horses?" + [/message] + + [message] + description={FOUND} + message= _ "A hunting party left just yesterday, so unless the rocks fell all over the land, many of the horses have probably survived. The few that remained here were scared by the falling rocks and fled into the night. It took all my skill to calm Yasi and keep him from running." + [/message] + + [message] + description=Kaleh + message= _ "We'll need your help in checking to see if the outer settlements are okay. Who knows what kinds of damage they suffered in the night? And perhaps some of the people out in the desert have been able to round up some of the loose horses." + [/message] + + [message] + description=Nym + message= _ "Well, let's hope that hunting party comes back soon." + [/message] +#enddef + [event] name=moveto [filter] @@ -823,10 +721,7 @@ name=moveto side=1 [/filter] - [set_variable] - name=rescued_elves - add=1 - [/set_variable] + {ADD rescued_elves 1} [message] description=Kaleh @@ -836,153 +731,54 @@ name=moveto description=Nym message= _ "Maybe they're hiding in the stables. Let's go check." [/message] -[/event] #Stables Encounters #These happen when the player moves to the two village hexes. #Depending on the order, the long dialogue happens at the first stable #they encounter, and then a short dialogue happens at the second. +[/event] #First stables encounter [event] -name=moveto +name=capture [filter] x=43 y=29 side=1 [/filter] [if] - [variable] - name=encountered_scout - numerical_equals=0 - [/variable] + [have_unit] + description=Nisa + [/have_unit] [then] - - [set_variable] - name=encountered_scout - value=1 - [/set_variable] - - [message] - description=Nym - message= _ "I think I see movement in the stables. Is anyone there?" - [/message] - - {UNIT_T (Desert Scout) (Naru) ( _ "Naru") 1 43 28} - - [message] - description=Naru - message= _ "Is it safe to come out? I was so scared." - [/message] - - [message] - description=Kaleh - message= _ "Where are all the other horses?" - [/message] - - [message] - description=Naru - message= _ "A hunting party left just yesterday, so unless the rocks fell all over the land, many of the horses have probably survived. The few that remained here were scared by the falling rocks and fled into the night. It took all my skill to calm Yasi and keep him from running." - [/message] - - [message] - description=Kaleh - message= _ "We'll need your help in checking to see if the outer settlements are okay. Who knows what kinds of damage they suffered in the night? And perhaps some of the people out in the desert have been able to round up some of the loose horses." - [/message] - - [message] - description=Nym - message= _ "Well, let's hope that hunting party comes back soon." - [/message] - + {STABLE_TALK_IF "Nisa" "Naru" 43 28} [/then] [else] - - [message] - description=Nisa - message= _ "Hey Naru, the rocks have stopped falling. You can come out now!" - [/message] - - {UNIT_T (Desert Scout) (Naru) ( _ "Naru") 1 43 28} - - [message] - description=Naru - message= _ "Oh, thank Eloh, I thought they would never stop." - [/message] - + {STABLE_TALK_ELSE "Naru" 43 28} [/else] [/if] [/event] #Second stables encounter [event] -name=moveto +name=capture [filter] x=43 y=32 side=1 [/filter] [if] - [variable] - name=encountered_scout - numerical_equals=0 - [/variable] + [have_unit] + description=Naru + [/have_unit] [then] - - [set_variable] - name=encountered_scout - value=1 - [/set_variable] - - [message] - description=Nym - message= _ "I think I see movement in the stables. Is anyone there?" - [/message] - - {UNIT_T (Desert Scout) (Nisa) ( _ "Nisa") 1 42 31} - - [message] - description=Nisa - message= _ "Is it safe to come out? I was so scared." - [/message] - - [message] - description=Kaleh - message= _ "Where are all the other horses?" - [/message] - - [message] - description=Nisa - message= _ "A hunting party left just yesterday, so unless the rocks fell all over the land, many of the horses have probably survived. The few that remained here were scared by the falling rocks and fled into the night. It took all my skill to calm Yasi and keep him from running." - [/message] - - [message] - description=Kaleh - message= _ "We'll need your help in checking to see if the outer settlements are okay. Who knows what kinds of damage they suffered in the night? And perhaps some of the people out in the desert have been able to round up some of the loose horses." - [/message] - - [message] - description=Nym - message= _ "Well, let's hope that hunting party comes back soon." - [/message] - + {STABLE_TALK_IF "Naru" "Nisa" 43 31} [/then] [else] - [message] - description=Naru - message= _ "Hey Nisa, the rocks have stopped falling. You can come out now!" - [/message] - - {UNIT_T (Desert Scout) (Nisa) ( _ "Nisa") 1 42 31} - - [message] - description=Nisa - message= _ "Oh, thank Eloh, I thought they would never stop." - [/message] - + {STABLE_TALK_ELSE "Nisa" 43 31} [/else] [/if] @@ -993,55 +789,28 @@ name=moveto # if hard difficulty, create a necromancer instead of dark sorcerer +#!***Another space-waste, #ifdef can be used inside [unit]. Upkeep is full by default.*** #define DARKSORCERER_INTRO + [unit] #ifdef HARD - [unit] type=Necromancer - description=Xanthos - user_description= _ "Xanthos" - canrecruit=1 - upkeep=full - x=46 - y=3 - side=3 - [/unit] #else - [unit] type=Dark Sorcerer + #endif description=Xanthos user_description= _ "Xanthos" canrecruit=1 - upkeep=full x=46 y=3 side=3 [/unit] - #endif - [modify_side] side=3 - - #ifdef EASY - income=12 - gold=150 - #endif - #ifdef MEDIUM - income=15 - gold=175 - #endif - #ifdef HARD - income=20 - gold=200 - #endif + {GOLD 150 175 200} + {INCOME 12 15 20} [/modify_side] - #dark sorcerer has now appeared - [set_variable] - name=dark_sorcerer_appeared - value=1 - [/set_variable] - [remove_shroud] side=1 x=44-48 @@ -1102,18 +871,30 @@ name=moveto [event] name=turn 11 +#!***If Xanthos does not exist and undead gold is unmodified it means he never showed up**** +[store_side] + side=3 + variable=temp +[/store_side] + [if] - + [not] + [have_unit] + description=Xanthos + [/have_unit] + [/not] [variable] - name=dark_sorcerer_appeared - equals=0 + name=temp.gold + numerical_equals=100 [/variable] - [then] {DARKSORCERER_INTRO} [/then] [/if] + +{CLEAR_VARIABLE temp} + [/event] # When dark sorcerer dies, checks to make sure elves have been rescued @@ -1124,12 +905,6 @@ name=die description=Xanthos [/filter] - [kill] - description=Xanthos - animate=no - fire_event=no - [/kill] - [message] description=Kaleh message= _ "The necromancer is finally vanquished." @@ -1150,7 +925,33 @@ name=die description=Kaleh message= _ "The necromancer is dead, but I don't think we've explored the entire village. There may still be elves that need rescuing. We should go back and check. " [/message] + [event] + name=die + first_time_only=no + [filter] + [not] + side=1 + [/not] + [/filter] + [if] + [variable] + name=rescued_elves + numerical_equals=5 + [/variable] + [then] + [message] + description=Kaleh + message= _ "We've explored the village and I think we've rescued the last of the survivors." + [/message] + + [endlevel] + result=victory + bonus=yes + [/endlevel] + [/then] + [/if] + [/event] [/then] [else] [endlevel] @@ -1161,38 +962,8 @@ name=die [/if] [/event] -#This event is used in case the player kills the dark sorcerer -#before rescuing all the elves. -[event] -name=enemies defeated - first_time_only=no - [if] - [variable] - name=rescued_elves - numerical_equals=5 - [/variable] - - [variable] - name=dark_sorcerer_appeared - equals=1 - [/variable] - - [then] - [message] - description=Kaleh - message= _ "We've explored the village and I think we've rescued the last of the survivors." - [/message] - - [endlevel] - result=victory - bonus=yes - [/endlevel] - [/then] - [/if] -[/event] - #This event prevents player from running to dark sorcerer's base before he shows up on turn 11. If the player approaches his base before turn 11 he appears and attacks. Either way the unit moving into the area also comments on the plight of those elves who lived out in the open sands. - +#!***To be honest I don't belive this scenario is possible, but levaing it anyway.*** [event] name=moveto [filter] @@ -1201,12 +972,13 @@ name=moveto side=1 [/filter] +#!***No other checks this time. If necro was killed this event was fired before that happened.*** [if] - - [variable] - name=dark_sorcerer_appeared - equals=0 - [/variable] + [not] + [have_unit] + side=3 + [/have_unit] + [/not] [then] {DARKSORCERER_INTRO} @@ -1232,15 +1004,17 @@ name=turn 16 y=1-6 [/remove_shroud] - {UNIT_T (Desert Hunter) (Pythos) ( _ "Pythos") 1 29 2} - {UNIT_T (Desert Fighter) (Shea) ( _ "Shea") 1 28 2} - {UNIT_T (Desert Fighter) (Narn) ( _ "Narn") 1 29 1} - {UNIT_T (Desert Scout) (Jokli) ( _ "Jokli") 1 27 2} - {UNIT_T (Desert Archer) (Lyia) ( _ "Lyia") 1 28 1} - #Hack to make Lyia female - [+unit] - gender=female - [/unit] + {CREATE_UNIT 1 "Desert Hunter" 29 2 "Pythos" (user_description=_"Pythos" +random_traits="yes")} + {CREATE_UNIT 1 "Desert Fighter" 28 2 "Shea" (user_description=_"Shea" +random_traits="yes")} + {CREATE_UNIT 1 "Desert Fighter" 29 1 "Narn" (user_description=_"Narn" +random_traits="yes")} + {CREATE_UNIT 1 "Desert Scout" 27 2 "Jokli" (user_description=_"Jokli" +random_traits="yes")} + {CREATE_UNIT 1 "Desert Archer" 28 1 "Lyia" (user_description=_"Lyia" +random_traits="yes" +gender="female")} [message] description=Pythos @@ -1264,6 +1038,8 @@ name=turn 16 [/event] +#!***This is basicaly one event doing the same thing at four different places.*** +#!***Turning it into a macro invoked four times saves space again*** #Desert Village events #Some of the outer villages have elves hiding in them. If the player #reaches them before the undead do, they can rescue the elves. @@ -1274,28 +1050,22 @@ name=turn 16 #26,7 #17,10 -#Village 1: 57,35 +#define VILLAGE_EVENT X Y TYPE_FOUND NAME_FOUND [event] name=capture [filter] - x=57 - y=35 - side=1 + x={X} + y={Y} [/filter] [if] [variable] - name=village1 - equals=0 + name=unit.side + numerical_equals=1 [/variable] [then] - [set_variable] - name=village1 - value=1 - [/set_variable] - {RANDOM 1..10} [if] @@ -1312,8 +1082,8 @@ name=capture message= _ "Oh good, some elves have survived in this outer settlement. They've agreed to help us search for other survivors." [/message] - {UNIT_T (Desert Scout) (Lrea) ( _ "Lrea") 1 $x1 $y1} - + {CREATE_UNIT 1 {TYPE_FOUND} $x1 $y1 {NAME_FOUND} (user_description=_{NAME_FOUND} +random_traits="yes")} [/then] [else] @@ -1330,303 +1100,29 @@ name=capture [/then] [else] + [event] + name=capture + [filter] + x={X} + y={Y} + side=1 + [/filter] [message] speaker=unit message= _ "This encampment has been abandoned. There are signs of a struggle and a few bloodstains but nothing else. I fear for those elves who lived out here." [/message] - + [/event] [/else] [/if] [/event] -[event] -name=capture - [filter] - x=57 - y=35 - side=3 - [/filter] - - [if] - - [variable] - name=village1 - equals=0 - [/variable] - - [then] - [set_variable] - name=village1 - value=3 - [/set_variable] - [/then] - - [/if] -[/event] - -#Village 2: 51,43 -[event] -name=capture - [filter] - x=51 - y=43 - side=1 - [/filter] - - [if] - - [variable] - name=village2 - equals=0 - [/variable] - - [then] - [set_variable] - name=village2 - value=1 - [/set_variable] - - {RANDOM 1..10} - - [if] - - [variable] - name=random - less_than_equal_to=6 - [/variable] - - [then] - [message] - speaker=unit - message= _ "Oh good, some elves have survived in this outer settlement. They've agreed to help us search for other survivors." - [/message] - - {UNIT_T (Desert Scout) (Danu) ( _ "Danu") 1 $x1 $y1} - [/then] - - [else] - - [message] - speaker=unit - message= _ "The encampment is empty. I wonder what happened to the inhabitants?" - [/message] - - [/else] - - [/if] - - [/then] - - [else] - [message] - speaker=unit - message= _ "This encampment has been abandoned. There are signs of a struggle and a few bloodstains but nothing else. I fear for those elves who lived out here." - [/message] - [/else] - - [/if] -[/event] - -[event] -name=capture - [filter] - x=51 - y=43 - side=3 - [/filter] - - [if] - [variable] - name=village2 - equals=0 - [/variable] - - [then] - [set_variable] - name=village2 - value=3 - [/set_variable] - [/then] - - [/if] -[/event] - -#Village 3: 26,7 -[event] -name=capture - [filter] - x=26 - y=7 - side=1 - [/filter] - - [if] - [variable] - name=village3 - equals=0 - [/variable] - - [then] - [set_variable] - name=village3 - value=1 - [/set_variable] - - {RANDOM 1..10} - - [if] - - [variable] - name=random - less_than_equal_to=6 - [/variable] - - [then] - - [message] - speaker=unit - message= _ "Oh good, some elves have survived in this outer settlement. They've agreed to help us search for other survivors." - [/message] - - {UNIT_T (Desert Hunter) (Hamm) ( _ "Hamm") 1 $x1 $y1} - - [/then] - - [else] - [message] - speaker=unit - message= _ "The encampment is empty. I wonder what happened to the inhabitants?" - [/message] - [/else] - - [/if] - - [/then] - - [else] - [message] - speaker=unit - message= _ "This encampment has been abandoned. There are signs of a struggle and a few bloodstains but nothing else. I fear for those elves who lived out here." - [/message] - [/else] - - [/if] -[/event] - -[event] -name=capture - [filter] - x=26 - y=7 - side=3 - [/filter] - - [if] - [variable] - name=village3 - equals=0 - [/variable] - - [then] - [set_variable] - name=village3 - value=3 - [/set_variable] - [/then] - [/if] -[/event] - - -#Village 4: 17,10 -[event] -name=capture - [filter] - x=17 - y=10 - side=1 - [/filter] - - [if] - - [variable] - name=village4 - equals=0 - [/variable] - - [then] - [set_variable] - name=village4 - value=1 - [/set_variable] - - {RANDOM 1..10} - - [if] - - [variable] - name=random - less_than_equal_to=6 - [/variable] - - [then] - [message] - speaker=unit - message= _ "Oh good, some elves have survived in this outer settlement. They've agreed to help us search for other survivors." - [/message] - - {UNIT_T (Desert Archer) (Frea) ( _ "Frea") 1 $x1 $y1} - #Hack to make frea female - [+unit] - gender=female - [/unit] - [/then] - - [else] - [message] - speaker=unit - message= _ "The encampment is empty. I wonder what happened to the inhabitants?" - [/message] - [/else] - - [/if] - - [/then] - - [else] - [message] - speaker=unit - message= _ "This encampment has been abandoned. There are signs of a struggle and a few bloodstains but nothing else. I fear for those elves who lived out here." - [/message] - [/else] - [/if] -[/event] - -[event] -name=capture - [filter] - x=17 - y=10 - side=3 - [/filter] - - [if] - [variable] - name=village4 - equals=0 - [/variable] - - [then] - [set_variable] - name=village4 - value=3 - [/set_variable] - - [/then] - - [/if] -[/event] +#enddef +{VILLAGE_EVENT 57 35 "Desert Scout" "Lrea"} +{VILLAGE_EVENT 51 43 "Desert Scout" "Danu"} +{VILLAGE_EVENT 26 7 "Desert Hunter" "Hamm"} +{VILLAGE_EVENT 17 10 "Desert Archer" "Frea"} [event] name=victory @@ -1718,20 +1214,10 @@ name=victory #Clear variables - #Prestart variables - {CLEAR_VARIABLE never_seen_mudcrawler} + {CLEAR_VARIABLE seen_mudcrawler} {CLEAR_VARIABLE mudcrawlers_killed} - {CLEAR_VARIABLE encountered_druids} - {CLEAR_VARIABLE encountered_deep_one} - {CLEAR_VARIABLE encountered_scout} {CLEAR_VARIABLE rescued_elves} - {CLEAR_VARIABLE dark_sorcerer_appeared} - {CLEAR_VARIABLE village1} - {CLEAR_VARIABLE village2} - {CLEAR_VARIABLE village3} - {CLEAR_VARIABLE village4} - [/event] [event] diff --git a/data/campaigns/Under_the_Burning_Suns/scenarios/8_Frying_Pan.cfg b/data/campaigns/Under_the_Burning_Suns/scenarios/8_Frying_Pan.cfg index 933b50b09ba..2d23c300c5c 100644 --- a/data/campaigns/Under_the_Burning_Suns/scenarios/8_Frying_Pan.cfg +++ b/data/campaigns/Under_the_Burning_Suns/scenarios/8_Frying_Pan.cfg @@ -3919,635 +3919,38 @@ first_time_only=no # when you find a hex that is valid, check to see if a unit is already # there, if the hex is empty teleport Kaleh there -# x+0 y+1 - -[set_variable] -name=kaleh_x -value={X_LOC} -[/set_variable] - -[set_variable] -name=kaleh_y -value={Y_LOC} -[/set_variable] +[store_locations] + x={X_LOC} + y={Y_LOC} + radius=1 + [filter] + [not] + [/not] + [/filter] + terrain=Uu, Re, Uu^Vu, Cud, Ke, Uh, Uu^Uf + variable=coords +[/store_locations] [if] - [variable] - name=found_empty_hex - numerical_equals=0 - [/variable] - - [then] - - [set_variable] - name=temp_x - value=$kaleh_x - [/set_variable] - - [set_variable] - name=temp_y - value=$kaleh_y - [/set_variable] - - [set_variable] - name=temp_y - add=1 - [/set_variable] - - [store_locations] - x=$temp_x - y=$temp_y - terrain=Uu, Re, Uu^Vu, Cud, Ke, Uh, Uu^Uf - variable=hex_loc - [/store_locations] - - [set_variable] - name=temp - value=$hex_loc.length - [/set_variable] - - {CLEAR_VARIABLE hex_loc} - - [if] - [variable] - name=temp - numerical_equals=1 - [/variable] - - [then] - - [if] - [have_unit] - x,y=$temp_x,$temp_y + [not] + [have_unit] + x=$coords[0].x + y=$coords[0].y side=1 - [/have_unit] - - [then] - # do nothing - [/then] - - [else] - - [teleport] - [filter] - description=Kaleh - [/filter] - x,y=$temp_x,$temp_y - [/teleport] - - [/else] - [/if] - - [/then] - [/if] - - [/then] - -[/if] - - -# x+1 y+0 -[if] - [variable] - name=found_empty_hex - numerical_equals=0 - [/variable] - + [/have_unit] + [/not] [then] - - [set_variable] - name=temp_x - value=$kaleh_x - [/set_variable] - - [set_variable] - name=temp_y - value=$kaleh_y - [/set_variable] - - [set_variable] - name=temp_x - add=1 - [/set_variable] - - [store_locations] - x=$temp_x - y=$temp_y - terrain=Uu, Re, Uu^Vu, Cud, Ke, Uh, Uu^Uf - variable=hex_loc - [/store_locations] - - [set_variable] - name=temp - value=$hex_loc.length - [/set_variable] - - {CLEAR_VARIABLE hex_loc} - - [if] - [variable] - name=temp - numerical_equals=1 - [/variable] - - [then] - - [if] - [have_unit] - x,y=$temp_x,$temp_y - side=1 - [/have_unit] - - [then] - # do nothing - [/then] - - [else] - - [teleport] + [teleport] [filter] - description=Kaleh + description=Kaleh [/filter] - x,y=$temp_x,$temp_y - [/teleport] - - [/else] - [/if] - - [/then] - [/if] - - [/then] -[/if] - -# x+0 y-1 - -[if] - [variable] - name=found_empty_hex - numerical_equals=0 - [/variable] - - [then] - - [set_variable] - name=temp_x - value=$kaleh_x - [/set_variable] - - [set_variable] - name=temp_y - value=$kaleh_y - [/set_variable] - - [set_variable] - name=temp_y - add=-1 - [/set_variable] - - [store_locations] - x=$temp_x - y=$temp_y - terrain=Uu, Re, Uu^Vu, Cud, Ke, Uh, Uu^Uf - variable=hex_loc - [/store_locations] - - [set_variable] - name=temp - value=$hex_loc.length - [/set_variable] - - {CLEAR_VARIABLE hex_loc} - - [if] - [variable] - name=temp - numerical_equals=1 - [/variable] - - [then] - - [if] - [have_unit] - x,y=$temp_x,$temp_y - side=1 - [/have_unit] - - [then] - # do nothing - [/then] - - [else] - - [teleport] - [filter] - description=Kaleh - [/filter] - x,y=$temp_x,$temp_y - [/teleport] - - [/else] - [/if] - - [/then] - [/if] - - [/then] -[/if] - -# x-1 y+0 - -[if] - [variable] - name=found_empty_hex - numerical_equals=0 - [/variable] - - [then] - - [set_variable] - name=temp_x - value=$kaleh_x - [/set_variable] - - [set_variable] - name=temp_y - value=$kaleh_y - [/set_variable] - - [set_variable] - name=temp_x - add=-1 - [/set_variable] - - [store_locations] - x=$temp_x - y=$temp_y - terrain=Uu, Re, Uu^Vu, Cud, Ke, Uh, Uu^Uf - variable=hex_loc - [/store_locations] - - [set_variable] - name=temp - value=$hex_loc.length - [/set_variable] - - {CLEAR_VARIABLE hex_loc} - - [if] - [variable] - name=temp - numerical_equals=1 - [/variable] - - [then] - - [if] - [have_unit] - x,y=$temp_x,$temp_y - side=1 - [/have_unit] - - [then] - # do nothing - [/then] - - [else] - - [teleport] - [filter] - description=Kaleh - [/filter] - x,y=$temp_x,$temp_y - [/teleport] - - [/else] - [/if] - - [/then] - [/if] - - [/then] -[/if] - -# x+1 y+1 - -[if] - [variable] - name=found_empty_hex - numerical_equals=0 - [/variable] - - [then] - - [set_variable] - name=temp_x - value=$kaleh_x - [/set_variable] - - [set_variable] - name=temp_y - value=$kaleh_y - [/set_variable] - - [set_variable] - name=temp_x - add=1 - [/set_variable] - - [set_variable] - name=temp_y - add=1 - [/set_variable] - - [store_locations] - x=$temp_x - y=$temp_y - terrain=Uu, Re, Uu^Vu, Cud, Ke, Uh, Uu^Uf - variable=hex_loc - [/store_locations] - - [set_variable] - name=temp - value=$hex_loc.length - [/set_variable] - - {CLEAR_VARIABLE hex_loc} - - [if] - [variable] - name=temp - numerical_equals=1 - [/variable] - - [then] - - [if] - [have_unit] - x,y=$temp_x,$temp_y - side=1 - [/have_unit] - - [then] - # do nothing - [/then] - - [else] - - [teleport] - [filter] - description=Kaleh - [/filter] - x,y=$temp_x,$temp_y - [/teleport] - - [/else] - [/if] - - [/then] - [/if] - - [/then] -[/if] - -# x+1 y-1 - -[if] - [variable] - name=found_empty_hex - numerical_equals=0 - [/variable] - - [then] - - [set_variable] - name=temp_x - value=$kaleh_x - [/set_variable] - - [set_variable] - name=temp_y - value=$kaleh_y - [/set_variable] - - [set_variable] - name=temp_x - add=1 - [/set_variable] - - [set_variable] - name=temp_y - add=-1 - [/set_variable] - - [store_locations] - x=$temp_x - y=$temp_y - terrain=Uu, Re, Uu^Vu, Cud, Ke, Uh, Uu^Uf - variable=hex_loc - [/store_locations] - - [set_variable] - name=temp - value=$hex_loc.length - [/set_variable] - - {CLEAR_VARIABLE hex_loc} - - [if] - [variable] - name=temp - numerical_equals=1 - [/variable] - - [then] - - [if] - [have_unit] - x,y=$temp_x,$temp_y - side=1 - [/have_unit] - - [then] - # do nothing - [/then] - - [else] - - [teleport] - [filter] - description=Kaleh - [/filter] - x,y=$temp_x,$temp_y - [/teleport] - - [/else] - [/if] - - [/then] - [/if] - - [/then] -[/if] - -# x-1 y+1 - -[if] - [variable] - name=found_empty_hex - numerical_equals=0 - [/variable] - - [then] - - [set_variable] - name=temp_x - value=$kaleh_x - [/set_variable] - - [set_variable] - name=temp_y - value=$kaleh_y - [/set_variable] - - [set_variable] - name=temp_x - add=-1 - [/set_variable] - - [set_variable] - name=temp_y - add=1 - [/set_variable] - - [store_locations] - x=$temp_x - y=$temp_y - terrain=Uu, Re, Uu^Vu, Cud, Ke, Uh, Uu^Uf - variable=hex_loc - [/store_locations] - - [set_variable] - name=temp - value=$hex_loc.length - [/set_variable] - - {CLEAR_VARIABLE hex_loc} - - [if] - [variable] - name=temp - numerical_equals=1 - [/variable] - - [then] - - [if] - [have_unit] - x,y=$temp_x,$temp_y - side=1 - [/have_unit] - - [then] - # do nothing - [/then] - - [else] - - [teleport] - [filter] - description=Kaleh - [/filter] - x,y=$temp_x,$temp_y - [/teleport] - - [/else] - [/if] - - [/then] - [/if] - - [/then] -[/if] - -# x-1 y-1 - -[if] - [variable] - name=found_empty_hex - numerical_equals=0 - [/variable] - - [then] - - [set_variable] - name=temp_x - value=$kaleh_x - [/set_variable] - - [set_variable] - name=temp_y - value=$kaleh_y - [/set_variable] - - [set_variable] - name=temp_x - add=-1 - [/set_variable] - - [set_variable] - name=temp_y - add=-1 - [/set_variable] - - [store_locations] - x=$temp_x - y=$temp_y - terrain=Uu, Re, Uu^Vu, Cud, Ke, Uh, Uu^Uf - variable=hex_loc - [/store_locations] - - [set_variable] - name=temp - value=$hex_loc.length - [/set_variable] - - {CLEAR_VARIABLE hex_loc} - - [if] - [variable] - name=temp - numerical_equals=1 - [/variable] - - [then] - - [if] - [have_unit] - x,y=$temp_x,$temp_y - side=1 - [/have_unit] - - [then] - # do nothing - [/then] - - [else] - - [teleport] - [filter] - description=Kaleh - [/filter] - x,y=$temp_x,$temp_y - [/teleport] - - [/else] - [/if] - - [/then] - [/if] - + x=$coords[0].x + y=$coords[0].y + [/teleport] [/then] + [else] + [/else] + [/if] #enddef diff --git a/data/campaigns/Under_the_Burning_Suns/units/Naga_Hunter.cfg b/data/campaigns/Under_the_Burning_Suns/units/Naga_Hunter.cfg index d662b6ff645..f0c8674b495 100644 --- a/data/campaigns/Under_the_Burning_Suns/units/Naga_Hunter.cfg +++ b/data/campaigns/Under_the_Burning_Suns/units/Naga_Hunter.cfg @@ -86,7 +86,6 @@ image="naga-hunter-ranged-2.png" sound=bow-miss.ogg [/frame] - [/if] [/else] [frame] begin=-300 diff --git a/data/campaigns/Under_the_Burning_Suns/utils/macros.cfg b/data/campaigns/Under_the_Burning_Suns/utils/macros.cfg index 6443bfa11d6..b927bc761ac 100644 --- a/data/campaigns/Under_the_Burning_Suns/utils/macros.cfg +++ b/data/campaigns/Under_the_Burning_Suns/utils/macros.cfg @@ -1,5 +1,13 @@ # The file contains useful macros I use within the campaign +#***Macro that will unclutter scenarios somewhat*** +#define ADD VAR AMOUNT +[set_variable] + name={VAR} + add={AMOUNT} +[/set_variable] +#enddef + #create a loop that runs X times #define LOOP VAR [set_variable]