v2.4.0: transfusion now uses damage wand logic, fixed desc errors too

This commit is contained in:
Evan Debenham
2024-04-07 15:53:06 -04:00
parent 2b8d344cd0
commit 544c1e926d
2 changed files with 15 additions and 5 deletions
@@ -29,7 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.watabou.noosa.audio.Sample; import com.watabou.noosa.audio.Sample;
//for wands that directly damage a target //for wands that directly damage a target
//wands with AOE effects count here (e.g. fireblast), but wands with indrect damage do not (e.g. venom, transfusion) //wands with AOE or circumstantial direct damage count here (e.g. fireblast, transfusion), but wands with indirect damage do not (e.g. corrosion)
public abstract class DamageWand extends Wand{ public abstract class DamageWand extends Wand{
public int min(){ public int min(){
@@ -50,7 +50,7 @@ import com.watabou.utils.Callback;
import com.watabou.utils.PointF; import com.watabou.utils.PointF;
import com.watabou.utils.Random; import com.watabou.utils.Random;
public class WandOfTransfusion extends Wand { public class WandOfTransfusion extends DamageWand {
{ {
image = ItemSpriteSheet.WAND_TRANSFUSION; image = ItemSpriteSheet.WAND_TRANSFUSION;
@@ -58,6 +58,16 @@ public class WandOfTransfusion extends Wand {
collisionProperties = Ballistica.PROJECTILE; collisionProperties = Ballistica.PROJECTILE;
} }
@Override
public int min(int level) {
return 3 + level;
}
@Override
public int max(int level) {
return 6 + 2*level;
}
private boolean freeCharge = false; private boolean freeCharge = false;
@Override @Override
@@ -124,7 +134,7 @@ public class WandOfTransfusion extends Wand {
//harms the undead //harms the undead
} else { } else {
ch.damage(Char.combatRoll(3 + buffedLvl(), 6+2*buffedLvl()), this); ch.damage(damageRoll(), this);
ch.sprite.emitter().start(ShadowParticle.UP, 0.05f, 10 + buffedLvl()); ch.sprite.emitter().start(ShadowParticle.UP, 0.05f, 10 + buffedLvl());
Sample.INSTANCE.play(Assets.Sounds.BURNING); Sample.INSTANCE.play(Assets.Sounds.BURNING);
} }
@@ -181,9 +191,9 @@ public class WandOfTransfusion extends Wand {
public String statsDesc() { public String statsDesc() {
int selfDMG = Math.round(Dungeon.hero.HT*0.05f); int selfDMG = Math.round(Dungeon.hero.HT*0.05f);
if (levelKnown) if (levelKnown)
return Messages.get(this, "stats_desc", selfDMG, selfDMG + 3*buffedLvl(), 5+buffedLvl(), 3+buffedLvl()/2, 6+ buffedLvl()); return Messages.get(this, "stats_desc", selfDMG, selfDMG + 3*buffedLvl(), 5+buffedLvl(), min(), max());
else else
return Messages.get(this, "stats_desc", selfDMG, selfDMG, 5, 3, 6); return Messages.get(this, "stats_desc", selfDMG, selfDMG, 5, min(0), max(0));
} }
private static final String FREECHARGE = "freecharge"; private static final String FREECHARGE = "freecharge";