mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-20 22:39:31 +02:00
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
|
newPokemon.setVisible(false); // Hide if replaced with first pokemon
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pokemonReplaced && newPokemon.isAllowedInBattle()) {
|
if (pokemonReplaced && newPokemon.isAllowedInChallenge()) {
|
||||||
const modifiersToTransfer = this.scene.findModifiers(m => m instanceof PokemonHeldItemModifier && m.pokemonId === pokemonReplaced, true) as PokemonHeldItemModifier[];
|
const modifiersToTransfer = this.scene.findModifiers(m => m instanceof PokemonHeldItemModifier && !(m instanceof BaseStatModifier) && m.pokemonId === pokemonReplaced, true) as PokemonHeldItemModifier[];
|
||||||
const transferResults: Promise<boolean>[] = [];
|
const transferResults: Promise<boolean>[] = [];
|
||||||
for (const modifier of modifiersToTransfer) {
|
for (const modifier of modifiersToTransfer) {
|
||||||
transferResults.push(this.scene.tryTransferHeldItemModifier(modifier, newPokemon, false, modifier.getStackCount(), true, true));
|
transferResults.push(this.scene.tryTransferHeldItemModifier(modifier, newPokemon, false, modifier.getStackCount(), true, true));
|
||||||
|
@ -1063,7 +1063,7 @@ export default class PartyUiHandler extends MessageUiHandler {
|
|||||||
this.clearPartySlots();
|
this.clearPartySlots();
|
||||||
const releasedPokemon = this.scene.getPlayerParty().splice(slotIndex, 1)[0];
|
const releasedPokemon = this.scene.getPlayerParty().splice(slotIndex, 1)[0];
|
||||||
let releasedId: number = 0;
|
let releasedId: number = 0;
|
||||||
if (releasedPokemon.isAllowedInBattle()) {
|
if (releasedPokemon.isAllowedInChallenge()) {
|
||||||
releasedId = releasedPokemon.id;
|
releasedId = releasedPokemon.id;
|
||||||
}
|
}
|
||||||
this.populatePartySlots();
|
this.populatePartySlots();
|
||||||
|
Loading…
Reference in New Issue
Block a user