v0.7.4b: balance changes to wand of living earth
This commit is contained in:
parent
019970b3e4
commit
43e6efe12d
|
@ -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,14 +324,23 @@ public class WandOfLivingEarth extends DamageWand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int drRoll() {
|
public int drRoll() {
|
||||||
|
if (Dungeon.isChallenged(Challenges.NO_ARMOR)){
|
||||||
|
return Random.NormalIntRange(wandLevel, 2 + wandLevel);
|
||||||
|
} else {
|
||||||
return Random.NormalIntRange(wandLevel, 3 + 3 * wandLevel);
|
return Random.NormalIntRange(wandLevel, 3 + 3 * wandLevel);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String description() {
|
public String description() {
|
||||||
|
if (Dungeon.isChallenged(Challenges.NO_ARMOR)){
|
||||||
|
return Messages.get(this, "desc", wandLevel, 2 + wandLevel);
|
||||||
|
} else {
|
||||||
return Messages.get(this, "desc", wandLevel, 3 + 3*wandLevel);
|
return Messages.get(this, "desc", wandLevel, 3 + 3*wandLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private static final String DEFENSE = "defense";
|
private static final String DEFENSE = "defense";
|
||||||
private static final String WAND_LEVEL = "wand_level";
|
private static final String WAND_LEVEL = "wand_level";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user