mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-20 16:42:45 +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 {
|
||||
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;
|
||||
return healedPokemon.isFullHp()
|
||||
? i18next.t("battle:hpIsFull", {
|
||||
if (healedPokemon.isFullHp()) {
|
||||
globalScene.phaseManager.queueMessage(i18next.t("battle:hpIsFull", {
|
||||
pokemonName: getPokemonNameWithAffix(healedPokemon),
|
||||
})
|
||||
: undefined;
|
||||
}))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -104,7 +104,7 @@ describe("Moves - Recovery Moves", () => {
|
||||
game.move.use(MoveId.MOONLIGHT);
|
||||
await game.toEndOfTurn();
|
||||
|
||||
expect(blissey.getHpRatio()).toBeCloseTo(0.67, 1);
|
||||
expect(blissey.getHpRatio()).toBeCloseTo(0.66, 1);
|
||||
});
|
||||
|
||||
const nonSunWTs = getEnumValues(WeatherType)
|
||||
|
Loading…
Reference in New Issue
Block a user