Skip to content

Commit

Permalink
Did S9.3: made more use of [filter_condition]
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Dec 18, 2014
1 parent 20c8dcd commit c93d550
Showing 1 changed file with 148 additions and 129 deletions.
277 changes: 148 additions & 129 deletions data/campaigns/Descent_Into_Darkness/scenarios/09_A_Small_Favor3.cfg
Expand Up @@ -231,6 +231,7 @@
equals=3
[/variable]
[/filter_condition]

[store_unit]
[filter]
id=Darken Volk
Expand Down Expand Up @@ -276,6 +277,7 @@
variable=darken_goto
allow_multiple_turns=yes
[/find_path]

[if]
[variable]
name=darken_goto.step.length
Expand Down Expand Up @@ -305,151 +307,167 @@
id=Malin Keshar
x,y=11,7
[/filter]
[if]
[filter_condition]
[variable]
name=hasBook
equals=none
[/variable]
[then]
{VARIABLE hasBook Malin}
[message]
speaker=Malin Keshar
message=_ "We’ve got the book, but now how do we get out of here?"
[/message]
[message]
speaker=Darken Volk
message=_ "There’s a small tunnel in the cellar to the northeast. It will lead us far enough out of the city that we can escape pursuit."
[/message]
[remove_item]
x,y=11,7
[/remove_item]
[objectives]
side=1
[objective]
condition=win
description=_ "Escape via the tunnel in the northeast cellar"
[/objective]
[objective]
condition=lose
description=_ "Death of Malin Keshar"
[/objective]
[objective]
condition=lose
description=_ "Death of Darken Volk"
[/objective]

{TURNS_RUN_OUT}
[/objectives]
[event]
name=moveto
[filter]
id=Malin Keshar
x,y=30-31,1
[/filter]
[message]
speaker=Malin Keshar
message=_ "Phew! Let’s get out of here."
[/message]
[endlevel]
result=victory
bonus=no
{NEW_GOLD_CARRYOVER 100}
carryover_report=no
[/endlevel]
[/event]
[/then]
[/if]
[/filter_condition]

{VARIABLE hasBook Malin}

[message]
speaker=Malin Keshar
message=_ "We’ve got the book, but now how do we get out of here?"
[/message]

[message]
speaker=Darken Volk
message=_ "There’s a small tunnel in the cellar to the northeast. It will lead us far enough out of the city that we can escape pursuit."
[/message]

[remove_item]
x,y=11,7
[/remove_item]

[objectives]
side=1
[objective]
condition=win
description=_ "Escape via the tunnel in the northeast cellar"
[/objective]
[objective]
condition=lose
description=_ "Death of Malin Keshar"
[/objective]
[objective]
condition=lose
description=_ "Death of Darken Volk"
[/objective]

{TURNS_RUN_OUT}
[/objectives]

[event]
name=moveto
[filter]
id=Malin Keshar
x,y=30-31,1
[/filter]
[message]
speaker=Malin Keshar
message=_ "Phew! Let’s get out of here."
[/message]
[endlevel]
result=victory
bonus=no
{NEW_GOLD_CARRYOVER 100}
carryover_report=no
[/endlevel]
[/event]
[/event]

[event]
# DV gets the book
name=moveto
[filter]
id=Darken Volk
x,y=11,7
[/filter]
[if]
[filter_condition]
[variable]
name=hasBook
equals=none
[/variable]
[then]
{VARIABLE hasBook Darken}
[remove_item]
x,y=11,7
[/remove_item]
[objectives]
side=1
[objective]
condition=win
description=_ "Escape the manor"
[/objective]
[objective]
condition=lose
description=_ "Death of Malin Keshar"
[/objective]
[objective]
condition=lose
description=_ "Death of Darken Volk"
[/objective]

{TURNS_RUN_OUT}
[/objectives]
[event]
name=moveto
[filter]
id=Darken Volk
side=3
[/filter]
[message]
speaker=Malin Keshar
message=_ "We’ve got the book, but now how do we get out of here?"
[/message]
[scroll_to_unit]
id=Darken Volk
[/scroll_to_unit]
[message]
speaker=Malin Keshar
message=_ "Wait, you aren’t leaving me behind, are you?"
[/message]
[/event]
[event]
name=moveto
[filter]
id=Darken Volk
x,y=30-31,1
[/filter]
[message]
speaker=Darken Volk
message=_ "You have served me well, my apprentice."
[/message]
[message]
speaker=narrator
message=_ "As he heads into the tunnel Darken Volk collapses its entrance, leaving Malin to be captured and executed by the city guards."
image=wesnoth-icon.png
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]
[event]
name=moveto
[filter]
id=Malin Keshar
x,y=30-31,1
[/filter]
[message]
speaker=Malin Keshar
message=_ "Phew! Let’s get out of here."
[/message]
[endlevel]
result=victory
bonus=no
{NEW_GOLD_CARRYOVER 100}
carryover_report=no
[/endlevel]
[/event]
[/then]
[/if]
[/filter_condition]

{VARIABLE hasBook Darken}

[remove_item]
x,y=11,7
[/remove_item]

[objectives]
side=1
[objective]
condition=win
description=_ "Escape the manor"
[/objective]
[objective]
condition=lose
description=_ "Death of Malin Keshar"
[/objective]
[objective]
condition=lose
description=_ "Death of Darken Volk"
[/objective]

{TURNS_RUN_OUT}
[/objectives]

[event]
name=moveto
[filter]
id=Darken Volk
side=3
[/filter]
[message]
speaker=Malin Keshar
message=_ "We’ve got the book, but now how do we get out of here?"
[/message]

[scroll_to_unit]
id=Darken Volk
[/scroll_to_unit]

[message]
speaker=Malin Keshar
message=_ "Wait, you aren’t leaving me behind, are you?"
[/message]
[/event]

[event]
name=moveto
[filter]
id=Darken Volk
x,y=30-31,1
[/filter]

[message]
speaker=Darken Volk
message=_ "You have served me well, my apprentice."
[/message]

[message]
speaker=narrator
message=_ "As he heads into the tunnel Darken Volk collapses its entrance, leaving Malin to be captured and executed by the city guards."
image=wesnoth-icon.png
[/message]

[endlevel]
result=defeat
[/endlevel]
[/event]

[event]
name=moveto
[filter]
id=Malin Keshar
x,y=30-31,1
[/filter]

[message]
speaker=Malin Keshar
message=_ "Phew! Let’s get out of here."
[/message]

[endlevel]
result=victory
bonus=no
{NEW_GOLD_CARRYOVER 100}
carryover_report=no
[/endlevel]
[/event]
[/event]

# Defeat Conditions
Expand All @@ -463,6 +481,7 @@
message=_ "As dawn breaks, the city guards force their way into the manor and capture the two necromancers."
image=wesnoth-icon.png
[/message]

[endlevel]
result=defeat
[/endlevel]
Expand Down

0 comments on commit c93d550

Please sign in to comment.