This commit is contained in:
NxKarim 2024-04-22 21:59:29 -06:00
parent fb9739bede
commit 3992b8d556

View File

@ -2765,6 +2765,8 @@ export class AddArenaTagAttr extends MoveEffectAttr {
export class AddArenaTrapTagAttr extends AddArenaTagAttr { export class AddArenaTrapTagAttr extends AddArenaTagAttr {
getCondition(): MoveConditionFunc { getCondition(): MoveConditionFunc {
return (user, target, move) => { return (user, target, move) => {
let moveChance = this.getMoveChance(user,target,move,this.selfTarget);
if (moveChance < 0 || moveChance === 100 || user.randSeedInt(100) < moveChance)
if (move.category !== MoveCategory.STATUS || !user.scene.arena.getTag(this.tagType)) if (move.category !== MoveCategory.STATUS || !user.scene.arena.getTag(this.tagType))
return true; return true;
const tag = user.scene.arena.getTag(this.tagType) as ArenaTrapTag; const tag = user.scene.arena.getTag(this.tagType) as ArenaTrapTag;