From 7a5c02f249fa9b56d9dc90bd27135731e29eac7c Mon Sep 17 00:00:00 2001 From: frutescens Date: Sat, 16 Nov 2024 15:07:13 -0800 Subject: [PATCH] Added checks for Sheer Force interactions currently in the code. --- src/data/ability.ts | 4 +--- src/data/pokemon-forms.ts | 4 ++++ src/modifier/modifier.ts | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index b77b18947be..d90f6d5c376 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -5708,9 +5708,7 @@ export function initAbilities() { .condition(getSheerForceHitDisableAbCondition()), new Ability(Abilities.SHEER_FORCE, 5) .attr(MovePowerBoostAbAttr, (user, target, move) => move.chance >= 1, 5461 / 4096) - .attr(MoveEffectChanceMultiplierAbAttr, 0) - .edgeCase() // Should disable shell bell and Meloetta's relic song transformation - .edgeCase(), // Should disable life orb, eject button, red card, kee/maranga berry if they get implemented + .attr(MoveEffectChanceMultiplierAbAttr, 0), // Should disable life orb, eject button, red card, kee/maranga berry if they get implemented new Ability(Abilities.CONTRARY, 5) .attr(StatStageChangeMultiplierAbAttr, -1) .ignorable(), diff --git a/src/data/pokemon-forms.ts b/src/data/pokemon-forms.ts index 2db0ed54294..1f99681b436 100644 --- a/src/data/pokemon-forms.ts +++ b/src/data/pokemon-forms.ts @@ -351,6 +351,10 @@ export class MeloettaFormChangePostMoveTrigger extends SpeciesFormChangePostMove if (pokemon.scene.gameMode.hasChallenge(Challenges.SINGLE_TYPE)) { return false; } else { + // Meloetta will not transform if it has the ability Sheer Force when using Relic Song + if (pokemon.hasAbility(Abilities.SHEER_FORCE, true)) { + return false; + } return super.canChange(pokemon); } } diff --git a/src/modifier/modifier.ts b/src/modifier/modifier.ts index 4e59d6c01f0..00e20e21f56 100644 --- a/src/modifier/modifier.ts +++ b/src/modifier/modifier.ts @@ -1769,7 +1769,7 @@ export class HitHealModifier extends PokemonHeldItemModifier { * @returns `true` if the {@linkcode Pokemon} was healed */ override apply(pokemon: Pokemon): boolean { - if (pokemon.turnData.totalDamageDealt && !pokemon.isFullHp()) { + if (pokemon.turnData.totalDamageDealt && !pokemon.isFullHp() && !pokemon.hasAbility(Abilities.SHEER_FORCE, true)) { const scene = pokemon.scene; scene.unshiftPhase(new PokemonHealPhase(scene, pokemon.getBattlerIndex(), toDmgValue(pokemon.turnData.totalDamageDealt / 8) * this.stackCount, i18next.t("modifier:hitHealApply", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), typeName: this.type.name }), true));