From 43e6efe12d1b3f47811a0ff9629f8abd53f4e955 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 6 Aug 2019 21:09:09 -0400 Subject: [PATCH] v0.7.4b: balance changes to wand of living earth --- .../items/wands/WandOfLivingEarth.java | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfLivingEarth.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfLivingEarth.java index 03c801c90..14ce921ae 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfLivingEarth.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfLivingEarth.java @@ -22,6 +22,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.wands; import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.shatteredpixel.shatteredpixeldungeon.Challenges; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; @@ -188,13 +189,15 @@ public class WandOfLivingEarth extends DamageWand { break; } } + + int armor = Math.round(damage*0.25f); if (guardian != null){ guardian.sprite.centerEmitter().burst(MagicMissile.EarthParticle.ATTRACT, 8 + level() / 2); - guardian.setInfo(Dungeon.hero, level(), damage); + guardian.setInfo(Dungeon.hero, level(), armor); } else { attacker.sprite.centerEmitter().burst(MagicMissile.EarthParticle.ATTRACT, 8 + level() / 2); - Buff.affect(attacker, RockArmor.class).addArmor(level(), damage); + Buff.affect(attacker, RockArmor.class).addArmor(level(), armor); } } @@ -222,6 +225,7 @@ public class WandOfLivingEarth extends DamageWand { private void addArmor( int wandLevel, int armor ){ this.wandLevel = Math.max(this.wandLevel, wandLevel); this.armor += armor; + this.armor = Math.min(armor, 2*armorToGuardian()); } private int armorToGuardian(){ @@ -320,12 +324,21 @@ public class WandOfLivingEarth extends DamageWand { @Override public int drRoll() { - return Random.NormalIntRange(wandLevel, 3 + 3*wandLevel); + if (Dungeon.isChallenged(Challenges.NO_ARMOR)){ + return Random.NormalIntRange(wandLevel, 2 + wandLevel); + } else { + return Random.NormalIntRange(wandLevel, 3 + 3 * wandLevel); + } } @Override public String description() { - return Messages.get(this, "desc", wandLevel, 3 + 3*wandLevel); + if (Dungeon.isChallenged(Challenges.NO_ARMOR)){ + return Messages.get(this, "desc", wandLevel, 2 + wandLevel); + } else { + return Messages.get(this, "desc", wandLevel, 3 + 3*wandLevel); + } + } private static final String DEFENSE = "defense";