From d2a63b9953096fcb6cc04cd29308482606198db1 Mon Sep 17 00:00:00 2001 From: DisherProject Date: Mon, 15 Oct 2018 16:26:18 +0200 Subject: [PATCH] TRoW: use [show_if] inside the [objectives] tag --- .../scenarios/12_A_Final_Spring.cfg | 41 +++--------- .../scenarios/17d_Cursed_Isle.cfg | 67 +++++++------------ 2 files changed, 34 insertions(+), 74 deletions(-) diff --git a/data/campaigns/The_Rise_Of_Wesnoth/scenarios/12_A_Final_Spring.cfg b/data/campaigns/The_Rise_Of_Wesnoth/scenarios/12_A_Final_Spring.cfg index 16a87054346f..15183be3cfeb 100644 --- a/data/campaigns/The_Rise_Of_Wesnoth/scenarios/12_A_Final_Spring.cfg +++ b/data/campaigns/The_Rise_Of_Wesnoth/scenarios/12_A_Final_Spring.cfg @@ -271,6 +271,15 @@ description= _ "Death of King Addroran IX" condition=lose [/objective] + [objective] + description= _ "Death of Lord Typhon" + condition=lose + [show_if] + [have_unit] + id=Lord Typhon + [/have_unit] + [/show_if] + [/objective] {TURNS_RUN_OUT} @@ -402,36 +411,8 @@ side=1 type=Merman Fighter,Merman Hunter [/allow_recruit] - [objectives] - side=1 - [objective] - description= _ "Defeat all enemy leaders" - condition=win - [/objective] - [objective] - description= _ "Death of Prince Haldric" - condition=lose - [/objective] - [objective] - description= _ "Death of Lady Jessene" - condition=lose - [/objective] - [objective] - description= _ "Death of King Addroran IX" - condition=lose - [/objective] - [objective] - description= _ "Death of Lord Typhon" - condition=lose - [/objective] - - {TURNS_RUN_OUT} - - [gold_carryover] - bonus=yes - carryover_percentage=40 - [/gold_carryover] - [/objectives] + [show_objectives] + [/show_objectives] [/event] [event] diff --git a/data/campaigns/The_Rise_Of_Wesnoth/scenarios/17d_Cursed_Isle.cfg b/data/campaigns/The_Rise_Of_Wesnoth/scenarios/17d_Cursed_Isle.cfg index 3248a19f9191..522dfd466779 100644 --- a/data/campaigns/The_Rise_Of_Wesnoth/scenarios/17d_Cursed_Isle.cfg +++ b/data/campaigns/The_Rise_Of_Wesnoth/scenarios/17d_Cursed_Isle.cfg @@ -169,28 +169,8 @@ message= _ "Get her before she ensorcels us all!" image=portraits/haldric-mad.png [/message] - [objectives] - side=1 - [objective] - description= _ "Defeat the Vampire Queen" - condition=win - [/objective] - [objective] - description= _ "Death of Prince Haldric" - condition=lose - [/objective] - [objective] - description= _ "Death of Lady Jessene" - condition=lose - [/objective] - - {TURNS_RUN_OUT} - - [gold_carryover] - bonus=yes - carryover_percentage=40 - [/gold_carryover] - [/objectives] + [show_objectives] + [/show_objectives] [set_variable] name=queen_awake value=1 @@ -305,6 +285,25 @@ [objective] description= _ "Defeat all enemy leaders" condition=win + [show_if] + [not] + [have_unit] + id=Midnight Queen + [/have_unit] + [/not] + [have_unit] + id=Isorfilad,Tinoldor + [/have_unit] + [/show_if] + [/objective] + [objective] + description= _ "Defeat the Vampire Queen" + condition=win + [show_if] + [have_unit] + id=Midnight Queen + [/have_unit] + [/show_if] [/objective] [objective] description= _ "Death of Prince Haldric" @@ -456,28 +455,8 @@ speaker=Lady Jessene message= _ "We still have to defeat that vampire queen!" [/message] - [objectives] - side=1 - [objective] - description= _ "Defeat the Vampire Queen" - condition=win - [/objective] - [objective] - description= _ "Death of Prince Haldric" - condition=lose - [/objective] - [objective] - description= _ "Death of Lady Jessene" - condition=lose - [/objective] - - {TURNS_RUN_OUT} - - [gold_carryover] - bonus=yes - carryover_percentage=40 - [/gold_carryover] - [/objectives] + [show_objectives] + [/show_objectives] [/then] [else] {CLEAR_VARIABLE queen_awake}