diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index d0a43e3bcf8..148cea1c103 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -5127,8 +5127,8 @@ export class EnemyPokemon extends Pokemon { newPokemon.setVisible(false); // Hide if replaced with first pokemon } - if (pokemonReplaced && newPokemon.isAllowedInBattle()) { - const modifiersToTransfer = this.scene.findModifiers(m => m instanceof PokemonHeldItemModifier && m.pokemonId === pokemonReplaced, true) as PokemonHeldItemModifier[]; + if (pokemonReplaced && newPokemon.isAllowedInChallenge()) { + const modifiersToTransfer = this.scene.findModifiers(m => m instanceof PokemonHeldItemModifier && !(m instanceof BaseStatModifier) && m.pokemonId === pokemonReplaced, true) as PokemonHeldItemModifier[]; const transferResults: Promise[] = []; for (const modifier of modifiersToTransfer) { transferResults.push(this.scene.tryTransferHeldItemModifier(modifier, newPokemon, false, modifier.getStackCount(), true, true)); diff --git a/src/ui/party-ui-handler.ts b/src/ui/party-ui-handler.ts index a28615a4211..e16088f524e 100644 --- a/src/ui/party-ui-handler.ts +++ b/src/ui/party-ui-handler.ts @@ -1063,7 +1063,7 @@ export default class PartyUiHandler extends MessageUiHandler { this.clearPartySlots(); const releasedPokemon = this.scene.getPlayerParty().splice(slotIndex, 1)[0]; let releasedId: number = 0; - if (releasedPokemon.isAllowedInBattle()) { + if (releasedPokemon.isAllowedInChallenge()) { releasedId = releasedPokemon.id; } this.populatePartySlots();