Perish Song doesn't work on bosses
This commit is contained in:
parent
f0b00f9f27
commit
289969790a
|
@ -669,6 +669,10 @@ export class PerishSongTag extends BattlerTag {
|
|||
super(BattlerTagType.PERISH_SONG, BattlerTagLapseType.TURN_END, turnCount, Moves.PERISH_SONG);
|
||||
}
|
||||
|
||||
canAdd(pokemon: Pokemon): boolean {
|
||||
return !pokemon.isBossImmune();
|
||||
}
|
||||
|
||||
lapse(pokemon: Pokemon, lapseType: BattlerTagLapseType): boolean {
|
||||
const ret = super.lapse(pokemon, lapseType);
|
||||
|
||||
|
|
|
@ -1826,10 +1826,8 @@ export class AddBattlerTagAttr extends MoveEffectAttr {
|
|||
return false;
|
||||
|
||||
const chance = this.getTagChance(user, target, move);
|
||||
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 true;
|
||||
}
|
||||
if (chance < 0 || chance === 100 || user.randSeedInt(100) < chance)
|
||||
return (this.selfTarget ? user : target).addTag(this.tagType, user.randSeedInt(this.turnCountMax - this.turnCountMin, this.turnCountMin), move.id, user.id);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue