mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-21 00:52:47 +02:00
hhhh
This commit is contained in:
parent
501fb0b594
commit
07eb03f981
@ -1948,16 +1948,18 @@ export class HealAttr extends MoveEffectAttr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override canApply(user: Pokemon, target: Pokemon, _move: Move, _args?: any[]): boolean {
|
override canApply(user: Pokemon, target: Pokemon, _move: Move, _args?: any[]): boolean {
|
||||||
return !(this.selfTarget ? user : target).isFullHp();
|
if (!super.canApply(user, target, _move, _args)) {
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
override getFailedText(user: Pokemon, target: Pokemon, _move: Move): string | undefined {
|
|
||||||
const healedPokemon = this.selfTarget ? user : target;
|
const healedPokemon = this.selfTarget ? user : target;
|
||||||
return healedPokemon.isFullHp()
|
if (healedPokemon.isFullHp()) {
|
||||||
? i18next.t("battle:hpIsFull", {
|
globalScene.phaseManager.queueMessage(i18next.t("battle:hpIsFull", {
|
||||||
pokemonName: getPokemonNameWithAffix(healedPokemon),
|
pokemonName: getPokemonNameWithAffix(healedPokemon),
|
||||||
})
|
}))
|
||||||
: undefined;
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ describe("Moves - Recovery Moves", () => {
|
|||||||
game.move.use(MoveId.MOONLIGHT);
|
game.move.use(MoveId.MOONLIGHT);
|
||||||
await game.toEndOfTurn();
|
await game.toEndOfTurn();
|
||||||
|
|
||||||
expect(blissey.getHpRatio()).toBeCloseTo(0.67, 1);
|
expect(blissey.getHpRatio()).toBeCloseTo(0.66, 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
const nonSunWTs = getEnumValues(WeatherType)
|
const nonSunWTs = getEnumValues(WeatherType)
|
||||||
|
Loading…
Reference in New Issue
Block a user