NR: Fix Krash resurrection bug
After changes in 618659c083
, the leader keys in Krash's side caused him
to be reborn if he was killed in the previous scenario for S11a-S13a.
[ci skip]
This commit is contained in:
parent
35d32a0a80
commit
673e33bb20
4 changed files with 46 additions and 18 deletions
|
@ -130,7 +130,7 @@
|
|||
[/side]
|
||||
|
||||
# Krash may not actually still be alive at this point, but setting up
|
||||
# his side this way is the only way to reliasbly pick up his recall
|
||||
# his side this way is the only way to reliably pick up his recall
|
||||
# list if he is.
|
||||
[side]
|
||||
side=7
|
||||
|
@ -141,11 +141,7 @@
|
|||
{GOLD 250 200 150}
|
||||
team_name=knalgans
|
||||
user_team_name= _ "Alliance"
|
||||
|
||||
type=Drake Burner
|
||||
id=Krash
|
||||
name= _ "Krash"
|
||||
canrecruit=yes
|
||||
no_leader=yes
|
||||
[/side]
|
||||
|
||||
{STARTING_VILLAGES 1 6}
|
||||
|
@ -154,6 +150,7 @@
|
|||
[event]
|
||||
name=prestart
|
||||
|
||||
{RECALL_KRASH}
|
||||
[if]
|
||||
[not]
|
||||
[have_unit]
|
||||
|
|
|
@ -251,11 +251,7 @@
|
|||
{GOLD 250 200 150}
|
||||
team_name=knalgans
|
||||
user_team_name= _ "Alliance"
|
||||
|
||||
type=Drake Burner
|
||||
id=Krash
|
||||
name= _ "Krash"
|
||||
canrecruit=yes
|
||||
no_leader=yes
|
||||
[/side]
|
||||
|
||||
# Empty side - player will assume control of it if Eryssa is alive
|
||||
|
@ -279,6 +275,7 @@
|
|||
{VARIABLE path_get_the_gold yes}
|
||||
|
||||
# Here’s where we edit out Krash's side if he's dead.
|
||||
{RECALL_KRASH}
|
||||
[if]
|
||||
[not]
|
||||
[have_unit]
|
||||
|
|
|
@ -283,10 +283,6 @@
|
|||
# list if he is. Later, we'll edit in another leader if he's dead.
|
||||
[side]
|
||||
side=7
|
||||
type=Drake Burner
|
||||
id=Krash
|
||||
name= _ "Krash"
|
||||
canrecruit=yes
|
||||
save_id=Krash
|
||||
side_name= _ "Krash"
|
||||
gold=100
|
||||
|
@ -294,7 +290,10 @@
|
|||
team_name=knalgans
|
||||
user_team_name=_"Alliance"
|
||||
controller=human
|
||||
no_leader=yes
|
||||
defeat_condition=never
|
||||
[/side]
|
||||
# STARTING_VILLAGES works due to defeat_condition & having a starting location
|
||||
{STARTING_VILLAGES 7 10}
|
||||
|
||||
# Allied AI
|
||||
|
@ -353,9 +352,8 @@
|
|||
name=prestart
|
||||
|
||||
# Check if Krash is alive, if yes place him at helm of side 7,
|
||||
# otherwise it's taken over by older lich. We can't use a normal
|
||||
# recall followed by have_unit test here because we had to declare
|
||||
# Krash as a side leader in order to get recall list carryover.
|
||||
# otherwise it's taken over by older lich.
|
||||
{RECALL_KRASH}
|
||||
[recall]
|
||||
id="Ro'Arthian"
|
||||
[/recall]
|
||||
|
@ -386,6 +384,10 @@
|
|||
variable=place_lich_at
|
||||
[/unstore_unit]
|
||||
{UNMAKE_HERO "Ro'Arthian"}
|
||||
[kill]
|
||||
side=7
|
||||
race=drake
|
||||
[/kill]
|
||||
[disallow_recruit]
|
||||
side=7
|
||||
type=Drake Fighter,Drake Glider,Drake Burner,Drake Clasher
|
||||
|
@ -401,6 +403,10 @@
|
|||
{CLEAR_VARIABLE place_lich_at}
|
||||
[/then]
|
||||
[/if]
|
||||
[modify_side]
|
||||
side=7
|
||||
defeat_condition=no_leader_left
|
||||
[/modify_side]
|
||||
|
||||
# Hide unit for spectacular entrance
|
||||
[hide_unit]
|
||||
|
|
|
@ -55,6 +55,34 @@
|
|||
[/if]
|
||||
#enddef
|
||||
|
||||
#define RECALL_KRASH
|
||||
# In S11a-13a Krash starts as the leader of a side if he is alive. He is not
|
||||
# defined in the corresponding side tags for these scenarios, since if he is,
|
||||
# that would cause Krash to be reborn if he was dead. Since [recall] requires
|
||||
# a leader on the map, do this to get him off of his recall list without one.
|
||||
[store_unit]
|
||||
[filter]
|
||||
id=Krash
|
||||
[/filter]
|
||||
variable=krash
|
||||
kill=yes
|
||||
[/store_unit]
|
||||
[if]
|
||||
{VARIABLE_CONDITIONAL krash.id equals Krash}
|
||||
[then]
|
||||
[store_starting_location]
|
||||
side=$krash.side
|
||||
variable=start_loc
|
||||
[/store_starting_location]
|
||||
[unstore_unit]
|
||||
variable=krash
|
||||
x,y=$start_loc.x,$start_loc.y
|
||||
[/unstore_unit]
|
||||
[/then]
|
||||
[/if]
|
||||
{CLEAR_VARIABLE krash,start_loc}
|
||||
#enddef
|
||||
|
||||
#define STORY_PART_HAMEL SPEECH_STRING
|
||||
{STORY_PART_SPEECH portraits/Hamel.png (_ "Hamel") {SPEECH_STRING} }
|
||||
#enddef
|
||||
|
|
Loading…
Add table
Reference in a new issue