Skip to content

Commit

Permalink
Correct Self-Destruct and Explosion base power (smogon#6630)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
scheibo authored Apr 29, 2020
1 parent 9319f68 commit edddcb5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 0 additions & 4 deletions data/mods/gen2/moves.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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: {
Expand Down
4 changes: 2 additions & 2 deletions data/mods/gen4/moves.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
5 changes: 5 additions & 0 deletions sim/battle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit edddcb5

Please sign in to comment.