Remove unnecessary nullish coalescing

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
Sirz Benjie 2025-05-01 14:01:09 -05:00
parent 22d8d16dfb
commit 12d48edfa2
No known key found for this signature in database
GPG Key ID: 4A524B4D196C759E

View File

@ -1257,12 +1257,11 @@ export class MoveTypeChangeAbAttr extends PreAttackAbAttr {
* @returns whether the move type change attribute can be applied
*/
override canApplyPreAttack(pokemon: Pokemon, _passive: boolean, _simulated: boolean, _defender: Pokemon | null, move: Move, _args: [NumberHolder?, NumberHolder?, ...any]): boolean {
return ((!this.condition || this.condition(pokemon, _defender, move)) &&
return (!this.condition || this.condition(pokemon, _defender, move)) &&
!noAbilityTypeOverrideMoves.has(move.id) &&
(!pokemon.isTerastallized ||
(move.id !== Moves.TERA_BLAST &&
(move.id !== Moves.TERA_STARSTORM || pokemon.getTeraType() !== PokemonType.STELLAR || !pokemon.hasSpecies(Species.TERAPAGOS)))))
?? false;
(move.id !== Moves.TERA_STARSTORM || pokemon.getTeraType() !== PokemonType.STELLAR || !pokemon.hasSpecies(Species.TERAPAGOS))));
}
/**