diff --git a/config/formats.ts b/config/formats.ts index cd25810b79a0..eeab32d578ce 100644 --- a/config/formats.ts +++ b/config/formats.ts @@ -1353,7 +1353,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 64e608c6486d..9f0cd2a7b1a4 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", @@ -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) { 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;