mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-02-16 17:27:41 +00:00
[Bug] Fixed reviving while transformed not resetting the sprite (#2152)
* Fixed reviving while transformed not resetting the sprite * Made reload assets in resetStatus optional
This commit is contained in:
parent
da37069457
commit
589d06c15e
@ -2527,8 +2527,9 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
* Resets the status of a pokemon.
|
||||
* @param revive Whether revive should be cured; defaults to true.
|
||||
* @param confusion Whether resetStatus should include confusion or not; defaults to false.
|
||||
* @param reloadAssets Whether to reload the assets or not; defaults to false.
|
||||
*/
|
||||
resetStatus(revive: boolean = true, confusion: boolean = false): void {
|
||||
resetStatus(revive: boolean = true, confusion: boolean = false, reloadAssets: boolean = false): void {
|
||||
const lastStatus = this.status?.effect;
|
||||
if (!revive && lastStatus === StatusEffect.FAINT) {
|
||||
return;
|
||||
@ -2545,6 +2546,9 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
this.lapseTag(BattlerTagType.CONFUSED);
|
||||
}
|
||||
}
|
||||
if (reloadAssets) {
|
||||
this.loadAssets(false).then(() => this.playAnim());
|
||||
}
|
||||
}
|
||||
|
||||
primeSummonData(summonDataPrimer: PokemonSummonData): void {
|
||||
|
@ -1091,8 +1091,7 @@ export class PokemonInstantReviveModifier extends PokemonHeldItemModifier {
|
||||
pokemon.scene.unshiftPhase(new PokemonHealPhase(pokemon.scene, pokemon.getBattlerIndex(),
|
||||
Math.max(Math.floor(pokemon.getMaxHp() / 2), 1), getPokemonMessage(pokemon, ` was revived\nby its ${this.type.name}!`), false, false, true));
|
||||
|
||||
pokemon.resetStatus();
|
||||
|
||||
pokemon.resetStatus(true, false, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user