Skip to content

Commit

Permalink
SotA: Type change to follow convention for the Dark Adept line
Browse files Browse the repository at this point in the history
Also changes handling of conditions that allow them to level into liches.
  • Loading branch information
beetlenaut authored and sigurdfdragon committed Jan 15, 2019
1 parent 564722d commit 888d128
Show file tree
Hide file tree
Showing 15 changed files with 60 additions and 56 deletions.
Expand Up @@ -34,7 +34,7 @@ The tunnel at the back of the cave narrowed and ran on for quite some time. Patc
controller=ai
team_name=good
user_team_name= _ "Ras-Tabahn"
type=Dark Sorcerer SotA
type=SotA Dark Sorcerer
name= _ "Ras-Tabahn"
id=Ras-Tabahn
canrecruit=yes
Expand Down
Expand Up @@ -102,7 +102,7 @@
[unit]
x={X}
y={Y}
type=Dark Adept SotA
type=SotA Dark Adept
side=1
moves=0
gender={GENDER} # Otherwise, they're all male, and there's no reason for that.
Expand Down Expand Up @@ -296,7 +296,7 @@
[allow_recruit]
side=1
# This type of Dark Adept cannot advance to a lich.
type=Dark Adept SotA
type=SotA Dark Adept
[/allow_recruit]
# Gold was removed at the beginning, and is returned now.
[gold]
Expand Down
Expand Up @@ -180,7 +180,7 @@ I never would have been able to escape the trees without ghosts. They had proven
# maybe Chocobones too:
[allow_recruit]
side=1
type=Dark Adept SotA
type=SotA Dark Adept
[/allow_recruit]
[if]
[variable]
Expand Down
Expand Up @@ -106,7 +106,7 @@ Now the process is complete for both of us. I posted a guard so nothing could ha
x=$x1
y=$y1
side=1
type=Necromancer, Necromancer SotA
type=Necromancer, SotA Necromancer
[/have_unit]
[/show_if]
[command]
Expand Down Expand Up @@ -136,32 +136,6 @@ Now the process is complete for both of us. I posted a guard so nothing could ha
[/command]
[/set_menu_item]

# From now on, newly recruited DAs need to be able to eventually advance to
# liches like normal. We will stop using the custom units in the recruit list.
[disallow_recruit]
side=1
type=Dark Adept SotA
[/disallow_recruit]
[allow_recruit]
side=1
type=Dark Adept
[/allow_recruit]

# This section changes all *existing* units so that they have liches in their
# advancement trees. As of 1.14 at least, [modify_unit] doesn't apply to
# the recall list, same for [transform_unit].
[lua]
code = <<
for i, u in ipairs(wesnoth.get_recall_units { type = 'Dark Adept SotA, Dark Sorcerer SotA' }) do
if u.type == 'Dark Adept SotA' then
u:transform('Dark Adept')
elseif u.type == 'Dark Sorcerer SotA' then
u:transform('Dark Sorcerer')
end
end
>>
[/lua]

#ifndef HARD
[terrain]
x,y=28,7
Expand Down Expand Up @@ -545,6 +519,7 @@ Now the process is complete for both of us. I posted a guard so nothing could ha
[/endlevel]
[/event]

{ALLOW_LICHES}
{TURN_INTO_A_LICH}
{HERO_DEATHS}
{MANAGE_PROFILE}
Expand Down
Expand Up @@ -155,6 +155,7 @@ We continued down the tunnel in utter darkness for a time. The darkness presente
[/endlevel]
[/event]

{ALLOW_LICHES}
{TURN_INTO_A_LICH}
{HERO_DEATHS}
{MANAGE_PROFILE}
Expand Down
Expand Up @@ -813,6 +813,7 @@ We left the fires of the mountain behind and plunged once more into darkness. Af
[/endlevel]
[/event]

