SotA: Simplfy bat handling for the ship & for change level compatability
This commit is contained in:
parent
352d8838f8
commit
f6da00c132
21 changed files with 65 additions and 36 deletions
|
@ -129,7 +129,7 @@ With further observation, I have determined that this is probably not the way to
|
|||
# *************************** MACROS ***************************
|
||||
#define PLACE_BAT X Y TRAIT1
|
||||
[unit]
|
||||
type=SotA Vampire Bat
|
||||
type=Vampire Bat
|
||||
x={X}
|
||||
y={Y}
|
||||
side=1
|
||||
|
@ -366,6 +366,7 @@ With further observation, I have determined that this is probably not the way to
|
|||
|
||||
{HERO_DEATHS}
|
||||
{MANAGE_PROFILE}
|
||||
{MAKE_BATS_NORMAL}
|
||||
{ZOMBIES}
|
||||
|
||||
#undef PLACE_WOLF
|
||||
|
|
|
@ -333,7 +333,7 @@ of Healing"
|
|||
|
||||
# Choose a bat off the recall list if there is one.
|
||||
[role]
|
||||
type=SotA Blood Bat, SotA Vampire Bat # A Dread Bat would be too powerful.
|
||||
type=Blood Bat, Vampire Bat # A Dread Bat would be too powerful.
|
||||
search_recall_list=yes
|
||||
role=hiding_bat
|
||||
[/role]
|
||||
|
@ -354,7 +354,7 @@ of Healing"
|
|||
[/then]
|
||||
[else]
|
||||
[unit]
|
||||
type=SotA Vampire Bat
|
||||
type=Vampire Bat
|
||||
x, y=1, 1
|
||||
[/unit]
|
||||
[store_unit]
|
||||
|
@ -421,7 +421,7 @@ of Healing"
|
|||
[if]
|
||||
[variable]
|
||||
name=frightened_bat.type
|
||||
equals=SotA Vampire Bat
|
||||
equals=Vampire Bat
|
||||
[/variable]
|
||||
[then]
|
||||
[set_variable]
|
||||
|
@ -535,7 +535,7 @@ of Healing"
|
|||
[/then]
|
||||
[else]
|
||||
[unit]
|
||||
type=SotA Vampire Bat
|
||||
type=Vampire Bat
|
||||
x, y=$bat_x, $bat_y
|
||||
moves=0
|
||||
[/unit]
|
||||
|
@ -928,6 +928,7 @@ Well, I might as well do my experiment and worry about leaving later."
|
|||
[/message]
|
||||
[/event]
|
||||
{HERO_DEATHS}
|
||||
{MAKE_BATS_NORMAL}
|
||||
{ZOMBIES}
|
||||
{MANAGE_PROFILE}
|
||||
|
||||
|
|
|
@ -270,6 +270,7 @@ Even with the delay at the graveyard, I reached the outskirts of Llorvin at firs
|
|||
[/event]
|
||||
|
||||
{HERO_DEATHS}
|
||||
{MAKE_BATS_NORMAL}
|
||||
{ZOMBIES}
|
||||
{MANAGE_PROFILE}
|
||||
|
||||
|
|
|
@ -253,6 +253,7 @@ The journey started well enough, but on the dawn following our departure, the wi
|
|||
[/event]
|
||||
|
||||
# *************************** PLAY ***************************
|
||||
|
||||
#define MOVE_TO_LOWER_DECK X Y
|
||||
[move_unit]
|
||||
x,y={X},{Y}
|
||||
|
@ -648,6 +649,7 @@ The journey started well enough, but on the dawn following our departure, the wi
|
|||
[/event]
|
||||
|
||||
{HERO_DEATHS}
|
||||
{TRANSFORM_BATS_FOR_SHIP}
|
||||
{ZOMBIES}
|
||||
{MANAGE_PROFILE}
|
||||
|
||||
|
|
|
@ -211,6 +211,7 @@ When the captain retained his memories, I reasoned that it may have been because
|
|||
[/event]
|
||||
|
||||
# *************************** PLAY ***************************
|
||||
|
||||
# The next two events control the ability of side 2 to recruit a level-2 unit.
|
||||
[event]
|
||||
name=side 2 turn
|
||||
|
@ -431,6 +432,7 @@ When the captain retained his memories, I reasoned that it may have been because
|
|||
[/event]
|
||||
|
||||
{HERO_DEATHS}
|
||||
{TRANSFORM_BATS_FOR_SHIP}
|
||||
{ZOMBIES}
|
||||
{MANAGE_PROFILE}
|
||||
|
||||
|
|
|
@ -117,8 +117,6 @@ I was so sure I had the answer! I was wrong. I wanted to believe that I was imag
|
|||
|
||||
# *************************** PRESTART ***************************
|
||||
|
||||
{SIDE_1_ARDONNA:TRANSFROM_BATS_TO_NORMAL_EVENT}
|
||||
|
||||
[event]
|
||||
name=prestart
|
||||
{RECALL_LOYAL_UNITS}
|
||||
|
@ -606,6 +604,7 @@ I was so sure I had the answer! I was wrong. I wanted to believe that I was imag
|
|||
[/event]
|
||||
|
||||
{HERO_DEATHS}
|
||||
{MAKE_BATS_NORMAL}
|
||||
{ZOMBIES}
|
||||
{MANAGE_PROFILE}
|
||||
|
||||
|
|
|
@ -155,8 +155,6 @@ The tunnel at the back of the cave narrowed and ran on for quite some time. Patc
|
|||
[/redraw]
|
||||
#enddef
|
||||
|
||||
{SIDE_1_ARDONNA:TRANSFROM_BATS_TO_NORMAL_EVENT}
|
||||
|
||||
[event]
|
||||
name=start
|
||||
|
||||
|
|
|
@ -464,6 +464,7 @@ After several days of travel, he approached the frontier town of Carcyn."
|
|||
[/event]
|
||||
|
||||
{HERO_DEATHS}
|
||||
{MAKE_BATS_NORMAL}
|
||||
{ZOMBIES}
|
||||
{KIDS_ADVANCE}
|
||||
[/scenario]
|
||||
|
|
|
@ -424,6 +424,7 @@
|
|||
[/event]
|
||||
|
||||
{HERO_DEATHS}
|
||||
{MAKE_BATS_NORMAL}
|
||||
{ZOMBIES}
|
||||
{KIDS_ADVANCE}
|
||||
[/scenario]
|
||||
|
|
|
@ -575,6 +575,7 @@
|
|||
[/event]
|
||||
|
||||
{HERO_DEATHS}
|
||||
{MAKE_BATS_NORMAL}
|
||||
{ZOMBIES}
|
||||
{KIDS_ADVANCE}
|
||||
[/scenario]
|
||||
|
|
|
@ -88,8 +88,6 @@ Rastaban seems like an acceptable ally. He is quite different from the stodgy te
|
|||
|
||||
# *************************** PRESTART ***************************
|
||||
|
||||
{SIDE_1_ARDONNA:TRANSFROM_BATS_TO_NORMAL_EVENT}
|
||||
|
||||
[event]
|
||||
name=prestart
|
||||
|
||||
|
@ -265,6 +263,7 @@ Rastaban seems like an acceptable ally. He is quite different from the stodgy te
|
|||
[/event]
|
||||
|
||||
{HERO_DEATHS}
|
||||
{MAKE_BATS_NORMAL}
|
||||
{ZOMBIES}
|
||||
{MANAGE_PROFILE}
|
||||
[/scenario]
|
||||
|
|
|
@ -90,8 +90,6 @@ My primary objective was met, and I had been able to press a number of ghosts in
|
|||
|
||||
# *************************** PRESTART ***************************
|
||||
|
||||
{SIDE_1_ARDONNA:TRANSFROM_BATS_TO_NORMAL_EVENT}
|
||||
|
||||
[event]
|
||||
name=prestart
|
||||
|
||||
|
@ -391,6 +389,7 @@ My primary objective was met, and I had been able to press a number of ghosts in
|
|||
[/event]
|
||||
|
||||
{HERO_DEATHS}
|
||||
{MAKE_BATS_NORMAL}
|
||||
{ZOMBIES}
|
||||
{MANAGE_PROFILE}
|
||||
|
||||
|
|
|
@ -28,8 +28,6 @@ I never would have been able to escape the trees without ghosts. They had proven
|
|||
gold=0
|
||||
[/side]
|
||||
|
||||
{SIDE_1_ARDONNA:TRANSFROM_BATS_TO_NORMAL_EVENT}
|
||||
|
||||
[event]
|
||||
name=prestart
|
||||
|
||||
|
|
|
@ -262,6 +262,7 @@ We reached the Ford of Abez as the dawn light spread behind the mountain peaks t
|
|||
[/event]
|
||||
|
||||
{HERO_DEATHS}
|
||||
{MAKE_BATS_NORMAL}
|
||||
{ZOMBIES}
|
||||
{MANAGE_PROFILE}
|
||||
{KIDS_ADVANCE}
|
||||
|
|
|
@ -406,6 +406,7 @@ We have reached a pass through the mountains that Ras-Tabahn knew of. The air is
|
|||
[/event]
|
||||
|
||||
{HERO_DEATHS}
|
||||
{MAKE_BATS_NORMAL}
|
||||
{ZOMBIES}
|
||||
{MANAGE_PROFILE}
|
||||
{KIDS_ADVANCE}
|
||||
|
|
|
@ -526,6 +526,7 @@ We crossed the high plateaus, and forded the Arkan-thoria. Then we headed up int
|
|||
[/event]
|
||||
|
||||
{HERO_DEATHS}
|
||||
{MAKE_BATS_NORMAL}
|
||||
{ZOMBIES}
|
||||
{MANAGE_PROFILE}
|
||||
{KIDS_ADVANCE}
|
||||
|
|
|
@ -522,6 +522,7 @@ Now the process is complete for both of us. I posted a guard so nothing could ha
|
|||
{ALLOW_LICHES}
|
||||
{TURN_INTO_A_LICH}
|
||||
{HERO_DEATHS}
|
||||
{MAKE_BATS_NORMAL}
|
||||
{ZOMBIES}
|
||||
{MANAGE_PROFILE}
|
||||
{KIDS_ADVANCE}
|
||||
|
|
|
@ -158,6 +158,7 @@ We continued down the tunnel in utter darkness for a time. The darkness presente
|
|||
{ALLOW_LICHES}
|
||||
{TURN_INTO_A_LICH}
|
||||
{HERO_DEATHS}
|
||||
{MAKE_BATS_NORMAL}
|
||||
{ZOMBIES}
|
||||
{MANAGE_PROFILE}
|
||||
{KIDS_ADVANCE}
|
||||
|
|
|
@ -816,6 +816,7 @@ We left the fires of the mountain behind and plunged once more into darkness. Af
|
|||
{ALLOW_LICHES}
|
||||
{TURN_INTO_A_LICH}
|
||||
{HERO_DEATHS}
|
||||
{MAKE_BATS_NORMAL}
|
||||
{ZOMBIES}
|
||||
{MANAGE_PROFILE}
|
||||
{KIDS_ADVANCE}
|
||||
|
|
|
@ -908,6 +908,7 @@ We finally made it out of the mountains. We crossed the Ford of Abez late this m
|
|||
{ALLOW_LICHES}
|
||||
{TURN_INTO_A_LICH}
|
||||
{HERO_DEATHS}
|
||||
{MAKE_BATS_NORMAL}
|
||||
{ZOMBIES}
|
||||
{MANAGE_PROFILE}
|
||||
{KIDS_ADVANCE}
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#define SIDE_1_ARDONNA_EARLY
|
||||
{SIDE_1_ARDONNA_BASE}
|
||||
recruit=SotA Vampire Bat
|
||||
recruit=Vampire Bat
|
||||
#enddef
|
||||
|
||||
#define SIDE_1_RAS-TABAHN
|
||||
|
@ -1054,29 +1054,48 @@
|
|||
[/set_menu_item]
|
||||
#enddef
|
||||
|
||||
# this is inserted in some scenarios to clear SotA Bats from older saves
|
||||
# it needs to be in all scenarios which use SIDE_1_ARDONNA, otherwise the player
|
||||
# may be able to recruit normal and SotA bats, or be able to recruit bats when
|
||||
# he plays someone who should not be able to do so
|
||||
#define SIDE_1_ARDONNA:TRANSFROM_BATS_TO_NORMAL_EVENT
|
||||
# SotA bats were necessary for the ship where they were drawn behind the
|
||||
# rigging, but not in later scenarios.
|
||||
# This is inserted in scenarios with the ship, so the bats will show properly underneath the ship rigging.
|
||||
# Covers recruit, recall, and debug created units
|
||||
#define TRANSFORM_BATS_FOR_SHIP
|
||||
[event]
|
||||
name=unit placed
|
||||
first_time_only=no
|
||||
[filter]
|
||||
type=Vampire Bat,Blood Bat,Dread Bat
|
||||
[/filter]
|
||||
[switch]
|
||||
variable=unit.type
|
||||
[case]
|
||||
value=Vampire Bat
|
||||
[transform_unit]
|
||||
id=$unit.id
|
||||
transform_to=SotA Vampire Bat
|
||||
[/transform_unit]
|
||||
[/case]
|
||||
[case]
|
||||
value=Blood Bat
|
||||
[transform_unit]
|
||||
id=$unit.id
|
||||
transform_to=SotA Blood Bat
|
||||
[/transform_unit]
|
||||
[/case]
|
||||
[case]
|
||||
value=Dread Bat
|
||||
[transform_unit]
|
||||
id=$unit.id
|
||||
transform_to=SotA Dread Bat
|
||||
[/transform_unit]
|
||||
[/case]
|
||||
[/switch]
|
||||
[/event]
|
||||
#enddef
|
||||
|
||||
#define MAKE_BATS_NORMAL
|
||||
# Make sure bats are turned back to normal. Inserted on all non-ship levels so debug change level will work correctly
|
||||
[event]
|
||||
name=prestart
|
||||
|
||||
# First, we'll make sure newly recruited ones will be correct
|
||||
[disallow_recruit]
|
||||
side=1
|
||||
type=SotA Vampire Bat
|
||||
[/disallow_recruit]
|
||||
[allow_recruit]
|
||||
side=1
|
||||
type=Vampire Bat
|
||||
[/allow_recruit]
|
||||
|
||||
# Now the type of all bats on the recall list is changed
|
||||
[lua]
|
||||
code = <<
|
||||
code=<<
|
||||
for i, u in ipairs(wesnoth.get_recall_units { type = 'SotA Vampire Bat, SotA Blood Bat, SotA Dread Bat' }) do
|
||||
if u.type == 'SotA Vampire Bat' then
|
||||
u:transform('Vampire Bat')
|
||||
|
|
Loading…
Add table
Reference in a new issue