Optimize defense animation WML macros and animation-utils.cfg some more

This commit is contained in:
David Mikos 2013-03-12 07:14:52 +00:00
parent 8caa433854
commit 3c0e56f2c3
2 changed files with 93 additions and 235 deletions

View file

@ -28,13 +28,7 @@
[leading_anim]
start_time=-126
[frame]
image={HALFWAYS_IMAGE}:1
[/frame]
[frame]
image={FULL_IMAGE}:250
[/frame]
[frame]
image={HALFWAYS_IMAGE}:1
image={HALFWAYS_IMAGE}:1,{FULL_IMAGE}:250,{HALFWAYS_IMAGE}:1
[/frame]
halo_start_time=-120
@ -63,27 +57,18 @@
[defend]
start_time=-126
[frame]
image={BASE_IMAGE}:1
[/frame]
[frame]
image={REACTION_IMAGE}:100
image={BASE_IMAGE}:1,{REACTION_IMAGE}:250,{BASE_IMAGE}:1
[/frame]
hit_sound_start_time=-26
[if]
hits=hit
[frame]
image={REACTION_IMAGE}:150
[hit_sound_frame]
duration=1
[/hit_sound_frame]
[hit_sound_frame]
sound={HIT_SOUND}
[/frame]
[/hit_sound_frame]
[/if]
[else]
hits=miss,kill
[frame]
image={REACTION_IMAGE}:150
[/frame]
[/else]
[frame]
image={BASE_IMAGE}:1
[/frame]
[/defend]
#enddef
@ -95,27 +80,18 @@
start_time=-126
{FILTER}
[frame]
image={BASE_IMAGE}:1
[/frame]
[frame]
image={REACTION_IMAGE}:100
image={BASE_IMAGE}:1,{REACTION_IMAGE}:250,{BASE_IMAGE}:1
[/frame]
hit_sound_start_time=-26
[if]
hits=hit
[frame]
image={REACTION_IMAGE}:150
[hit_sound_frame]
duration=1
[/hit_sound_frame]
[hit_sound_frame]
sound={HIT_SOUND}
[/frame]
[/hit_sound_frame]
[/if]
[else]
hits=miss,kill
[frame]
image={REACTION_IMAGE}:150
[/frame]
[/else]
[frame]
image={BASE_IMAGE}:1
[/frame]
[/defend]
#enddef
@ -128,54 +104,36 @@
direction=sw,s,se
start_time=-126
[frame]
image={BASE_SE_IMAGE}:1
[/frame]
[frame]
image={REACTION_SE_IMAGE}:100
image={BASE_SE_IMAGE}:1,{REACTION_SE_IMAGE}:250,{BASE_SE_IMAGE}:1
[/frame]
hit_sound_start_time=-26
[if]
hits=hit
[frame]
image={REACTION_SE_IMAGE}:150
[hit_sound_frame]
duration=1
[/hit_sound_frame]
[hit_sound_frame]
sound={HIT_SOUND}
[/frame]
[/hit_sound_frame]
[/if]
[else]
hits=miss,kill
[frame]
image={REACTION_SE_IMAGE}:150
[/frame]
[/else]
[frame]
image={BASE_SE_IMAGE}:1
[/frame]
[/defend]
[defend]
{FILTER}
direction=nw,n,ne
start_time=-126
[frame]
image={BASE_NE_IMAGE}:1
[/frame]
[frame]
image={REACTION_NE_IMAGE}:100
image={BASE_NE_IMAGE}:1,{REACTION_NE_IMAGE}:250,{BASE_NE_IMAGE}:1
[/frame]
hit_sound_start_time=-26
[if]
hits=hit
[frame]
image={REACTION_NE_IMAGE}:150
[hit_sound_frame]
duration=1
[/hit_sound_frame]
[hit_sound_frame]
sound={HIT_SOUND}
[/frame]
[/hit_sound_frame]
[/if]
[else]
hits=miss,kill
[frame]
image={REACTION_NE_IMAGE}:150
[/frame]
[/else]
[frame]
image={BASE_NE_IMAGE}:1
[/frame]
[/defend]
#enddef
@ -189,86 +147,59 @@
range={RANGE}
[/filter_attack]
[frame]
image={BASE_IMAGE}:1
[/frame]
[frame]
image={REACTION_IMAGE}:100
image={BASE_IMAGE}:1,{REACTION_IMAGE}:250,{BASE_IMAGE}:1
[/frame]
hit_sound_start_time=-26
[if]
hits=hit
[frame]
image={REACTION_IMAGE}:150
[hit_sound_frame]
duration=1
[/hit_sound_frame]
[hit_sound_frame]
sound={HIT_SOUND}
[/frame]
[/hit_sound_frame]
[/if]
[else]
hits=miss,kill
[frame]
image={REACTION_IMAGE}:150
[/frame]
[/else]
[frame]
image={BASE_IMAGE}:1
[/frame]
[/defend]
#enddef
#define DEFENSE_ANIM_DIRECTIONAL REACTION_SE_IMAGE BASE_SE_IMAGE REACTION_NE_IMAGE BASE_NE_IMAGE HITSOUND
#define DEFENSE_ANIM_DIRECTIONAL REACTION_SE_IMAGE BASE_SE_IMAGE REACTION_NE_IMAGE BASE_NE_IMAGE HIT_SOUND
[defend]
direction=sw,s,se
start_time=-126
[frame]
image={BASE_SE_IMAGE}:1
[/frame]
[frame]
image={REACTION_SE_IMAGE}:100
image={BASE_SE_IMAGE}:1,{REACTION_SE_IMAGE}:250,{BASE_SE_IMAGE}:1
[/frame]
hit_sound_start_time=-26
[if]
hits=hit
[frame]
image={REACTION_SE_IMAGE}:150
sound={HITSOUND}
[/frame]
[hit_sound_frame]
duration=1
[/hit_sound_frame]
[hit_sound_frame]
sound={HIT_SOUND}
[/hit_sound_frame]
[/if]
[else]
hits=miss,kill
[frame]
image={REACTION_SE_IMAGE}:150
[/frame]
[/else]
[frame]
image={BASE_SE_IMAGE}:1
[/frame]
[/defend]
[defend]
direction=nw,n,ne
start_time=-126
[frame]
image={BASE_NE_IMAGE}:1
[/frame]
[frame]
image={REACTION_NE_IMAGE}:100
image={BASE_NE_IMAGE}:1,{REACTION_NE_IMAGE}:250,{BASE_NE_IMAGE}:1
[/frame]
hit_sound_start_time=-26
[if]
hits=hit
[frame]
image={REACTION_NE_IMAGE}:150
sound={HITSOUND}
[/frame]
[hit_sound_frame]
duration=1
[/hit_sound_frame]
[hit_sound_frame]
sound={HIT_SOUND}
[/hit_sound_frame]
[/if]
[else]
hits=miss,kill
[frame]
image={REACTION_NE_IMAGE}:150
[/frame]
[/else]
[frame]
image={BASE_NE_IMAGE}:1
[/frame]
[/defend]
#enddef
#define DEFENSE_ANIM_DIRECTIONAL_RANGE REACTION_SE_IMAGE BASE_SE_IMAGE REACTION_NE_IMAGE BASE_NE_IMAGE HITSOUND RANGE
#define DEFENSE_ANIM_DIRECTIONAL_RANGE REACTION_SE_IMAGE BASE_SE_IMAGE REACTION_NE_IMAGE BASE_NE_IMAGE HIT_SOUND RANGE
[defend]
direction=sw,s,se
[filter_attack]
@ -276,27 +207,18 @@
[/filter_attack]
start_time=-126
[frame]
image={BASE_SE_IMAGE}:1
[/frame]
[frame]
image={REACTION_SE_IMAGE}:100
image={BASE_SE_IMAGE}:1,{REACTION_SE_IMAGE}:250,{BASE_SE_IMAGE}:1
[/frame]
hit_sound_start_time=-26
[if]
hits=hit
[frame]
image={REACTION_SE_IMAGE}:150
sound={HITSOUND}
[/frame]
[hit_sound_frame]
duration=1
[/hit_sound_frame]
[hit_sound_frame]
sound={HIT_SOUND}
[/hit_sound_frame]
[/if]
[else]
hits=miss,kill
[frame]
image={REACTION_SE_IMAGE}:150
[/frame]
[/else]
[frame]
image={BASE_SE_IMAGE}:1
[/frame]
[/defend]
[defend]
direction=nw,n,ne
@ -305,27 +227,18 @@
[/filter_attack]
start_time=-126
[frame]
image={BASE_NE_IMAGE}:1
[/frame]
[frame]
image={REACTION_NE_IMAGE}:100
image={BASE_NE_IMAGE}:1,{REACTION_NE_IMAGE}:250,{BASE_NE_IMAGE}:1
[/frame]
hit_sound_start_time=-26
[if]
hits=hit
[frame]
image={REACTION_NE_IMAGE}:150
sound={HITSOUND}
[/frame]
[hit_sound_frame]
duration=1
[/hit_sound_frame]
[hit_sound_frame]
sound={HIT_SOUND}
[/hit_sound_frame]
[/if]
[else]
hits=miss,kill
[frame]
image={REACTION_NE_IMAGE}:150
[/frame]
[/else]
[frame]
image={BASE_NE_IMAGE}:1
[/frame]
[/defend]
#enddef
@ -340,42 +253,19 @@
range={RANGE}
[/filter_attack]
[frame]
duration=50
image={BASE_IMAGE}
halo=halo/elven/elven-shield-halo-[20,40]pct.png:25
[/frame]
[frame]
duration=100
image={REACTION_IMAGE}
halo=halo/elven/elven-shield-halo-[60,80]pct.png:50
image={BASE_IMAGE}:50,{REACTION_IMAGE}:250,{BASE_IMAGE}:75
halo=halo/elven/elven-shield-halo-[20,40,60,80,100,80,60,40,20]pct.png:[25*2,50*2,100,50,25*3]
[/frame]
hit_sound_start_time=-26
[if]
hits=hit
[frame]
duration=100
image={REACTION_IMAGE}
[hit_sound_frame]
duration=1
[/hit_sound_frame]
[hit_sound_frame]
sound={HIT_SOUND}
halo=halo/elven/elven-shield-halo-100pct.png
[/frame]
[/hit_sound_frame]
[/if]
[else]
hits=miss,kill
[frame]
duration=100
image={REACTION_IMAGE}
halo=halo/elven/elven-shield-halo-100pct.png
[/frame]
[/else]
[frame]
duration=50
image={REACTION_IMAGE}
halo=halo/elven/elven-shield-halo-80pct.png
[/frame]
[frame]
duration=75
image={BASE_IMAGE}
halo=halo/elven/elven-shield-halo-[60,40,20]pct.png:25
[/frame]
[/defend]
#enddef
@ -470,7 +360,7 @@
direction=n,ne,nw
[missile_frame]
halo="halo/holy/light-beam-[1~7].png:[30*6,130],halo/holy/light-beam-[6~1].png:70"
halo="halo/holy/light-beam-[1~7,6~1].png:[30*6,130,70*6]"
offset=1.0
[/missile_frame]
[/if]
@ -478,7 +368,7 @@
direction=s,se,sw
[missile_frame]
halo="halo/holy/light-beam-[1~7].png~FL(vert):[30*6,130],halo/holy/light-beam-[6~1].png~FL(vert):70"
halo="halo/holy/light-beam-[1~7,6~1].png~FL(vert):[30*6,130,70*6]"
offset=1.0
[/missile_frame]
[/else]
@ -563,31 +453,9 @@
# Animate a projectile for a faerie-fire attack.
missile_start_time=-500
[missile_frame]
duration=250
image="projectiles/icemissile-n-1.png"
image_diagonal="projectiles/icemissile-ne-1.png"
halo=halo/elven/ice-halo[1~3].png:[100,100,25]
halo_x,halo_y=0,0
[/missile_frame]
[missile_frame]
duration=150
image="projectiles/icemissile-n-2.png"
image_diagonal="projectiles/icemissile-ne-2.png"
halo=halo/elven/ice-halo[3,4].png:75
halo_x,halo_y=0,0
[/missile_frame]
[missile_frame]
duration=150
image="projectiles/icemissile-n-3.png"
image_diagonal="projectiles/icemissile-ne-3.png"
halo=halo/elven/ice-halo[5,1,2].png:50
halo_x,halo_y=0,0
[/missile_frame]
[missile_frame]
duration=200
image="projectiles/icemissile-n-[4~7].png"
image_diagonal="projectiles/icemissile-ne-[4~7].png"
halo=halo/elven/ice-halo[6~9].png
image="projectiles/icemissile-n-[1~7].png:[250,150*2,50*4]"
image_diagonal="projectiles/icemissile-ne-[1~7].png:[250,150*2,50*4]"
halo=halo/elven/ice-halo[1~5,1,2,6~9].png:[100*4,50*7]
halo_x,halo_y=0,0
[/missile_frame]
#enddef
@ -1080,8 +948,7 @@
hits=no
[frame]
duration=20
image="units/drakes/{DRAKE_NAME}.png"
image="units/drakes/{DRAKE_NAME}.png:20"
sound=flame-big-miss.ogg
[/frame]
[/if]
@ -1089,8 +956,7 @@
hits=yes
[frame]
duration=20
image="units/drakes/{DRAKE_NAME}.png"
image="units/drakes/{DRAKE_NAME}.png:20"
sound=flame-big.ogg
[/frame]
[/else]
@ -1119,8 +985,7 @@
hits=no
[frame]
duration=20
image="units/drakes/{DRAKE_NAME}.png"
image="units/drakes/{DRAKE_NAME}.png:20"
sound=flame-big-miss.ogg
[/frame]
[/if]
@ -1128,8 +993,7 @@
hits=yes
[frame]
duration=20
image="units/drakes/{DRAKE_NAME}.png"
image="units/drakes/{DRAKE_NAME}.png:20"
sound=flame-big.ogg
[/frame]
[/else]
@ -1158,8 +1022,7 @@
hits=no
[frame]
duration=20
image="units/drakes/{DRAKE_NAME}.png"
image="units/drakes/{DRAKE_NAME}.png:20"
sound=flame-big-miss.ogg
[/frame]
[/if]
@ -1167,8 +1030,7 @@
hits=yes
[frame]
duration=20
image="units/drakes/{DRAKE_NAME}.png"
image="units/drakes/{DRAKE_NAME}.png:20"
sound=flame-big.ogg
[/frame]
[/else]
@ -1197,8 +1059,7 @@
hits=no
[frame]
duration=20
image="units/drakes/{DRAKE_NAME}.png"
image="units/drakes/{DRAKE_NAME}.png:20"
sound=flame-big-miss.ogg
[/frame]
[/if]
@ -1206,8 +1067,7 @@
hits=yes
[frame]
duration=20
image="units/drakes/{DRAKE_NAME}.png"
image="units/drakes/{DRAKE_NAME}.png:20"
sound=flame-big.ogg
[/frame]
[/else]

View file

@ -542,11 +542,11 @@ zombie-hit-[1~6].ogg #enddef
# A more convenient way of wiring in hit and miss sounds to an
# attack animation. Just specify the sounds to use and the time
# when they should trigger.
attack_sound_start_time={TIME}
[if]
hits=yes
attack_sound_start_time={TIME}
[attack_sound_frame]
duration=1
[/attack_sound_frame]
@ -557,8 +557,6 @@ zombie-hit-[1~6].ogg #enddef
[else]
hits=no
attack_sound_start_time={TIME}
[attack_sound_frame]
duration=1
[/attack_sound_frame]