From 56708b36aa5562149be0861e7bb401bb78167913 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sun, 12 Oct 2014 00:24:37 -0400 Subject: [PATCH] V0.2.1 : Fixed a bug involving Ring of Tenacity (now rounds damage up, mainly so that hunger still hurts) --- .../shatteredpixeldungeon/actors/hero/Hero.java | 2 +- .../shatteredpixeldungeon/items/rings/RingOfTenacity.java | 4 ++-- 2 files 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 883c77593..73e53adec 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java @@ -842,7 +842,7 @@ public class Hero extends Char { tenacity += ((RingOfTenacity.Tenacity)buff).level; } if (tenacity != 0) //(HT - HP)/HT = heroes current % missing health. - dmg *= Math.pow(0.9, tenacity*((float)(HT - HP)/HT)); + dmg = (int)Math.ceil((float)dmg * Math.pow(0.9, tenacity*((float)(HT - HP)/HT))); super.damage( dmg, src ); diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfTenacity.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfTenacity.java index ee61c1553..b4670d557 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfTenacity.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/rings/RingOfTenacity.java @@ -18,8 +18,8 @@ public class RingOfTenacity extends Ring { public String desc() { return isKnown() ? "When worn, this ring will allow the wearer to resist normally mortal strikes. " + - "The weaker the user becomes, the more resistant they will be to physical damage. " + - "A cursed ring will instead make it easier for the wearer to be executed." : + "The more injured the user is, the more resistant they will be to damage. " + + "A cursed ring will instead make it easier for enemies to execute the wearer." : super.desc(); }