SoF: add [show_if] to the objectives

This commit is contained in:
DisherProject 2018-09-12 21:10:49 +02:00 committed by Severin Glöckner
parent 6d0f21fb12
commit dbfc81e999
6 changed files with 195 additions and 290 deletions

View file

@ -125,6 +125,11 @@
# TODO: manually add snow detritus
[set_variable]
name=incominggold
value=5000
[/set_variable]
[objectives]
side=1
[objective]
@ -134,10 +139,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]
@ -412,11 +423,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

View file

@ -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"
@ -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]

View file

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

View file

@ -140,6 +140,18 @@
[objective]
description= _ "Defeat Glonoin, the Shorbear clan leader"
condition=win
[show_if]
[have_unit]
id=Glonoin
[/have_unit]
[/show_if]
[/objective]
[objective]
description= _ "Have all heroes in the Shorbear caves while no enemies are in the caves"
condition=win
[show_if]
{VARIABLE_CONDITIONAL elves_come boolean_equals yes}
[/show_if]
[/objective]
[objective]
description= _ "Death of Rugnur"
@ -427,44 +439,10 @@
speaker=Thursagan
message= _ "Dont be a fool! We cant take the elves, and it was a mistake to attack these dwarves, but if we have to fight we should retreat once we get what we came for, the tools!"
[/message]
[objectives]
side=1
[objective]
description= _ "Defeat Glonoin, the Shorbear clan leader"
condition=win
[/objective]
[objective]
description= _ "Have all heroes in the Shorbear caves while no enemies are in 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 Krawg"
condition=lose
[/objective]
[objective]
description= _ "Death of Thursagan"
condition=lose
[/objective]
[objective]
description= _ "Death of Durstorn"
condition=lose
[/objective]
{TURNS_RUN_OUT}
[gold_carryover]
bonus=no
carryover_percentage=40
[/gold_carryover]
[/objectives]
{VARIABLE elves_come yes}
[show_objectives]
[/show_objectives]
[/event]
#define IN_CAVES
@ -537,40 +515,8 @@
{VARIABLE ready_to_close yes}
[objectives]
side=1
[objective]
description= _ "Have all heroes in the Shorbear caves while no enemies are in 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 Krawg"
condition=lose
[/objective]
[objective]
description= _ "Death of Thursagan"
condition=lose
[/objective]
[objective]
description= _ "Death of Durstorn"
condition=lose
[/objective]
{TURNS_RUN_OUT}
[gold_carryover]
bonus=no
carryover_percentage=40
[/gold_carryover]
[/objectives]
[show_objectives]
[/show_objectives]
[/then]
[else]
[message]
@ -601,40 +547,8 @@
{VARIABLE ready_to_close yes}
[objectives]
side=1
[objective]
description= _ "Have all heroes in the Shorbear caves while no enemies are in 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 Krawg"
condition=lose
[/objective]
[objective]
description= _ "Death of Thursagan"
condition=lose
[/objective]
[objective]
description= _ "Death of Durstorn"
condition=lose
[/objective]
{TURNS_RUN_OUT}
[gold_carryover]
bonus=no
carryover_percentage=40
[/gold_carryover]
[/objectives]
[show_objectives]
[/show_objectives]
[/else]
[/if]
[/event]
@ -848,6 +762,12 @@
[/endlevel]
[/event]
[event]
name=victory
{CLEAR_VARIABLE elves_come}
[/event]
[event]
name=turn 10
[gold]

View file

