From 1615f5e502f086ec35fc98d43505bf026efa8b84 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 11 Sep 2014 19:57:05 -0400 Subject: [PATCH] V0.2.0: Corrected Ring of Force implementation --- .../shatteredpixeldungeon/actors/hero/Hero.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java index feecc35aa..21f161df3 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java @@ -316,15 +316,15 @@ public class Hero extends Char { public int damageRoll() { int dmg; int bonus = 0; - for (Buff buff : buffs( RingOfEvasion.Evasion.class )) { + for (Buff buff : buffs( RingOfForce.Force.class )) { bonus += ((RingOfForce.Force)buff).level; } if (belongings.weapon != null) { dmg = belongings.weapon.damageRoll( this ) + bonus; } else { - bonus *= 1+Math.round(lvl/5f); - dmg = Random.NormalIntRange( 1, Math.min(1 , STR()-9+bonus ) ); + int bonusMax = 1 + (int)(bonus * (lvl/5f)); + dmg = Random.NormalIntRange( 1+bonus, Math.max(1+bonus , STR()-9+bonusMax ) ); } return buff( Fury.class ) != null ? (int)(dmg * 1.5f) : dmg; }