TSG S02 Fix bug: No victory if no Minister Hylas

The objective is, first, to find Minister Hylas and, then, later, to kill Urza Nalmath. Handle the (unlikely) case where the player kills Urza Nalmath BEFORE going to the citadel to find Minister Hy
las.
This commit is contained in:
Gregory A Lundberg 2016-08-24 01:15:00 -05:00
parent 97a3aca98b
commit 0356f95b9a

View File

@ -20,6 +20,7 @@
{DEFAULT_SCHEDULE_SECOND_WATCH} {DEFAULT_SCHEDULE_SECOND_WATCH}
victory_when_enemies_defeated=no
{TURNS 40 32 28} {TURNS 40 32 28}
# Scenario Introduction - Not all is right in Westin. # Scenario Introduction - Not all is right in Westin.
@ -193,9 +194,39 @@
[objectives] [objectives]
side=1 side=1
[objective] [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" description= _ "Take the Citadel at Westin by the end of the ninth turn"
condition=win condition=win
[/objective] [/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] [objective]
description= _ "Death of Deoran" description= _ "Death of Deoran"
condition=lose condition=lose
@ -204,6 +235,15 @@
description= _ "Death of Sir Gerrick" description= _ "Death of Sir Gerrick"
condition=lose condition=lose
[/objective] [/objective]
[objective]
[show_if]
[have_unit]
id=Minister Hylas
[/have_unit]
[/show_if]
description= _ "Death of Minister Hylas"
condition=lose
[/objective]
{TURNS_RUN_OUT} {TURNS_RUN_OUT}
@ -241,28 +281,7 @@
speaker=Sir Gerrick speaker=Sir Gerrick
message= _ "Now, Deoran, take your post of command at the Citadel of Westin." message= _ "Now, Deoran, take your post of command at the Citadel of Westin."
[/message] [/message]
[objectives] [show_objectives][/show_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]
[/then] [/then]
[/if] [/if]
[/event] [/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= _ "We will do our best to hold the city — you lead your men across the river and kill the bandit leader!"
[/message] [/message]
[objectives] [if]
side=1 [have_unit]
[objective] id=Urza Nalmath
description= _ "Kill Urza Nalmath, the bandit leader" [/have_unit]
condition=win [then]
[/objective] [show_objectives][/show_objectives]
[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]
{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] # update the [ai] params so that the recruitment_pattern matches the new
bonus=yes # recruits
carryover_percentage=40 [modify_side]
[/gold_carryover] side=2
[/objectives]
[set_recruit] [ai]
side=2 {URZA_NALMATH_AI_PARAMS}
{QUANTITY recruit (Walking Corpse)
(Walking Corpse,Skeleton,Vampire Bat)
(Skeleton,Skeleton Archer,Vampire Bat,Blood Bat)}
[/set_recruit]
# update the [ai] params so that the recruitment_pattern matches the new {QUANTITY recruitment_pattern (fighter)
# recruits (fighter,fighter,scout,fighter)
[modify_side] (fighter,archer,fighter,archer,scout)}
side=2 [/ai]
[/modify_side]
[ai] [gold]
{URZA_NALMATH_AI_PARAMS} side=2
{QUANTITY amount 15 30 60}
{QUANTITY recruitment_pattern (fighter) [/gold]
(fighter,fighter,scout,fighter) [/then]
(fighter,archer,fighter,archer,scout)} [else]
[/ai] [fire_event]
[/modify_side] name=victory dance
[/fire_event]
[gold] [/else]
side=2 [/if]
{QUANTITY amount 15 30 60}
[/gold]
[/event] [/event]
# Deoran is too late. # Deoran is too late.
@ -572,6 +578,21 @@
[/else] [/else]
[/if] [/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] [message]
speaker=Minister Hylas 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." 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."