diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java index 5cedb2bd9..eeceba63e 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java @@ -274,7 +274,7 @@ public class Hero extends Char { int bonus = RingOfEvasion.getBonus(this, RingOfEvasion.Evasion.class); - float evasion = (float)Math.pow( 1.15, bonus ); + float evasion = (float)Math.pow( 1.125, bonus ); if (paralysed > 0) { evasion /= 2; } @@ -1214,9 +1214,9 @@ public class Hero extends Char { @Override public int stealth() { int stealth = super.stealth(); - for (Buff buff : buffs( RingOfEvasion.Evasion.class )) { - stealth += ((RingOfEvasion.Evasion)buff).effectiveLevel; - } + + stealth += RingOfEvasion.getBonus(this, RingOfEvasion.Evasion.class); + if (belongings.armor != null && belongings.armor.hasGlyph(Obfuscation.class)){ stealth += belongings.armor.level(); } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfEvasion.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfEvasion.java index 580431b4e..7b26c7900 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfEvasion.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfEvasion.java @@ -20,10 +20,6 @@ */ package com.shatteredpixel.shatteredpixeldungeon.items.rings; -import com.shatteredpixel.shatteredpixeldungeon.Dungeon; -import com.shatteredpixel.shatteredpixeldungeon.actors.Char; -import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; - public class RingOfEvasion extends Ring { @Override @@ -31,43 +27,6 @@ public class RingOfEvasion extends Ring { return new Evasion(); } - //yup, the only ring in the game with logic inside of its class public class Evasion extends RingBuff { - public int effectiveLevel; - - @Override - public boolean attachTo( Char target ) { - - effectiveLevel = Math.min(0, RingOfEvasion.this.level()); - return super.attachTo(target); - } - - @Override - public boolean act() { - - boolean seen = false; - - for (Mob enemy : Dungeon.level.mobs.toArray(new Mob[0])){ - if (enemy.focusingHero()) { - seen = true; - break; - } - } - - if (RingOfEvasion.this.level() < 1){ - effectiveLevel = RingOfEvasion.this.level(); - } else if (seen) { - effectiveLevel = Math.max(effectiveLevel - 1, 0); - } else { - effectiveLevel = Math.min(effectiveLevel + 1, RingOfEvasion.this.level()); - } - - return super.act(); - } - - @Override - public int level() { - return effectiveLevel; - } } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties b/src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties index 28ea3a48f..1af586567 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties +++ b/src/com/shatteredpixel/shatteredpixeldungeon/messages/items/items.properties @@ -515,7 +515,7 @@ items.rings.ringofelements.name=ring of elements items.rings.ringofelements.desc=This ring provides resistance to different elements, such as fire, electricity, gases etc. Also it decreases duration of negative effects. items.rings.ringofevasion.name=ring of evasion -items.rings.ringofevasion.desc=This ring obfuscates the true position of the wearer, making them harder to detect and attack. This ring is much stronger while the user remains undetected, and if the user is targeted the power of evasion will slowly fade away, remaining undetected will restore the ring's effectiveness. A degraded ring will instead make the user easier to detect and strike. +items.rings.ringofevasion.desc=This ring obfuscates the true position of the wearer, making them harder to detect and attack. A degraded ring will instead make the user easier to detect and strike. items.rings.ringofforce.name=ring of force items.rings.ringofforce.avg_dmg=When unarmed, at your current strength, this ring will deal _%1$d-%2$d damage._