From b91ed818cec09451bc85bd6ca216ef2a8153e442 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 8 Sep 2014 01:08:46 -0400 Subject: [PATCH] V0.2.0: corrected Chalice Logic --- .../items/artifacts/ChaliceOfBlood.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/ChaliceOfBlood.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/ChaliceOfBlood.java index c7759642c..0357ef660 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/ChaliceOfBlood.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/ChaliceOfBlood.java @@ -79,9 +79,17 @@ public class ChaliceOfBlood extends Artifact { hero.spendAndNext(3f); + Earthroot.Armor armor = hero.buff(Earthroot.Armor.class); + if (armor != null) { + damage = armor.absorb(damage); + } + + damage -= Random.IntRange(0, hero.dr()); + //TODO: make sure this look good - if (damage == 0){ + if (damage <= 0){ GLog.i("You prick yourself, that hardly hurt at all!"); + return; } else if (damage < 25){ GLog.w("You prick yourself and the chalice feeds on you."); Sample.INSTANCE.play(Assets.SND_CURSED); @@ -96,13 +104,6 @@ public class ChaliceOfBlood extends Artifact { hero.sprite.emitter().burst( ShadowParticle.CURSE, 6 ); } - Earthroot.Armor armor = hero.buff(Earthroot.Armor.class); - if (armor != null) { - damage = armor.absorb(damage); - } - - damage -= Random.IntRange(0, hero.dr()); - hero.damage(damage, this);