@ -170,26 +170,56 @@
[objective]
description= _ "Move Rugnur to the northeast cave entrance"
condition=win
[show_if]
[have_unit]
id=Rugnur
[/have_unit]
[/show_if]
[/objective]
[objective]
description= _ "Move Alanin to the southern border east of the river"
condition=win
[show_if]
[have_unit]
id=Alanin
[/have_unit]
[/show_if]
[/objective]
[objective]
description= _ "Death of Rugnur"
condition=lose
[show_if]
[have_unit]
id=Rugnur
[/have_unit]
[/show_if]
[/objective]
[objective]
description= _ "Death of Alanin"
condition=lose
[show_if]
[have_unit]
id=Alanin
[/have_unit]
[/show_if]
[/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}
@ -481,32 +511,8 @@
{VARIABLE alanin.canrecruit yes}
{CLEAR_VARIABLE alanin.ellipse}
{CLEAR_VARIABLE alanin.overlays}
[objectives]
side=1
[objective]
description= _ "Move Rugnur to the northeast cave entrance"
condition=win
[/objective]
[objective]
description= _ "Death of Rugnur"
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=no
carryover_percentage=40
[/gold_carryover]
[/objectives]
[show_objectives]
[/show_objectives]
[/then]
[else]
[message]
@ -569,24 +575,8 @@
side=1
recruit=
[/set_recruit]
[objectives]
side=1
[objective]
description= _ "Move Alanin to the southern border east of the river"
condition=win
[/objective]
[objective]
description= _ "Death of Alanin"
condition=lose
[/objective]
{TURNS_RUN_OUT}
[gold_carryover]
bonus=no
carryover_percentage=40
[/gold_carryover]
[/objectives]
[show_objectives]
[/show_objectives]
[/then]
[else]
[message]

View file

@ -118,11 +118,45 @@
[event]
name=prestart
{VARIABLE found_forge no}
[objectives]
side=1
[objective]
description= _ "Get all heroes to the end of the tunnel"
condition=win
[show_if]
{VARIABLE_CONDITIONAL found_forge boolean_equals no}
[have_unit]
id=Thursagan
[/have_unit]
[/show_if]
[/objective]
[objective]
description= _ "Move Thursagan to the forge"
condition=win
[show_if]
{VARIABLE_CONDITIONAL found_forge boolean_equals yes}
[/show_if]
[/objective]
[objective]
description= _ "Defend Thursagan until the Sceptre of Fire is complete"
condition=win
[show_if]
{VARIABLE_CONDITIONAL found_forge boolean_equals yes}
[/show_if]
[/objective]
[objective]
description= _ "Survive until turns run out"
condition=win
show_turn_counter=yes
[show_if]
[not]
[have_unit]
id=Thursagan
[/have_unit]
[/not]
[/show_if]
[/objective]
[objective]
description= _ "Death of Rugnur"
@ -135,6 +169,22 @@
[objective]
description= _ "Death of Thursagan"
condition=lose
[show_if]
[have_unit]
id=Thursagan
[/have_unit]
[/show_if]
[/objective]
[objective]
description= _ "An enemy moves onto the forge"
condition=lose
[show_if]
[not]
[have_unit]
id=Thursagan
[/have_unit]
[/not]
[/show_if]
[/objective]
[gold_carryover]
@ -354,33 +404,11 @@
speaker=Khrakrahs
message= _ "That pretty metal rock is mine! Get away from it!"
[/message]
[objectives]
side=1
[objective]
description= _ "Move Thursagan to the forge"
condition=win
[/objective]
[objective]
description= _ "Defend Thursagan until the Sceptre of Fire is complete"
condition=win
[/objective]
[objective]
description= _ "Death of Rugnur"
condition=lose
[/objective]
[objective]
description= _ "Death of Krawg"
condition=lose
[/objective]
[objective]
description= _ "Death of Thursagan"
condition=lose
[/objective]
[gold_carryover]
carryover_percentage=0
[/gold_carryover]
[/objectives]
{VARIABLE found_forge yes}
[show_objectives]
[/show_objectives]
[/event]
[event]
@ -398,31 +426,6 @@
value="$($turn_number + 9)"
[/modify_turns]
[objectives]
side=1
[objective]
description= _ "Survive until turns run out"
condition=win
show_turn_counter=yes
[/objective]
[objective]
description= _ "Death of Rugnur"
condition=lose
[/objective]
[objective]
description= _ "Death of Krawg"
condition=lose
[/objective]
[objective]
description= _ "An enemy moves onto the forge"
condition=lose
[/objective]
[gold_carryover]
carryover_percentage=0
[/gold_carryover]
[/objectives]
[store_unit]
[filter]
id=Thursagan
@ -430,6 +433,10 @@
variable=thur
kill=yes
[/store_unit]
{CLEAR_VARIABLE found_forge}
[show_objectives]
[/show_objectives]
[event]
name=moveto
[filter]