v0.7.4b: balance changes to wand of living earth

This commit is contained in:
Evan Debenham 2019-08-06 21:09:09 -04:00
parent 019970b3e4
commit 43e6efe12d

View File

@ -22,6 +22,7 @@
package com.shatteredpixel.shatteredpixeldungeon.items.wands; package com.shatteredpixel.shatteredpixeldungeon.items.wands;
import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
@ -189,12 +190,14 @@ public class WandOfLivingEarth extends DamageWand {
} }
} }
int armor = Math.round(damage*0.25f);
if (guardian != null){ if (guardian != null){
guardian.sprite.centerEmitter().burst(MagicMissile.EarthParticle.ATTRACT, 8 + level() / 2); guardian.sprite.centerEmitter().burst(MagicMissile.EarthParticle.ATTRACT, 8 + level() / 2);
guardian.setInfo(Dungeon.hero, level(), damage); guardian.setInfo(Dungeon.hero, level(), armor);
} else { } else {
attacker.sprite.centerEmitter().burst(MagicMissile.EarthParticle.ATTRACT, 8 + level() / 2); 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 ){ private void addArmor( int wandLevel, int armor ){
this.wandLevel = Math.max(this.wandLevel, wandLevel); this.wandLevel = Math.max(this.wandLevel, wandLevel);
this.armor += armor; this.armor += armor;
this.armor = Math.min(armor, 2*armorToGuardian());
} }
private int armorToGuardian(){ private int armorToGuardian(){
@ -320,12 +324,21 @@ public class WandOfLivingEarth extends DamageWand {
@Override @Override
public int drRoll() { 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 @Override
public String description() { 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"; private static final String DEFENSE = "defense";