wesnoth/data/core/macros/items.cfg
Nils Kneuper d1897fba77 some stuff by wmllint...
...(correcting one mistake, removng an empty line at the end of a
file, adding a newline at the end of file)
2008-05-17 12:26:43 +00:00

587 lines
15 KiB
INI

#textdomain wesnoth
#
# Macros for items and objects
#
# All images are GPL, many come from Worldforge.
# Worldforge images should be replaced with custom images.
#define ITM_BOOK1 X Y
[item]
x={X}
y={Y}
image=items/book1.png
[/item]
#enddef
#define ITM_TREE1 X Y
[item]
x={X}
y={Y}
image=scenery/pine1.png
[/item]
#enddef
#define ITM_WISHINGWELL X Y
[item]
x={X}
y={Y}
image=scenery/well.png
[/item]
[event]
name=moveto
first_time_only=no
[filter]
x={X}
y={Y}
[/filter]
[message]
speaker=narrator
message= _ "You have come across a wishing well. What would you like to wish for?"
image=scenery/well.png
[option]
message= _ "A swift victory"
[command]
[gold]
amount=-1
[/gold]
[message]
speaker=unit
message= _ "With this golden coin, I wish that this battle end in a swift and safe victory."
[/message]
[/command]
[/option]
[option]
message= _ "Lots of gold"
[command]
[gold]
amount=-1
[/gold]
[message]
speaker=unit
message= _ "I wish this single gold coin be returned ten-fold to me."
[/message]
[/command]
[/option]
[option]
message= _ "Peace throughout Wesnoth."
[command]
[gold]
amount=-1
[/gold]
[message]
speaker=unit
message= _ "The only thing worth wishing for is peace throughout the land."
[/message]
[/command]
[/option]
[option]
message= _ "Don't make a wish."
[/option]
[/message]
[/event]
#enddef
#define ITM_GLOWING_BRAZIER X Y
[item]
x={X}
y={Y}
image=items/brazier-lit1.png
halo=halo/fire-aura.png
[/item]
#enddef
#define OBJ_POTION_HEALING X Y ID
[item]
x={X}
y={Y}
image=items/potion-red.png
[/item]
[event]
name=moveto
first_time_only=no
[filter]
x={X}
y={Y}
[/filter]
[object]
id={ID}
name= _ "Potion of Healing"
image=items/potion-red.png
duration=level
description= _ "A feeling of well-being overwhelms the drinker."
cannot_use_message= _ "You are not worthy of healing."
[filter]
x={X}
y={Y}
[/filter]
[then]
[removeitem]
x,y={X},{Y}
[/removeitem]
[/then]
[effect]
apply_to=hitpoints
increase=10%
[/effect]
[/object]
[/event]
#enddef
#define OBJ_POTION_POISON X Y ID
[item]
x={X}
y={Y}
image=items/potion-yellow.png
[/item]
[event]
name=moveto
first_time_only=no
[filter]
x={X}
y={Y}
[/filter]
[object]
id={ID}
name= _ "Poison"
image=items/potion-yellow.png
duration=level
description= _ "Poison is seeping through the veins of this unit at this very moment."
cannot_use_message=NONE
[filter]
x={X}
y={Y}
[/filter]
[then]
[removeitem]
x,y={X},{Y}
[/removeitem]
[/then]
[effect]
apply_to=status
add=poisoned
[/effect]
[/object]
[/event]
#enddef
#define OBJ_POTION_HOLY X Y ID
[item]
x={X}
y={Y}
image=items/holy-water.png
[/item]
[event]
name=moveto
first_time_only=no
[filter]
x={X}
y={Y}
[/filter]
[object]
id={ID}
name= _ "Holy Water"
image=items/holy-water.png
duration=level
description= _ "This water will make melee weapons have the 'arcane' damage type until the end of the current scenario."
cannot_use_message= _ "I am not suited to the use of this item! Let another take it."
[filter]
x={X}
y={Y}
[/filter]
[then]
[removeitem]
x,y={X},{Y}
[/removeitem]
[/then]
[effect]
apply_to=attack
range=melee
set_type=arcane
[/effect]
[/object]
[/event]
#enddef
#define OBJ_POTION_STRONG X Y ID
[item]
x={X}
y={Y}
image=items/potion-red.png
[/item]
[event]
name=moveto
first_time_only=no
[filter]
x={X}
y={Y}
[/filter]
[object]
id={ID}
name= _ "Potion of Strength"
image=items/potion-red.png
duration=level
description= _ "Strength is given to the drinker."
cannot_use_message=NONE
[filter]
x={X}
y={Y}
[/filter]
[then]
[removeitem]
x,y={X},{Y}
[/removeitem]
[/then]
[effect]
apply_to=attack
range=melee
increase_damage=1
[/effect]
[effect]
apply_to=hitpoints
increase_total=2
heal_full=yes
[/effect]
[/object]
[/event]
#enddef
#define OBJ_POTION_DECAY X Y ID
[item]
x={X}
y={Y}
image=items/potion-blue.png
[/item]
[event]
name=moveto
first_time_only=no
[filter]
x={X}
y={Y}
[/filter]
[object]
id={ID}
name= _ "Potion of Decay"
image=items/potion-blue.png
duration=level
description= _ "This poor unit drank something really bad."
cannot_use_message=NONE
[filter]
x={X}
y={Y}
[/filter]
[then]
[removeitem]
x,y={X},{Y}
[/removeitem]
[/then]
[effect]
apply_to=hitpoints
increase=-10%
[/effect]
[/object]
[/event]
#enddef
#define OBJ_RING_REGENERATION X Y ID
[item]
x={X}
y={Y}
image=items/ring-red.png
[/item]
[event]
name=moveto
first_time_only=no
[filter]
x={X}
y={Y}
[/filter]
[object]
id={ID}
name= _ "Ring of Regeneration"
image=items/ring-red.png
duration=forever
description= _ "This ring will heal the bearer a little each turn."
cannot_use_message=NONE
[filter]
x={X}
y={Y}
[/filter]
[then]
[removeitem]
x,y={X},{Y}
[/removeitem]
[/then]
[effect]
apply_to=new_ability
[abilities]
{ABILITY_REGENERATES}
[/abilities]
[/effect]
[/object]
[/event]
#enddef
#define OBJ_RING_SLOW X Y ID
[item]
x={X}
y={Y}
image=items/ring-brown.png
[/item]
[event]
name=moveto
first_time_only=no
[filter]
x={X}
y={Y}
[/filter]
[object]
id={ID}
name= _ "Ring of Slowness"
image=items/ring-brown.png
duration=forever
description= _ "The bearer of this ring is slowed."
cannot_use_message=NONE
[filter]
x={X}
y={Y}
[/filter]
[then]
[removeitem]
x,y={X},{Y}
[/removeitem]
[/then]
[effect]
apply_to=status
add=slowed
[/effect]
[/object]
[/event]
#enddef
#define OBJ_STAFF_SPEED X Y ID
[item]
x={X}
y={Y}
image=items/staff.png
[/item]
[event]
name=moveto
first_time_only=no
[filter]
x={X}
y={Y}
[/filter]
[object]
id={ID}
name= _ "Staff of Swiftness"
image=items/staff.png
duration=forever
description= _ "This staff will grant the bearer swift movement."
cannot_use_message= _ "Only magical beings can wield such an object."
[filter]
x={X}
y={Y}
[/filter]
[then]
[removeitem]
x,y={X},{Y}
[/removeitem]
[/then]
[effect]
apply_to=movement
increase=2
[/effect]
[/object]
[/event]
#enddef
#define OBJ_TRIDENT_STORM X Y ID
[item]
x={X}
y={Y}
image=items/storm-trident.png
[/item]
[event]
name=moveto
first_time_only=no
[filter]
x={X}
y={Y}
[/filter]
[object]
id={ID}
name= _ "Storm Trident"
image=items/storm-trident.png
duration=forever
description= _ "This trident allows a merman to shoot electric bolts at his enemies!"
cannot_use_message= _ "Only the mermen can use this item!"
[filter]
type=Mermaid Diviner,Mermaid Enchantress,Mermaid Initiate,Mermaid Priestess,Mermaid Siren,Merman Entangler,Merman Fighter,Merman Hoplite,Merman Hunter,Merman Javelineer,Merman Netcaster,Merman Spearman,Merman Triton,Merman Warrior
x,y={X},{Y}
[/filter]
[then]
[removeitem]
x,y={X},{Y}
[/removeitem]
[/then]
[effect]
apply_to=new_attack
name="storm trident"
description= _ "storm trident"
# need a better attack image, but this will do for now, replaced fireball with lightingbolt
icon=attacks/lightning.png
type=fire
range=ranged
[specials]
{WEAPON_SPECIAL_MAGICAL}
[/specials]
damage=14
number=2
[/effect]
[effect]
apply_to=new_animation
name="storm trident"
[attack_anim]
[filter_attack]
name="storm trident"
[/filter_attack]
[missile_frame]
begin=-150
end=0
image=projectiles/lightning-n.png
image_diagonal=projectiles/lightning-ne.png
[/missile_frame]
[if]
hits=no
[frame]
begin=-200
end=0
sound=lightning-miss.ogg
[/frame]
[/if]
[else]
hits=yes
[frame]
begin=-200
end=0
sound=lightning.ogg
[/frame]
[/else]
[/attack_anim]
[/effect]
[/object]
[/event]
#enddef
#define PICKUPPABLE_ITEM ID X Y EXTRA_FILTER IMAGE MESSAGE CANNOT_USE_MESSAGE OBJECT
# This places an item on the map which can be picked up once, but allows the
# player to choose whether the unit stepping on it should take it or not.
# The "object" doesn't necessarily need to be an [object], any action works.
#
# Example:
# ! {PICKUPPABLE_ITEM ring_of_hp 8 12 race=human items/ring-red.png
# ! _"$unit.name finds a pretty ring. Should he pick it up?"
# ! _"$unit.name finds a pretty ring. But only a human can take it!" (
# ! [object]
# ! name= _ "Ring of HP"
# ! image=items/ring-red.png
# ! description= _ "This ring grants the wearer +10 max hp!"
# !
# ! [effect]
# ! apply_to=hitpoints
# ! increase_total=10
# ! [/effect]
# ! [/object]
# ! )}
[item]
x,y={X},{Y}
image={IMAGE}
[/item]
[event]
name=moveto
first_time_only=no
[filter]
x,y={X},{Y}
[/filter]
[if]
[have_unit]
x,y={X},{Y}
{EXTRA_FILTER}
[/have_unit]
[variable]
name=item_{ID}_picked_up
not_equals=yes
[/variable]
[then]
[message]
speaker=narrator
message={MESSAGE}
image={IMAGE}
[option]
message= _ "Pick it up"
[command]
{OBJECT}
[removeitem]
x,y={X},{Y}
[/removeitem]
[set_variable]
name=item_{ID}_picked_up
value=yes
[/set_variable]
[/command]
[/option]
[option]
message= _ "Leave it"
[command]
[allow_undo][/allow_undo]
[/command]
[/option]
[/message]
[/then]
[else]
[if]
[variable]
name=item_{ID}_picked_up
not_equals=yes
[/variable]
[then]
[message]
speaker=narrator
message={CANNOT_USE_MESSAGE}
image={IMAGE}
[/message]
[/then]
[/if]
[allow_undo][/allow_undo]
[/else]
[/if]
[/event]
#enddef