Fix pickup working on non-transferrable items

This commit is contained in:
Flashfyre 2024-03-07 13:07:58 -05:00
parent 8f3d76d358
commit da6d4bba2e
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ export default class Battle {
} }
addPostBattleLoot(enemyPokemon: EnemyPokemon): void { 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; const ret = i as PokemonHeldItemModifier;
ret.pokemonId = null; ret.pokemonId = null;
return ret; return ret;