mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-23 06:53:27 +02:00
parent
a85d8cd5de
commit
6fac1a5052
@ -1263,17 +1263,17 @@ export class PostDefendContactApplyTagChanceAbAttr extends PostDefendAbAttr {
|
||||
this.turnCount = turnCount;
|
||||
}
|
||||
|
||||
override canApply({ move, pokemon, opponent: attacker }: PostMoveInteractionAbAttrParams): boolean {
|
||||
override canApply({ move, pokemon, opponent }: PostMoveInteractionAbAttrParams): boolean {
|
||||
return (
|
||||
move.doesFlagEffectApply({ flag: MoveFlags.MAKES_CONTACT, user: attacker, target: pokemon }) &&
|
||||
move.doesFlagEffectApply({ flag: MoveFlags.MAKES_CONTACT, user: opponent, target: pokemon }) &&
|
||||
pokemon.randBattleSeedInt(100) < this.chance &&
|
||||
attacker.canAddTag(this.tagType)
|
||||
opponent.canAddTag(this.tagType)
|
||||
);
|
||||
}
|
||||
|
||||
override apply({ simulated, opponent: attacker, move }: PostMoveInteractionAbAttrParams): void {
|
||||
override apply({ pokemon, simulated, opponent, move }: PostMoveInteractionAbAttrParams): void {
|
||||
if (!simulated) {
|
||||
attacker.addTag(this.tagType, this.turnCount, move.id, attacker.id);
|
||||
opponent.addTag(this.tagType, this.turnCount, move.id, pokemon.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user