diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Stone.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Stone.java index 6ceec1356..618e14315 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Stone.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/glyphs/Stone.java @@ -24,6 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; +import com.watabou.utils.GameMath; public class Stone extends Armor.Glyph { @@ -45,7 +46,8 @@ public class Stone extends Armor.Glyph { } //75% of dodge chance is applied as damage reduction - hitChance = (1f + 3f*hitChance)/4f; + // we clamp in case accuracy or evasion were negative + hitChance = GameMath.gate(0.25f, (1f + 3f*hitChance)/4f, 1f); damage = (int)Math.ceil(damage * hitChance);