Skip to content

Commit

Permalink
THoT S9: Implement a victory condition closer to the one described in…
Browse files Browse the repository at this point in the history
… the objectives.

The previous condition was, "Win as soon as Aiglondur and Angarthing
have each touched the signpost".  The new condition is, "Win as soon
as Aiglondur is on the signpost and Angarthing is next to him, or the
other way around".

[ci skip]

(cherry-picked from commit d2c8c1a)
  • Loading branch information
jostephd authored and sevu committed Oct 7, 2018
1 parent aa0f5d2 commit a0c70a9
Showing 1 changed file with 56 additions and 42 deletions.
Expand Up @@ -254,35 +254,18 @@
[/move_unit_fake]
[/event]

# Angarthing and Aiglondur speak when they reach the signpost.
[event]
name=moveto
first_time_only=yes
[filter]
id=Aiglondur
x,y=40,17
[/filter]

[message]
speaker=Aiglondur
message= _ "Rally on me, everyone. We have better things to do than brawl with elves."
[/message]

[if]
[variable]
name=angarthing_passed
equals=yes
[/variable]
[then]
[endlevel]
result=victory
bonus=yes
{NEW_GOLD_CARRYOVER 40}
[/endlevel]
[/then]
[else]
{VARIABLE aiglondur_passed yes}
[/else]
[/if]
[fire_event]
name=Aiglondur message
[/fire_event]
[allow_undo][/allow_undo]
[/event]

[event]
Expand All @@ -292,34 +275,65 @@
id=Angarthing
x,y=40,17
[/filter]
[fire_event]
name=Angarthing message
[/fire_event]
[allow_undo][/allow_undo]
[/event]

[event]
name=Aiglondur message
first_time_only=yes
[message]
speaker=Aiglondur
message= _ "Rally on me, everyone. We have better things to do than brawl with elves."
[/message]
[/event]

[event]
name=Angarthing message
first_time_only=yes
[message]
speaker=Angarthing
message= _ "Kal Kartha should be only another day’s march east of here."
[/message]

[if]
[variable]
name=aiglondur_passed
equals=yes
[/variable]
[then]
[endlevel]
result=victory
bonus=yes
{NEW_GOLD_CARRYOVER 40}
[/endlevel]
[/then]
[else]
{VARIABLE angarthing_passed yes}
[/else]
[/if]
[/event]

[event]
name=scenario_end

{CLEAR_VARIABLE aiglondur_passed,angarthing_passed}
name=moveto
first_time_only=no
[filter_condition]
[have_unit]
id=Aiglondur
x,y=40,17
[filter_adjacent]
id=Angarthing
[/filter_adjacent]
[/have_unit]
[or]
[have_unit]
id=Angarthing
x,y=40,17
[filter_adjacent]
id=Aiglondur
[/filter_adjacent]
[/have_unit]
[/or]
[/filter_condition]

# If Aiglondor is on the signpost and Angarthing next to him, or the other way around,
# the player has won. Fire Aiglondur's and Angarthing's messages if they haven't fired yet.
[fire_event]
name=Aiglondur message
[/fire_event]
[fire_event]
name=Angarthing message
[/fire_event]
[endlevel]
result=victory
bonus=yes
{NEW_GOLD_CARRYOVER 40}
[/endlevel]
[/event]

{HERODEATH_AIGLONDUR}
Expand Down

0 comments on commit a0c70a9

Please sign in to comment.