Get rid of the Garak special units.

This involved giving Garak an object to modify his ranged attack and
creating a global event to re-hack his portrait if he adances to
Desert Marshal (his stats as a Marshal are stock).

The portrait-setting on advancement is the same thing that's done with Elyssa.
I've abstracted this into a SET_PORTRAIT_ON_ADVANCE macro.

Also, tweak Desert Captain to use SPECIAL_NOTES_LEADERSHIP.
This commit is contained in:
Eric S. Raymond 2007-04-16 01:21:12 +00:00
parent af41a9a918
commit a33e0a2fbc
6 changed files with 23 additions and 271 deletions

View File

@ -575,16 +575,23 @@ name=moveto
{FREE_UNIT (Small Mudcrawler) (Rocky Horror) ( _ "Rocky Horror") 2 34 35}
[unit]
type=Garak Captain
type=Desert Captain
description=Garak
user_description= _ "Garak"
upkeep=full
x=35
y=34
side=1
hitpoints=44 # A bit less than for a Desert Captain
[modifications]
{TRAIT_STRONG}
{TRAIT_LOYAL}
[object]
apply_to=attack
range=ranged
name="Superior archery skills."
increase_damage=1
[/object]
[/modifications]
{IS_HERO}
[/unit]

View File

@ -30,9 +30,7 @@
advanceto=Desert Marshal
cost=40
usage=fighter
unit_description= _ "Skilled in commanding other elves, Desert Captains provide a bonus to all level 1 units on adjacent hexes. Desert Captains prefer engaging the enemy in melee combat, but are trained in archery as well.
Special Notes: the leadership of a Captain enables friendly units next to it to deal more damage in combat, though this only applies to units of lower level."
unit_description= _ "Skilled in commanding other elves, Desert Captains provide a bonus to all level 1 units on adjacent hexes. Desert Captains prefer engaging the enemy in melee combat, but are trained in archery as well." + {SPECIAL_NOTES_LEADERSHIP}
die_sound={SOUND_LIST:ELF_HIT}
{DEFENSE_ANIM_RANGE "newelves/desert-elvish-captain-defend.png" newelves/desert-elvish-captain.png {SOUND_LIST:ELF_HIT} melee}
{DEFENSE_ANIM_RANGE "newelves/desert-elvish-captain-bow-defend.png" newelves/desert-elvish-captain.png {SOUND_LIST:ELF_HIT} ranged}

View File

@ -1,128 +0,0 @@
[unit]
#textdomain wesnoth-utbs
id=Garak Captain
name= _ "Desert Captain"
race=elf
image=newelves/desert-elvish-captain.png
profile=portraits/garak.png
image_long=newelves/desert-elvish-captain-bow.png
image_leading=newelves/desert-elvish-captain-leading.png
hitpoints=44
[abilities]
{ABILITY_LEADERSHIP_LEVEL_2}
[/abilities]
movement_type=woodland
# Desert elves move fast across the sands, but are not used to forests.
# They are also a bit faster in caves.
[movement_costs]
sand=1
forest=2
cave=2
tundra=3
[/movement_costs]
[defense]
sand=40
forest=50
[/defense]
movement=5
experience=90
level=2
alignment=lawful
advanceto=Garak Marshal
cost=40
usage=fighter
unit_description= _ "Skilled in commanding other elves, Desert Captains provide a bonus to all level 1 units on adjacent hexes. Desert Captains prefer engaging the enemy in melee combat, but are trained in archery as well."
hide_help=true
die_sound={SOUND_LIST:ELF_HIT}
{DEFENSE_ANIM_RANGE "newelves/desert-elvish-captain-defend.png" newelves/desert-elvish-captain.png {SOUND_LIST:ELF_HIT} melee}
{DEFENSE_ANIM_RANGE "newelves/desert-elvish-captain-bow-defend.png" newelves/desert-elvish-captain.png {SOUND_LIST:ELF_HIT} ranged}
[attack]
name=sword
description= _"sword"
type=blade
range=melee
damage=8
number=4
icon=attacks/sword-elven.png
[animation]
[if]
hits=yes
[frame]
begin=-101
end=100
image=newelves/desert-elvish-captain-attack.png
sound={SOUND_LIST:SWORD_SWISH}
[/frame]
[/if]
[else]
hits=no
[frame]
begin=-101
end=100
image=newelves/desert-elvish-captain-attack.png
sound={SOUND_LIST:MISS}
[/frame]
[/else]
[/animation]
[/attack]
[attack]
name=bow
description= _"bow"
type=pierce
range=ranged
damage=5
number=3
icon=attacks/bow-elven.png
[animation]
[missile_frame]
begin=-100
end=0
image=projectiles/missile-n.png
image_diagonal=projectiles/missile-ne.png
[/missile_frame]
[frame]
begin=-600
end=-450
image=newelves/desert-elvish-captain-bow.png
[/frame]
[if]
hits=yes
[frame]
begin=-450
end=-300
image=newelves/desert-elvish-captain-bow-attack1.png
sound=bow.ogg
[/frame]
[/if]
[else]
hits=no
[frame]
begin=-450
end=-300
image=newelves/desert-elvish-captain-bow-attack1.png
sound=bow-miss.ogg
[/frame]
[/else]
[frame]
begin=-300
end=-200
image=newelves/desert-elvish-captain-bow-attack2.png
[/frame]
[frame]
begin=-200
end=-100
image=newelves/desert-elvish-captain-bow-attack3.png
[/frame]
[frame]
begin=-100
end=0
image=newelves/desert-elvish-captain-bow-attack3.png
[/frame]
[frame]
begin=0
end=100
image=newelves/desert-elvish-captain-bow.png
[/frame]
[/animation]
[/attack]
[/unit]

