diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java index 3d6b6f0c0..233dbb4e8 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java @@ -35,6 +35,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.Wound; import com.shatteredpixel.shatteredpixeldungeon.items.Generator; import com.shatteredpixel.shatteredpixeldungeon.items.Heap; import com.shatteredpixel.shatteredpixeldungeon.items.Item; +import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfAccuracy; import com.shatteredpixel.shatteredpixeldungeon.levels.Level; import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; @@ -378,7 +379,17 @@ public abstract class Mob extends Char { @Override public int defenseSkill( Char enemy ) { - return enemySeen && !paralysed ? defenseSkill : 0; + if (enemySeen && !paralysed) { + int defenseSkill = this.defenseSkill; + int penalty = 0; + for (Buff buff : enemy.buffs(RingOfAccuracy.Accuracy.class)) { + penalty += ((RingOfAccuracy.Accuracy) buff).level; + } + if (penalty != 0) + defenseSkill *= Math.pow(0.8, penalty); + return defenseSkill; + } else + return 0; } @Override diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfAccuracy.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfAccuracy.java index 200436481..a392fa1cd 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfAccuracy.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfAccuracy.java @@ -31,7 +31,8 @@ public class RingOfAccuracy extends Ring { @Override public String desc() { return isKnown() ? - "This ring increases your chance to hit the enemy." : + "This ring increases your focus, reducing your enemy's ability to dodge your attacks. "+ + "A cursed ring will instead make you easier to evade.": super.desc(); }