From 4d8663d2746d1972e58833f7c3ce7b406b388d0c Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Fri, 8 Mar 2024 14:49:17 -0500 Subject: [PATCH] Fix pickup working on the same item multiple times --- src/data/ability.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/data/ability.ts b/src/data/ability.ts index a23ed4c1d..7cf4c8d0b 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -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; }