diff --git a/config/formats.ts b/config/formats.ts index 7e4562c5ff..8881a8a1c3 100644 --- a/config/formats.ts +++ b/config/formats.ts @@ -2082,7 +2082,7 @@ export const Formats: import('../sim/dex-formats').FormatList = [ if (move.spreadHit) { // multi-target modifier (doubles only) - const spreadModifier = move.spreadModifier || (this.battle.gameType === 'freeforall' ? 0.5 : 0.75); + const spreadModifier = this.battle.gameType === 'freeforall' ? 0.5 : 0.75; this.battle.debug(`Spread modifier: ${spreadModifier}`); baseDamage = this.battle.modify(baseDamage, spreadModifier); } else if (move.multihitType === 'parentalbond' && move.hit > 1) { diff --git a/data/abilities.ts b/data/abilities.ts index 9fb04d11b7..19b7c60079 100644 --- a/data/abilities.ts +++ b/data/abilities.ts @@ -145,7 +145,7 @@ export const Abilities: import('../sim/dex-abilities').AbilityDataTable = { if ( effect.effectType === "Move" && !effect.multihit && - (!effect.negateSecondary && !(effect.hasSheerForce && source.hasAbility('sheerforce'))) + !(effect.hasSheerForce && source.hasAbility('sheerforce')) ) { this.effectState.checkedAngerShell = false; } else { @@ -411,7 +411,7 @@ export const Abilities: import('../sim/dex-abilities').AbilityDataTable = { if ( effect.effectType === "Move" && !effect.multihit && - (!effect.negateSecondary && !(effect.hasSheerForce && source.hasAbility('sheerforce'))) + !(effect.hasSheerForce && source.hasAbility('sheerforce')) ) { this.effectState.checkedBerserk = false; } else { diff --git a/data/mods/gen1/moves.ts b/data/mods/gen1/moves.ts index a51645b614..ba21a2506c 100644 --- a/data/mods/gen1/moves.ts +++ b/data/mods/gen1/moves.ts @@ -820,8 +820,6 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = { let uncappedDamage = move.hit > 1 ? this.lastDamage : this.actions.getDamage(source, target, move); if (move.id === 'bide') uncappedDamage = source.volatiles['bide'].damage * 2; if (!uncappedDamage && uncappedDamage !== 0) return null; - uncappedDamage = this.runEvent('SubDamage', target, source, move, uncappedDamage); - if (!uncappedDamage && uncappedDamage !== 0) return uncappedDamage; this.lastDamage = uncappedDamage; target.volatiles['substitute'].hp -= uncappedDamage > target.volatiles['substitute'].hp ? target.volatiles['substitute'].hp : uncappedDamage; diff --git a/data/mods/gen1/scripts.ts b/data/mods/gen1/scripts.ts index 6da50a8008..a8f9d65df4 100644 --- a/data/mods/gen1/scripts.ts +++ b/data/mods/gen1/scripts.ts @@ -320,10 +320,8 @@ export const Scripts: ModdedBattleScriptsData = { return true; } - if (!move.negateSecondary) { - this.battle.singleEvent('AfterMoveSecondarySelf', move, null, pokemon, target, move); - this.battle.runEvent('AfterMoveSecondarySelf', pokemon, target, move); - } + this.battle.singleEvent('AfterMoveSecondarySelf', move, null, pokemon, target, move); + this.battle.runEvent('AfterMoveSecondarySelf', pokemon, target, move); return true; }, // This function attempts a move hit and returns the attempt result before the actual hit happens. @@ -484,10 +482,8 @@ export const Scripts: ModdedBattleScriptsData = { if (move.ohko) this.battle.add('-ohko'); - if (!move.negateSecondary) { - this.battle.singleEvent('AfterMoveSecondary', move, null, target, pokemon, move); - this.battle.runEvent('AfterMoveSecondary', target, pokemon, move); - } + this.battle.singleEvent('AfterMoveSecondary', move, null, target, pokemon, move); + this.battle.runEvent('AfterMoveSecondary', target, pokemon, move); return damage; }, diff --git a/data/mods/gen1jpn/moves.ts b/data/mods/gen1jpn/moves.ts index 9680bfb6cc..3e26d6af8e 100644 --- a/data/mods/gen1jpn/moves.ts +++ b/data/mods/gen1jpn/moves.ts @@ -39,10 +39,8 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = { // NOTE: In future generations the damage is capped to the remaining HP of the // Substitute, here we deliberately use the uncapped damage when tracking lastDamage etc. // Also, multi-hit moves must always deal the same damage as the first hit for any subsequent hits - let uncappedDamage = move.hit > 1 ? this.lastDamage : this.actions.getDamage(source, target, move); + const uncappedDamage = move.hit > 1 ? this.lastDamage : this.actions.getDamage(source, target, move); if (!uncappedDamage && uncappedDamage !== 0) return null; - uncappedDamage = this.runEvent('SubDamage', target, source, move, uncappedDamage); - if (!uncappedDamage && uncappedDamage !== 0) return uncappedDamage; this.lastDamage = uncappedDamage; target.volatiles['substitute'].hp -= uncappedDamage > target.volatiles['substitute'].hp ? target.volatiles['substitute'].hp : uncappedDamage; diff --git a/data/mods/gen1stadium/moves.ts b/data/mods/gen1stadium/moves.ts index 5a6ff54571..275351378c 100644 --- a/data/mods/gen1stadium/moves.ts +++ b/data/mods/gen1stadium/moves.ts @@ -249,8 +249,6 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = { damage = target.volatiles['substitute'].hp; } if (!damage && damage !== 0) return null; - damage = this.runEvent('SubDamage', target, source, move, damage); - if (!damage && damage !== 0) return damage; target.volatiles['substitute'].hp -= damage; this.lastDamage = damage; if (target.volatiles['substitute'].hp <= 0) { diff --git a/data/mods/gen1stadium/scripts.ts b/data/mods/gen1stadium/scripts.ts index 02affb54e7..fc59b39bd4 100644 --- a/data/mods/gen1stadium/scripts.ts +++ b/data/mods/gen1stadium/scripts.ts @@ -231,10 +231,8 @@ export const Scripts: ModdedBattleScriptsData = { return true; } - if (!move.negateSecondary) { - this.battle.singleEvent('AfterMoveSecondarySelf', move, null, pokemon, target, move); - this.battle.runEvent('AfterMoveSecondarySelf', pokemon, target, move); - } + this.battle.singleEvent('AfterMoveSecondarySelf', move, null, pokemon, target, move); + this.battle.runEvent('AfterMoveSecondarySelf', pokemon, target, move); return true; }, tryMoveHit(target, pokemon, move) { @@ -368,10 +366,8 @@ export const Scripts: ModdedBattleScriptsData = { if (move.ohko) this.battle.add('-ohko'); - if (!move.negateSecondary) { - this.battle.singleEvent('AfterMoveSecondary', move, null, target, pokemon, move); - this.battle.runEvent('AfterMoveSecondary', target, pokemon, move); - } + this.battle.singleEvent('AfterMoveSecondary', move, null, target, pokemon, move); + this.battle.runEvent('AfterMoveSecondary', target, pokemon, move); return damage; }, diff --git a/data/mods/gen2/moves.ts b/data/mods/gen2/moves.ts index e395b69747..a0207fb9f6 100644 --- a/data/mods/gen2/moves.ts +++ b/data/mods/gen2/moves.ts @@ -846,10 +846,6 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = { if (!damage) { return null; } - damage = this.runEvent('SubDamage', target, source, move, damage); - if (!damage) { - return damage; - } if (damage > target.volatiles['substitute'].hp) { damage = target.volatiles['substitute'].hp as number; } diff --git a/data/mods/gen2/scripts.ts b/data/mods/gen2/scripts.ts index 0163bf0bc0..d564f84d97 100644 --- a/data/mods/gen2/scripts.ts +++ b/data/mods/gen2/scripts.ts @@ -293,10 +293,8 @@ export const Scripts: ModdedBattleScriptsData = { } if (move.ohko) this.battle.add('-ohko'); - if (!move.negateSecondary) { - this.battle.singleEvent('AfterMoveSecondary', move, null, target, pokemon, move); - this.battle.runEvent('AfterMoveSecondary', target, pokemon, move); - } + this.battle.singleEvent('AfterMoveSecondary', move, null, target, pokemon, move); + this.battle.runEvent('AfterMoveSecondary', target, pokemon, move); if (move.recoil && move.totalDamage) { this.battle.damage(this.calcRecoilDamage(move.totalDamage, move, pokemon), pokemon, target, 'recoil'); diff --git a/data/mods/gen2stadium2/scripts.ts b/data/mods/gen2stadium2/scripts.ts index c2391a4d7c..9a9ddce00a 100644 --- a/data/mods/gen2stadium2/scripts.ts +++ b/data/mods/gen2stadium2/scripts.ts @@ -228,10 +228,8 @@ export const Scripts: ModdedBattleScriptsData = { } if (move.ohko) this.battle.add('-ohko'); - if (!move.negateSecondary) { - this.battle.singleEvent('AfterMoveSecondary', move, null, target, pokemon, move); - this.battle.runEvent('AfterMoveSecondary', target, pokemon, move); - } + this.battle.singleEvent('AfterMoveSecondary', move, null, target, pokemon, move); + this.battle.runEvent('AfterMoveSecondary', target, pokemon, move); // Implementing Recoil mechanics from Stadium 2. // If a pokemon caused the other to faint with a recoil move and only one pokemon remains on both sides, // recoil damage will not be taken. diff --git a/data/mods/gen3/scripts.ts b/data/mods/gen3/scripts.ts index 3f604ccac8..7fbbe6ca93 100644 --- a/data/mods/gen3/scripts.ts +++ b/data/mods/gen3/scripts.ts @@ -49,7 +49,7 @@ export const Scripts: ModdedBattleScriptsData = { // In Generation 3, the spread move modifier is 0.5x instead of 0.75x. Moves that hit both foes // and the user's ally, like Earthquake and Explosion, don't get affected by spread modifiers if (move.spreadHit && move.target === 'allAdjacentFoes') { - const spreadModifier = move.spreadModifier || 0.5; + const spreadModifier = 0.5; this.battle.debug(`Spread modifier: ${spreadModifier}`); baseDamage = this.battle.modify(baseDamage, spreadModifier); } @@ -256,7 +256,7 @@ export const Scripts: ModdedBattleScriptsData = { return false; } - if (!move.negateSecondary && !(move.hasSheerForce && pokemon.hasAbility('sheerforce'))) { + if (!(move.hasSheerForce && pokemon.hasAbility('sheerforce'))) { this.battle.singleEvent('AfterMoveSecondarySelf', move, null, pokemon, target, move); this.battle.runEvent('AfterMoveSecondarySelf', pokemon, target, move); } @@ -468,7 +468,7 @@ export const Scripts: ModdedBattleScriptsData = { this.battle.eachEvent('Update'); - if (target && !move.negateSecondary) { + if (target) { this.battle.singleEvent('AfterMoveSecondary', move, null, target, pokemon, move); this.battle.runEvent('AfterMoveSecondary', target, pokemon, move); } diff --git a/data/mods/gen4/moves.ts b/data/mods/gen4/moves.ts index 2ae2ad3a8a..4ebba87288 100644 --- a/data/mods/gen4/moves.ts +++ b/data/mods/gen4/moves.ts @@ -1630,10 +1630,6 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = { this.attrLastMove('[still]'); return null; } - damage = this.runEvent('SubDamage', target, source, move, damage); - if (!damage) { - return damage; - } if (damage > target.volatiles['substitute'].hp) { damage = target.volatiles['substitute'].hp as number; } diff --git a/data/mods/gen5/moves.ts b/data/mods/gen5/moves.ts index 693bb798cb..69d620cd7b 100644 --- a/data/mods/gen5/moves.ts +++ b/data/mods/gen5/moves.ts @@ -909,10 +909,6 @@ export const Moves: import('../../../sim/dex-moves').ModdedMoveDataTable = { this.attrLastMove('[still]'); return null; } - damage = this.runEvent('SubDamage', target, source, move, damage); - if (!damage) { - return damage; - } if (damage > target.volatiles['substitute'].hp) { damage = target.volatiles['substitute'].hp as number; } diff --git a/data/mods/gen9fe/abilities.ts b/data/mods/gen9fe/abilities.ts index b727e8fc92..25a5ee9789 100644 --- a/data/mods/gen9fe/abilities.ts +++ b/data/mods/gen9fe/abilities.ts @@ -471,7 +471,7 @@ export const Abilities: import('../../../sim/dex-abilities').ModdedAbilityDataTa regainpatience: { shortDesc: "Berserk + Regenerator", onDamage(damage, target, source, effect) { - this.effectState.checkedBerserk = !!(effect.effectType !== "Move" || effect.multihit || effect.negateSecondary || + this.effectState.checkedBerserk = !!(effect.effectType !== "Move" || effect.multihit || (effect.hasSheerForce && source.hasAbility(['overwhelming', 'sheerforce', 'forceofnature', 'sandwrath']))); }, onTryEatItem(item) { diff --git a/data/mods/gen9fe/scripts.ts b/data/mods/gen9fe/scripts.ts index 2b9715c7c9..c675c60f29 100644 --- a/data/mods/gen9fe/scripts.ts +++ b/data/mods/gen9fe/scripts.ts @@ -347,7 +347,6 @@ export const Scripts: ModdedBattleScriptsData = { return false; } if ( - !move.negateSecondary && !(move.hasSheerForce && pokemon.hasAbility(['sheerforce', 'forceofnature', 'sandwrath', 'overwhelming', 'powerbuns'])) && !move.flags['futuremove'] @@ -372,7 +371,7 @@ export const Scripts: ModdedBattleScriptsData = { baseDamage += 2; if (move.spreadHit) { // multi-target modifier (doubles only) - const spreadModifier = move.spreadModifier || (this.battle.gameType === 'freeforall' ? 0.5 : 0.75); + const spreadModifier = this.battle.gameType === 'freeforall' ? 0.5 : 0.75; this.battle.debug(`Spread modifier: ${spreadModifier}`); baseDamage = this.battle.modify(baseDamage, spreadModifier); } else if (move.multihitType === 'parentalbond' && move.hit > 1) { diff --git a/data/mods/gen9ssb/scripts.ts b/data/mods/gen9ssb/scripts.ts index 1674fa6603..62ee0a19d4 100644 --- a/data/mods/gen9ssb/scripts.ts +++ b/data/mods/gen9ssb/scripts.ts @@ -717,7 +717,7 @@ export const Scripts: ModdedBattleScriptsData = { if (move.spreadHit) { // multi-target modifier (doubles only) - const spreadModifier = move.spreadModifier || (this.battle.gameType === 'freeforall' ? 0.5 : 0.75); + const spreadModifier = this.battle.gameType === 'freeforall' ? 0.5 : 0.75; this.battle.debug(`Spread modifier: ${spreadModifier}`); baseDamage = this.battle.modify(baseDamage, spreadModifier); } else if (move.multihitType === 'parentalbond' && move.hit > 1) { @@ -1390,11 +1390,7 @@ export const Scripts: ModdedBattleScriptsData = { return false; } - if ( - !move.negateSecondary && - !(move.hasSheerForce && pokemon.hasAbility('sheerforce')) && - !move.flags['futuremove'] - ) { + if (!(move.hasSheerForce && pokemon.hasAbility('sheerforce')) && !move.flags['futuremove']) { const originalHp = pokemon.hp; this.battle.singleEvent('AfterMoveSecondarySelf', move, null, pokemon, target, move); this.battle.runEvent('AfterMoveSecondarySelf', pokemon, target, move); @@ -1582,7 +1578,7 @@ export const Scripts: ModdedBattleScriptsData = { this.afterMoveSecondaryEvent(targetsCopy.filter(val => !!val), pokemon, move); - if (!move.negateSecondary && !(move.hasSheerForce && pokemon.hasAbility('sheerforce'))) { + if (!(move.hasSheerForce && pokemon.hasAbility('sheerforce'))) { for (const [i, d] of damage.entries()) { // There are no multihit spread moves, so it's safe to use move.totalDamage for multihit moves // The previous check was for `move.multihit`, but that fails for Dragon Darts diff --git a/data/mods/passiveaggressive/scripts.ts b/data/mods/passiveaggressive/scripts.ts index cd0e9d9fff..adcf373ae6 100644 --- a/data/mods/passiveaggressive/scripts.ts +++ b/data/mods/passiveaggressive/scripts.ts @@ -178,7 +178,7 @@ export const Scripts: ModdedBattleScriptsData = { this.afterMoveSecondaryEvent(targetsCopy.filter(val => !!val), pokemon, move); - if (!move.negateSecondary && !(move.hasSheerForce && pokemon.hasAbility('sheerforce'))) { + if (!(move.hasSheerForce && pokemon.hasAbility('sheerforce'))) { for (const [i, d] of damage.entries()) { // There are no multihit spread moves, so it's safe to use move.totalDamage for multihit moves // The previous check was for `move.multihit`, but that fails for Dragon Darts diff --git a/data/moves.ts b/data/moves.ts index 0295522684..25320ed2b5 100644 --- a/data/moves.ts +++ b/data/moves.ts @@ -19068,10 +19068,6 @@ export const Moves: import('../sim/dex-moves').MoveDataTable = { this.attrLastMove('[still]'); return null; } - damage = this.runEvent('SubDamage', target, source, move, damage); - if (!damage) { - return damage; - } if (damage > target.volatiles['substitute'].hp) { damage = target.volatiles['substitute'].hp as number; } diff --git a/sim/battle-actions.ts b/sim/battle-actions.ts index e84d129067..87416a2f22 100644 --- a/sim/battle-actions.ts +++ b/sim/battle-actions.ts @@ -524,11 +524,7 @@ export class BattleActions { return false; } - if ( - !move.negateSecondary && - !(move.hasSheerForce && pokemon.hasAbility('sheerforce')) && - !move.flags['futuremove'] - ) { + if (!(move.hasSheerForce && pokemon.hasAbility('sheerforce')) && !move.flags['futuremove']) { const originalHp = pokemon.hp; this.battle.singleEvent('AfterMoveSecondarySelf', move, null, pokemon, target, move); this.battle.runEvent('AfterMoveSecondarySelf', pokemon, target, move); @@ -805,7 +801,7 @@ export class BattleActions { } afterMoveSecondaryEvent(targets: Pokemon[], pokemon: Pokemon, move: ActiveMove) { // console.log(`${targets}, ${pokemon}, ${move}`) - if (!move.negateSecondary && !(move.hasSheerForce && pokemon.hasAbility('sheerforce'))) { + if (!(move.hasSheerForce && pokemon.hasAbility('sheerforce'))) { this.battle.singleEvent('AfterMoveSecondary', move, null, targets[0], pokemon, move); this.battle.runEvent('AfterMoveSecondary', targets, pokemon, move); } @@ -1024,7 +1020,7 @@ export class BattleActions { this.afterMoveSecondaryEvent(targetsCopy.filter(val => !!val), pokemon, move); - if (!move.negateSecondary && !(move.hasSheerForce && pokemon.hasAbility('sheerforce'))) { + if (!(move.hasSheerForce && pokemon.hasAbility('sheerforce'))) { for (const [i, d] of damage.entries()) { // There are no multihit spread moves, so it's safe to use move.totalDamage for multihit moves // The previous check was for `move.multihit`, but that fails for Dragon Darts @@ -1730,7 +1726,7 @@ export class BattleActions { if (move.spreadHit) { // multi-target modifier (doubles only) - const spreadModifier = move.spreadModifier || (this.battle.gameType === 'freeforall' ? 0.5 : 0.75); + const spreadModifier = this.battle.gameType === 'freeforall' ? 0.5 : 0.75; this.battle.debug(`Spread modifier: ${spreadModifier}`); baseDamage = this.battle.modify(baseDamage, spreadModifier); } else if (move.multihitType === 'parentalbond' && move.hit > 1) { diff --git a/sim/dex-moves.ts b/sim/dex-moves.ts index 7794c7c13d..63f9a13afa 100644 --- a/sim/dex-moves.ts +++ b/sim/dex-moves.ts @@ -249,7 +249,6 @@ export interface MoveData extends EffectData, MoveEventMethods, HitEffect { multihitType?: 'parentalbond'; noDamageVariance?: boolean; nonGhostTarget?: MoveTarget; - pressureTarget?: MoveTarget; spreadModifier?: number; sleepUsable?: boolean; /** @@ -325,7 +324,6 @@ export interface ActiveMove extends MutableMove { isExternal?: boolean; lastHit?: boolean; magnitude?: number; - negateSecondary?: boolean; pranksterBoosted?: boolean; selfDropped?: boolean; selfSwitch?: 'copyvolatile' | 'shedtail' | boolean; @@ -450,8 +448,6 @@ export class DataMove extends BasicEffect implements Readonly