Skip to content

Commit

Permalink
Restructured WC/Soulless bat variation defense animation (fixes #3215)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ln-zookeeper committed Jun 7, 2018
1 parent b70463b commit 1318685
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 32 deletions.
37 changes: 21 additions & 16 deletions data/core/units/undead/Corpse_Soulless.cfg
Expand Up @@ -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] # Remove inherited defense animation first, since merging with it wouldn't work right
__remove=yes
[/defend]
[defend]
direction=s,sw,se
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-se-[3,4,3].png:[1,250,1]"
[/frame]
{SOUND:HIT {SOUND_LIST:ZOMBIE_WEAK_HIT} -25}
[/defend]
[defend]
direction=n,nw,ne
[else]
hits=hit
hit_sound_start_time=-25
[hit_sound_frame]
sound={SOUND_LIST:ZOMBIE_WEAK_HIT}
[/hit_sound_frame]
[/else]
[if]
hits=miss
offset=0.0~-0.15,-0.15~0.0
direction=s,sw,se
[frame]
image="units/undead/soulless-bat-se-[3,4,3].png:[1,250,1]"
[/frame]
[/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]
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
Expand Down
37 changes: 21 additions & 16 deletions data/core/units/undead/Corpse_Walking.cfg
Expand Up @@ -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] # Remove inherited defense animation first, since merging with it wouldn't work right
__remove=yes
[/defend]
[defend]
direction=s,sw,se
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-se-[3,4,3].png:[1,250,1]"
[/frame]
{SOUND:HIT {SOUND_LIST:ZOMBIE_WEAK_HIT} -25}
[/defend]
[defend]
direction=n,nw,ne
[else]
hits=hit
hit_sound_start_time=-25
[hit_sound_frame]
sound={SOUND_LIST:ZOMBIE_WEAK_HIT}
[/hit_sound_frame]
[/else]
[if]
hits=miss
offset=0.0~-0.15,-0.15~0.0
direction=s,sw,se
[frame]
image="units/undead/zombie-bat-se-[3,4,3].png:[1,250,1]"
[/frame]
[/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]
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
Expand Down

0 comments on commit 1318685

Please sign in to comment.