Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Change variable to #ifdef

  • Loading branch information...
commit e17213a48ca61ec5481b487826ff7766716ea105 1 parent 3bd15a7
@Alarantalara Alarantalara authored
View
4 data/campaigns/Under_the_Burning_Suns/scenarios/12_The_Final_Confrontation.cfg
@@ -239,7 +239,6 @@
#initialize starting variables
- {VARIABLE in_final_fight true}
{VARIABLE allies_killed 0}
{VARIABLE ally_died_in_final_fight no}
{VARIABLE number_minions_to_spawn 0}
@@ -1484,5 +1483,8 @@
[/event]
{UTBS_INCLUDE utils/kaleh-abilities.cfg}
+#define UTBS_IN_FINAL_FIGHT
+#enddef
{UTBS_INCLUDE utils/deaths.cfg}
+#undef UTBS_IN_FINAL_FIGHT
[/scenario]
View
122 data/campaigns/Under_the_Burning_Suns/utils/deaths.cfg
@@ -9,24 +9,17 @@
id=Kaleh
[/filter]
- [if]
- [variable]
- name=in_final_fight
- equals=true
- [/variable]
- [then]
- [message]
- speaker=unit
- message= _ "To die on the cusp of victory. Oh, the irony!"
- [/message]
- [/then]
- [else]
- [message]
- speaker=unit
- message= _ "I’m too young to die. What will happen to my people?"
- [/message]
- [/else]
- [/if]
+#ifdef UTBS_IN_FINAL_FIGHT
+ [message]
+ speaker=unit
+ message= _ "To die on the cusp of victory. Oh, the irony!"
+ [/message]
+#else
+ [message]
+ speaker=unit
+ message= _ "I’m too young to die. What will happen to my people?"
+ [/message]
+#endif
[endlevel]
result=defeat
[/endlevel]
@@ -44,20 +37,13 @@
message= _ "Save me, Kaleh, I’m dying..."
[/message]
- [if]
- [variable]
- name=in_final_fight
- equals=true
- [/variable]
- [then]
- {VARIABLE_OP allies_killed add 1}
- [/then]
- [else]
- [endlevel]
- result=defeat
- [/endlevel]
- [/else]
- [/if]
+#ifdef UTBS_IN_FINAL_FIGHT
+ {VARIABLE_OP allies_killed add 1}
+#else
+ [endlevel]
+ result=defeat
+ [/endlevel]
+#endif
[/event]
[event]
@@ -71,22 +57,16 @@
message= _ "Eloh protect us, I have fallen."
[/message]
- [if]
- [variable]
- name=in_final_fight
- equals=true
- [/variable]
- [then]
- {VARIABLE_OP allies_killed add 1}
- [/then]
- [else]
- [endlevel]
- result=defeat
- [/endlevel]
- [/else]
- [/if]
+#ifdef UTBS_IN_FINAL_FIGHT
+ {VARIABLE_OP allies_killed add 1}
+#else
+ [endlevel]
+ result=defeat
+ [/endlevel]
+#endif
[/event]
+#ifndef UTBS_IN_FINAL_FIGHT
[event]
name=last breath
@@ -103,6 +83,7 @@
result=defeat
[/endlevel]
[/event]
+#endif
[event]
name=last breath
@@ -132,41 +113,34 @@
[/else]
[/if]
+#ifdef UTBS_IN_FINAL_FIGHT
+ {VARIABLE ally_died_in_final_fight yes}
+ {VARIABLE_OP allies_killed add 1}
+#else
[if]
[variable]
- name=in_final_fight
- equals=true
+ name=ally_must_live
+ numerical_equals=1
[/variable]
+
[then]
- {VARIABLE ally_died_in_final_fight yes}
- {VARIABLE_OP allies_killed add 1}
+ [message]
+ speaker=Kaleh
+ message= _ "Without his guidance, how can we escape from these infernal caves? We are lost without him!"
+ [/message]
+
+ [endlevel]
+ result=defeat
+ [/endlevel]
[/then]
[else]
- [if]
- [variable]
- name=ally_must_live
- numerical_equals=1
- [/variable]
-
- [then]
- [message]
- speaker=Kaleh
- message= _ "Without his guidance, how can we escape from these infernal caves? We are lost without him!"
- [/message]
-
- [endlevel]
- result=defeat
- [/endlevel]
- [/then]
- [else]
- [message]
- speaker=Kaleh
- message= _ "He was a brave warrior and a true ally. He will be missed."
- [/message]
- [/else]
- [/if]
+ [message]
+ speaker=Kaleh
+ message= _ "He was a brave warrior and a true ally. He will be missed."
+ [/message]
[/else]
[/if]
+#endif
[/event]
[event]
@@ -186,6 +160,7 @@
[/message]
[/event]
+#ifndef UTBS_IN_FINAL_FIGHT
[event]
name=last breath
[filter]
@@ -215,3 +190,4 @@
message= _ "How could we have let her die? I’ve never seen fire magic like that before. She will be sorely missed."
[/message]
[/event]
+#endif
Please sign in to comment.
Something went wrong with that request. Please try again.