run auto formatter because I forgot
This commit is contained in:
parent
8a5f8e8f6d
commit
ffe7c371b3
|
@ -2519,14 +2519,14 @@ export class HealFromBerryUseAbAttr extends AbAttr {
|
||||||
private healPercent: number;
|
private healPercent: number;
|
||||||
|
|
||||||
constructor(healPercent: number) {
|
constructor(healPercent: number) {
|
||||||
super()
|
super();
|
||||||
|
|
||||||
// Clamp healPercent so its between [0,1].
|
// Clamp healPercent so its between [0,1].
|
||||||
this.healPercent = Math.max(Math.min(healPercent, 1), 0);
|
this.healPercent = Math.max(Math.min(healPercent, 1), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
apply(pokemon: Pokemon, passive: boolean, ...args: [Utils.BooleanHolder, any[]]): boolean {
|
apply(pokemon: Pokemon, passive: boolean, ...args: [Utils.BooleanHolder, any[]]): boolean {
|
||||||
const { name: abilityName } = passive ? pokemon.getPassiveAbility() : pokemon.getAbility()
|
const { name: abilityName } = passive ? pokemon.getPassiveAbility() : pokemon.getAbility();
|
||||||
pokemon.scene.unshiftPhase(
|
pokemon.scene.unshiftPhase(
|
||||||
new PokemonHealPhase(
|
new PokemonHealPhase(
|
||||||
pokemon.scene,
|
pokemon.scene,
|
||||||
|
@ -2537,7 +2537,7 @@ export class HealFromBerryUseAbAttr extends AbAttr {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
return true
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2107,7 +2107,9 @@ export class BerryPhase extends FieldPhase {
|
||||||
if (cancelled.value) {
|
if (cancelled.value) {
|
||||||
pokemon.scene.queueMessage(getPokemonMessage(pokemon, " is too\nnervous to eat berries!"));
|
pokemon.scene.queueMessage(getPokemonMessage(pokemon, " is too\nnervous to eat berries!"));
|
||||||
} else {
|
} else {
|
||||||
this.scene.unshiftPhase(new CommonAnimPhase(this.scene, pokemon.getBattlerIndex(), pokemon.getBattlerIndex(), CommonAnim.USE_ITEM));
|
this.scene.unshiftPhase(
|
||||||
|
new CommonAnimPhase(this.scene, pokemon.getBattlerIndex(), pokemon.getBattlerIndex(), CommonAnim.USE_ITEM)
|
||||||
|
);
|
||||||
|
|
||||||
for (const berryModifier of this.scene.applyModifiers(BerryModifier, pokemon.isPlayer(), pokemon) as BerryModifier[]) {
|
for (const berryModifier of this.scene.applyModifiers(BerryModifier, pokemon.isPlayer(), pokemon) as BerryModifier[]) {
|
||||||
if (berryModifier.consumed) {
|
if (berryModifier.consumed) {
|
||||||
|
|
Loading…
Reference in New Issue