{ALLOW_LICHES}
{TURN_INTO_A_LICH}
{HERO_DEATHS}
{MANAGE_PROFILE}
Expand Down
Expand Up @@ -417,7 +417,7 @@ We finally made it out of the mountains. We crossed the Ford of Abez late this m
[if]
[have_unit]
id=$close_units[$i].id
type=Ancient Lich, Ancient Lich SotA
type=Ancient Lich, SotA Ancient Lich
[/have_unit]
[then]
# Using "5" as the index chooses a level-4 unit:
Expand Down Expand Up @@ -872,6 +872,7 @@ We finally made it out of the mountains. We crossed the Ford of Abez late this m
[/message]
[/event]

{ALLOW_LICHES}
{TURN_INTO_A_LICH}
{HERO_DEATHS}
{MANAGE_PROFILE}
Expand Down
Expand Up @@ -12,7 +12,7 @@
experience=18
level=0
alignment=chaotic
advances_to=Footpad,Dark Adept SotA
advances_to=Footpad,SotA Dark Adept
cost=8
usage=fighter
description= _ "Some girls shun the typical life planned for them by society, and fall in with the criminal element. Though they may end up in jail, that seems preferable to them than tying themselves to a husband."
Expand Down
@@ -1,6 +1,6 @@
#textdomain wesnoth-sota
[unit_type]
id=Ancient Lich SotA
id=SotA Ancient Lich
#textdomain wesnoth-units
name= _ "Ancient Lich"
#textdomain wesnoth-sota
Expand Down
@@ -1,11 +1,11 @@
#textdomain wesnoth-units
# Same as normal, except advances to Dark Sorcerer SotA
# Same as normal, except advances to SotA Dark Sorcerer
[unit_type]
id=Dark Adept SotA
id=SotA Dark Adept
[base_unit]
id=Dark Adept
[/base_unit]
advances_to=Dark Sorcerer SotA
advances_to=SotA Dark Sorcerer
hide_help=yes
do_not_list=yes
[/unit_type]
@@ -1,11 +1,11 @@
#textdomain wesnoth-units
[unit_type]
id=Dark Sorcerer SotA
id=SotA Dark Sorcerer
[base_unit]
id=Dark Sorcerer
[/base_unit]
# The unit cannot advance to a lich until the main character learns how.
advances_to=Necromancer SotA
advances_to=SotA Necromancer
hide_help=yes
do_not_list=yes
[extra_anim]
Expand Down
4 changes: 2 additions & 2 deletions data/campaigns/Secrets_of_the_Ancients/units/Necro_Lich.cfg
@@ -1,10 +1,10 @@
#textdomain wesnoth-units
[unit_type]
id=Lich SotA
id=SotA Lich
[base_unit]
id=Lich
[/base_unit]
advances_to=Ancient Lich SotA
advances_to=SotA Ancient Lich
experience=250
hide_help=yes
do_not_list=yes
Expand Down
@@ -1,6 +1,6 @@
#textdomain wesnoth-units
[unit_type]
id=Necromancer SotA
id=SotA Necromancer
[base_unit]
id=Necromancer
[/base_unit]
Expand Down
4 changes: 2 additions & 2 deletions data/campaigns/Secrets_of_the_Ancients/units/Ruffian.cfg
@@ -1,11 +1,11 @@
#textdomain wesnoth-units
# Same as normal, except it can advance to Dark Adept SotA, too
# Same as normal, except it can advance to SotA Dark Adept, too
[unit_type]
id=SotA Ruffian
[base_unit]
id=Ruffian
[/base_unit]
advances_to=Footpad,Thug,Dark Adept SotA
advances_to=Footpad,Thug,SotA Dark Adept
hide_help=yes
do_not_list=yes
[/unit_type]
50 changes: 38 additions & 12 deletions data/campaigns/Secrets_of_the_Ancients/utils/sota-utils.cfg
Expand Up @@ -6,7 +6,7 @@
team_name=good
user_team_name= _ "Ardonna"
# This type of Dark Adept cannot eventually advance to a lich.
type=Dark Adept SotA
type=SotA Dark Adept
id=Ardonna
profile=portraits/ardonna.png
gender=female
Expand Down Expand Up @@ -35,7 +35,7 @@
team_name=good
user_team_name= _ "Ras-Tabahn"
# This type of Dark Sorcerer cannot advance to a lich.
type=Dark Sorcerer SotA
type=SotA Dark Sorcerer
id=Ras-Tabahn
name= _ "Ras-Tabahn"
canrecruit=yes
Expand All @@ -53,7 +53,7 @@
team_name=good
user_team_name= _ "Ardryn-Na"
# This type of Dark Adept cannot eventually advance to a lich.
type=Dark Adept SotA
type=SotA Dark Adept
id=Ardonna
profile=portraits/ardonna.png
gender=female
Expand Down Expand Up @@ -243,7 +243,7 @@
name=die
[filter]
id=Shynal
type=Lich SotA, Ancient Lich SotA, Lich, Ancient Lich
type=SotA Lich, SotA Ancient Lich, Lich, Ancient Lich
[/filter]
[if]
[have_unit]
Expand Down Expand Up @@ -331,14 +331,14 @@
[switch]
variable=Ardonna_stored.type
[case]
value=Necromancer SotA
value=SotA Necromancer
[set_variable]
name=Ardonna_stored.profile
value="portraits/humans/necromancer+female.png"
[/set_variable]
[/case]
[case]
value=Lich SotA, Ancient Lich SotA
value=SotA Lich, SotA Ancient Lich
[set_variable]
name=Ardonna_stored.profile
value="portraits/ardonna-lich.png"
Expand Down Expand Up @@ -399,14 +399,14 @@
[switch]
variable=Shynal_stored.type
[case]
value=Dark Adept SotA, Dark Adept, Dark Sorcerer SotA, Dark Sorcerer
value=SotA Dark Adept, Dark Adept, SotA Dark Sorcerer, Dark Sorcerer
[set_variable]
name=Shynal_stored.profile
value="portraits/shynal-adept.png"
[/set_variable]
[/case]
[case]
value=Necromancer SotA, Necromancer
value=SotA Necromancer, Necromancer
[set_variable]
name=Shynal_stored.profile
value="portraits/humans/necromancer+female.png"
Expand Down Expand Up @@ -446,7 +446,7 @@
[if]
# The dialog is different if one of the kids is already a Dark something.
[have_unit]
type=Dark Adept SotA, Dark Sorcerer SotA, Necromancer SotA, Dark Adept, Dark Sorcerer, Necromancer
type=SotA Dark Adept, SotA Dark Sorcerer, SotA Necromancer, Dark Adept, Dark Sorcerer, Necromancer
[and]
id=Shynal
[or]
Expand Down Expand Up @@ -481,7 +481,7 @@
[option]
message= _ "I have reconsidered. Perhaps you will be very powerful one day."
[command]
{ADVANCE_UNIT (id=$unit.id) (Dark Adept SotA)}
{ADVANCE_UNIT (id=$unit.id) (SotA Dark Adept)}
[modify_unit]
[filter]
id=$unit.id
Expand Down Expand Up @@ -522,7 +522,7 @@
[option]
message= _ "Very well. Having more adepts might be a good idea after all."
[command]
{ADVANCE_UNIT (id=$unit.id) (Dark Adept SotA)}
{ADVANCE_UNIT (id=$unit.id) (SotA Dark Adept)}
[modify_unit]
[filter]
id=$unit.id
Expand Down Expand Up @@ -829,7 +829,7 @@
[then]
[set_variable]
name=lich_type
value=Lich SotA
value=SotA Lich
[/set_variable]
[/then]
[else]
Expand Down Expand Up @@ -1076,3 +1076,29 @@
[/lua]
[/event]
#enddef

# After Ardonna learns how to turn into a Lich, that option becomes available to all Dark
# Sorcerers. This event will be added to scenarios after that point.
#define ALLOW_LICHES
[event]
name=unit_placed, post_advance
first_time_only=no
[filter]
type=SotA Dark Sorcerer
[/filter]
[object]
duration=forever
silent=yes
[effect]
[filter]
level=2
[/filter]
apply_to=new_advancement
# It's pretty easy for a unit to end up with multiple Liches in the
# level-up options unless we use replace=yes.
replace=yes
types=SotA Necromancer, Lich
[/effect]
[/object]
[/event]
#enddef

0 comments on commit 888d128

Please sign in to comment.