diff --git a/data/moves.js b/data/moves.js index b25850468..91db228fa 100644 --- a/data/moves.js +++ b/data/moves.js @@ -5048,11 +5048,11 @@ let BattleMovedex = { onModifyMove: function (move) { if (move.sourceEffect === 'waterpledge') { move.type = 'Water'; - move.hasSTAB = true; + move.forceSTAB = true; } if (move.sourceEffect === 'grasspledge') { move.type = 'Fire'; - move.hasSTAB = true; + move.forceSTAB = true; } }, onHit: function (target, source, move) { @@ -6466,11 +6466,11 @@ let BattleMovedex = { onModifyMove: function (move) { if (move.sourceEffect === 'waterpledge') { move.type = 'Grass'; - move.hasSTAB = true; + move.forceSTAB = true; } if (move.sourceEffect === 'firepledge') { move.type = 'Fire'; - move.hasSTAB = true; + move.forceSTAB = true; } }, onHit: function (target, source, move) { @@ -18416,11 +18416,11 @@ let BattleMovedex = { onModifyMove: function (move) { if (move.sourceEffect === 'grasspledge') { move.type = 'Grass'; - move.hasSTAB = true; + move.forceSTAB = true; } if (move.sourceEffect === 'firepledge') { move.type = 'Water'; - move.hasSTAB = true; + move.forceSTAB = true; } }, onHit: function (target, source, move) { diff --git a/dev-tools/globals.ts b/dev-tools/globals.ts index 935ac2cc3..08a0e8f7d 100644 --- a/dev-tools/globals.ts +++ b/dev-tools/globals.ts @@ -507,6 +507,7 @@ interface MoveData extends EffectData { volatileStatus?: string weather?: string willCrit?: boolean + forceSTAB?: boolean zMovePower?: number zMoveEffect?: string zMoveBoost?: SparseBoostsTable @@ -537,7 +538,6 @@ interface ActiveMove extends Effect, MoveData { hasAuraBreak?: boolean hasBounced?: boolean hasSheerForce?: boolean - hasSTAB?: boolean isExternal?: boolean lastHit?: boolean magnitude?: number diff --git a/mods/gen4/scripts.js b/mods/gen4/scripts.js index 316284f9d..485c0c94a 100644 --- a/mods/gen4/scripts.js +++ b/mods/gen4/scripts.js @@ -52,7 +52,7 @@ let BattleScripts = { baseDamage = this.randomizer(baseDamage); // STAB - if (move.hasSTAB || type !== '???' && pokemon.hasType(type)) { + if (move.forceSTAB || type !== '???' && pokemon.hasType(type)) { // The "???" type never gets STAB // Not even if you Roost in Gen 4 and somehow manage to use // Struggle in the same turn. diff --git a/sim/battle.js b/sim/battle.js index 7967211c6..abeaa60b2 100644 --- a/sim/battle.js +++ b/sim/battle.js @@ -2287,7 +2287,7 @@ class Battle extends Dex.ModdedDex { baseDamage = this.randomizer(baseDamage); // STAB - if (move.hasSTAB || (type !== '???' && pokemon.hasType(type))) { + if (move.forceSTAB || (type !== '???' && pokemon.hasType(type))) { // The "???" type never gets STAB // Not even if you Roost in Gen 4 and somehow manage to use // Struggle in the same turn. diff --git a/sim/dex-data.js b/sim/dex-data.js index 12c9d48c5..9ba42cd4a 100644 --- a/sim/dex-data.js +++ b/sim/dex-data.js @@ -1104,7 +1104,7 @@ class Move extends Effect { * Forces the move to get STAB even if the type doesn't match * @type {boolean} */ - this.hasSTAB = !!this.hasSTAB; + this.forceSTAB = !!this.forceSTAB; /** * True if it can't be copied with Sketch