Completed, and tested, fix for bug #12291: Northern Rebirth:

...Krash's recall list disappears in Eastern Flank.
This commit is contained in:
Eric S. Raymond 2008-09-12 08:09:13 +00:00
parent b23d6a2593
commit 4aec03e3d4
6 changed files with 64 additions and 33 deletions

View File

@ -1012,6 +1012,7 @@
message= _ "Whoa! Maybe he isn't so friendly after all... or at least to some things." message= _ "Whoa! Maybe he isn't so friendly after all... or at least to some things."
[/message] [/message]
[/event] [/event]
{VARIABLE Krash_alive yes}
[/event] [/event]
# 1e - Escape tunnel # 1e - Escape tunnel

View File

@ -206,26 +206,23 @@
[case] [case]
value=0 value=0
{VARIABLE new_tallin_type Sergeant} {VARIABLE new_tallin_type Sergeant}
[/case] [/case]
[case] [case]
value=1 value=1
{VARIABLE new_tallin_type Sergeant} {VARIABLE new_tallin_type Sergeant}
[/case] [/case]
[case] [case]
value=2 value=2
{VARIABLE new_tallin_type Lieutenant} {VARIABLE new_tallin_type Lieutenant}
[/case] [/case]
[else] [else]
{VARIABLE new_tallin_type General} {VARIABLE new_tallin_type General}
[/else] [/else]
[/if] [/switch]
{TRANSFORM_UNIT id=Tallin $new_tallin_type} {TRANSFORM_UNIT id=Tallin $new_tallin_type}
{FULL_HEAL id=Tallin} {FULL_HEAL id=Tallin}

View File

@ -100,7 +100,10 @@
team_name=orcs team_name=orcs
user_team_name=_"Orcs" user_team_name=_"Orcs"
[/side] [/side]
# Allied side - also player controlled, leader serves as a placeholder for Krash if he's alive
# 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
# list if he is.
[side] [side]
side=7 side=7
type=Drake Burner type=Drake Burner
@ -114,15 +117,20 @@
user_team_name=_"Alliance" user_team_name=_"Alliance"
controller=human controller=human
[/side] [/side]
# Check if Krash is on recall list and if yes replace side 7 leader with him
# Here's where we edit out Krash's side if he's dead.
[event] [event]
name=prestart name=prestart
[if] [if]
[have_unit] [variable]
id=Krash name=Krash_alive
[/have_unit] equals=no
[else] [/variable]
[then]
[kill]
side=7
[/kill]
[terrain] [terrain]
x=29,29,30,30,30,31,31,31,32,32 x=29,29,30,30,30,31,31,31,32,32
y=6,7,5,6,7,6,7,8,6,7 y=6,7,5,6,7,6,7,8,6,7
@ -132,7 +140,7 @@
side=1 side=1
amount=200 amount=200
[/gold] [/gold]
[/else] [/then]
[/if] [/if]
[/event] [/event]
@ -196,7 +204,7 @@
speaker=Tallin speaker=Tallin
message= _ "Gods of Light! Look at that fortress. The castle Angthurim is even grimmer than its reputation." message= _ "Gods of Light! Look at that fortress. The castle Angthurim is even grimmer than its reputation."
[/message] [/message]
# Hidiel part takes place only if Anita is alive # Hidel part takes place only if Anita is alive
[if] [if]
[have_unit] [have_unit]
id=Anita id=Anita

View File

@ -155,6 +155,7 @@
team_name=orcs team_name=orcs
user_team_name=_"Alliance" user_team_name=_"Alliance"
[/side] [/side]
# Empty sides - to ensure proper recall lists carryover # Empty sides - to ensure proper recall lists carryover
[side] [side]
side=4 side=4
@ -168,7 +169,10 @@
side=6 side=6
no_leader=yes no_leader=yes
[/side] [/side]
# Empty side - player will asume control of it if Krash is alive
# 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
# list if he is.
[side] [side]
side=7 side=7
type=Drake Burner type=Drake Burner
@ -182,12 +186,14 @@
user_team_name=_"Alliance" user_team_name=_"Alliance"
controller=human controller=human
[/side] [/side]
# Empty side - to ensure proper recall list caryover
# Empty side - to ensure proper recall list carryover
[side] [side]
side=8 side=8
no_leader=yes no_leader=yes
[/side] [/side]
# Empty side - player will asume control of it if Anita is alive
# Empty side - player will assume control of it if Anita is alive
[side] [side]
side=9 side=9
{GOLD4 500 400 350 300} {GOLD4 500 400 350 300}
@ -201,22 +207,27 @@
[event] [event]
name=prestart name=prestart
# {SCATTER_IMAGE (terrain=Gs^Fp) 20 scenery/pine2.png} # Here's where we edit out Krash's side if he's dead.
# If Krash is alive place him at sides 7 keep, otherwise remove that castle
[if] [if]
[have_unit] [variable]
id=Krash name=Krash_alive
[/have_unit] equals=no
[else] [/variable]
[then]
[kill]
side=7
[/kill]
[terrain] [terrain]
x=4,4,4,5,5,5,6,6,6 x=4,4,4,5,5,5,6,6,6
y=3,4,5,3,4,5,3,4,5 y=3,4,5,3,4,5,3,4,5
terrain=Gs^Fp terrain=Gs^Fp
[/terrain] [/terrain]
[/else] [/then]
[/if] [/if]
# If Anita is alive change her to recruiting leader of side 9 and place on that keep
# If Anita is alive change her to recruiting leader of side 9 and
# place on that keep. This method works because, unlike Krash, she
# has no recall list of followers to preserve.
[recall] [recall]
id=Anita id=Anita
[/recall] [/recall]

