Skip to content

Commit

Permalink
DW: Use show_if in the objectives tag
Browse files Browse the repository at this point in the history
  • Loading branch information
DisherProject authored and sevu committed Jan 5, 2019
1 parent 4743241 commit f7f3d76
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 28 deletions.
26 changes: 10 additions & 16 deletions data/campaigns/Dead_Water/scenarios/02_Flight.cfg
Expand Up @@ -84,6 +84,16 @@
{ALTERNATIVE_OBJECTIVE_CAPTION}
description= _ "Defeat all enemy leaders"+{OBJECTIVE_FOOTNOTE _"(different bonus for each)"}
condition=win
[show_if]
{VARIABLE_CONDITIONAL end_level_when_ring_picked_up boolean_equals no}
[/show_if]
[/objective]
[objective]
description= _ "Have a unit pick up the ring of power."
condition=win
[show_if]
{VARIABLE_CONDITIONAL end_level_when_ring_picked_up boolean_equals yes}
[/show_if]
[/objective]

{HOW_TO_LOSE}
Expand Down Expand Up @@ -916,22 +926,6 @@ _f, _f, _f, _f, _f, _f, _f
name=end_level_when_ring_picked_up
value=yes
[/set_variable]

[objectives]
side=1
silent=yes
[objective]
description= _ "Have a unit pick up the ring of power."
condition=win
[/objective]

{HOW_TO_LOSE}

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

# ...Otherwise, since the ring must have been picked up
Expand Down
18 changes: 6 additions & 12 deletions data/campaigns/Dead_Water/scenarios/10_The_Flaming_Sword.cfg
Expand Up @@ -194,6 +194,12 @@
[objective]
description= _ "Death of Caladon"
condition=lose
[show_if]
[have_unit]
id=Caladon
side=1
[/have_unit]
[/show_if]
[/objective]

{TURNS_RUN_OUT}
Expand Down Expand Up @@ -661,18 +667,6 @@
flag=post_teleport
[/animate_unit]

# Remove the death of Caladon from a the loss conditions, but
# we probably don't need to make a point of it, so silent=yes.
[objectives]
silent=yes
side=1
[objective]
description= _ "Pry the flaming sword from the dead hand of its owner"
condition=win
[/objective]
{HOW_TO_LOSE}
[/objectives]

[delay]
time=700
# Gives you time to see that Caladon teleported to the
Expand Down

0 comments on commit f7f3d76

Please sign in to comment.