Update use of isTransferrable to isTransferable

This commit is contained in:
Eucalyptus 2024-10-06 12:54:08 -04:00
parent caf6708067
commit d49d49f9bc
1 changed files with 2 additions and 2 deletions

View File

@ -6932,8 +6932,8 @@ export class SwapHeldItemsAttr extends MoveEffectAttr {
*/
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
const targetHeldItems = target.getHeldItems().filter(i => i.isTransferrable);
const userHeldItems = user.getHeldItems().filter(i => i.isTransferrable);
const targetHeldItems = target.getHeldItems().filter(i => i.isTransferable);
const userHeldItems = user.getHeldItems().filter(i => i.isTransferable);
if (!user.hasTrainer() || target.hasAbility(Abilities.STICKY_HOLD) || (!userHeldItems.length && !targetHeldItems.length)) {
user.scene.queueMessage(i18next.t("battle:attackFailed"));