Merge pull request #414 from rjaguar3/bug23668

DM S19: Add defeat condition for losing last undead (bug #23668)
This commit is contained in:
Charles Dang 2015-07-07 13:55:43 +11:00
commit d3113a9bd4
4 changed files with 60 additions and 0 deletions

View file

@ -24,6 +24,9 @@ Version 1.13.1:
* Campaigns:
* Dead Water:
* The Stun effect now expires at the stunned unit's side turn end
* Delfador's Memoirs:
* Added defeat condition for death of the last undead veteran in
'Showdown in the Northern Swamp' (bug #23668)
* Under the Burning Suns:
* The Stun effect now expires at the stunned unit's side turn end
* Editor:

View file

@ -159,6 +159,17 @@
description= _ "Death of Kalenz"
condition=lose
[/objective]
[objective]
description= _ "Loss of all Undead veterans before Iliah-Malal is defeated"
condition=lose
[show_if]
[have_unit]
race=undead
side=1
search_recall_list=yes
[/have_unit]
[/show_if]
[/objective]
{TURNS_RUN_OUT}
@ -308,6 +319,46 @@
# He gets the standard +3 hitpoints and full heal.
{ADVANCE_UNIT (id="Iliah-Malal") ()}
[/event]
# If a player's undead unit is defeated,
# check if there are still undead veterans.
# Otherwise end the scenario in defeat.
# Note that this still leaves the possibility of an unwinnable
# scenario if the player dismisses the last undead veteran.
# We check that there at at least two undead units since the
# dying unit is counted in the [have_unit] filter
[event]
name=die
first_time_only=no
[filter]
race=undead
side=1
[/filter]
[filter_condition]
[not]
[have_unit]
race=undead
side=1
count=2
search_recall_list=yes
[/have_unit]
[/not]
[and]
[have_unit]
id=Iliah-Malal
[/have_unit]
[/and]
[/filter_condition]
[message]
speaker=Delfador
message=_ "Alas! Without any undead to strike the killing blow, we will never be able to defeat Iliah-Malal!"
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]
[/then]
[else]
[set_variable]

View file

@ -1073,6 +1073,9 @@
name = "gh0st"
comment = "2012 Google Code-in Students' Micro AI development"
[/entry]
[entry]
name = "Gregory Gauthier (rjaguar3)"
[/entry]
[entry]
name = "Groggy Dice (groggydice)"
comment = "wmllint enhancements"

View file

@ -17,6 +17,9 @@ Version 1.13.1:
* Campaigns:
* Dead Water:
* The Stun effect now expires at the stunned unit's side turn end
* Delfador's Memoirs:
* Added defeat condition for death of the last undead veteran in
'Showdown in the Northern Swamp' (bug #23668)
* Under the Burning Suns:
* The Stun effect now expires at the stunned unit's side turn end