From e10fb89c220137af0d121f5bc168c151307ffd67 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 9 Feb 2023 17:32:15 -0500 Subject: [PATCH] v2.0.0: fixed ripper demon leap being unable to be blocked --- .../actors/mobs/RipperDemon.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/RipperDemon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/RipperDemon.java index d364cc88e..9f379dee0 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/RipperDemon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/RipperDemon.java @@ -32,6 +32,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.Pushing; import com.shatteredpixel.shatteredpixeldungeon.effects.TargetedCell; import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; +import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.RipperSprite; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.watabou.noosa.audio.Sample; @@ -175,9 +176,14 @@ public class RipperDemon extends Mob { public void call() { if (leapVictim != null && alignment != leapVictim.alignment){ - Buff.affect(leapVictim, Bleeding.class).set(0.75f*damageRoll()); - leapVictim.sprite.flash(); - Sample.INSTANCE.play(Assets.Sounds.HIT); + if (hit(RipperDemon.this, leapVictim, Char.INFINITE_ACCURACY)) { + Buff.affect(leapVictim, Bleeding.class).set(0.75f * damageRoll()); + leapVictim.sprite.flash(); + Sample.INSTANCE.play(Assets.Sounds.HIT); + } else { + enemy.sprite.showStatus( CharSprite.NEUTRAL, enemy.defenseVerb() ); + Sample.INSTANCE.play(Assets.Sounds.MISS); + } } if (endPos != leapPos){