mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-16 21:32:18 +02:00
clean up comments and readd status cure prefaint
This commit is contained in:
parent
845aa292a8
commit
c7d50193b3
@ -1578,19 +1578,18 @@ export class StealEatBerryAttr extends EatBerryAttr {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param selfTarget - Whether this move targets the user
|
||||
* @param ...effects - Status Effects to heal
|
||||
* @example
|
||||
* ```
|
||||
* // A move that unthaws target
|
||||
* const thawSelf = new HealStatusEffectAttr(false, StatusEffect.FREEZE)
|
||||
* // Pokemon uses 'Refresh' on itself
|
||||
* const cureAll = new HealStatusEffectAttr(true, StatusEffect.BURN, StatusEffect.PARALYSIS, StatusEffect.POISON)
|
||||
* ```
|
||||
* Move attribute that signals that that move should cure a status effect
|
||||
* @extends MoveEffectAttr
|
||||
* @see {@linkcode apply()}
|
||||
*/
|
||||
export class HealStatusEffectAttr extends MoveEffectAttr {
|
||||
/** Array of Status Effects to cure */
|
||||
private effects: StatusEffect[];
|
||||
|
||||
|
||||
/**
|
||||
* @param selfTarget - Whether this move targets the user
|
||||
* @param ...effects - Array of status effects to cure
|
||||
*/
|
||||
constructor(selfTarget: boolean, ...effects: StatusEffect[]) {
|
||||
super(selfTarget);
|
||||
|
||||
@ -1602,7 +1601,7 @@ export class HealStatusEffectAttr extends MoveEffectAttr {
|
||||
return false;
|
||||
|
||||
const pokemon = this.selfTarget ? user : target;
|
||||
if (pokemon.hp > 0 && pokemon.status && this.effects.includes(pokemon.status.effect)) {
|
||||
if (pokemon.status && this.effects.includes(pokemon.status.effect)) {
|
||||
pokemon.scene.queueMessage(getPokemonMessage(pokemon, getStatusEffectHealText(pokemon.status.effect)));
|
||||
pokemon.resetStatus();
|
||||
pokemon.updateInfo();
|
||||
|
Loading…
Reference in New Issue
Block a user