diff --git a/data/campaigns/The_South_Guard/scenarios/02_Proven_by_the_Sword.cfg b/data/campaigns/The_South_Guard/scenarios/02_Proven_by_the_Sword.cfg index f26b585a217..6fa8bd8c18c 100644 --- a/data/campaigns/The_South_Guard/scenarios/02_Proven_by_the_Sword.cfg +++ b/data/campaigns/The_South_Guard/scenarios/02_Proven_by_the_Sword.cfg @@ -20,6 +20,7 @@ {DEFAULT_SCHEDULE_SECOND_WATCH} + victory_when_enemies_defeated=no {TURNS 40 32 28} # Scenario Introduction - Not all is right in Westin. @@ -193,9 +194,39 @@ [objectives] side=1 [objective] + [show_if] + [variable] + name=citadel_secured + boolean_not_equals=yes + [/variable] + [/show_if] description= _ "Take the Citadel at Westin by the end of the ninth turn" condition=win [/objective] + [objective] + [show_if] + [variable] + name=citadel_secured + boolean_equals=yes + [/variable] + [not] + [have_unit] + id=Minister Hylas + [/have_unit] + [/not] + [/show_if] + description= _ "Bring Deoran to the Citadel of Westin" + condition=win + [/objective] + [objective] + [show_if] + [have_unit] + id=Minister Hylas + [/have_unit] + [/show_if] + description= _ "Kill Urza Nalmath, the bandit leader" + condition=win + [/objective] [objective] description= _ "Death of Deoran" condition=lose @@ -204,6 +235,15 @@ description= _ "Death of Sir Gerrick" condition=lose [/objective] + [objective] + [show_if] + [have_unit] + id=Minister Hylas + [/have_unit] + [/show_if] + description= _ "Death of Minister Hylas" + condition=lose + [/objective] {TURNS_RUN_OUT} @@ -241,28 +281,7 @@ speaker=Sir Gerrick message= _ "Now, Deoran, take your post of command at the Citadel of Westin." [/message] - [objectives] - side=1 - [objective] - description= _ "Bring Deoran to the Citadel of Westin" - condition=win - [/objective] - [objective] - description= _ "Death of Deoran" - condition=lose - [/objective] - [objective] - description= _ "Death of Sir Gerrick" - condition=lose - [/objective] - - {TURNS_RUN_OUT} - - [gold_carryover] - bonus=yes - carryover_percentage=40 - [/gold_carryover] - [/objectives] + [show_objectives][/show_objectives] [/then] [/if] [/event] @@ -328,58 +347,45 @@ message= _ "We will do our best to hold the city — you lead your men across the river and kill the bandit leader!" [/message] - [objectives] - side=1 - [objective] - description= _ "Kill Urza Nalmath, the bandit leader" - condition=win - [/objective] - [objective] - description= _ "Death of Deoran" - condition=lose - [/objective] - [objective] - description= _ "Death of Sir Gerrick" - condition=lose - [/objective] - [objective] - description= _ "Death of Minister Hylas" - condition=lose - [/objective] + [if] + [have_unit] + id=Urza Nalmath + [/have_unit] + [then] + [show_objectives][/show_objectives] - {TURNS_RUN_OUT} + [set_recruit] + side=2 + {QUANTITY recruit (Walking Corpse) + (Walking Corpse,Skeleton,Vampire Bat) + (Skeleton,Skeleton Archer,Vampire Bat,Blood Bat)} + [/set_recruit] - [gold_carryover] - bonus=yes - carryover_percentage=40 - [/gold_carryover] - [/objectives] + # update the [ai] params so that the recruitment_pattern matches the new + # recruits + [modify_side] + side=2 - [set_recruit] - side=2 - {QUANTITY recruit (Walking Corpse) - (Walking Corpse,Skeleton,Vampire Bat) - (Skeleton,Skeleton Archer,Vampire Bat,Blood Bat)} - [/set_recruit] + [ai] + {URZA_NALMATH_AI_PARAMS} - # update the [ai] params so that the recruitment_pattern matches the new - # recruits - [modify_side] - side=2 + {QUANTITY recruitment_pattern (fighter) + (fighter,fighter,scout,fighter) + (fighter,archer,fighter,archer,scout)} + [/ai] + [/modify_side] - [ai] - {URZA_NALMATH_AI_PARAMS} - - {QUANTITY recruitment_pattern (fighter) - (fighter,fighter,scout,fighter) - (fighter,archer,fighter,archer,scout)} - [/ai] - [/modify_side] - - [gold] - side=2 - {QUANTITY amount 15 30 60} - [/gold] + [gold] + side=2 + {QUANTITY amount 15 30 60} + [/gold] + [/then] + [else] + [fire_event] + name=victory dance + [/fire_event] + [/else] + [/if] [/event] # Deoran is too late. @@ -572,6 +578,21 @@ [/else] [/if] + [if] + [have_unit] + id=Minister Hylas + [/have_unit] + [then] + [fire_event] + name=victory dance + [/fire_event] + [/then] + [/if] + [/event] + + [event] + name=victory dance + [message] speaker=Minister Hylas message= _ "Just before the bandit raids began, an ambassador came to Sir Loris from the elves of the Aethenwood west of here. He asked that a knight be sent to discuss a new threat to Wesnoth."