Compare commits

..

3 Commits

Author SHA1 Message Date
Bertie690
47794d4e40
Merge 687a28e85f into 5bfcb1d379 2025-08-04 19:44:11 -04:00
Amani H.
5bfcb1d379
[Bug] Release Fainted Pokémon in Switch Menu (#6215)
* [Bug] Release Fainted Pokémon in Switch Menu

* Add Kev's Suggestions
2025-08-04 15:55:36 -07:00
Acelynn Zhang
40443d2afa
[Bug] Fix override move animations not loading for enemy Pokemon
https://github.com/pagefaultgames/pokerogue/pull/6214
2025-08-04 14:33:01 -07:00
2 changed files with 6 additions and 7 deletions

View File

@ -1821,8 +1821,6 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
* @returns An array of {@linkcode PokemonMove}, as described above. * @returns An array of {@linkcode PokemonMove}, as described above.
*/ */
getMoveset(ignoreOverride = false): PokemonMove[] { getMoveset(ignoreOverride = false): PokemonMove[] {
const ret = !ignoreOverride && this.summonData.moveset ? this.summonData.moveset : this.moveset;
// Overrides moveset based on arrays specified in overrides.ts // Overrides moveset based on arrays specified in overrides.ts
let overrideArray: MoveId | Array<MoveId> = this.isPlayer() let overrideArray: MoveId | Array<MoveId> = this.isPlayer()
? Overrides.MOVESET_OVERRIDE ? Overrides.MOVESET_OVERRIDE
@ -1838,7 +1836,7 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
}); });
} }
return ret; return !ignoreOverride && this.summonData.moveset ? this.summonData.moveset : this.moveset;
} }
/** /**

View File

@ -827,6 +827,11 @@ export class PartyUiHandler extends MessageUiHandler {
globalScene.triggerPokemonFormChange(pokemon, SpeciesFormChangeItemTrigger, false, true); globalScene.triggerPokemonFormChange(pokemon, SpeciesFormChangeItemTrigger, false, true);
} }
// This is processed before the filter result since releasing does not depend on status.
if (option === PartyOption.RELEASE) {
return this.processReleaseOption(pokemon);
}
// If the pokemon is filtered out for this option, we cannot continue // If the pokemon is filtered out for this option, we cannot continue
const filterResult = this.getFilterResult(option, pokemon); const filterResult = this.getFilterResult(option, pokemon);
if (filterResult) { if (filterResult) {
@ -850,10 +855,6 @@ export class PartyUiHandler extends MessageUiHandler {
// PartyUiMode.POST_BATTLE_SWITCH (SEND_OUT) // PartyUiMode.POST_BATTLE_SWITCH (SEND_OUT)
// These are the options that need a callback // These are the options that need a callback
if (option === PartyOption.RELEASE) {
return this.processReleaseOption(pokemon);
}
if (this.partyUiMode === PartyUiMode.SPLICE) { if (this.partyUiMode === PartyUiMode.SPLICE) {
if (option === PartyOption.SPLICE) { if (option === PartyOption.SPLICE) {
(this.selectCallback as PartyModifierSpliceSelectCallback)(this.transferCursor, this.cursor); (this.selectCallback as PartyModifierSpliceSelectCallback)(this.transferCursor, this.cursor);