From b36c23fae1f9b034b6151502aa32b76f14697c43 Mon Sep 17 00:00:00 2001 From: lucfd <83493765+lucfd@users.noreply.github.com> Date: Mon, 13 May 2024 05:57:17 -0400 Subject: [PATCH] Implemented Curious Medicine (#263) * implemented supersweet syrup * implemented curious medicine * removed sneaky test overrides * removed sneaky test overrides x2 * updated to new language-agnostic format, removed supersweet syrup * fixed whitespace * Update ability.ts --------- Co-authored-by: Benjamin Odom --- src/data/ability.ts | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index 70c59b70074..bbc55a19e3d 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -1448,6 +1448,34 @@ export class PostSummonAllyHealAbAttr extends PostSummonAbAttr { } } +/** + * Resets an ally's temporary stat boots to zero with no regard to + * whether this is a positive or negative change + * @param pokemon The {@link Pokemon} with this {@link AbAttr} + * @param passive N/A + * @param args N/A + * @returns if the move was successful + */ +export class PostSummonClearAllyStatsAbAttr extends PostSummonAbAttr { + constructor() { + super(); + } + + applyPostSummon(pokemon: Pokemon, passive: boolean, args: any[]): boolean { + const target = pokemon.getAlly(); + if (target?.isActive(true)) { + for (let s = 0; s < target.summonData.battleStats.length; s++) + target.summonData.battleStats[s] = 0; + + target.scene.queueMessage(getPokemonMessage(target, `'s stat changes\nwere removed!`)); + + return true; + } + + return false; + } +} + export class DownloadAbAttr extends PostSummonAbAttr { private enemyDef: integer; private enemySpDef: integer; @@ -3566,7 +3594,7 @@ export function initAbilities() { new Ability(Abilities.UNSEEN_FIST, 8) .unimplemented(), new Ability(Abilities.CURIOUS_MEDICINE, 8) - .unimplemented(), + .attr(PostSummonClearAllyStatsAbAttr), new Ability(Abilities.TRANSISTOR, 8) .attr(MoveTypePowerBoostAbAttr, Type.ELECTRIC), new Ability(Abilities.DRAGONS_MAW, 8)