Skip to content

Commit

Permalink
UtBS: Update objectives automatically via [show_if]
Browse files Browse the repository at this point in the history
  • Loading branch information
DisherProject committed Apr 11, 2019
1 parent 0d355d2 commit 9f1fa79
Show file tree
Hide file tree
Showing 9 changed files with 294 additions and 591 deletions.
Expand Up @@ -118,11 +118,19 @@

# Can't end scenario until all elves have been rescued (5 events)
[objectives]
summary= _ "Starting Objectives:"
[objective]
description= _ "Rescue surviving elves"
condition=win
[/objective]
[objective]
description= _ "Defeat Xanthos"
condition=win
[show_if]
[have_unit]
id=Xanthos
[/have_unit]
[/show_if]
[/objective]
[objective]
description= _ "Death of Kaleh"
condition=lose
Expand Down Expand Up @@ -1126,54 +1134,8 @@
y=1-5
[/place_shroud]

[objectives]
summary= _ "New Objectives:"
silent=no
[objective]
description= _ "Rescue surviving elves"
condition=win
[/objective]
[objective]
description= _ "Defeat Xanthos"
condition=win
[/objective]
[objective]
description= _ "Death of Kaleh"
condition=lose
[/objective]
[objective]
description= _ "Death of Nym"
condition=lose
[/objective]
[objective]
description= _ "Death of Garak"
condition=lose
[show_if]
# We could just use [have_unit], but if Garak or Zhul dies and the player
# checks the objectives, the respective objective won't be displayed,
# and disappearing objectives for no good reason would look buggy.
[variable]
name=found_garak
boolean_equals=yes
[/variable]
[/show_if]
[/objective]
[objective]
description= _ "Death of Zhul"
condition=lose
[show_if]
[variable]
name=found_zhul
boolean_equals=yes
[/variable]
[/show_if]
[/objective]

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

# This event prevents player from running to the dark sorcerer's base
Expand Down
Expand Up @@ -195,11 +195,19 @@
# Set starting scenario objectives

[objectives]
summary= _ "Starting Objectives:"
[objective]
description= _ "Kaleh must reach the northern edge of the desert"
condition=win
[/objective]
[objective]
description= _ "Defeat outlaw leader"
condition=win
[show_if]
[have_unit]
id=Thorn
[/have_unit]
[/show_if]
[/objective]
[objective]
description= _ "Death of Kaleh"
condition=lose
Expand Down Expand Up @@ -1354,40 +1362,6 @@
[/message]
{CLEAR_VARIABLE explorer}

[objectives]
summary= _ "New Objectives:"
silent=no
[objective]
description= _ "Kaleh must reach the northern edge of the desert"
condition=win
[/objective]
[objective]
description= _ "Defeat outlaw leader"
condition=win
[/objective]
[objective]
description= _ "Death of Kaleh"
condition=lose
[/objective]
[objective]
description= _ "Death of Nym"
condition=lose
[/objective]
[objective]
description= _ "Death of Garak"
condition=lose
[/objective]
[objective]
description= _ "Death of Zhul"
condition=lose
[/objective]

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

[unit]
side=2
id=Thorn
Expand All @@ -1408,6 +1382,9 @@
{INCOME 9 11 13}
{GOLD 100 125 150}
[/modify_side]

[show_objectives]
[/show_objectives]
[/event]

#Encounter 7 Mirage
Expand Down

0 comments on commit 9f1fa79

Please sign in to comment.