Return `isNullOrUndefined()` instead of `if` chain

Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
This commit is contained in:
NightKev 2024-11-19 03:58:45 -08:00 committed by GitHub
parent c47d2b5b8e
commit dae64db8f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 5 deletions

View File

@ -5781,11 +5781,7 @@ export function initAbilities() {
new Ability(Abilities.ANALYTIC, 5)
.attr(MovePowerBoostAbAttr, (user, target, move) => {
const movePhase = user?.scene.findPhase((phase) => phase instanceof MovePhase && phase.pokemon.id !== user.id);
if (movePhase) {
return false;
} else {
return true;
}
return Utils.isNullOrUndefined(movePhase);
}, 1.3),
new Ability(Abilities.ILLUSION, 5)
.attr(UncopiableAbilityAbAttr)