mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-17 05:42: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
|
* Move attribute that signals that that move should cure a status effect
|
||||||
* @param ...effects - Status Effects to heal
|
* @extends MoveEffectAttr
|
||||||
* @example
|
* @see {@linkcode apply()}
|
||||||
* ```
|
|
||||||
* // 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)
|
|
||||||
* ```
|
|
||||||
*/
|
*/
|
||||||
export class HealStatusEffectAttr extends MoveEffectAttr {
|
export class HealStatusEffectAttr extends MoveEffectAttr {
|
||||||
|
/** Array of Status Effects to cure */
|
||||||
private effects: StatusEffect[];
|
private effects: StatusEffect[];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param selfTarget - Whether this move targets the user
|
||||||
|
* @param ...effects - Array of status effects to cure
|
||||||
|
*/
|
||||||
constructor(selfTarget: boolean, ...effects: StatusEffect[]) {
|
constructor(selfTarget: boolean, ...effects: StatusEffect[]) {
|
||||||
super(selfTarget);
|
super(selfTarget);
|
||||||
|
|
||||||
@ -1602,7 +1601,7 @@ export class HealStatusEffectAttr extends MoveEffectAttr {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
const pokemon = this.selfTarget ? user : target;
|
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.scene.queueMessage(getPokemonMessage(pokemon, getStatusEffectHealText(pokemon.status.effect)));
|
||||||
pokemon.resetStatus();
|
pokemon.resetStatus();
|
||||||
pokemon.updateInfo();
|
pokemon.updateInfo();
|
||||||
|
Loading…
Reference in New Issue
Block a user