whoops, should still apply to fainted party member
This commit is contained in:
parent
8e6688daef
commit
8b189d3747
|
@ -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<boolean>[] = [];
|
||||
for (const modifier of modifiersToTransfer) {
|
||||
transferResults.push(this.scene.tryTransferHeldItemModifier(modifier, newPokemon, false, modifier.getStackCount(), true, true));
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue