From da6d4bba2e051170fe1592bed0871e23d0b24679 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Thu, 7 Mar 2024 13:07:58 -0500 Subject: [PATCH] Fix pickup working on non-transferrable items --- src/battle.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battle.ts b/src/battle.ts index b132533c52a..fd001094fd9 100644 --- a/src/battle.ts +++ b/src/battle.ts @@ -129,7 +129,7 @@ export default class Battle { } addPostBattleLoot(enemyPokemon: EnemyPokemon): void { - this.postBattleLoot.push(...enemyPokemon.scene.findModifiers(m => m instanceof PokemonHeldItemModifier && m.pokemonId === enemyPokemon.id, false).map(i => { + this.postBattleLoot.push(...enemyPokemon.scene.findModifiers(m => m instanceof PokemonHeldItemModifier && m.pokemonId === enemyPokemon.id && m.getTransferrable(false), false).map(i => { const ret = i as PokemonHeldItemModifier; ret.pokemonId = null; return ret;