mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-27 10:42:25 +02:00
Changed ability behavior to pass tests
This commit is contained in:
parent
ded3582f46
commit
d525e2275f
@ -1003,8 +1003,12 @@ export class PostDefendPerishSongAbAttr extends PostDefendAbAttr {
|
|||||||
|
|
||||||
override applyPostDefend(pokemon: Pokemon, _passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, _hitResult: HitResult, _args: any[]): boolean {
|
override applyPostDefend(pokemon: Pokemon, _passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, _hitResult: HitResult, _args: any[]): boolean {
|
||||||
if (move.checkFlag(MoveFlags.MAKES_CONTACT, attacker, pokemon) && !move.hitsSubstitute(attacker, pokemon)) {
|
if (move.checkFlag(MoveFlags.MAKES_CONTACT, attacker, pokemon) && !move.hitsSubstitute(attacker, pokemon)) {
|
||||||
if (pokemon.getTag(BattlerTagType.PERISH_SONG) || attacker.getTag(BattlerTagType.PERISH_SONG)) {
|
if (attacker.getTag(BattlerTagType.PERISH_SONG)) {
|
||||||
return false;
|
return false;
|
||||||
|
} else if (pokemon.getTag(BattlerTagType.PERISH_SONG)) {
|
||||||
|
if (!simulated) {
|
||||||
|
attacker.addTag(BattlerTagType.PERISH_SONG, this.turns);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!simulated) {
|
if (!simulated) {
|
||||||
attacker.addTag(BattlerTagType.PERISH_SONG, this.turns);
|
attacker.addTag(BattlerTagType.PERISH_SONG, this.turns);
|
||||||
|
Loading…
Reference in New Issue
Block a user