View File

@ -1,129 +0,0 @@
[unit]
#textdomain wesnoth-utbs
id=Garak Marshal
name= _ "Desert Marshal"
race=elf
image=newelves/desert-elvish-marshal.png
profile=portraits/garak.png
image_long=newelves/desert-elvish-marshal-bow.png
image_leading=newelves/desert-elvish-marshal-leading.png
hitpoints=62
[abilities]
{ABILITY_LEADERSHIP_LEVEL_3}
[/abilities]
movement_type=woodland
#desert elves move fast across the sands, but are not used to forests
#they are also a bit faster in caves
[movement_costs]
sand=1
forest=2
cave=2
tundra=3
[/movement_costs]
[defense]
sand=40
forest=50
[/defense]
movement=5
experience=100
level=3
alignment=lawful
advanceto=null
{AMLA_TOUGH 3}
cost=80
usage=fighter
unit_description= _ "Desert Marshals are master commanders, able to inspire confidence in any level 1 or 2 unit in adjacent hexes, causing them to fight with increased skill. Desert Marshals prefer engaging the enemy in melee combat, but are trained in archery as well."
hide_help=true
die_sound={SOUND_LIST:ELF_HIT}
{DEFENSE_ANIM_RANGE "newelves/desert-elvish-marshal-defend.png" newelves/desert-elvish-marshal.png {SOUND_LIST:ELF_HIT} melee}
{DEFENSE_ANIM_RANGE "newelves/desert-elvish-marshal-bow.png" newelves/desert-elvish-marshal.png {SOUND_LIST:ELF_HIT} ranged}
[attack]
name=sword
description= _"sword"
type=blade
range=melee
damage=11
number=4
icon=attacks/sword-elven.png
[animation]
[if]
hits=yes
[frame]
begin=-101
end=100
image=newelves/desert-elvish-marshal-attack.png
sound={SOUND_LIST:SWORD_SWISH}
[/frame]
[/if]
[else]
hits=no
[frame]
begin=-101
end=100
image=newelves/desert-elvish-marshal-attack.png
sound={SOUND_LIST:MISS}
[/frame]
[/else]
[/animation]
[/attack]
[attack]
name=bow
description= _"bow"
type=pierce
range=ranged
damage=7
number=3
icon=attacks/bow-elven.png
[animation]
[missile_frame]
begin=-100
end=0
image=projectiles/missile-n.png
image_diagonal=projectiles/missile-ne.png
[/missile_frame]
[frame]
begin=-600
end=-450
image=newelves/desert-elvish-marshal-bow.png
[/frame]
[if]
hits=yes
[frame]
begin=-450
end=-300
image=newelves/desert-elvish-marshal-attack1.png
sound=bow.ogg
[/frame]
[/if]
[else]
hits=no
[frame]
begin=-450
end=-300
image=newelves/desert-elvish-marshal-attack1.png
sound=bow-miss.ogg
[/frame]
[/else]
[frame]
begin=-300
end=-200
image=newelves/desert-elvish-marshal-attack2.png
[/frame]
[frame]
begin=-200
end=-100
image=newelves/desert-elvish-marshal-attack3.png
[/frame]
[frame]
begin=-100
end=0
image=newelves/desert-elvish-marshal-attack3.png
[/frame]
[frame]
begin=0
end=100
image=newelves/desert-elvish-marshal-bow.png
[/frame]
[/animation]
[/attack]
[/unit]

View File

@ -1,10 +1,3 @@
[event]
name=post_advance
[filter]
description=Elyssa
type=Silver Mage
[/filter]
{MODIFY_UNIT description=Elyssa profile "portraits/elyssa_silver.png"}
[/event]
# Make sure our special units keep the right portraits as they advance
{SET_PORTRAIT_ON_ADVANCE "Elyssa" "Silver Mage" "portraits/elyssa_silver.png"}
{SET_PORTRAIT_ON_ADVANCE "Garak" "Desert Marshal" "portraits/garak.png"}

View File

@ -126,3 +126,14 @@ $UNIT_OVERLAY_store[$UNIT_OVERLAY_i].y}
{CLEAR_VARIABLE UNIT_OVERLAY_store}
#enddef
#define SET_PORTAIT_ON_ADVANCE NAME TYPE PORTRAIT
[event]
name=post_advance
[filter]
description={NAME}
type={TYPE}
[/filter]
{MODIFY_UNIT description={NAME} profile {PORTRAIT}}
[/event]