From edddcb5c3832b237c721841354e3cc1785b5452d Mon Sep 17 00:00:00 2001 From: Kirk Scheibelhut Date: Wed, 29 Apr 2020 14:59:59 -0700 Subject: [PATCH] Correct Self-Destruct and Explosion base power (#6630) As confirmed by SadisticMystic, base power cannot be above 255, so this move data is clearly incorrect and results in downstream users of the data files such as the Smogon or PS dex or the tooltips displaying misleading information. --- data/mods/gen2/moves.ts | 4 ---- data/mods/gen4/moves.ts | 4 ++-- sim/battle.ts | 5 +++++ 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/data/mods/gen2/moves.ts b/data/mods/gen2/moves.ts index 3607267b16806..bc45a89428744 100644 --- a/data/mods/gen2/moves.ts +++ b/data/mods/gen2/moves.ts @@ -289,8 +289,6 @@ export const BattleMovedex: {[k: string]: ModdedMoveData} = { explosion: { inherit: true, desc: "The user faints after using this move. The target's Defense is halved during damage calculation.", - shortDesc: "The user faints.", - basePower: 250, noSketch: true, }, fissure: { @@ -738,8 +736,6 @@ export const BattleMovedex: {[k: string]: ModdedMoveData} = { selfdestruct: { inherit: true, desc: "The user faints after using this move. The target's Defense is halved during damage calculation.", - shortDesc: "The user faints.", - basePower: 200, noSketch: true, }, sketch: { diff --git a/data/mods/gen4/moves.ts b/data/mods/gen4/moves.ts index 00206b252a195..d34f0454d190c 100644 --- a/data/mods/gen4/moves.ts +++ b/data/mods/gen4/moves.ts @@ -570,7 +570,7 @@ export const BattleMovedex: {[k: string]: ModdedMoveData} = { explosion: { inherit: true, desc: "The user faints after using this move, unless this move has no target. The target's Defense is halved during damage calculation. This move is prevented from executing if any active Pokemon has the Damp Ability.", - basePower: 500, + shortDesc: "Deals double damage. The user faints.", }, extremespeed: { inherit: true, @@ -1386,7 +1386,7 @@ export const BattleMovedex: {[k: string]: ModdedMoveData} = { selfdestruct: { inherit: true, desc: "The user faints after using this move, unless this move has no target. The target's Defense is halved during damage calculation. This move is prevented from executing if any active Pokemon has the Damp Ability.", - basePower: 400, + shortDesc: "Deals double damage. The user faints.", }, sketch: { inherit: true, diff --git a/sim/battle.ts b/sim/battle.ts index 22b6c5c1d3042..40a67bb4e4b65 100644 --- a/sim/battle.ts +++ b/sim/battle.ts @@ -2124,6 +2124,11 @@ export class Battle { attack = this.runEvent('Modify' + statTable[attackStat], attacker, defender, move, attack); defense = this.runEvent('Modify' + statTable[defenseStat], defender, attacker, move, defense); + if (this.gen <= 4 && ['explosion', 'selfdestruct'].includes(move.id) && + move.defensiveCategory === 'Physical') { + defense = this.dex.clampIntRange(Math.floor(defense / 2), 1); + } + const tr = this.trunc; // int(int(int(2 * L / 5 + 2) * A * P / D) / 50);