Rewrite macro for storm trident lightning effect so it's more generally useful.

This commit is contained in:
Eric S. Raymond 2008-12-08 17:27:03 +00:00
parent 61c1610118
commit 132b04ace7

View file

@ -508,34 +508,36 @@
#enddef
#wmllint: markcheck off
#define STORM_TRIDENT_LIGHTNING DIRECTION_NUMBER
[effect]
apply_to=new_animation
name="storm trident"
[attack_anim]
[filter_attack]
name="storm trident"
[/filter_attack]
{LIGHTNING_BOLT {DIRECTION_NUMBER} }
[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]
#define LIGHTNING_ANIMATION NAME_STRING DIRECTION_NUMBER
"Effect generating a new animation that throws lightning in a specified direction."
[effect]
apply_to=new_animation
name={NAME_STRING}
[attack_anim]
[filter_attack]
name={NAME_STRING}
[/filter_attack]
{LIGHTNING_BOLT {DIRECTION_NUMBER}}
[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]
#enddef
#define OBJ_TRIDENT_STORM X Y ID
{PICKUPPABLE_ITEM {ID} {X} {Y} race=merman items/storm-trident.png _"Should $unit.name pick up the trident?" _"Only the mermen can use this item!" (
[object]
@ -557,9 +559,9 @@
number=2
[/effect]
{STORM_TRIDENT_LIGHTNING 1}
{STORM_TRIDENT_LIGHTNING 2}
{STORM_TRIDENT_LIGHTNING 3}
{LIGHTNING_ANIMATION "storm trident" 1}
{LIGHTNING_ANIMATION "storm trident" 2}
{LIGHTNING_ANIMATION "storm trident" 3}
[/object]
)}
#enddef