mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-01-18 15:00:55 +00:00
Fix pickup working on the same item multiple times
This commit is contained in:
parent
b147cf8f37
commit
4d8663d274
@ -1036,6 +1036,7 @@ export class PostBattleLootAbAttr extends PostBattleAbAttr {
|
||||
if (postBattleLoot.length) {
|
||||
const randItem = Utils.randSeedItem(postBattleLoot);
|
||||
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}!`));
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user