Skip to content

Commit

Permalink
TSG: change inclusion of death events
Browse files Browse the repository at this point in the history
That way less events need to be duplicated in scenarios.
It also does not include the full Hylas death event in S7a to S9a.
Previously the Jarek event was not present in one of the final scenarios,
now both include it, but the shorter variant of it.

[ci skip]
  • Loading branch information
sevu committed Aug 27, 2018
1 parent 1822292 commit 2f7bb75
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 84 deletions.
Expand Up @@ -10,6 +10,8 @@

map_data="{campaigns/The_South_Guard/maps/06a_Tidings_Good_and_Ill.map}"

#define SG_DEATHS_JAREK_ALTERNATIVE
#enddef
{campaigns/The_South_Guard/utils/sg_deaths.cfg}
{campaigns/The_South_Guard/utils/sg_help.cfg}

Expand Down
Expand Up @@ -10,6 +10,8 @@

map_data="{campaigns/The_South_Guard/maps/07a_Into_the_Depths.map}"

#define SG_DEATHS_HYLAS_LATE
#enddef
{campaigns/The_South_Guard/utils/sg_deaths.cfg}

{UNDERGROUND}
Expand Down
Expand Up @@ -18,6 +18,8 @@
{SCENARIO_MUSIC wanderer.ogg}
{EXTRA_SCENARIO_MUSIC knolls.ogg}

#define SG_DEATHS_HYLAS_LATE
#enddef
{campaigns/The_South_Guard/utils/sg_deaths.cfg}

{DEFAULT_SCHEDULE_DUSK}
Expand Down
44 changes: 4 additions & 40 deletions data/campaigns/The_South_Guard/scenarios/08b_The_Tides_of_War.cfg
Expand Up @@ -11,6 +11,10 @@

map_data="{campaigns/The_South_Guard/maps/08b_The_Tides_of_War.map}"

#define SG_DEATHS_LAST_LEVEL
#enddef
{campaigns/The_South_Guard/utils/sg_deaths.cfg}

{DEFAULT_SCHEDULE_DAWN}

victory_when_enemies_defeated=yes
Expand Down Expand Up @@ -510,46 +514,6 @@
save=no
[/endlevel]
[/event]

# In order to allow Hylas to die, the death events aren't included from the
# standard location here
[event]
name=last breath
[filter]
id=Deoran
[/filter]
[message]
speaker=unit
image=portraits/deoran-sad.png
message= _ "I have failed my kingdom and duty..."
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]

[event]
name=last breath
[filter]
id=Minister Hylas
[/filter]
[message]
speaker=unit
image=portraits/hylas.png
message= _ "Now I will never see Westin free again..."
[/message]
[/event]

[event]
name=last breath
[filter]
id=Jarek
[/filter]
[message]
speaker=unit
message= _ "Far from home I fall — but not in vain! Guard our people, Deoran!"
[/message]
[/event]
[/scenario]

#undef ILLUMINATING_CAMPFIRE
30 changes: 4 additions & 26 deletions data/campaigns/The_South_Guard/scenarios/09a_Vengeance.cfg
Expand Up @@ -10,6 +10,10 @@

map_data="{campaigns/The_South_Guard/maps/09a_Vengeance.map}"

#define SG_DEATHS_LAST_LEVEL
#enddef
{campaigns/The_South_Guard/utils/sg_deaths.cfg}

{DEFAULT_SCHEDULE_MORNING}

turns=unlimited
Expand Down Expand Up @@ -304,32 +308,6 @@
{CLEAR_VARIABLE how_many_elves,unit_type}
[/event]

[event]
name=last breath
[filter]
id=Deoran
[/filter]
[message]
speaker=unit
image=portraits/deoran-sad.png
message= _ "I have failed my kingdom and duty..."
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]

[event]
name=last breath
[filter]
id=Sir Gerrick
[/filter]
[message]
speaker=unit
message= _ "I have given my all for my kingdom! Avenge me, Deoran!"
[/message]
[/event]

[event]
name=die

Expand Down
62 changes: 44 additions & 18 deletions data/campaigns/The_South_Guard/utils/sg_deaths.cfg
@@ -1,6 +1,15 @@
#textdomain wesnoth-tsg
# Heroes and Allies

#ifdef SG_DEATHS_LAST_LEVEL

#define SG_DEATHS_HYLAS_LATE
#enddef
#define SG_DEATHS_JAREK_ALTERNATIVE
#enddef

#endif

[event]
name=last breath
[filter]
Expand Down Expand Up @@ -40,6 +49,7 @@
[/if]
[/event]

#ifndef SG_DEATHS_LAST_LEVEL
[event]
name=last breath
[filter]
Expand All @@ -53,6 +63,7 @@
result=defeat
[/endlevel]
[/event]
#endif

[event]
name=last breath
Expand All @@ -63,9 +74,11 @@
speaker=unit
message= _ "I have given my all for my kingdom! Avenge me, Deoran!"
[/message]
#ifndef SG_DEATHS_LAST_LEVEL
[endlevel]
result=defeat
[/endlevel]
#endif
[/event]

[event]
Expand All @@ -78,33 +91,46 @@
image=portraits/hylas.png
message= _ "Now I will never see Westin free again..."
[/message]
#ifndef SG_DEATHS_HYLAS_LATE
[endlevel]
result=defeat
[/endlevel]
#endif
[/event]

[event]
name=last breath
[filter]
id=Jarek
[/filter]
[if]
[have_unit]
id=Deoran
[/have_unit]
[then]
[message]
speaker=unit
message= _ "Far from home I fall — but not in vain! Guard our people, Deoran!"
[/message]
[/then]
[else]
[message]
speaker=unit
message= _ "Far from home I fall — but not in vain!"
[/message]
[/else]
[/if]
#ifndef SG_DEATHS_JAREK_ALTERNATIVE
[message]
speaker=unit
message= _ "Far from home I fall — but not in vain! Guard our people, Deoran!"
[/message]
#else
[message]
speaker=unit
message= _ "Far from home I fall — but not in vain!"
[/message]
#endif
[/event]

# Brigands and Enemies
# If an macro is used withhin another macro, it cannot be undefined as long as
# the other macro is still used. If the death events would be included in via a
# macro they would have to be undefined in the scenario files, but as they are
# included by reading this file they can be undefined here.

#ifdef SG_DEATHS_LAST_LEVEL
#undef SG_DEATHS_LAST_LEVEL
#undef SG_DEATHS_HYLAS_LATE
#undef SG_DEATHS_JAREK_ALTERNATIVE
#endif

#ifdef SG_DEATHS_HYLAS_LATE
#undef SG_DEATHS_HYLAS_LATE
#endif

#ifdef SG_DEATHS_JAREK_ALTERNATIVE
#undef SG_DEATHS_JAREK_ALTERNATIVE
#endif

0 comments on commit 2f7bb75

Please sign in to comment.