Perish Song doesn't work on bosses
parent
f0b00f9f27
commit
289969790a
|
@ -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);
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue