Update RemoveArenaTagAttr to allow BOTH, fix stylization.

This commit is contained in:
Stophles 2024-04-12 19:55:23 -05:00 committed by GitHub
parent c7dac7886f
commit 81f2d150a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2513,7 +2513,6 @@ export class RemoveArenaTagAttr extends MoveEffectAttr {
this.tagTypes = tagTypes;
this.selfSideTarget = selfSideTarget;
this.side = side;
}
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
@ -2521,14 +2520,11 @@ export class RemoveArenaTagAttr extends MoveEffectAttr {
return false;
if (move.chance < 0 || move.chance === 100 || user.randSeedInt(100) < move.chance) {
for (let tagType of this.tagTypes)
if (this.side != ArenaTagSide.BOTH)
{
if (this.side != ArenaTagSide.BOTH){
user.scene.arena.removeTag(tagType, (this.selfSideTarget ? user : target).isPlayer() ? ArenaTagSide.PLAYER : ArenaTagSide.ENEMY);
}
else
{
user.scene.arena.removeTag(tagType, ArenaTagSide.PLAYER);
user.scene.arena.removeTag(tagType, ArenaTagSide.ENEMY);
else {
user.scene.arena.removeTag(tagType, ArenaTagSide.BOTH);
}
return true;
}