From 9f1fa791df90a659bf259602a121c43bfa22d77c Mon Sep 17 00:00:00 2001 From: DisherProject Date: Thu, 11 Apr 2019 21:05:35 +0200 Subject: [PATCH] UtBS: Update objectives automatically via [show_if] --- .../scenarios/01_The_Morning_After.cfg | 60 +---- .../scenarios/02_Across_the_Harsh_Sands.cfg | 47 +--- .../scenarios/03_Stirring_in_the_Night.cfg | 206 +++++------------- .../scenarios/05_A_Subterranean_Struggle.cfg | 175 ++++++--------- .../scenarios/08_Out_of_the_Frying_Pan.cfg | 166 +++++--------- .../09_Blood_is_Thicker_Than_Water.cfg | 85 +++----- .../11_Battle_for_Zocthanol_Isle.cfg | 114 ++++------ .../scenarios/12_The_Final_Confrontation.cfg | 30 +-- .../Under_the_Burning_Suns/utils/deaths.cfg | 2 +- 9 files changed, 294 insertions(+), 591 deletions(-) diff --git a/data/campaigns/Under_the_Burning_Suns/scenarios/01_The_Morning_After.cfg b/data/campaigns/Under_the_Burning_Suns/scenarios/01_The_Morning_After.cfg index 59d2b11e435a..a95fb75cf223 100644 --- a/data/campaigns/Under_the_Burning_Suns/scenarios/01_The_Morning_After.cfg +++ b/data/campaigns/Under_the_Burning_Suns/scenarios/01_The_Morning_After.cfg @@ -118,11 +118,19 @@ # Can't end scenario until all elves have been rescued (5 events) [objectives] - summary= _ "Starting Objectives:" [objective] description= _ "Rescue surviving elves" condition=win [/objective] + [objective] + description= _ "Defeat Xanthos" + condition=win + [show_if] + [have_unit] + id=Xanthos + [/have_unit] + [/show_if] + [/objective] [objective] description= _ "Death of Kaleh" condition=lose @@ -1126,54 +1134,8 @@ y=1-5 [/place_shroud] - [objectives] - summary= _ "New Objectives:" - silent=no - [objective] - description= _ "Rescue surviving elves" - condition=win - [/objective] - [objective] - description= _ "Defeat Xanthos" - condition=win - [/objective] - [objective] - description= _ "Death of Kaleh" - condition=lose - [/objective] - [objective] - description= _ "Death of Nym" - condition=lose - [/objective] - [objective] - description= _ "Death of Garak" - condition=lose - [show_if] - # We could just use [have_unit], but if Garak or Zhul dies and the player - # checks the objectives, the respective objective won't be displayed, - # and disappearing objectives for no good reason would look buggy. - [variable] - name=found_garak - boolean_equals=yes - [/variable] - [/show_if] - [/objective] - [objective] - description= _ "Death of Zhul" - condition=lose - [show_if] - [variable] - name=found_zhul - boolean_equals=yes - [/variable] - [/show_if] - [/objective] - - [gold_carryover] - bonus=yes - carryover_percentage=40 - [/gold_carryover] - [/objectives] + [show_objectives] + [/show_objectives] [/event] # This event prevents player from running to the dark sorcerer's base diff --git a/data/campaigns/Under_the_Burning_Suns/scenarios/02_Across_the_Harsh_Sands.cfg b/data/campaigns/Under_the_Burning_Suns/scenarios/02_Across_the_Harsh_Sands.cfg index a6e8aba7ab74..a97be8d04b06 100644 --- a/data/campaigns/Under_the_Burning_Suns/scenarios/02_Across_the_Harsh_Sands.cfg +++ b/data/campaigns/Under_the_Burning_Suns/scenarios/02_Across_the_Harsh_Sands.cfg @@ -195,11 +195,19 @@ # Set starting scenario objectives [objectives] - summary= _ "Starting Objectives:" [objective] description= _ "Kaleh must reach the northern edge of the desert" condition=win [/objective] + [objective] + description= _ "Defeat outlaw leader" + condition=win + [show_if] + [have_unit] + id=Thorn + [/have_unit] + [/show_if] + [/objective] [objective] description= _ "Death of Kaleh" condition=lose @@ -1354,40 +1362,6 @@ [/message] {CLEAR_VARIABLE explorer} - [objectives] - summary= _ "New Objectives:" - silent=no - [objective] - description= _ "Kaleh must reach the northern edge of the desert" - condition=win - [/objective] - [objective] - description= _ "Defeat outlaw leader" - condition=win - [/objective] - [objective] - description= _ "Death of Kaleh" - condition=lose - [/objective] - [objective] - description= _ "Death of Nym" - condition=lose - [/objective] - [objective] - description= _ "Death of Garak" - condition=lose - [/objective] - [objective] - description= _ "Death of Zhul" - condition=lose - [/objective] - - [gold_carryover] - bonus=yes - carryover_percentage=40 - [/gold_carryover] - [/objectives] - [unit] side=2 id=Thorn @@ -1408,6 +1382,9 @@ {INCOME 9 11 13} {GOLD 100 125 150} [/modify_side] + + [show_objectives] + [/show_objectives] [/event] #Encounter 7 Mirage diff --git a/data/campaigns/Under_the_Burning_Suns/scenarios/03_Stirring_in_the_Night.cfg b/data/campaigns/Under_the_Burning_Suns/scenarios/03_Stirring_in_the_Night.cfg index 672ff09e0f17..473724ad2728 100644 --- a/data/campaigns/Under_the_Burning_Suns/scenarios/03_Stirring_in_the_Night.cfg +++ b/data/campaigns/Under_the_Burning_Suns/scenarios/03_Stirring_in_the_Night.cfg @@ -182,41 +182,6 @@ {STARTING_VILLAGES 1 30} -#define VILLAGE_CONTROL_OBJECTIVE - [objective] - description= _ "You lose control (even temporarily) of more than 6 villages" - condition=lose - [/objective] -#enddef -#define DEFEAT_AZKOTEP_OBJECTIVE - [objective] - description= _ "Defeat Azkotep" - condition=win - [/objective] -#enddef -#define DEFEAT_YSTARA_OBJECTIVE - [objective] - description= _ "Defeat Ystara" - condition=win - [/objective] -#enddef -#define HERO_DEATH_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] -#enddef - #! -- setting up objectives,variables and map objects #! -- sets variables : $sneak_up, $defiant_death, #! -- $casualties_count @@ -225,18 +190,64 @@ # set starting scenario objectives [objectives] - summary= _ "Starting Objectives:" [objective] description= _ "Survive until dawn" condition=win show_turn_counter=yes + [show_if] + {VARIABLE_CONDITIONAL turn_number less_than 12} + [/show_if] [/objective] [objective] {ALTERNATIVE_OBJECTIVE_CAPTION} description= _ "Defeat all undead leaders" condition=win + [show_if] + {VARIABLE_CONDITIONAL turn_number less_than 12} + [/show_if] + [/objective] + [objective] + description= _ "Defeat all undead leaders" + condition=win + [show_if] + {VARIABLE_CONDITIONAL defiant_death boolean_equals yes} + [/show_if] + [/objective] + [objective] + description= _ "Defeat Possessed Garak" + condition=win + [show_if] + [have_unit] + id=Possessed Garak + [/have_unit] + [/show_if] + [/objective] + [objective] + {ALTERNATIVE_OBJECTIVE_CAPTION} + description= _ "Defeat Azkotep" + condition=win + [show_if] + [have_unit] + id=Possessed Garak + [/have_unit] + [have_unit] + id=Azkotep + [/have_unit] + [/show_if] + [/objective] + [objective] + {ALTERNATIVE_OBJECTIVE_CAPTION} + description= _ "Defeat Ystara" + condition=win + [show_if] + [have_unit] + id=Possessed Garak + [/have_unit] + [have_unit] + id=Ystara + [/have_unit] + [/show_if] [/objective] - {VILLAGE_CONTROL_OBJECTIVE} [objective] description= _ "Death of Kaleh" condition=lose @@ -248,11 +259,18 @@ [objective] description= _ "Death of Garak" condition=lose + [show_if] + {VARIABLE_CONDITIONAL turn_number less_than 12} + [/show_if] [/objective] [objective] description= _ "Death of Zhul" condition=lose [/objective] + [objective] + description= _ "You lose control (even temporarily) of more than 6 villages" + condition=lose + [/objective] [gold_carryover] bonus=yes @@ -1266,18 +1284,6 @@ [/set_variables] {VARIABLE event_to_fire "lich_lord_fails_possession"} - - [objectives] - summary= _ "New Objectives:" - silent=no - {DEFEAT_AZKOTEP_OBJECTIVE} - {VILLAGE_CONTROL_OBJECTIVE} - {HERO_DEATH_OBJECTIVE} - - [gold_carryover] - carryover_percentage=40 - [/gold_carryover] - [/objectives] [/then] [/if] [if] @@ -1297,25 +1303,6 @@ [/set_variables] {VARIABLE event_to_fire "lich_lord_possesses_garak"} - - [objectives] - summary= _ "New Objectives:" - silent=no - [objective] - description=_"Defeat Possessed Garak" - condition=win - [/objective] - {DEFEAT_YSTARA_OBJECTIVE} - [+objective] - {ALTERNATIVE_OBJECTIVE_CAPTION} - [/objective] - {VILLAGE_CONTROL_OBJECTIVE} - {HERO_DEATH_OBJECTIVE} - - [gold_carryover] - carryover_percentage=40 - [/gold_carryover] - [/objectives] [/then] [/if] [if] @@ -1334,25 +1321,6 @@ [/set_variables] {VARIABLE event_to_fire "lich_lord_possesses_garak"} - - [objectives] - summary= _ "New Objectives:" - silent=no - [objective] - description=_"Defeat Possessed Garak" - condition=win - [/objective] - {DEFEAT_AZKOTEP_OBJECTIVE} - [+objective] - {ALTERNATIVE_OBJECTIVE_CAPTION} - [/objective] - {VILLAGE_CONTROL_OBJECTIVE} - {HERO_DEATH_OBJECTIVE} - - [gold_carryover] - carryover_percentage=40 - [/gold_carryover] - [/objectives] [/then] [/if] [if] @@ -1371,18 +1339,6 @@ [/set_variables] {VARIABLE event_to_fire "lich_lord_fails_possession"} - - [objectives] - summary= _ "New Objectives:" - silent=no - {DEFEAT_AZKOTEP_OBJECTIVE} - {VILLAGE_CONTROL_OBJECTIVE} - {HERO_DEATH_OBJECTIVE} - - [gold_carryover] - carryover_percentage=40 - [/gold_carryover] - [/objectives] [/then] [/if] [if] @@ -1401,25 +1357,6 @@ [/set_variables] {VARIABLE event_to_fire "lich_lord_resuscitates_inside_garak"} - - [objectives] - summary= _ "New Objectives:" - silent=no - [objective] - description=_"Defeat Possessed Garak" - condition=win - [/objective] - {DEFEAT_AZKOTEP_OBJECTIVE} - [+objective] - {ALTERNATIVE_OBJECTIVE_CAPTION} - [/objective] - {VILLAGE_CONTROL_OBJECTIVE} - {HERO_DEATH_OBJECTIVE} - - [gold_carryover] - carryover_percentage=40 - [/gold_carryover] - [/objectives] [/then] [/if] [if] @@ -1438,18 +1375,6 @@ [/set_variables] {VARIABLE event_to_fire "lich_lord_fails_possession"} - - [objectives] - summary= _ "New Objectives:" - silent=no - {DEFEAT_YSTARA_OBJECTIVE} - {VILLAGE_CONTROL_OBJECTIVE} - {HERO_DEATH_OBJECTIVE} - - [gold_carryover] - carryover_percentage=40 - [/gold_carryover] - [/objectives] [/then] [/if] [if] @@ -1468,25 +1393,6 @@ [/set_variables] {VARIABLE event_to_fire "lich_lord_resuscitates_inside_garak"} - - [objectives] - summary= _ "New Objectives:" - silent=no - [objective] - description=_"Defeat Possessed Garak" - condition=win - [/objective] - {DEFEAT_YSTARA_OBJECTIVE} - [+objective] - {ALTERNATIVE_OBJECTIVE_CAPTION} - [/objective] - {VILLAGE_CONTROL_OBJECTIVE} - {HERO_DEATH_OBJECTIVE} - - [gold_carryover] - carryover_percentage=40 - [/gold_carryover] - [/objectives] [/then] [/if] @@ -1527,6 +1433,8 @@ [modify_turns] value=-1 [/modify_turns] + [show_objectives] + [/show_objectives] {CLEAR_VARIABLE event_to_fire,undead_casualties,casualties_count,lich_lord,other_lord} [/event] diff --git a/data/campaigns/Under_the_Burning_Suns/scenarios/05_A_Subterranean_Struggle.cfg b/data/campaigns/Under_the_Burning_Suns/scenarios/05_A_Subterranean_Struggle.cfg index c9cc70b2c45b..2b8256b0c6c4 100644 --- a/data/campaigns/Under_the_Burning_Suns/scenarios/05_A_Subterranean_Struggle.cfg +++ b/data/campaigns/Under_the_Burning_Suns/scenarios/05_A_Subterranean_Struggle.cfg @@ -305,14 +305,46 @@ #set starting scenario objectives [objectives] - summary= _ "Starting Objectives:" [objective] description= _ "Explore underground" condition=win + [show_if] + [have_unit] + race=troll,dwarf + count=0 + [/have_unit] + [/show_if] [/objective] [objective] - description= _ "Defeat enemy leaders" + description= _ "Defeat troll leaders" condition=win + [show_if] + {VARIABLE_CONDITIONAL ally_race equals "dwarf"} + [have_unit] + canrecruit=yes + race=troll + [/have_unit] + [/show_if] + [/objective] + [objective] + description= _ "Defeat dwarf leaders" + condition=win + [show_if] + {VARIABLE_CONDITIONAL ally_race equals "troll"} + [have_unit] + canrecruit=yes + race=dwarf + [/have_unit] + [/show_if] + [/objective] + [objective] + description= _ "Defeat the Cloaked Figure" + condition=win + [show_if] + [have_unit] + id=Cloaked Figure + [/have_unit] + [/show_if] [/objective] [objective] description= _ "Death of Kaleh" @@ -326,6 +358,35 @@ description= _ "Death of Zhul" condition=lose [/objective] + [objective] + description= _ "Death of Fundin" + condition=lose + [show_if] + {VARIABLE_CONDITIONAL ally_race equals "dwarf"} + [/show_if] + [/objective] + [objective] + description= _ "Death of Nori" + condition=lose + [show_if] + {VARIABLE_CONDITIONAL ally_race equals "dwarf"} + [/show_if] + [/objective] + [objective] + description= _ "Death of Thungar" + condition=lose + [show_if] + {VARIABLE_CONDITIONAL ally_race equals "troll"} + [/show_if] + [/objective] + [objective] + description= _ "Death of Gnarl" + condition=lose + [show_if] + {VARIABLE_CONDITIONAL ally_race equals "troll"} + [/show_if] + [/objective] + [gold_carryover] bonus=yes @@ -730,34 +791,6 @@ [/message] [/event] -#define CLOAK_KILL_OBJECTIVES - [objectives] - summary= _ "New Objectives:" - silent=no - [objective] - description= _ "Defeat the Cloaked Figure" - 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] - - [gold_carryover] - bonus=yes - carryover_percentage=40 - [/gold_carryover] - [/objectives] -#enddef - # Event 2: Entering the large cavern #player chooses one side (trolls or dwarves) then: @@ -1069,42 +1102,6 @@ speaker=Troll Leader message= _ "Bah! Your kind all the same. Everyone turns on trolls. But you’ll see, Griknagh will smash you all." [/message] - - #set new scenario objectives - - [objectives] - summary= _ "New Objectives:" - silent=no - [objective] - description= _ "Defeat troll leaders" - 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] - [objective] - description= _ "Death of Fundin" - condition=lose - [/objective] - [objective] - description= _ "Death of Nori" - condition=lose - [/objective] - - [gold_carryover] - bonus=yes - carryover_percentage=40 - [/gold_carryover] - [/objectives] [/command] [/option] @@ -1127,41 +1124,6 @@ speaker=Dwarf Leader message= _ "I knew elves couldn’t be trusted. Foolish boy, you will regret your betrayal. Taste dwarven steel!" [/message] - - #set new scenario objectives - [objectives] - summary= _ "New Objectives:" - silent=no - [objective] - description= _ "Defeat dwarf leaders" - 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] - [objective] - description= _ "Death of Thungar" - condition=lose - [/objective] - [objective] - description= _ "Death of Gnarl" - condition=lose - [/objective] - - [gold_carryover] - bonus=yes - carryover_percentage=40 - [/gold_carryover] - [/objectives] [/command] [/option] [/message] @@ -1450,6 +1412,9 @@ side=5 [/capture_village] + [show_objectives] + [/show_objectives] + [fire_event] name=queue_battle_events [/fire_event] @@ -2466,9 +2431,8 @@ message= _ "Wait a moment, Zurg, we must deal with this mysterious cloaked figure before we can follow you." [/message] - #set new scenario objectives - - {CLOAK_KILL_OBJECTIVES} + [show_objectives] + [/show_objectives] [/then] [else] @@ -2563,7 +2527,8 @@ message= _ "Wait a moment, Grimnir, we must deal with this mysterious cloaked figure before we can follow you." [/message] - {CLOAK_KILL_OBJECTIVES} + [show_objectives] + [/show_objectives] [/then] [else] diff --git a/data/campaigns/Under_the_Burning_Suns/scenarios/08_Out_of_the_Frying_Pan.cfg b/data/campaigns/Under_the_Burning_Suns/scenarios/08_Out_of_the_Frying_Pan.cfg index 0b2f92fef3fd..43b608070355 100644 --- a/data/campaigns/Under_the_Burning_Suns/scenarios/08_Out_of_the_Frying_Pan.cfg +++ b/data/campaigns/Under_the_Burning_Suns/scenarios/08_Out_of_the_Frying_Pan.cfg @@ -336,7 +336,7 @@ [set_variable] name=ally_must_live - value=1 + value=yes [/set_variable] [set_variable] @@ -387,10 +387,33 @@ # set starting scenario objectives [objectives] - summary= _ "Starting Objectives:" [objective] description= _ "Escape the caves" condition=win + [show_if] + {VARIABLE_CONDITIONAL ally_must_live boolean_equals yes} + [/show_if] + [/objective] + [objective] + description= _ "Explore outside" + condition=win + [show_if] + [not] + [have_unit] + id=Sergeant Durstrag,Esanoo + [/have_unit] + [/not] + {VARIABLE_CONDITIONAL ally_must_live boolean_equals no} + [/show_if] + [/objective] + [objective] + description= _ "Defeat Sergeant Durstrag" + condition=win + [show_if] + [have_unit] + id=Sergeant Durstrag + [/have_unit] + [/show_if] [/objective] [objective] description= _ "Death of Kaleh" @@ -408,43 +431,49 @@ description= _ "Death of Grog" condition=lose [show_if] - [variable] - name=ally_name - equals=Grog - [/variable] + {VARIABLE_CONDITIONAL ally_name equals "Grog"} + {VARIABLE_CONDITIONAL ally_must_live boolean_equals yes} [/show_if] [/objective] [objective] description= _ "Death of Nog" condition=lose [show_if] - [variable] - name=ally_name - equals=Nog - [/variable] + {VARIABLE_CONDITIONAL ally_name equals "Nog"} + {VARIABLE_CONDITIONAL ally_must_live boolean_equals yes} [/show_if] [/objective] [objective] description= _ "Death of Rogrimir" condition=lose [show_if] - [variable] - name=ally_name - equals=Rogrimir - [/variable] + {VARIABLE_CONDITIONAL ally_name equals "Rogrimir"} + {VARIABLE_CONDITIONAL ally_must_live boolean_equals yes} [/show_if] [/objective] [objective] description= _ "Death of Jarl" condition=lose [show_if] - [variable] - name=ally_name - equals=Jarl - [/variable] + {VARIABLE_CONDITIONAL ally_name equals "Jarl"} + {VARIABLE_CONDITIONAL ally_must_live boolean_equals yes} + [/show_if] + [/objective] + [objective] + description= _ "A human messenger escapes the valley" + condition=lose + [show_if] + {VARIABLE_CONDITIONAL messengers_incoming boolean_equals yes} [/show_if] [/objective] + [note] + description= _ "The messenger is the leader of the special white colored units" + [show_if] + {VARIABLE_CONDITIONAL messengers_incoming boolean_equals yes} + [/show_if] + [/note] + [gold_carryover] bonus=yes carryover_percentage=40 @@ -2681,31 +2710,10 @@ message= _ "Well, Nym’s right, we don’t know what’s out there. So we should set up a perimeter guard around the cave mouth and start discovering what this side of the mountains looks like." [/message] - [objectives] - summary= _ "New Objectives:" - silent=no - [objective] - description= _ "Explore outside" - 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] - - [gold_carryover] - bonus=yes - carryover_percentage=40 - [/gold_carryover] - [/objectives] + {VARIABLE ally_must_live no} + + [show_objectives] + [/show_objectives] [event] name=new turn @@ -2764,11 +2772,6 @@ [event] name=ally_conversation - [set_variable] - name=ally_must_live - value=0 - [/set_variable] - {MESSAGE_DEPEND_ON_ALLY ( [message] @@ -3475,31 +3478,8 @@ side=2 [/capture_village] - [objectives] - summary= _ "New Objectives:" - silent=no - [objective] - description= _ "Defeat Sergeant Durstrag" - 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] - - [gold_carryover] - bonus=yes - carryover_percentage=40 - [/gold_carryover] - [/objectives] + [show_objectives] + [/show_objectives] [event] name=new turn @@ -3576,46 +3556,16 @@ message= _ "Then we’ll just have to make sure that no messenger escapes this valley to summon reinforcements." [/message] - [objectives] - summary= _ "New Objectives:" - silent=no - [objective] - description= _ "Defeat Sergeant Durstrag" - condition=win - [/objective] - [objective] - description= _ "A human messenger escapes the valley" - condition=lose - [/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] - - [gold_carryover] - bonus=yes - carryover_percentage=40 - [/gold_carryover] - - [note] - description= _ "The messenger is the leader of the special white colored units" - [/note] - [/objectives] - #set messenger timer at 2, so first messenger goes in 6,5,4 turns [set_variable] name=messenger_timer value=2 [/set_variable] + {VARIABLE messengers_incoming yes} + + [show_objectives] + [/show_objectives] # schedule events that occur after the humans start fighting [event] @@ -4529,7 +4479,7 @@ {CLEAR_VARIABLE healing_rune1,healing_rune2} - {CLEAR_VARIABLE messenger_timer} + {CLEAR_VARIABLE messenger_timer,messengers_incoming} [/event] # set time for all underground areas to be always night/underground diff --git a/data/campaigns/Under_the_Burning_Suns/scenarios/09_Blood_is_Thicker_Than_Water.cfg b/data/campaigns/Under_the_Burning_Suns/scenarios/09_Blood_is_Thicker_Than_Water.cfg index c61a56456be8..79e04c6fcd55 100644 --- a/data/campaigns/Under_the_Burning_Suns/scenarios/09_Blood_is_Thicker_Than_Water.cfg +++ b/data/campaigns/Under_the_Burning_Suns/scenarios/09_Blood_is_Thicker_Than_Water.cfg @@ -318,10 +318,28 @@ # set starting scenario objectives [objectives] - summary= _ "Starting Objectives:" [objective] description= _ "Rescue at least two merfolk by turn 16" condition=win + [show_if] + {VARIABLE_CONDITIONAL turn_number less_than 16} + [/show_if] + [/objective] + [objective] + description= _ "Defeat Tanstafaal and Eloh" + condition=win + [show_if] + [have_unit] + id=Tanstafaal,Eloh + [/have_unit] + [/show_if] + [/objective] + [objective] + description= _ "Capture all 4 human ships" + condition=win + [show_if] + {VARIABLE_CONDITIONAL capture_ships boolean_equals yes} + [/show_if] [/objective] [objective] description= _ "Three merfolk must survive" @@ -1878,36 +1896,8 @@ message= _ "Then we will make do with those few that we have." [/message] - # change scenario objectives - - [objectives] - summary= _ "New Objectives:" - [objective] - description= _ "Defeat Tanstafaal and Eloh" - condition=win - [/objective] - [objective] - description= _ "Three merfolk must survive" - 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] - - [gold_carryover] - bonus=yes - carryover_percentage=40 - [/gold_carryover] - [/objectives] + [show_objectives] + [/show_objectives] # move tanstafaal to keep @@ -2532,36 +2522,10 @@ message= _ "Though the cost be high, we do what we must. Come let us go capture those boats." [/message] - # change scenario objectives - - [objectives] - summary= _ "New Objectives:" - [objective] - description= _ "Capture all 4 human ships" - condition=win - [/objective] - [objective] - description= _ "Three merfolk must survive" - 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] + {VARIABLE capture_ships yes} - [gold_carryover] - bonus=yes - carryover_percentage=40 - [/gold_carryover] - [/objectives] + [show_objectives] + [/show_objectives] # allow player’s elves to recruit units again [set_recruit] @@ -2795,6 +2759,7 @@ {PLACE_IMAGE "units/transport/galleon.png~RC(magenta>red)~FL()" 9 25} {CLEAR_VARIABLE number_merfolk_caged} {CLEAR_VARIABLE number_merfolk_deaths} + {CLEAR_VARIABLE capture_ships} [/event] {UTBS_INCLUDE utils/deaths.cfg} 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 5f13a7ad28aa..b6a864e851db 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 @@ -367,10 +367,44 @@ # set starting scenario objectives [objectives] - summary= _ "Starting Objectives:" [objective] description= _ "Kaleh must capture a keep" condition=win + [show_if] + {VARIABLE_CONDITIONAL keep_reached boolean_equals no} + [/show_if] + [/objective] + [objective] + description= _ "Reach the black citadel in the center of the island" + condition=win + [show_if] + {VARIABLE_CONDITIONAL keep_reached boolean_equals yes} + {VARIABLE_CONDITIONAL found_door boolean_equals no} + [/show_if] + [/objective] + [objective] + description= _ "Defeat enemy leaders, find both keys" + condition=win + [show_if] + {VARIABLE_CONDITIONAL found_door boolean_equals yes} + [have_unit] + canrecruit=yes + side=2,3 + [/have_unit] + [/show_if] + [/objective] + [objective] + description= _ "Any unit must reach the black citadel" + condition=win + [show_if] + {VARIABLE_CONDITIONAL found_door boolean_equals yes} + [not] + [have_unit] + canrecruit=yes + side=2,3 + [/have_unit] + [/not] + [/show_if] [/objective] [objective] description= _ "Death of Kaleh" @@ -783,29 +817,10 @@ id=jungle_warning [/remove_event] - [objectives] - summary= _ "New Objectives:" - [objective] - description= _ "Reach the black citadel in the center of the island" - 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] + {VARIABLE keep_reached yes} - [gold_carryover] - carryover_percentage=0 - [/gold_carryover] - [/objectives] + [show_objectives] + [/show_objectives] # change the music playing [music] @@ -923,29 +938,8 @@ {VARIABLE found_door yes} - [objectives] - summary= _ "New Objectives:" - [objective] - description= _ "Defeat enemy leaders, find both keys" - 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] - - [gold_carryover] - carryover_percentage=0 - [/gold_carryover] - [/objectives] + [show_objectives] + [/show_objectives] [/else] [/if] [/event] @@ -972,29 +966,8 @@ 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] - - [gold_carryover] - carryover_percentage=0 - [/gold_carryover] - [/objectives] + [show_objectives] + [/show_objectives] [remove_shroud] [filter_side] side=1 @@ -1072,7 +1045,7 @@ [if] [variable] name=found_door - numerical_equals=yes + boolean_equals=yes [/variable] [then] @@ -1468,6 +1441,7 @@ )} {CLEAR_VARIABLE found_door} + {CLEAR_VARIABLE keep_reached} [/event] # create bats at dusk function diff --git a/data/campaigns/Under_the_Burning_Suns/scenarios/12_The_Final_Confrontation.cfg b/data/campaigns/Under_the_Burning_Suns/scenarios/12_The_Final_Confrontation.cfg index 5264bdfc6d21..a3f2f76c86cf 100644 --- a/data/campaigns/Under_the_Burning_Suns/scenarios/12_The_Final_Confrontation.cfg +++ b/data/campaigns/Under_the_Burning_Suns/scenarios/12_The_Final_Confrontation.cfg @@ -253,10 +253,23 @@ # set starting scenario objectives [objectives] - summary= _ "Starting Objectives:" [objective] description= _ "Defeat the false Eloh" condition=win + [show_if] + [have_unit] + id=Eloh + [/have_unit] + [/show_if] + [/objective] + [objective] + description= _ "Defeat Yechnagoth" + condition=win + [show_if] + [have_unit] + id=Yechnagoth + [/have_unit] + [/show_if] [/objective] [objective] description= _ "Death of Kaleh" @@ -905,19 +918,8 @@ message= _ "It must have some sort of weak point. Look at those pulsing spires, I thought they were stone, but they seem to be alive. Maybe if we destroy them it will weaken the creature. No matter what horrors appear, we must keep attacking it. We can’t stop now!" [/message] - [objectives] - summary= _ "New Objectives:" - [objective] - description= _ "Defeat Yechnagoth" - condition=win - [/objective] - [objective] - description= _ "Death of Kaleh" - condition=lose - [/objective] - - {IS_LAST_SCENARIO} - [/objectives] + [show_objectives] + [/show_objectives] # Start spawning minions, increasing the number each turn. {VARIABLE number_minions_to_spawn 1} diff --git a/data/campaigns/Under_the_Burning_Suns/utils/deaths.cfg b/data/campaigns/Under_the_Burning_Suns/utils/deaths.cfg index 0cf498c2dc82..8acd7e7c22f5 100644 --- a/data/campaigns/Under_the_Burning_Suns/utils/deaths.cfg +++ b/data/campaigns/Under_the_Burning_Suns/utils/deaths.cfg @@ -121,7 +121,7 @@ [if] [variable] name=ally_must_live - numerical_equals=1 + boolean_equals=yes [/variable] [then]