mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-07 07:59:26 +02:00
made lunar blessing/jungle healing not fail on full hp for now
This commit is contained in:
parent
88baff4846
commit
cee6e8678a
@ -1945,14 +1945,27 @@ export class AddSubstituteAttr extends MoveEffectAttr {
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class HealAttr extends MoveEffectAttr {
|
||||
/** The percentage of {@linkcode Stat.HP} to heal; default `1` */
|
||||
protected healRatio = 1
|
||||
/** Whether to display a healing animation upon healing the target; default `false` */
|
||||
private showAnim = false
|
||||
|
||||
/**
|
||||
* Whether the move should fail if the target is at full HP.
|
||||
* @todo Remove post move failure rework
|
||||
*/
|
||||
private failOnFullHp = true;
|
||||
|
||||
constructor(
|
||||
/** The percentage of {@linkcode Stat.HP} to heal; default `1` */
|
||||
protected healRatio = 1,
|
||||
/** Whether to display a healing animation upon healing the target; default `false` */
|
||||
private showAnim = false,
|
||||
selfTarget = true
|
||||
healRatio = 1,
|
||||
showAnim = false,
|
||||
selfTarget = true,
|
||||
failOnFullHp = true
|
||||
) {
|
||||
super(selfTarget);
|
||||
this.healRatio = healRatio;
|
||||
this.showAnim = showAnim
|
||||
this.failOnFullHp = failOnFullHp
|
||||
}
|
||||
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||
@ -1979,7 +1992,7 @@ export class HealAttr extends MoveEffectAttr {
|
||||
}
|
||||
|
||||
override getCondition(): MoveConditionFunc {
|
||||
return (user, target) => !(this.selfTarget ? user : target).isFullHp();
|
||||
return (user, target) => !(this.failOnFullHp && (this.selfTarget ? user : target).isFullHp());
|
||||
}
|
||||
|
||||
override getFailedText(user: Pokemon, target: Pokemon): string | undefined {
|
||||
@ -1999,7 +2012,7 @@ export class HealAttr extends MoveEffectAttr {
|
||||
* Used for:
|
||||
* - {@linkcode MoveId.MOONLIGHT} and variants
|
||||
* - {@linkcode MoveId.SHORE_UP}
|
||||
* - {@linkcode MoveId.JUNGLE_HEALING}
|
||||
* - {@linkcode MoveId.FLORAL_HEALING}
|
||||
* - {@linkcode MoveId.SWALLOW}
|
||||
*/
|
||||
export class VariableHealAttr extends HealAttr {
|
||||
@ -11035,10 +11048,11 @@ export function initMoves() {
|
||||
.attr(HealStatusEffectAttr, false, StatusEffect.FREEZE)
|
||||
.attr(StatusEffectAttr, StatusEffect.BURN),
|
||||
new StatusMove(MoveId.JUNGLE_HEALING, PokemonType.GRASS, -1, 10, -1, 0, 8)
|
||||
.attr(HealAttr, 0.25, true, false)
|
||||
.attr(HealAttr, 0.25, true, false, false)
|
||||
.attr(HealStatusEffectAttr, false, getNonVolatileStatusEffects())
|
||||
.target(MoveTarget.USER_AND_ALLIES)
|
||||
.triageMove(),
|
||||
.triageMove()
|
||||
.edgeCase(), // TODO: Review if jungle healing fails if HP cannot be restored and status cannot be cured
|
||||
new AttackMove(MoveId.WICKED_BLOW, PokemonType.DARK, MoveCategory.PHYSICAL, 75, 100, 5, -1, 0, 8)
|
||||
.attr(CritOnlyAttr)
|
||||
.punchingMove(),
|
||||
@ -11140,10 +11154,11 @@ export function initMoves() {
|
||||
.windMove()
|
||||
.target(MoveTarget.ALL_NEAR_ENEMIES),
|
||||
new StatusMove(MoveId.LUNAR_BLESSING, PokemonType.PSYCHIC, -1, 5, -1, 0, 8)
|
||||
.attr(HealAttr, 0.25, true, false)
|
||||
.attr(HealAttr, 0.25, true, false, false)
|
||||
.attr(HealStatusEffectAttr, false, getNonVolatileStatusEffects())
|
||||
.target(MoveTarget.USER_AND_ALLIES)
|
||||
.triageMove(),
|
||||
.triageMove()
|
||||
.edgeCase(), // TODO: Review if lunar blessing fails if HP cannot be restored and status cannot be cured
|
||||
new SelfStatusMove(MoveId.TAKE_HEART, PokemonType.PSYCHIC, -1, 10, -1, 0, 8)
|
||||
.attr(StatStageChangeAttr, [ Stat.SPATK, Stat.SPDEF ], 1, true)
|
||||
.attr(HealStatusEffectAttr, true, [ StatusEffect.PARALYSIS, StatusEffect.POISON, StatusEffect.TOXIC, StatusEffect.BURN, StatusEffect.SLEEP ]),
|
||||
|
@ -69,9 +69,9 @@ export class PokemonHealPhase extends CommonAnimPhase {
|
||||
|
||||
if (healBlock && this.hpHealed > 0) {
|
||||
globalScene.phaseManager.queueMessage(healBlock.onActivation(pokemon));
|
||||
this.message = null;
|
||||
return super.end();
|
||||
}
|
||||
|
||||
if (healOrDamage) {
|
||||
const hpRestoreMultiplier = new NumberHolder(1);
|
||||
if (!this.revive) {
|
||||
|
Loading…
Reference in New Issue
Block a user