From 3e8fc8acbe0b4fe647448bc3b4dbbf87e8c6b62b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bastos=20Dias?= Date: Thu, 25 Jul 2024 01:00:01 +0100 Subject: [PATCH 1/3] BDSP: Rotom's special moves are restricted moves --- data/learnsets.ts | 10 +++++----- data/mods/gen8bdsp/learnsets.ts | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/data/learnsets.ts b/data/learnsets.ts index 84e75e8cb438..48ac2f48c2d5 100644 --- a/data/learnsets.ts +++ b/data/learnsets.ts @@ -52310,27 +52310,27 @@ export const Learnsets: import('../sim/dex-species').LearnsetDataTable = { }, rotomheat: { learnset: { - overheat: ["9L1", "8L1", "7R", "6R", "5R", "4R"], + overheat: ["9R", "8R", "7R", "6R", "5R", "4R"], }, }, rotomwash: { learnset: { - hydropump: ["9L1", "8L1", "7R", "6R", "5R", "4R"], + hydropump: ["9R", "8R", "7R", "6R", "5R", "4R"], }, }, rotomfrost: { learnset: { - blizzard: ["9L1", "8L1", "7R", "6R", "5R", "4R"], + blizzard: ["9R", "8R", "7R", "6R", "5R", "4R"], }, }, rotomfan: { learnset: { - airslash: ["9L1", "8L1", "7R", "6R", "5R", "4R"], + airslash: ["9R", "8R", "7R", "6R", "5R", "4R"], }, }, rotommow: { learnset: { - leafstorm: ["9L1", "8L1", "7R", "6R", "5R", "4R"], + leafstorm: ["9R", "8R", "7R", "6R", "5R", "4R"], }, }, uxie: { diff --git a/data/mods/gen8bdsp/learnsets.ts b/data/mods/gen8bdsp/learnsets.ts index 2dc4771e9eaf..e12a208af1f8 100644 --- a/data/mods/gen8bdsp/learnsets.ts +++ b/data/mods/gen8bdsp/learnsets.ts @@ -24396,27 +24396,27 @@ export const Learnsets: import('../../../sim/dex-species').ModdedLearnsetDataTab }, rotomheat: { learnset: { - overheat: ["8T"], + overheat: ["8R"], }, }, rotomwash: { learnset: { - hydropump: ["8T"], + hydropump: ["8R"], }, }, rotomfrost: { learnset: { - blizzard: ["8T"], + blizzard: ["8R"], }, }, rotomfan: { learnset: { - airslash: ["8T"], + airslash: ["8R"], }, }, rotommow: { learnset: { - leafstorm: ["8T"], + leafstorm: ["8R"], }, }, uxie: { From aa2e0ca3ff067aac7b446237164ce9111027a65d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bastos=20Dias?= Date: Sat, 24 Aug 2024 05:55:34 +0100 Subject: [PATCH 2/3] Chloroblast recoil refactor --- config/formats.ts | 2 +- data/mods/gen9ssb/scripts.ts | 2 +- data/moves.ts | 2 +- sim/battle-actions.ts | 4 ++-- sim/dex-moves.ts | 1 + 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/config/formats.ts b/config/formats.ts index f1d0f5bf8a73..1e665444db1b 100644 --- a/config/formats.ts +++ b/config/formats.ts @@ -1451,7 +1451,7 @@ export const Formats: import('../sim/dex-formats').FormatList = [ move.critRatio = (move.critRatio || 1) + (forte.critRatio || 1) - 1; const VALID_PROPERTIES = [ 'alwaysHit', 'basePowerCallback', 'breaksProtect', 'drain', 'forceSTAB', 'forceSwitch', 'hasCrashDamage', 'hasSheerForce', - 'ignoreAbility', 'ignoreAccuracy', 'ignoreDefensive', 'ignoreEvasion', 'ignoreImmunity', 'mindBlownRecoil', 'noDamageVariance', + 'ignoreAbility', 'ignoreAccuracy', 'ignoreDefensive', 'ignoreEvasion', 'ignoreImmunity', 'mindBlownRecoil', 'chloroblastRecoil', 'noDamageVariance', 'ohko', 'overrideDefensivePokemon', 'overrideDefensiveStat', 'overrideOffensivePokemon', 'overrideOffensiveStat', 'pseudoWeather', 'recoil', 'selfdestruct', 'selfSwitch', 'sleepUsable', 'smartTarget', 'stealsBoosts', 'thawsTarget', 'volatileStatus', 'willCrit', ] as const; diff --git a/data/mods/gen9ssb/scripts.ts b/data/mods/gen9ssb/scripts.ts index 428c94ab672c..86bee9f04c9b 100644 --- a/data/mods/gen9ssb/scripts.ts +++ b/data/mods/gen9ssb/scripts.ts @@ -1555,7 +1555,7 @@ export const Scripts: ModdedBattleScriptsData = { this.battle.add('-hitcount', targets[0], hit - 1); } - if ((move.recoil || move.id === 'chloroblast') && move.totalDamage) { + if ((move.recoil || move.chloroblastRecoil) && move.totalDamage) { const hpBeforeRecoil = pokemon.hp; this.battle.damage(this.calcRecoilDamage(move.totalDamage, move, pokemon), pokemon, pokemon, 'recoil'); if (pokemon.hp <= pokemon.maxhp / 2 && hpBeforeRecoil > pokemon.maxhp / 2) { diff --git a/data/moves.ts b/data/moves.ts index 34aa1732e4cd..39ed5c217d20 100644 --- a/data/moves.ts +++ b/data/moves.ts @@ -2511,7 +2511,7 @@ export const Moves: import('../sim/dex-moves').MoveDataTable = { pp: 5, priority: 0, flags: {protect: 1, mirror: 1, metronome: 1}, - // Recoil implemented in battle-actions.ts + chloroblastRecoil: [1, 2], secondary: null, target: "normal", type: "Grass", diff --git a/sim/battle-actions.ts b/sim/battle-actions.ts index 5e5e46098922..165cb295a87a 100644 --- a/sim/battle-actions.ts +++ b/sim/battle-actions.ts @@ -992,7 +992,7 @@ export class BattleActions { this.battle.add('-hitcount', targets[0], hit - 1); } - if ((move.recoil || move.id === 'chloroblast') && move.totalDamage) { + if ((move.recoil || move.chloroblastRecoil) && move.totalDamage) { const hpBeforeRecoil = pokemon.hp; this.battle.damage(this.calcRecoilDamage(move.totalDamage, move, pokemon), pokemon, pokemon, 'recoil'); if (pokemon.hp <= pokemon.maxhp / 2 && hpBeforeRecoil > pokemon.maxhp / 2) { @@ -1403,7 +1403,7 @@ export class BattleActions { } calcRecoilDamage(damageDealt: number, move: Move, pokemon: Pokemon): number { - if (move.id === 'chloroblast') return Math.round(pokemon.maxhp / 2); + if (move.chloroblastRecoil) return Math.round(pokemon.maxhp * move.chloroblastRecoil[0] / move.chloroblastRecoil[1]); return this.battle.clampIntRange(Math.round(damageDealt * move.recoil![0] / move.recoil![1]), 1); } diff --git a/sim/dex-moves.ts b/sim/dex-moves.ts index 4becd92a7dc5..870b2074869b 100644 --- a/sim/dex-moves.ts +++ b/sim/dex-moves.ts @@ -210,6 +210,7 @@ export interface MoveData extends EffectData, MoveEventMethods, HitEffect { recoil?: [number, number]; drain?: [number, number]; mindBlownRecoil?: boolean; + chloroblastRecoil?: [number, number]; stealsBoosts?: boolean; struggleRecoil?: boolean; secondary?: SecondaryEffect | null; From d05487f09b4c84c618857298b987238f18e04398 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bastos=20Dias?= Date: Tue, 10 Sep 2024 22:11:51 +0100 Subject: [PATCH 3/3] Fix substitute interaction --- data/moves.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/moves.ts b/data/moves.ts index 0e5396992ce0..9f0cd2a7b1a4 100644 --- a/data/moves.ts +++ b/data/moves.ts @@ -19036,7 +19036,7 @@ export const Moves: import('../sim/dex-moves').MoveDataTable = { } else { this.add('-activate', target, 'move: Substitute', '[damage]'); } - if (move.recoil || move.id === 'chloroblast') { + if (move.recoil || move.chloroblastRecoil) { this.damage(this.actions.calcRecoilDamage(damage, move, source), source, target, 'recoil'); } if (move.drain) {