Author: esr
Date: Mon Dec 8 18:27:03 2008
New Revision: 31372
URL: http://svn.gna.org/viewcvs/wesnoth?rev=31372&view=rev
Log:
Rewrite macro for storm trident lightning effect so it's more generally useful.
Modified:
trunk/data/core/macros/items.cfg
Modified: trunk/data/core/macros/items.cfg
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/core/macros/items.cfg?rev=31372&r1=31371&r2=31372&view=diff
==============================================================================
--- trunk/data/core/macros/items.cfg (original)
+++ trunk/data/core/macros/items.cfg Mon Dec 8 18:27:03 2008
@@ -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]
-#enddef
+#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
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits