diff --git a/core/src/main/assets/effects/text_icons.png b/core/src/main/assets/effects/text_icons.png index faa354c4e..e7714a2b1 100644 Binary files a/core/src/main/assets/effects/text_icons.png and b/core/src/main/assets/effects/text_icons.png differ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java index 6885851f9..89efc5d25 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java @@ -590,8 +590,13 @@ public abstract class Char extends Actor { } else { if (enemy.sprite != null){ - enemy.sprite.showStatus( CharSprite.NEUTRAL, enemy.defenseVerb() ); + if (tuftDodged){ + enemy.sprite.showStatusWithIcon(CharSprite.NEUTRAL, enemy.defenseVerb(), FloatingText.TUFT); + } else { + enemy.sprite.showStatus(CharSprite.NEUTRAL, enemy.defenseVerb()); + } } + tuftDodged = false; if (visibleFight) { //TODO enemy.defenseSound? currently miss plays for monks/crab even when they parry Sample.INSTANCE.play(Assets.Sounds.MISS); @@ -648,7 +653,8 @@ public abstract class Char extends Actor { // + 3%/5% acuRoll *= 1.01f + 0.02f*Dungeon.hero.pointsInTalent(Talent.BLESS); } - + acuRoll *= accMulti; + float defRoll = Random.Float( defStat ); if (defender.buff(Bless.class) != null) defRoll *= 1.25f; if (defender.buff( Hex.class) != null) defRoll *= 0.8f; @@ -663,11 +669,18 @@ public abstract class Char extends Actor { // + 3%/5% defRoll *= 1.01f + 0.02f*Dungeon.hero.pointsInTalent(Talent.BLESS); } + + if (defRoll < acuRoll && (defRoll*FerretTuft.evasionMultiplier()) >= acuRoll){ + tuftDodged = true; + } defRoll *= FerretTuft.evasionMultiplier(); - - return (acuRoll * accMulti) >= defRoll; + + return acuRoll >= defRoll; } + //TODO this is messy and hacky atm, should consider standardizing this so we can have many 'dodge reasons' + private static boolean tuftDodged = false; + public int attackSkill( Char target ) { return 0; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/FloatingText.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/FloatingText.java index 0a9117a11..e2a366ba9 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/FloatingText.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/FloatingText.java @@ -77,6 +77,9 @@ public class FloatingText extends RenderedTextBlock { public static int GOLD = 23; public static int ENERGY = 24; + //dodge icons + public static int TUFT = 26; + private Image icon; private boolean iconLeft;