Fix pickup working on the same item multiple times
parent
b147cf8f37
commit
4d8663d274
|
@ -1036,6 +1036,7 @@ export class PostBattleLootAbAttr extends PostBattleAbAttr {
|
||||||
if (postBattleLoot.length) {
|
if (postBattleLoot.length) {
|
||||||
const randItem = Utils.randSeedItem(postBattleLoot);
|
const randItem = Utils.randSeedItem(postBattleLoot);
|
||||||
if (pokemon.scene.tryTransferHeldItemModifier(randItem, pokemon, false, true, true)) {
|
if (pokemon.scene.tryTransferHeldItemModifier(randItem, pokemon, false, true, true)) {
|
||||||
|
postBattleLoot.splice(postBattleLoot.indexOf(randItem), 1);
|
||||||
pokemon.scene.queueMessage(getPokemonMessage(pokemon, ` picked up\n${randItem.type.name}!`));
|
pokemon.scene.queueMessage(getPokemonMessage(pokemon, ` picked up\n${randItem.type.name}!`));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue