From a3b733362f7cd55cb453f6eafc00c66ab2e81938 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Tue, 23 Apr 2024 09:42:52 -0400 Subject: [PATCH] Minor nitpicks --- src/data/ability.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index c61123e0c5e..e0bd24b4e62 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -1249,20 +1249,21 @@ export class PostSummonAllyHealAbAttr extends PostSummonAbAttr { private healRatio: number; private showAnim: boolean; - constructor(healRatio: number, showAnim?: boolean,) { + constructor(healRatio: number, showAnim: boolean = false) { super(); - this.healRatio = healRatio || 1; - this.showAnim = !!showAnim; + this.healRatio = healRatio || 4; + this.showAnim = showAnim; } applyPostSummon(pokemon: Pokemon, passive: boolean, args: any[]): boolean { - if (pokemon.getAlly()) { - let target = pokemon.getAlly() + const target = pokemon.getAlly(); + if (target?.isActive(true)) { target.scene.unshiftPhase(new PokemonHealPhase(target.scene, target.getBattlerIndex(), - Math.max(Math.floor(pokemon.getMaxHp() * this.healRatio), 1), getPokemonMessage(target, ` drank down all the\nmatcha that ${pokemon.name} made!`), true, !this.showAnim)); + Math.max(Math.floor(pokemon.getMaxHp() / this.healRatio), 1), getPokemonMessage(target, ` drank down all the\nmatcha that ${pokemon.name} made!`), true, !this.showAnim)); return true; } + return false; } } @@ -3208,7 +3209,7 @@ export function initAbilities() { .ignorable(), new Ability(Abilities.SUPERSWEET_SYRUP, "Supersweet Syrup (N)", "A sickly sweet scent spreads across the field the first time the Pokémon enters a battle, lowering the evasiveness of opposing Pokémon.", 9), new Ability(Abilities.HOSPITALITY, "Hospitality", "When the Pokémon enters a battle, it showers its ally with hospitality, restoring a small amount of the ally's HP.", 9) - .attr(PostSummonAllyHealAbAttr, 1/4, true), + .attr(PostSummonAllyHealAbAttr, 4, true), new Ability(Abilities.TOXIC_CHAIN, "Toxic Chain", "The power of the Pokémon's toxic chain may badly poison any target the Pokémon hits with a move.", 9) .attr(PostAttackApplyStatusEffectAbAttr, false, 30, StatusEffect.TOXIC), new Ability(Abilities.EMBODY_ASPECT_TEAL, "Embody Aspect", "The Pokémon's heart fills with memories, causing the Teal Mask to shine and the Pokémon's Speed stat to be boosted.", 9)