Skip to content

Commit

Permalink
SoF: add [show_if] to the objectives
Browse files Browse the repository at this point in the history
  • Loading branch information
DisherProject authored and sevu committed Sep 14, 2018
1 parent 67f4971 commit 648035f
Show file tree
Hide file tree
Showing 6 changed files with 196 additions and 291 deletions.
16 changes: 11 additions & 5 deletions data/campaigns/Sceptre_of_Fire/scenarios/1_A_Bargain_is_Struck.cfg
Expand Up @@ -127,6 +127,11 @@

# TODO: manually add snow detritus

[set_variable]
name=incominggold
value=5000
[/set_variable]

[objectives]
side=1
[objective]
Expand All @@ -136,10 +141,16 @@
description= _ "Transport 4 caravans full of silver back to the dwarvish castle"
#endif
condition=win
[show_if]
{VARIABLE_CONDITIONAL incominggold greater_than 0}
[/show_if]
[/objective]
[objective]
description= _ "Bring Alanin, who has the Ruby of Fire, to the dwarvish castle"
condition=win
[show_if]
{VARIABLE_CONDITIONAL havestone boolean_not_equals yes}
[/show_if]
[/objective]
{ALTERNATIVE_OBJECTIVE_BONUS ( _ "Defeat Glildur")}
[objective]
Expand Down Expand Up @@ -414,11 +425,6 @@
speaker=Rugnur
message= _ "Very well. Glildur, if the high elvish council has made an alliance with the men, I would advise you to follow it, but not doing so is your choice."
[/message]

[set_variable]
name=incominggold
value=5000
[/set_variable]
[/event]

# This helps prevent Haldric from getting himself killed by preventing him
Expand Down
38 changes: 16 additions & 22 deletions data/campaigns/Sceptre_of_Fire/scenarios/2_Closing_the_Gates.cfg
Expand Up @@ -70,10 +70,23 @@
[objective]
description= _ "Place someone on each of the six magic glyphs in order to close the dwarvish gates"
condition=win
[show_if]
{VARIABLE_CONDITIONAL gate_closed boolean_not_equals yes}
[/show_if]
[/objective]
[objective]
description= _ "Kill all elves in the caves after the gates are closed"
condition=win
[show_if]
{VARIABLE_CONDITIONAL gate_closed boolean_not_equals yes}
[/show_if]
[/objective]
[objective]
description= _ "Kill all elves in the caves"
condition=win
[show_if]
{VARIABLE_CONDITIONAL gate_closed boolean_equals yes}
[/show_if]
[/objective]
[objective]
description= _ "Death of Rugnur"
Expand Down Expand Up @@ -575,28 +588,9 @@
side=2
message= _ "You would have us be cowards! We do not surrender."
[/message]
[objectives]
side=1
[objective]
description= _ "Kill all elves in the caves"
condition=win
[/objective]
[objective]
description= _ "Death of Rugnur"
condition=lose
[/objective]
[objective]
description= _ "Death of Baglur"
condition=lose
[/objective]

{TURNS_RUN_OUT}

[gold_carryover]
bonus=yes
carryover_percentage=40
[/gold_carryover]
[/objectives]

[show_objectives]
[/show_objectives]
[/then]
[else]
[message]
Expand Down
Expand Up @@ -97,6 +97,36 @@
[objective]
description= _ "Find Thursagan and convince him to come back to the dwarvish city"
condition=win
[show_if]
[not]
[have_unit]
id=Krawg
[/have_unit]
[/not]
[/show_if]
[/objective]
[objective]
description= _ "Find Thursagan and convince him to come back to the dwarvish city, then bring him back to the caves"
condition=win
[show_if]
[have_unit]
id=Krawg
[/have_unit]
[not]
[have_unit]
id=Thursagan
[/have_unit]
[/not]
[/show_if]
[/objective]
[objective]
description= _ "Move Thursagan to the signpost"
condition=win
[show_if]
[have_unit]
id=Thursagan
[/have_unit]
[/show_if]
[/objective]
[objective]
description= _ "Death of Rugnur"
Expand All @@ -110,6 +140,24 @@
description= _ "Death of Baglur"
condition=lose
[/objective]
[objective]
description= _ "Death of Krawg"
condition=lose
[show_if]
[have_unit]
id=Krawg
[/have_unit]
[/show_if]
[/objective]
[objective]
description= _ "Death of Thursagan"
condition=lose
[show_if]
[have_unit]
id=Thursagan
[/have_unit]
[/show_if]
[/objective]

{TURNS_RUN_OUT}

Expand Down Expand Up @@ -342,36 +390,8 @@
# speaker=Krawg
# message= _ "Kwe... yoo ants to ide uuus, nooa? Kwe, uus kan..." # wmllint: no spellcheck
#[/message]
[objectives]
side=1
[objective]
description= _ "Find Thursagan and convince him to come back to the dwarvish city, then bring him back to the caves"
condition=win
[/objective]
[objective]
description= _ "Death of Rugnur"
condition=lose
[/objective]
[objective]
description= _ "Death of Alanin"
condition=lose
[/objective]
[objective]
description= _ "Death of Baglur"
condition=lose
[/objective]
[objective]
description= _ "Death of Krawg"
condition=lose
[/objective]

{TURNS_RUN_OUT}

[gold_carryover]
bonus=yes
carryover_percentage=40
[/gold_carryover]
[/objectives]
[show_objectives]
[/show_objectives]

[redraw]
clear_shroud=yes
Expand Down Expand Up @@ -561,40 +581,8 @@
x,y=$x1,$y1
[/scroll_to]

[objectives]
side=1
[objective]
description= _ "Move Thursagan to the signpost"
condition=win
[/objective]
[objective]
description= _ "Death of Rugnur"
condition=lose
[/objective]
[objective]
description= _ "Death of Alanin"
condition=lose
[/objective]
[objective]
description= _ "Death of Baglur"
condition=lose
[/objective]
[objective]
description= _ "Death of Krawg"
condition=lose
[/objective]
[objective]
description= _ "Death of Thursagan"
condition=lose
[/objective]

{TURNS_RUN_OUT}

[gold_carryover]
bonus=yes
carryover_percentage=40
[/gold_carryover]
[/objectives]
[show_objectives]
[/show_objectives]
[/event]

# Thursagan reaches the signpost
Expand Down

0 comments on commit 648035f

Please sign in to comment.