mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-17 02:43:26 +00:00
Should fix the weird bugs with the CHG_TYPE macro,
or at least the undead transformation in scenario 4.
This commit is contained in:
parent
b03756de0a
commit
4e1ce12744
@ -1,215 +1,223 @@
|
||||
#textdomain wesnoth-l
|
||||
|
||||
#define SET_VILLAGE X Y SIDE
|
||||
[capture_village]
|
||||
x={X}
|
||||
y={Y}
|
||||
side={SIDE}
|
||||
[/capture_village]
|
||||
#enddef
|
||||
|
||||
#define LOYAL_PEASANT TYPE X Y DESCRIPTION USER_DESCRIPTION SECOND_TRAIT
|
||||
[unit]
|
||||
type={TYPE}
|
||||
description={DESCRIPTION}
|
||||
user_description={USER_DESCRIPTION}
|
||||
x,y={X},{Y}
|
||||
side=1
|
||||
[modifications]
|
||||
{TRAIT_LOYAL}
|
||||
{SECOND_TRAIT}
|
||||
[/modifications]
|
||||
[/unit]
|
||||
#enddef
|
||||
|
||||
#
|
||||
# Two macros to make units, 1 loyal, 1 a guardian
|
||||
#
|
||||
|
||||
#define MK_GUARD X Y SIDE UTYPE NAME
|
||||
[unit]
|
||||
type={UTYPE}
|
||||
description={NAME}
|
||||
side={SIDE}
|
||||
x={X}
|
||||
y={Y}
|
||||
ai_special=guardian
|
||||
[/unit]
|
||||
#enddef
|
||||
|
||||
#
|
||||
# This one changes a unit from one type to another
|
||||
#
|
||||
|
||||
#define CHG_TYPE FILTER TARGET
|
||||
[store_unit]
|
||||
[filter]
|
||||
{FILTER}
|
||||
[/filter]
|
||||
|
||||
variable=chgtype_store
|
||||
kill=yes
|
||||
[/store_unit]
|
||||
|
||||
{FOREACH chgtype_store i}
|
||||
[set_variable]
|
||||
name=chgtype_store[$i].type
|
||||
value={TARGET}
|
||||
[/set_variable]
|
||||
|
||||
[unstore_unit]
|
||||
variable=chgtype_store[$i]
|
||||
advance=false
|
||||
[/unstore_unit]
|
||||
{NEXT i}
|
||||
|
||||
{CLEAR_VARIABLE chgtype_store}
|
||||
#enddef
|
||||
|
||||
#define CHG_TERRAIN LETTER X Y
|
||||
[terrain]
|
||||
letter={LETTER}
|
||||
x={X}
|
||||
y={Y}
|
||||
[/terrain]
|
||||
#enddef
|
||||
|
||||
#define OBJ_HOLY_ANKH X Y ID
|
||||
[event]
|
||||
name=moveto
|
||||
first_time_only=no
|
||||
[filter]
|
||||
x={X}
|
||||
y={Y}
|
||||
[/filter]
|
||||
[object]
|
||||
id={ID}
|
||||
name= _ "Holy Ankh"
|
||||
image=props/ankh.png
|
||||
duration=level
|
||||
description= _ "You find a hefty pendant on a strange and ominous looking altar. It glows brightly when you pick it up!"
|
||||
cannot_use_message= _ "There is a strange altar here and a pendant on it. I don't want to touch it."
|
||||
[filter]
|
||||
side=1
|
||||
x,y={X},{Y}
|
||||
[/filter]
|
||||
[then]
|
||||
[removeitem]
|
||||
x,y={X},{Y}
|
||||
[/removeitem]
|
||||
[/then]
|
||||
[effect]
|
||||
apply_to=new_attack
|
||||
name= _ "holy ankh"
|
||||
icon=attacks/lightbeam.png
|
||||
type=arcane
|
||||
range=ranged
|
||||
[specials]
|
||||
{WEAPON_SPECIAL_MAGICAL}
|
||||
[/specials]
|
||||
damage=24
|
||||
number=1
|
||||
[animation]
|
||||
[missile_frame]
|
||||
begin=-180
|
||||
end=0
|
||||
image="projectiles/whitemissile-n.png"
|
||||
image_diagonal="projectiles/whitemissile-ne.png"
|
||||
halo=halo/holy/white-mage-halo1.png,halo/holy/white-mage-halo2.png,halo/holy/white-mage-halo3.png,halo/holy/white-mage-halo4.png
|
||||
[/missile_frame]
|
||||
[if]
|
||||
hits=no
|
||||
[frame]
|
||||
begin=-200
|
||||
end=0
|
||||
sound={SOUND_LIST:HOLY_MISS}
|
||||
[/frame]
|
||||
[/if]
|
||||
[else]
|
||||
hits=yes
|
||||
[frame]
|
||||
begin=-200
|
||||
end=0
|
||||
sound={SOUND_LIST:HOLY}
|
||||
[/frame]
|
||||
[/else]
|
||||
[/animation]
|
||||
|
||||
[/effect]
|
||||
[/object]
|
||||
[/event]
|
||||
#enddef
|
||||
|
||||
#define DOT_TIME X Y TIME
|
||||
[image]
|
||||
x,y={X},{Y}
|
||||
file=misc/dot.png
|
||||
delay={TIME}
|
||||
[/image]
|
||||
#enddef
|
||||
|
||||
#define CROSS_TIME X Y TIME
|
||||
[image]
|
||||
x,y={X},{Y}
|
||||
file=misc/cross.png
|
||||
delay={TIME}
|
||||
[/image]
|
||||
#enddef
|
||||
|
||||
#define LIBERTY_DEATHS
|
||||
[event]
|
||||
name=die
|
||||
[filter]
|
||||
description=Baldras
|
||||
[/filter]
|
||||
[message]
|
||||
description=Baldras
|
||||
message= _ "Tell my wife... that I loved her!"
|
||||
[/message]
|
||||
[endlevel]
|
||||
result=defeat
|
||||
[/endlevel]
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
name=die
|
||||
[filter]
|
||||
description=Harper
|
||||
[/filter]
|
||||
[message]
|
||||
description=Harper
|
||||
message= _ "Unngh... Now our people may never be free..."
|
||||
[/message]
|
||||
[endlevel]
|
||||
result=defeat
|
||||
[/endlevel]
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
name=die
|
||||
[filter]
|
||||
description=Relnan
|
||||
[/filter]
|
||||
[message]
|
||||
description=Relnan
|
||||
message= _ "I am finished... will we ever be free?"
|
||||
[/message]
|
||||
[endlevel]
|
||||
result=defeat
|
||||
[/endlevel]
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
name=die
|
||||
[filter]
|
||||
description=Lord Maddock
|
||||
[/filter]
|
||||
[message]
|
||||
description=Lord Maddock
|
||||
message= _ "How can this be? We have lost."
|
||||
[/message]
|
||||
[endlevel]
|
||||
result=defeat
|
||||
[/endlevel]
|
||||
[/event]
|
||||
#enddef
|
||||
#textdomain wesnoth-l
|
||||
|
||||
#define SET_VILLAGE X Y SIDE
|
||||
[capture_village]
|
||||
x={X}
|
||||
y={Y}
|
||||
side={SIDE}
|
||||
[/capture_village]
|
||||
#enddef
|
||||
|
||||
#define LOYAL_PEASANT TYPE X Y DESCRIPTION USER_DESCRIPTION SECOND_TRAIT
|
||||
[unit]
|
||||
type={TYPE}
|
||||
description={DESCRIPTION}
|
||||
user_description={USER_DESCRIPTION}
|
||||
x,y={X},{Y}
|
||||
side=1
|
||||
[modifications]
|
||||
{TRAIT_LOYAL}
|
||||
{SECOND_TRAIT}
|
||||
[/modifications]
|
||||
[/unit]
|
||||
#enddef
|
||||
|
||||
#
|
||||
# Two macros to make units, 1 loyal, 1 a guardian
|
||||
#
|
||||
|
||||
#define MK_GUARD X Y SIDE UTYPE NAME
|
||||
[unit]
|
||||
type={UTYPE}
|
||||
description={NAME}
|
||||
side={SIDE}
|
||||
x={X}
|
||||
y={Y}
|
||||
ai_special=guardian
|
||||
[/unit]
|
||||
#enddef
|
||||
|
||||
#
|
||||
# This one changes a unit from one type to another
|
||||
#
|
||||
|
||||
#define CHG_TYPE FILTER TARGET
|
||||
[store_unit]
|
||||
[filter]
|
||||
{FILTER}
|
||||
[/filter]
|
||||
|
||||
variable=chgtype_store
|
||||
kill=yes
|
||||
[/store_unit]
|
||||
|
||||
{FOREACH chgtype_store i}
|
||||
[set_variable]
|
||||
name=chgtype_store[$i].type
|
||||
value={TARGET}
|
||||
[/set_variable]
|
||||
|
||||
[if]
|
||||
[variable]
|
||||
name=chgtype_store[$i].side
|
||||
greater_than=0
|
||||
[/variable]
|
||||
|
||||
[then]
|
||||
[unstore_unit]
|
||||
variable=chgtype_store[$i]
|
||||
[/unstore_unit]
|
||||
[/then]
|
||||
[/if]
|
||||
{NEXT i}
|
||||
|
||||
{CLEAR_VARIABLE chgtype_store}
|
||||
#enddef
|
||||
|
||||
#define CHG_TERRAIN LETTER X Y
|
||||
[terrain]
|
||||
letter={LETTER}
|
||||
x={X}
|
||||
y={Y}
|
||||
[/terrain]
|
||||
#enddef
|
||||
|
||||
#define OBJ_HOLY_ANKH X Y ID
|
||||
[event]
|
||||
name=moveto
|
||||
first_time_only=no
|
||||
[filter]
|
||||
x={X}
|
||||
y={Y}
|
||||
[/filter]
|
||||
[object]
|
||||
id={ID}
|
||||
name= _ "Holy Ankh"
|
||||
image=props/ankh.png
|
||||
duration=level
|
||||
description= _ "You find a hefty pendant on a strange and ominous looking altar. It glows brightly when you pick it up!"
|
||||
cannot_use_message= _ "There is a strange altar here and a pendant on it. I don't want to touch it."
|
||||
[filter]
|
||||
side=1
|
||||
x,y={X},{Y}
|
||||
[/filter]
|
||||
[then]
|
||||
[removeitem]
|
||||
x,y={X},{Y}
|
||||
[/removeitem]
|
||||
[/then]
|
||||
[effect]
|
||||
apply_to=new_attack
|
||||
name= _ "holy ankh"
|
||||
icon=attacks/lightbeam.png
|
||||
type=arcane
|
||||
range=ranged
|
||||
[specials]
|
||||
{WEAPON_SPECIAL_MAGICAL}
|
||||
[/specials]
|
||||
damage=24
|
||||
number=1
|
||||
[animation]
|
||||
[missile_frame]
|
||||
begin=-180
|
||||
end=0
|
||||
image="projectiles/whitemissile-n.png"
|
||||
image_diagonal="projectiles/whitemissile-ne.png"
|
||||
halo=halo/holy/white-mage-halo1.png,halo/holy/white-mage-halo2.png,halo/holy/white-mage-halo3.png,halo/holy/white-mage-halo4.png
|
||||
[/missile_frame]
|
||||
[if]
|
||||
hits=no
|
||||
[frame]
|
||||
begin=-200
|
||||
end=0
|
||||
sound={SOUND_LIST:HOLY_MISS}
|
||||
[/frame]
|
||||
[/if]
|
||||
[else]
|
||||
hits=yes
|
||||
[frame]
|
||||
begin=-200
|
||||
end=0
|
||||
sound={SOUND_LIST:HOLY}
|
||||
[/frame]
|
||||
[/else]
|
||||
[/animation]
|
||||
|
||||
[/effect]
|
||||
[/object]
|
||||
[/event]
|
||||
#enddef
|
||||
|
||||
#define DOT_TIME X Y TIME
|
||||
[image]
|
||||
x,y={X},{Y}
|
||||
file=misc/dot.png
|
||||
delay={TIME}
|
||||
[/image]
|
||||
#enddef
|
||||
|
||||
#define CROSS_TIME X Y TIME
|
||||
[image]
|
||||
x,y={X},{Y}
|
||||
file=misc/cross.png
|
||||
delay={TIME}
|
||||
[/image]
|
||||
#enddef
|
||||
|
||||
#define LIBERTY_DEATHS
|
||||
[event]
|
||||
name=die
|
||||
[filter]
|
||||
description=Baldras
|
||||
[/filter]
|
||||
[message]
|
||||
description=Baldras
|
||||
message= _ "Tell my wife... that I loved her!"
|
||||
[/message]
|
||||
[endlevel]
|
||||
result=defeat
|
||||
[/endlevel]
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
name=die
|
||||
[filter]
|
||||
description=Harper
|
||||
[/filter]
|
||||
[message]
|
||||
description=Harper
|
||||
message= _ "Unngh... Now our people may never be free..."
|
||||
[/message]
|
||||
[endlevel]
|
||||
result=defeat
|
||||
[/endlevel]
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
name=die
|
||||
[filter]
|
||||
description=Relnan
|
||||
[/filter]
|
||||
[message]
|
||||
description=Relnan
|
||||
message= _ "I am finished... will we ever be free?"
|
||||
[/message]
|
||||
[endlevel]
|
||||
result=defeat
|
||||
[/endlevel]
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
name=die
|
||||
[filter]
|
||||
description=Lord Maddock
|
||||
[/filter]
|
||||
[message]
|
||||
description=Lord Maddock
|
||||
message= _ "How can this be? We have lost."
|
||||
[/message]
|
||||
[endlevel]
|
||||
result=defeat
|
||||
[/endlevel]
|
||||
[/event]
|
||||
#enddef
|
||||
|
Loading…
x
Reference in New Issue
Block a user