Perish Song doesn't work on bosses

This commit is contained in:
Flashfyre 2024-03-28 09:21:39 -04:00
parent f0b00f9f27
commit 289969790a
2 changed files with 6 additions and 4 deletions

View File

@ -669,6 +669,10 @@ export class PerishSongTag extends BattlerTag {
super(BattlerTagType.PERISH_SONG, BattlerTagLapseType.TURN_END, turnCount, Moves.PERISH_SONG); super(BattlerTagType.PERISH_SONG, BattlerTagLapseType.TURN_END, turnCount, Moves.PERISH_SONG);
} }
canAdd(pokemon: Pokemon): boolean {
return !pokemon.isBossImmune();
}
lapse(pokemon: Pokemon, lapseType: BattlerTagLapseType): boolean { lapse(pokemon: Pokemon, lapseType: BattlerTagLapseType): boolean {
const ret = super.lapse(pokemon, lapseType); const ret = super.lapse(pokemon, lapseType);

View File

@ -1826,10 +1826,8 @@ export class AddBattlerTagAttr extends MoveEffectAttr {
return false; return false;
const chance = this.getTagChance(user, target, move); const chance = this.getTagChance(user, target, move);
if (chance < 0 || chance === 100 || user.randSeedInt(100) < chance) { if (chance < 0 || chance === 100 || user.randSeedInt(100) < chance)
(this.selfTarget ? user : target).addTag(this.tagType, user.randSeedInt(this.turnCountMax - this.turnCountMin, this.turnCountMin), move.id, user.id); return (this.selfTarget ? user : target).addTag(this.tagType, user.randSeedInt(this.turnCountMax - this.turnCountMin, this.turnCountMin), move.id, user.id);
return true;
}
return false; return false;
} }