Fix pickup working on non-transferrable items
This commit is contained in:
parent
8f3d76d358
commit
da6d4bba2e
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue