diff --git a/data/core/macros/items.cfg b/data/core/macros/items.cfg index 99eeb3ceaa4..3c72e103039 100644 --- a/data/core/macros/items.cfg +++ b/data/core/macros/items.cfg @@ -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