mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-07 14:54:21 +00:00
Use a rather cool WML trick to create a macro with which the slowed sound...
...can cleanly be included in attack animations.
This commit is contained in:
parent
bd9a37b6c2
commit
4b52bc6a5c
@ -93,17 +93,7 @@ Special Notes:"+{SPECIAL_NOTES_SLOW}+{SPECIAL_NOTES_CURES}
|
|||||||
halo="halo/elven/nature-halo2.png"
|
halo="halo/elven/nature-halo2.png"
|
||||||
halo_x,halo_y=0,-12
|
halo_x,halo_y=0,-12
|
||||||
[/frame]
|
[/frame]
|
||||||
[if]
|
{ON_SLOW (
|
||||||
hits=yes
|
|
||||||
[secondary_unit_filter]
|
|
||||||
[not]
|
|
||||||
[wml_filter]
|
|
||||||
[status]
|
|
||||||
slowed="yes"
|
|
||||||
[/status]
|
|
||||||
[/wml_filter]
|
|
||||||
[/not]
|
|
||||||
[/secondary_unit_filter]
|
|
||||||
[frame]
|
[frame]
|
||||||
begin=-150
|
begin=-150
|
||||||
end=-75
|
end=-75
|
||||||
@ -112,16 +102,7 @@ Special Notes:"+{SPECIAL_NOTES_SLOW}+{SPECIAL_NOTES_CURES}
|
|||||||
halo_x,halo_y=0,-12
|
halo_x,halo_y=0,-12
|
||||||
sound=slowed.wav
|
sound=slowed.wav
|
||||||
[/frame]
|
[/frame]
|
||||||
[/if]
|
)}
|
||||||
[else]
|
|
||||||
[frame]
|
|
||||||
begin=-150
|
|
||||||
end=-75
|
|
||||||
image="units/elves-wood/druid-magic-3.png"
|
|
||||||
halo="halo/elven/nature-halo3.png"
|
|
||||||
halo_x,halo_y=0,-12
|
|
||||||
[/frame]
|
|
||||||
[/else]
|
|
||||||
[frame]
|
[frame]
|
||||||
begin=-75
|
begin=-75
|
||||||
end=0
|
end=0
|
||||||
|
@ -110,17 +110,7 @@ Special Notes:"+{SPECIAL_NOTES_MAGICAL}+{SPECIAL_NOTES_SLOW}
|
|||||||
halo=halo/elven/nature-halo4.png
|
halo=halo/elven/nature-halo4.png
|
||||||
halo_x,halo_y=0,-28
|
halo_x,halo_y=0,-28
|
||||||
[/frame]
|
[/frame]
|
||||||
[if]
|
{ON_SLOW (
|
||||||
hits=yes
|
|
||||||
[secondary_unit_filter]
|
|
||||||
[not]
|
|
||||||
[wml_filter]
|
|
||||||
[status]
|
|
||||||
slowed="yes"
|
|
||||||
[/status]
|
|
||||||
[/wml_filter]
|
|
||||||
[/not]
|
|
||||||
[/secondary_unit_filter]
|
|
||||||
[frame]
|
[frame]
|
||||||
begin=-150
|
begin=-150
|
||||||
end=-75
|
end=-75
|
||||||
@ -129,16 +119,7 @@ Special Notes:"+{SPECIAL_NOTES_MAGICAL}+{SPECIAL_NOTES_SLOW}
|
|||||||
halo_x,halo_y=0,-28
|
halo_x,halo_y=0,-28
|
||||||
sound=slowed.wav
|
sound=slowed.wav
|
||||||
[/frame]
|
[/frame]
|
||||||
[/if]
|
)}
|
||||||
[else]
|
|
||||||
[frame]
|
|
||||||
begin=-150
|
|
||||||
end=-75
|
|
||||||
image="units/elves-wood/enchantress-magic.png"
|
|
||||||
halo=halo/elven/nature-halo5.png
|
|
||||||
halo_x,halo_y=0,-28
|
|
||||||
[/frame]
|
|
||||||
[/else]
|
|
||||||
[frame]
|
[frame]
|
||||||
begin=-75
|
begin=-75
|
||||||
end=0
|
end=0
|
||||||
|
@ -109,35 +109,16 @@ Special Notes:"+{SPECIAL_NOTES_SLOW}+{SPECIAL_NOTES_HEALS}
|
|||||||
halo=halo/elven/nature-halo4.png
|
halo=halo/elven/nature-halo4.png
|
||||||
halo_x,halo_y=0,-12
|
halo_x,halo_y=0,-12
|
||||||
[/frame]
|
[/frame]
|
||||||
[if]
|
{ON_SLOW (
|
||||||
hits=yes
|
|
||||||
[secondary_unit_filter]
|
|
||||||
[not]
|
|
||||||
[wml_filter]
|
|
||||||
[status]
|
|
||||||
slowed="yes"
|
|
||||||
[/status]
|
|
||||||
[/wml_filter]
|
|
||||||
[/not]
|
|
||||||
[/secondary_unit_filter]
|
|
||||||
[frame]
|
[frame]
|
||||||
begin=-150
|
begin=-150
|
||||||
end=-75
|
end=-75
|
||||||
image="units/elves-wood/shaman-attack2.png"
|
image="units/random-enemy.png"
|
||||||
halo=halo/elven/nature-halo5.png
|
halo=halo/elven/nature-halo5.png
|
||||||
halo_x,halo_y=0,-12
|
halo_x,halo_y=0,-12
|
||||||
sound=slowed.wav
|
sound=slowed.wav
|
||||||
[/frame]
|
[/frame]
|
||||||
[/if]
|
)}
|
||||||
[else]
|
|
||||||
[frame]
|
|
||||||
begin=-150
|
|
||||||
end=-75
|
|
||||||
image="units/elves-wood/shaman-attack2.png"
|
|
||||||
halo=halo/elven/nature-halo5.png
|
|
||||||
halo_x,halo_y=0,-12
|
|
||||||
[/frame]
|
|
||||||
[/else]
|
|
||||||
[frame]
|
[frame]
|
||||||
begin=-75
|
begin=-75
|
||||||
end=0
|
end=0
|
||||||
|
@ -98,17 +98,7 @@ Special Notes:"+{SPECIAL_NOTES_SLOW}+{SPECIAL_NOTES_CURES}
|
|||||||
halo=halo/elven/nature-halo4.png
|
halo=halo/elven/nature-halo4.png
|
||||||
halo_x,halo_y=0,-12
|
halo_x,halo_y=0,-12
|
||||||
[/frame]
|
[/frame]
|
||||||
[if]
|
{ON_SLOW (
|
||||||
hits=yes
|
|
||||||
[secondary_unit_filter]
|
|
||||||
[not]
|
|
||||||
[wml_filter]
|
|
||||||
[status]
|
|
||||||
slowed="yes"
|
|
||||||
[/status]
|
|
||||||
[/wml_filter]
|
|
||||||
[/not]
|
|
||||||
[/secondary_unit_filter]
|
|
||||||
[frame]
|
[frame]
|
||||||
begin=-150
|
begin=-150
|
||||||
end=-75
|
end=-75
|
||||||
@ -117,16 +107,7 @@ Special Notes:"+{SPECIAL_NOTES_SLOW}+{SPECIAL_NOTES_CURES}
|
|||||||
halo_x,halo_y=0,-12
|
halo_x,halo_y=0,-12
|
||||||
sound=slowed.wav
|
sound=slowed.wav
|
||||||
[/frame]
|
[/frame]
|
||||||
[/if]
|
)}
|
||||||
[else]
|
|
||||||
[frame]
|
|
||||||
begin=-150
|
|
||||||
end=-75
|
|
||||||
image="units/elves-wood/shyde-ftouch-attack3.png"
|
|
||||||
halo=halo/elven/nature-halo5.png
|
|
||||||
halo_x,halo_y=0,-12
|
|
||||||
[/frame]
|
|
||||||
[/else]
|
|
||||||
[frame]
|
[frame]
|
||||||
begin=-75
|
begin=-75
|
||||||
end=0
|
end=0
|
||||||
|
@ -118,17 +118,7 @@ Special Notes:"+{SPECIAL_NOTES_MAGICAL}+{SPECIAL_NOTES_SLOW}
|
|||||||
halo=halo/elven/nature-halo4.png
|
halo=halo/elven/nature-halo4.png
|
||||||
halo_x,halo_y=0,-28
|
halo_x,halo_y=0,-28
|
||||||
[/frame]
|
[/frame]
|
||||||
[if]
|
{ON_SLOW (
|
||||||
hits=yes
|
|
||||||
[secondary_unit_filter]
|
|
||||||
[not]
|
|
||||||
[wml_filter]
|
|
||||||
[status]
|
|
||||||
slowed="yes"
|
|
||||||
[/status]
|
|
||||||
[/wml_filter]
|
|
||||||
[/not]
|
|
||||||
[/secondary_unit_filter]
|
|
||||||
[frame]
|
[frame]
|
||||||
begin=-150
|
begin=-150
|
||||||
end=-75
|
end=-75
|
||||||
@ -137,16 +127,7 @@ Special Notes:"+{SPECIAL_NOTES_MAGICAL}+{SPECIAL_NOTES_SLOW}
|
|||||||
halo_x,halo_y=0,-28
|
halo_x,halo_y=0,-28
|
||||||
sound=slowed.wav
|
sound=slowed.wav
|
||||||
[/frame]
|
[/frame]
|
||||||
[/if]
|
)}
|
||||||
[else]
|
|
||||||
[frame]
|
|
||||||
begin=-150
|
|
||||||
end=-75
|
|
||||||
image="units/elves-wood/sorceress-magic.png"
|
|
||||||
halo=halo/elven/nature-halo5.png
|
|
||||||
halo_x,halo_y=0,-28
|
|
||||||
[/frame]
|
|
||||||
[/else]
|
|
||||||
[frame]
|
[frame]
|
||||||
begin=-75
|
begin=-75
|
||||||
end=0
|
end=0
|
||||||
|
@ -97,17 +97,7 @@ Special Notes:"+{SPECIAL_NOTES_SLOW}
|
|||||||
halo=halo/elven/faerie-fire-halo4.png
|
halo=halo/elven/faerie-fire-halo4.png
|
||||||
halo_x,halo_y=0,-28
|
halo_x,halo_y=0,-28
|
||||||
[/frame]
|
[/frame]
|
||||||
[if]
|
{ON_SLOW (
|
||||||
hits=yes
|
|
||||||
[secondary_unit_filter]
|
|
||||||
[not]
|
|
||||||
[wml_filter]
|
|
||||||
[status]
|
|
||||||
slowed="yes"
|
|
||||||
[/status]
|
|
||||||
[/wml_filter]
|
|
||||||
[/not]
|
|
||||||
[/secondary_unit_filter]
|
|
||||||
[frame]
|
[frame]
|
||||||
begin=-150
|
begin=-150
|
||||||
end=-75
|
end=-75
|
||||||
@ -116,16 +106,7 @@ Special Notes:"+{SPECIAL_NOTES_SLOW}
|
|||||||
halo_x,halo_y=0,-28
|
halo_x,halo_y=0,-28
|
||||||
sound=slowed.wav
|
sound=slowed.wav
|
||||||
[/frame]
|
[/frame]
|
||||||
[/if]
|
)}
|
||||||
[else]
|
|
||||||
[frame]
|
|
||||||
begin=-150
|
|
||||||
end=-75
|
|
||||||
image="units/elves-wood/sylph-magic.png"
|
|
||||||
halo=halo/elven/faerie-fire-halo5.png
|
|
||||||
halo_x,halo_y=0,-28
|
|
||||||
[/frame]
|
|
||||||
[/else]
|
|
||||||
[frame]
|
[frame]
|
||||||
begin=-75
|
begin=-75
|
||||||
end=0
|
end=0
|
||||||
|
@ -108,31 +108,14 @@ Special Notes:"+{SPECIAL_NOTES_SLOW}
|
|||||||
sound={SOUND_LIST:MISS}
|
sound={SOUND_LIST:MISS}
|
||||||
[/frame]
|
[/frame]
|
||||||
[/else]
|
[/else]
|
||||||
[if]
|
{ON_SLOW (
|
||||||
hits=yes
|
|
||||||
[secondary_unit_filter]
|
|
||||||
[not]
|
|
||||||
[wml_filter]
|
|
||||||
[status]
|
|
||||||
slowed="yes"
|
|
||||||
[/status]
|
|
||||||
[/wml_filter]
|
|
||||||
[/not]
|
|
||||||
[/secondary_unit_filter]
|
|
||||||
[frame]
|
[frame]
|
||||||
begin=-75
|
begin=-75
|
||||||
end=100
|
end=100
|
||||||
image="units/goblins/pillager.png"
|
image="units/goblins/pillager.png"
|
||||||
sound=slowed.wav
|
sound=slowed.wav
|
||||||
[/frame]
|
[/frame]
|
||||||
[/if]
|
)}
|
||||||
[else]
|
|
||||||
[frame]
|
|
||||||
begin=-75
|
|
||||||
end=100
|
|
||||||
image="units/goblins/pillager.png"
|
|
||||||
[/frame]
|
|
||||||
[/else]
|
|
||||||
[/animation]
|
[/animation]
|
||||||
[/attack]
|
[/attack]
|
||||||
[/unit]
|
[/unit]
|
||||||
|
@ -87,31 +87,14 @@ Special Notes:"+{SPECIAL_NOTES_SLOW}
|
|||||||
sound=sound={SOUND_LIST:MISS}
|
sound=sound={SOUND_LIST:MISS}
|
||||||
[/frame]
|
[/frame]
|
||||||
[/else]
|
[/else]
|
||||||
[if]
|
{ON_SLOW (
|
||||||
hits=yes
|
|
||||||
[secondary_unit_filter]
|
|
||||||
[not]
|
|
||||||
[wml_filter]
|
|
||||||
[status]
|
|
||||||
slowed="yes"
|
|
||||||
[/status]
|
|
||||||
[/wml_filter]
|
|
||||||
[/not]
|
|
||||||
[/secondary_unit_filter]
|
|
||||||
[frame]
|
[frame]
|
||||||
begin=-75
|
begin=-75
|
||||||
end=100
|
end=100
|
||||||
image="units/merfolk/entangler.png"
|
image="units/merfolk/entangler.png"
|
||||||
sound=slowed.wav
|
sound=slowed.wav
|
||||||
[/frame]
|
[/frame]
|
||||||
[/if]
|
)}
|
||||||
[else]
|
|
||||||
[frame]
|
|
||||||
begin=-75
|
|
||||||
end=100
|
|
||||||
image="units/merfolk/entangler.png"
|
|
||||||
[/frame]
|
|
||||||
[/else]
|
|
||||||
[/animation]
|
[/animation]
|
||||||
[/attack]
|
[/attack]
|
||||||
[/unit]
|
[/unit]
|
||||||
|
@ -86,31 +86,14 @@ Special Notes:"+{SPECIAL_NOTES_SLOW}
|
|||||||
sound=sound={SOUND_LIST:MISS}
|
sound=sound={SOUND_LIST:MISS}
|
||||||
[/frame]
|
[/frame]
|
||||||
[/else]
|
[/else]
|
||||||
[if]
|
{ON_SLOW (
|
||||||
hits=yes
|
|
||||||
[secondary_unit_filter]
|
|
||||||
[not]
|
|
||||||
[wml_filter]
|
|
||||||
[status]
|
|
||||||
slowed="yes"
|
|
||||||
[/status]
|
|
||||||
[/wml_filter]
|
|
||||||
[/not]
|
|
||||||
[/secondary_unit_filter]
|
|
||||||
[frame]
|
[frame]
|
||||||
begin=-75
|
begin=-75
|
||||||
end=100
|
end=100
|
||||||
image="units/merfolk/netcaster.png"
|
image="units/merfolk/netcaster.png"
|
||||||
sound=slowed.wav
|
sound=slowed.wav
|
||||||
[/frame]
|
[/frame]
|
||||||
[/if]
|
)}
|
||||||
[else]
|
|
||||||
[frame]
|
|
||||||
begin=-75
|
|
||||||
end=100
|
|
||||||
image="units/merfolk/netcaster.png"
|
|
||||||
[/frame]
|
|
||||||
[/else]
|
|
||||||
[/animation]
|
[/animation]
|
||||||
[/attack]
|
[/attack]
|
||||||
[/unit]
|
[/unit]
|
||||||
|
@ -120,31 +120,14 @@ Special Notes:"+{SPECIAL_NOTES_POISON}+{SPECIAL_NOTES_SLOW}
|
|||||||
sound={SOUND_LIST:MISS}
|
sound={SOUND_LIST:MISS}
|
||||||
[/frame]
|
[/frame]
|
||||||
[/else]
|
[/else]
|
||||||
[if]
|
{ON_SLOW (
|
||||||
hits=yes
|
|
||||||
[secondary_unit_filter]
|
|
||||||
[not]
|
|
||||||
[wml_filter]
|
|
||||||
[status]
|
|
||||||
slowed="yes"
|
|
||||||
[/status]
|
|
||||||
[/wml_filter]
|
|
||||||
[/not]
|
|
||||||
[/secondary_unit_filter]
|
|
||||||
[frame]
|
[frame]
|
||||||
begin=-75
|
begin=-75
|
||||||
end=100
|
end=100
|
||||||
image="units/monsters/cavespider.png"
|
image="units/monsters/cavespider.png"
|
||||||
sound=slowed.wav
|
sound=slowed.wav
|
||||||
[/frame]
|
[/frame]
|
||||||
[/if]
|
)}
|
||||||
[else]
|
|
||||||
[frame]
|
|
||||||
begin=-75
|
|
||||||
end=100
|
|
||||||
image="units/monsters/cavespider.png"
|
|
||||||
[/frame]
|
|
||||||
[/else]
|
|
||||||
[/animation]
|
[/animation]
|
||||||
[/attack]
|
[/attack]
|
||||||
[/unit]
|
[/unit]
|
||||||
|
@ -210,6 +210,52 @@
|
|||||||
[/unit_filter]
|
[/unit_filter]
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
|
#define ON_SLOW CONTENTS
|
||||||
|
# When a unit is slowed, the slowed sound (slowed.wav) should be
|
||||||
|
# played by the attack animation. Wrap the [frame] containing
|
||||||
|
# the sound= key inside this macro, and the sound will not get
|
||||||
|
# played if the attack misses or the target already is slowed.
|
||||||
|
[if]
|
||||||
|
hits=yes
|
||||||
|
[secondary_unit_filter]
|
||||||
|
[not]
|
||||||
|
[wml_filter]
|
||||||
|
[status]
|
||||||
|
slowed="yes"
|
||||||
|
[/status]
|
||||||
|
[/wml_filter]
|
||||||
|
[/not]
|
||||||
|
[/secondary_unit_filter]
|
||||||
|
|
||||||
|
{CONTENTS}
|
||||||
|
[/if]
|
||||||
|
[else]
|
||||||
|
hits=yes
|
||||||
|
[secondary_unit_filter]
|
||||||
|
[wml_filter]
|
||||||
|
[status]
|
||||||
|
slowed="yes"
|
||||||
|
[/status]
|
||||||
|
[/wml_filter]
|
||||||
|
[/secondary_unit_filter]
|
||||||
|
|
||||||
|
{CONTENTS}
|
||||||
|
|
||||||
|
[+frame]
|
||||||
|
sound=
|
||||||
|
[/frame]
|
||||||
|
[/else]
|
||||||
|
[else]
|
||||||
|
hits=no
|
||||||
|
|
||||||
|
{CONTENTS}
|
||||||
|
|
||||||
|
[+frame]
|
||||||
|
sound=
|
||||||
|
[/frame]
|
||||||
|
[/else]
|
||||||
|
#enddef
|
||||||
|
|
||||||
#define MISSILE_FRAME_WAIL
|
#define MISSILE_FRAME_WAIL
|
||||||
# Animate a projectile for a wail attack.
|
# Animate a projectile for a wail attack.
|
||||||
[if]
|
[if]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user