SotA: transform units in S5 instead of S18

this commit differs from the 1.14 one

[ci skip]

(cherry-picked from commit 307d1d1d44)
This commit is contained in:
Severin Glöckner 2018-05-26 03:52:09 +02:00
parent 768c49ec61
commit fda634af12
8 changed files with 41 additions and 36 deletions

View file

@ -113,7 +113,7 @@ With further observation, I have determined that this is probably not the way to
[side]
# wmllint: who SIDE_1_ARDONNA is Ardonna
{SIDE_1_ARDONNA}
{SIDE_1_ARDONNA_EARLY}
facing=se
{GOLD 15 5 0}
fog=yes

View file

@ -52,7 +52,7 @@ I decided to hide in the cemetery. That way I could try my experiment to animate
{TURNS 18 18 18}
[side]
{SIDE_1_ARDONNA}
{SIDE_1_ARDONNA_EARLY}
{GOLD 50 40 30}
facing=se
# The scenario won't be shrouded, but some of the intro dialog is:

View file

@ -27,7 +27,7 @@ Even with the delay at the graveyard, I reached the outskirts of Llorvin at firs
{TURNS 35 35 35}
[side]
{SIDE_1_ARDONNA}
{SIDE_1_ARDONNA_EARLY}
{GOLD 150 150 140}
[/side]

View file

@ -89,7 +89,7 @@ The journey started well enough, but on the dawn following our departure, the wi
{TURNS 14 15 16}
[side]
{SIDE_1_ARDONNA}
{SIDE_1_ARDONNA_EARLY}
# We are assuming substantial gold from the previous scenario:
{GOLD 60 40 20}
facing=ne

View file

@ -42,7 +42,7 @@ When the captain retained his memories, I reasoned that it may have been because
{TURNS 28 28 28}
[side]
{SIDE_1_ARDONNA}
{SIDE_1_ARDONNA_EARLY}
{GOLD 270 230 200}
income=6
facing=se

View file

@ -119,6 +119,31 @@ I was so sure I had the answer! I was wrong. I wanted to believe that I was imag
[event]
name=prestart
# The modifed bats were only needed for the ship
# transform them, and recruit only normal ones from now on
[disallow_recruit]
side=1
type=Vampire Bat SotA
[/disallow_recruit]
[allow_recruit]
side=1
type=Vampire Bat
[/allow_recruit]
[lua]
code = <<
for i, u in ipairs(wesnoth.get_recall_units { type = 'Vampire Bat SotA, Blood Bat SotA, Dread Bat SotA' }) do
if u.type == 'Vampire Bat SotA' then
u:transform('Vampire Bat')
elseif u.type == 'Blood Bat SotA' then
u:transform('Blood Bat')
elseif u.type == 'Dread Bat SotA' then
u:transform('Dread Bat')
end
end
>>
[/lua]
{RECALL_LOYAL_UNITS}
# Using a shroud_data file would work too, but this is easier to modify if

View file

@ -162,35 +162,6 @@ Now the process is complete for both of us. I posted a guard so nothing could ha
>>
[/lua]
# We need to change all existing bats to normal types instead of SotA types
# so they are drawn above terrains. SotA bats were necessary for the ship
# where they were drawn behind the rigging, but for the spiderwebs in this
# scenario, normal bats look a lot better. First, we'll make sure newly
# recruited ones will be correct:
[disallow_recruit]
side=1
type=Vampire Bat SotA
[/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 = <<
for i, u in ipairs(wesnoth.get_recall_units { type = 'Vampire Bat SotA, Blood Bat SotA, Dread Bat SotA' }) do
if u.type == 'Vampire Bat SotA' then
u:transform('Vampire Bat')
elseif u.type == 'Blood Bat SotA' then
u:transform('Blood Bat')
elseif u.type == 'Dread Bat SotA' then
u:transform('Dread Bat')
end
end
>>
[/lua]
#ifndef HARD
[terrain]
x,y=28,7

View file

@ -1,6 +1,6 @@
#textdomain wesnoth-sota
#define SIDE_1_ARDONNA
#define SIDE_1_ARDONNA_BASE
side=1
controller=human
team_name=good
@ -16,10 +16,19 @@
{TRAIT_QUICK}
{TRAIT_RESILIENT}
[/modifications]
recruit=Vampire Bat SotA
{FLAG_VARIANT undead}
#enddef
#define SIDE_1_ARDONNA
{SIDE_1_ARDONNA_BASE}
recruit=Vampire Bat
#enddef
#define SIDE_1_ARDONNA_EARLY
{SIDE_1_ARDONNA_BASE}
recruit=Vampire Bat SotA
#enddef
#define SIDE_1_RAS-TABAHN
side=1
controller=human