adds override to resetStatus to not allow revive

This commit is contained in:
shayebeadlingkl 2024-05-08 20:29:44 -04:00
parent 43e617aac9
commit c4c51b5d9d
2 changed files with 9 additions and 2 deletions

View File

@ -1959,8 +1959,15 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
return true;
}
resetStatus(): void {
/**
* Resets the status of a pokemon
* @param revive whether revive should be cured, defaults to true
*/
resetStatus(revive: boolean = true): void {
const lastStatus = this.status?.effect;
if (!revive && lastStatus === StatusEffect.FAINT) {
return;
}
this.status = undefined;
if (lastStatus === StatusEffect.SLEEP) {
this.setFrameRate(12);

View File

@ -14,7 +14,7 @@ export const STARTING_MONEY_OVERRIDE = 0;
export const WEATHER_OVERRIDE = WeatherType.NONE;
export const DOUBLE_BATTLE_OVERRIDE = false;
export const ABILITY_OVERRIDE = Abilities.NONE;
export const ABILITY_OVERRIDE = Abilities.CURSED_BODY;
export const PASSIVE_ABILITY_OVERRIDE = Abilities.NONE;
export const MOVE_OVERRIDE = Moves.NONE;
export const MOVE_OVERRIDE_2 = Moves.NONE;