V0.2.0: corrected Chalice Logic

This commit is contained in:
Evan Debenham 2014-09-08 01:08:46 -04:00
parent aa591d7c71
commit b91ed818ce

View File

@ -79,9 +79,17 @@ public class ChaliceOfBlood extends Artifact {
hero.spendAndNext(3f); 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 //TODO: make sure this look good
if (damage == 0){ if (damage <= 0){
GLog.i("You prick yourself, that hardly hurt at all!"); GLog.i("You prick yourself, that hardly hurt at all!");
return;
} else if (damage < 25){ } else if (damage < 25){
GLog.w("You prick yourself and the chalice feeds on you."); GLog.w("You prick yourself and the chalice feeds on you.");
Sample.INSTANCE.play(Assets.SND_CURSED); Sample.INSTANCE.play(Assets.SND_CURSED);
@ -96,13 +104,6 @@ public class ChaliceOfBlood extends Artifact {
hero.sprite.emitter().burst( ShadowParticle.CURSE, 6 ); 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); hero.damage(damage, this);