Restructured WC/Soulless bat variation defense animation (fixes #3215)

There were two overlapping problems: 1) the branching was written incorrectly (due to combining top-level and [if] filters) and 2) the first [defend] tag getting merged with the base WC/Soulless defense animation.

(cherry-picked from commit 131868581d)
This commit is contained in:
ln-zookeeper 2018-06-08 00:37:12 +03:00
parent 58880c8453
commit 2373407bd2
2 changed files with 44 additions and 34 deletions

View file

@ -243,29 +243,34 @@
image="units/undead/soulless-bat-die-[1~4].png:150,units/undead/soulless-die-[5~10].png:150"
[/frame]
[/death]
[defend]
direction=s,sw,se
[if]
hits=miss
offset=0.0~-0.15,-0.15~0.0
[/if]
start_time=-126
[frame]
image="units/undead/soulless-bat-se-[3,4,3].png:[1,250,1]"
[/frame]
{SOUND:HIT {SOUND_LIST:ZOMBIE_WEAK_HIT} -25}
[defend] # Remove inherited defense animation first, since merging with it wouldn't work right
__remove=yes
[/defend]
[defend]
direction=n,nw,ne
start_time=-126
[if]
hits=miss
offset=0.0~-0.15,-0.15~0.0
[/if]
start_time=-126
[frame]
image="units/undead/soulless-bat-ne-[3,4,3].png:[1,250,1]"
[/frame]
{SOUND:HIT {SOUND_LIST:ZOMBIE_WEAK_HIT} -25}
[else]
hits=hit
hit_sound_start_time=-25
[hit_sound_frame]
sound={SOUND_LIST:ZOMBIE_WEAK_HIT}
[/hit_sound_frame]
[/else]
[if]
direction=s,sw,se
[frame]
image="units/undead/soulless-bat-se-[3,4,3].png:[1,250,1]"
[/frame]
[/if]
[else]
direction=n,nw,ne
[frame]
image="units/undead/soulless-bat-ne-[3,4,3].png:[1,250,1]"
[/frame]
[/else]
[/defend]
[standing_anim]
direction=s,se,sw

View file

@ -243,29 +243,34 @@
image="units/undead/zombie-bat-die-[1~4].png:150,units/undead/soulless-die-[5~10].png:150"
[/frame]
[/death]
[defend]
direction=s,sw,se
[if]
hits=miss
offset=0.0~-0.15,-0.15~0.0
[/if]
start_time=-126
[frame]
image="units/undead/zombie-bat-se-[3,4,3].png:[1,250,1]"
[/frame]
{SOUND:HIT {SOUND_LIST:ZOMBIE_WEAK_HIT} -25}
[defend] # Remove inherited defense animation first, since merging with it wouldn't work right
__remove=yes
[/defend]
[defend]
direction=n,nw,ne
start_time=-126
[if]
hits=miss
offset=0.0~-0.15,-0.15~0.0
[/if]
start_time=-126
[frame]
image="units/undead/zombie-bat-ne-[3,4,3].png:[1,250,1]"
[/frame]
{SOUND:HIT {SOUND_LIST:ZOMBIE_WEAK_HIT} -25}
[else]
hits=hit
hit_sound_start_time=-25
[hit_sound_frame]
sound={SOUND_LIST:ZOMBIE_WEAK_HIT}
[/hit_sound_frame]
[/else]
[if]
direction=s,sw,se
[frame]
image="units/undead/zombie-bat-se-[3,4,3].png:[1,250,1]"
[/frame]
[/if]
[else]
direction=n,nw,ne
[frame]
image="units/undead/zombie-bat-ne-[3,4,3].png:[1,250,1]"
[/frame]
[/else]
[/defend]
[standing_anim]
direction=s,se,sw