v3.2.0: added a short cooldown to blast wave's on-hit effect

This commit is contained in:
Evan Debenham
2025-07-25 12:06:44 -04:00
parent 49c335b284
commit 3f9f142513
2 changed files with 9 additions and 2 deletions

View File

@@ -1536,7 +1536,7 @@ items.wands.wandofblastwave.desc=This wand is made of a sort of marbled stone, w
items.wands.wandofblastwave.typical_stats_desc=This wand shoots a bolt which violently detonates at a target location. The force of this blast typically deals _%1$d-%2$d damage_ and is strong enough to send most enemies flying.
items.wands.wandofblastwave.stats_desc=This wand shoots a bolt which violently detonates at a target location. The force of this blast deals _%1$d-%2$d damage_ and is strong enough to send most enemies flying.
items.wands.wandofblastwave.upgrade_stat_name_2=Knockback
items.wands.wandofblastwave.bmage_desc=When _the Battlemage_ strikes a paralyzed enemy with a staff of blast wave, it will consume the paralysis to deal a burst of bonus magic damage.
items.wands.wandofblastwave.bmage_desc=When _the Battlemage_ strikes a paralyzed enemy with a staff of blast wave, it will consume the paralysis to deal a burst of bonus magic damage. This has a short cooldown per-enemy.
items.wands.wandofblastwave.eleblast_desc=An elemental blast with a staff of blast wave deals 67% damage and knocks all enemies outside of the blast area.
items.wands.wandofcorrosion.name=wand of corrosion

View File

@@ -26,6 +26,8 @@ import com.shatteredpixel.shatteredpixeldungeon.Badges;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis;
import com.shatteredpixel.shatteredpixeldungeon.effects.Effects;
import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile;
@@ -193,15 +195,20 @@ public class WandOfBlastWave extends DamageWand {
@Override
public void onHit(MagesStaff staff, Char attacker, Char defender, int damage) {
if (defender.buff(Paralysis.class) != null){
if (defender.buff(Paralysis.class) != null && defender.buff(BWaveOnHitTracker.class) == null){
defender.buff(Paralysis.class).detach();
int dmg = Random.NormalIntRange(6+buffedLvl(), 12+2*buffedLvl());
defender.damage(Math.round(procChanceMultiplier(attacker) * dmg), this);
BlastWave.blast(defender.pos);
Sample.INSTANCE.play( Assets.Sounds.BLAST );
//brief immunity, to prevent stacking absurd damage with it with things like para gas
Buff.prolong(defender, BWaveOnHitTracker.class, 3f);
}
}
public static class BWaveOnHitTracker extends FlavourBuff{}
@Override
public String upgradeStat2(int level) {
return Integer.toString(3 + level);