DW: Use show_if in the objectives tag

This commit is contained in:
DisherProject 2018-10-26 20:07:47 +02:00 committed by Severin Glöckner
parent 4743241007
commit f7f3d766f0
2 changed files with 16 additions and 28 deletions

View file

@ -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}
@ -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

View file

@ -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}
@ -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