View File

@ -202,7 +202,10 @@
[/ai] [/ai]
[/side] [/side]
{STARTING_VILLAGES 6 4} {STARTING_VILLAGES 6 4}
# Side for Krash, if alive
# Krash may not actually still be alive at this point, but setting up
# his side this way is the only way to reliably pick up his recall
# list if he is. Later, we'll edit in another leader if he's dead.
[side] [side]
side=7 side=7
type=Drake Burner type=Drake Burner
@ -217,6 +220,7 @@
controller=human controller=human
[/side] [/side]
{STARTING_VILLAGES 7 10} {STARTING_VILLAGES 7 10}
# Allied AI # Allied AI
[side] [side]
type=Dwarvish Lord type=Dwarvish Lord
@ -248,6 +252,7 @@
[/ai] [/ai]
[/side] [/side]
{STARTING_VILLAGES 8 10} {STARTING_VILLAGES 8 10}
# Side for Anita if alive # Side for Anita if alive
[side] [side]
side=9 side=9
@ -263,8 +268,10 @@
[event] [event]
name=prestart name=prestart
# {SCATTER_IMAGE (terrain=Gg,Gs^Fp) 12 scenery/pine1.png} # Check if Krash is alive, if yes place him at helm of side 7,
# Check if Krash is alive, if yes place him at helm of side 7, otherwise it's taken over by older lich # 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.
[recall] [recall]
id="Ro'Arthian" id="Ro'Arthian"
[/recall] [/recall]
@ -273,10 +280,11 @@
variable=side_seven_starts_at variable=side_seven_starts_at
[/store_starting_location] [/store_starting_location]
[if] [if]
[have_unit] [variable]
id=Krash name=Krash_alive
[/have_unit] equals=no
[else] [/variable]
[then]
[store_unit] [store_unit]
[filter] [filter]
id="Ro'Arthian" id="Ro'Arthian"
@ -301,14 +309,18 @@
type=Troll,Troll Whelp,Ogre,Young Ogre,Mage,Red Mage,Gryphon type=Troll,Troll Whelp,Ogre,Young Ogre,Mage,Red Mage,Gryphon
[/allow_recruit] [/allow_recruit]
{CLEAR_VARIABLE place_lich_at} {CLEAR_VARIABLE place_lich_at}
[/else] [/then]
[/if] [/if]
# Hide unit for spectacular entrance # Hide unit for spectacular entrance
[hide_unit] [hide_unit]
x=$side_seven_starts_at.x x=$side_seven_starts_at.x
y=$side_seven_starts_at.y y=$side_seven_starts_at.y
[/hide_unit] [/hide_unit]
# Check if Anita is alive, if yes place her at helm of side 9, if no younger lich assumes command
# Check if Anita is alive. If yes place her at the helm of side 9,
# if no younger lich assumes command. Note, this method does
# not carry over veterans from the previous scenario,
[recall] [recall]
id=Anita id=Anita
[/recall] [/recall]

View File

@ -40,6 +40,7 @@
speaker=Camerin speaker=Camerin
message= _ "Awww, I liked that guy!" message= _ "Awww, I liked that guy!"
[/message] [/message]
{VARIABLE Krash_alive no}
[/event] [/event]
# Death events for Stalrag and lich brothers, in ifdef to prevent them firing when you fight them in Settling Disputes # Death events for Stalrag and lich brothers, in ifdef to prevent them firing when you fight them in Settling Disputes
@ -713,6 +714,7 @@
name=random name=random
[/clear_variable] [/clear_variable]
[/event] [/event]
# Elenia death # Elenia death
[event] [event]
name=die name=die