Initial Modpack Upload

This commit is contained in:
Rbanh committed 2023-08-14 21:45:09 -04:00
1 parent 268b0650aa
commit 3d8b956ee4
1429 files changed
+820128

No files matched your search

+593
View File
@@ -0,0 +1,593 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var abilities_exports = {};
__export(abilities_exports, {
Abilities: () => Abilities
});
module.exports = __toCommonJS(abilities_exports);
const Abilities = {
airlock: {
inherit: true,
onSwitchIn() {
},
onStart() {
}
},
angerpoint: {
inherit: true,
onAfterSubDamage(damage, target, source, move) {
if (!target.hp)
return;
if (move && move.effectType === "Move" && target.getMoveHitData(move).crit) {
target.setBoost({ atk: 6 });
this.add("-setboost", target, "atk", 12, "[from] ability: Anger Point");
}
},
rating: 1.5
},
baddreams: {
inherit: true,
onResidualOrder: 10,
onResidualSubOrder: 10
},
blaze: {
onBasePowerPriority: 2,
onBasePower(basePower, attacker, defender, move) {
if (move.type === "Fire" && attacker.hp <= attacker.maxhp / 3) {
this.debug("Blaze boost");
return this.chainModify(1.5);
}
},
name: "Blaze",
rating: 2,
num: 66
},
cloudnine: {
inherit: true,
onSwitchIn() {
},
onStart() {
}
},
colorchange: {
inherit: true,
onDamagingHit(damage, target, source, move) {
if (!damage || !target.hp)
return;
const type = move.type;
if (target.isActive && move.category !== "Status" && type !== "???" && !target.hasType(type)) {
if (!target.setType(type))
return false;
this.add("-start", target, "typechange", type, "[from] ability: Color Change");
}
},
onAfterMoveSecondary() {
}
},
compoundeyes: {
onSourceModifyAccuracyPriority: 9,
onSourceModifyAccuracy(accuracy) {
if (typeof accuracy !== "number")
return;
this.debug("compoundeyes - enhancing accuracy");
return accuracy * 1.3;
},
inherit: true
},
cutecharm: {
inherit: true,
onDamagingHit(damage, target, source, move) {
if (damage && move.flags["contact"]) {
if (this.randomChance(3, 10)) {
source.addVolatile("attract", this.effectState.target);
}
}
}
},
effectspore: {
inherit: true,
onDamagingHit(damage, target, source, move) {
if (damage && move.flags["contact"] && !source.status) {
const r = this.random(100);
if (r < 10) {
source.setStatus("slp", target);
} else if (r < 20) {
source.setStatus("par", target);
} else if (r < 30) {
source.setStatus("psn", target);
}
}
}
},
flamebody: {
inherit: true,
onDamagingHit(damage, target, source, move) {
if (damage && move.flags["contact"]) {
if (this.randomChance(3, 10)) {
source.trySetStatus("brn", target);
}
}
}
},
flashfire: {
inherit: true,
onTryHit(target, source, move) {
if (target !== source && move.type === "Fire") {
if (target.status === "frz") {
return;
}
if (!target.addVolatile("flashfire")) {
this.add("-immune", target, "[from] ability: Flash Fire");
}
return null;
}
},
condition: {
noCopy: true,
// doesn't get copied by Baton Pass
onStart(target) {
this.add("-start", target, "ability: Flash Fire");
},
onModifyDamagePhase1(atk, attacker, defender, move) {
if (move.type === "Fire") {
this.debug("Flash Fire boost");
return this.chainModify(1.5);
}
},
onEnd(target) {
this.add("-end", target, "ability: Flash Fire", "[silent]");
}
}
},
flowergift: {
inherit: true,
onAllyModifyAtk(atk) {
if (this.field.isWeather("sunnyday")) {
return this.chainModify(1.5);
}
},
onAllyModifySpD(spd) {
if (this.field.isWeather("sunnyday")) {
return this.chainModify(1.5);
}
}
},
forewarn: {
inherit: true,
onStart(pokemon) {
let warnMoves = [];
let warnBp = 1;
for (const target of pokemon.foes()) {
for (const moveSlot of target.moveSlots) {
const move = this.dex.moves.get(moveSlot.move);
let bp = move.basePower;
if (move.ohko)
bp = 160;
if (move.id === "counter" || move.id === "metalburst" || move.id === "mirrorcoat")
bp = 120;
if (!bp && move.category !== "Status")
bp = 80;
if (bp > warnBp) {
warnMoves = [move];
warnBp = bp;
} else if (bp === warnBp) {
warnMoves.push(move);
}
}
}
if (!warnMoves.length)
return;
const warnMove = this.sample(warnMoves);
this.add("-activate", pokemon, "ability: Forewarn", warnMove);
}
},
frisk: {
inherit: true,
onStart(pokemon) {
for (const target of pokemon.foes()) {
if (target.item && !target.itemState.knockedOff) {
this.add("-item", target, target.getItem().name, "[from] ability: Frisk", "[of] " + pokemon, "[identify]");
}
}
}
},
hustle: {
inherit: true,
onSourceModifyAccuracyPriority: 7,
onSourceModifyAccuracy(accuracy, target, source, move) {
if (move.category === "Physical" && typeof accuracy === "number") {
return accuracy * 0.8;
}
}
},
hydration: {
onWeather(target, source, effect) {
if (effect.id === "raindance" && target.status) {
this.add("-activate", target, "ability: Hydration");
target.cureStatus();
}
},
name: "Hydration",
rating: 1.5,
num: 93
},
insomnia: {
inherit: true,
rating: 2.5
},
intimidate: {
inherit: true,
onStart(pokemon) {
const activated = pokemon.adjacentFoes().some((target) => !(target.volatiles["substitute"] || target.volatiles["substitutebroken"]?.move === "uturn"));
if (!activated) {
this.hint("In Gen 4, Intimidate does not activate if every target has a Substitute (or the Substitute was just broken by U-turn).", false, pokemon.side);
return;
}
this.add("-ability", pokemon, "Intimidate", "boost");
for (const target of pokemon.adjacentFoes()) {
if (target.volatiles["substitute"]) {
this.add("-immune", target);
} else if (target.volatiles["substitutebroken"]?.move === "uturn") {
this.hint("In Gen 4, if U-turn breaks Substitute the incoming Intimidate does nothing.");
} else {
this.boost({ atk: -1 }, target, pokemon, null, true);
}
}
}
},
leafguard: {
inherit: true,
onSetStatus(status, target, source, effect) {
if (effect && effect.id === "rest") {
return;
} else if (this.field.isWeather("sunnyday")) {
return false;
}
}
},
lightningrod: {
inherit: true,
onTryHit() {
},
rating: 0
},
liquidooze: {
inherit: true,
onSourceTryHeal(damage, target, source, effect) {
this.debug("Heal is occurring: " + target + " <- " + source + " :: " + effect.id);
const canOoze = ["drain", "leechseed"];
if (canOoze.includes(effect.id) && this.activeMove?.id !== "dreameater") {
this.damage(damage, null, null, null, true);
return 0;
}
}
},
magicguard: {
onDamage(damage, target, source, effect) {
if (effect.effectType !== "Move") {
return false;
}
},
onSetStatus(status, target, source, effect) {
if (effect && effect.id === "toxicspikes") {
return false;
}
},
name: "Magic Guard",
rating: 4.5,
num: 98
},
minus: {
onModifySpA(spa, pokemon) {
for (const ally of pokemon.allies()) {
if (ally.ability === "plus") {
return spa * 1.5;
}
}
},
name: "Minus",
rating: 0,
num: 58
},
naturalcure: {
inherit: true,
onCheckShow(pokemon) {
},
onSwitchOut(pokemon) {
if (!pokemon.status || pokemon.status === "fnt")
return;
this.add("-curestatus", pokemon, pokemon.status, "[from] ability: Natural Cure");
pokemon.clearStatus();
}
},
normalize: {
inherit: true,
onModifyMove(move) {
if (move.id !== "struggle") {
move.type = "Normal";
}
}
},
overgrow: {
onBasePowerPriority: 2,
onBasePower(basePower, attacker, defender, move) {
if (move.type === "Grass" && attacker.hp <= attacker.maxhp / 3) {
this.debug("Overgrow boost");
return this.chainModify(1.5);
}
},
name: "Overgrow",
rating: 2,
num: 65
},
pickup: {
name: "Pickup",
rating: 0,
num: 53
},
plus: {
onModifySpA(spa, pokemon) {
for (const ally of pokemon.allies()) {
if (ally.ability === "minus") {
return spa * 1.5;
}
}
},
name: "Plus",
rating: 0,
num: 57
},
poisonpoint: {
inherit: true,
onDamagingHit(damage, target, source, move) {
if (damage && move.flags["contact"]) {
if (this.randomChance(3, 10)) {
source.trySetStatus("psn", target);
}
}
}
},
pressure: {
onStart(pokemon) {
this.add("-ability", pokemon, "Pressure");
},
onDeductPP(target, source) {
if (target === source)
return;
return 1;
},
name: "Pressure",
rating: 1.5,
num: 46
},
roughskin: {
inherit: true,
onDamagingHit(damage, target, source, move) {
if (damage && move.flags["contact"]) {
this.damage(source.baseMaxhp / 8, source, target);
}
}
},
sandveil: {
inherit: true,
onModifyAccuracyPriority: 8,
onModifyAccuracy(accuracy) {
if (typeof accuracy !== "number")
return;
if (this.field.isWeather("sandstorm")) {
this.debug("Sand Veil - decreasing accuracy");
return accuracy * 0.8;
}
}
},
serenegrace: {
inherit: true,
onModifyMove(move) {
if (move.secondaries) {
this.debug("doubling secondary chance");
for (const secondary of move.secondaries) {
if (secondary.chance)
secondary.chance *= 2;
}
}
}
},
shedskin: {
inherit: true,
onResidualOrder: 10,
onResidualSubOrder: 3
},
simple: {
onModifyBoost(boosts) {
let key;
for (key in boosts) {
boosts[key] *= 2;
}
},
isBreakable: true,
name: "Simple",
rating: 4,
num: 86
},
snowcloak: {
inherit: true,
onModifyAccuracyPriority: 8,
onModifyAccuracy(accuracy) {
if (typeof accuracy !== "number")
return;
if (this.field.isWeather("hail")) {
this.debug("Snow Cloak - decreasing accuracy");
return accuracy * 0.8;
}
}
},
speedboost: {
inherit: true,
onResidualOrder: 10,
onResidualSubOrder: 3
},
static: {
inherit: true,
onDamagingHit(damage, target, source, move) {
if (damage && move.flags["contact"]) {
if (this.randomChance(3, 10)) {
source.trySetStatus("par", target);
}
}
}
},
stench: {
name: "Stench",
rating: 0,
num: 1
},
stickyhold: {
inherit: true,
onTakeItem(item, pokemon, source) {
if (source && source !== pokemon || this.activeMove && this.activeMove.id === "knockoff") {
this.add("-activate", pokemon, "ability: Sticky Hold");
return false;
}
}
},
stormdrain: {
inherit: true,
onTryHit() {
},
rating: 0
},
sturdy: {
inherit: true,
onDamage() {
},
rating: 0
},
swarm: {
onBasePowerPriority: 2,
onBasePower(basePower, attacker, defender, move) {
if (move.type === "Bug" && attacker.hp <= attacker.maxhp / 3) {
this.debug("Swarm boost");
return this.chainModify(1.5);
}
},
name: "Swarm",
rating: 2,
num: 68
},
synchronize: {
inherit: true,
onAfterSetStatus(status, target, source, effect) {
if (!source || source === target)
return;
if (effect && effect.id === "toxicspikes")
return;
let id = status.id;
if (id === "slp" || id === "frz")
return;
if (id === "tox")
id = "psn";
source.trySetStatus(id, target);
}
},
tangledfeet: {
inherit: true,
onModifyAccuracyPriority: 6,
onModifyAccuracy(accuracy, target) {
if (typeof accuracy !== "number")
return;
if (target?.volatiles["confusion"]) {
this.debug("Tangled Feet - decreasing accuracy");
return accuracy * 0.5;
}
}
},
thickfat: {
onSourceBasePowerPriority: 1,
onSourceBasePower(basePower, attacker, defender, move) {
if (move.type === "Ice" || move.type === "Fire") {
return this.chainModify(0.5);
}
},
isBreakable: true,
name: "Thick Fat",
rating: 3.5,
num: 47
},
torrent: {
onBasePowerPriority: 2,
onBasePower(basePower, attacker, defender, move) {
if (move.type === "Water" && attacker.hp <= attacker.maxhp / 3) {
this.debug("Torrent boost");
return this.chainModify(1.5);
}
},
name: "Torrent",
rating: 2,
num: 67
},
trace: {
inherit: true,
onUpdate(pokemon) {
if (!pokemon.isStarted)
return;
const target = pokemon.side.randomFoe();
if (!target || target.fainted)
return;
const ability = target.getAbility();
const bannedAbilities = ["forecast", "multitype", "trace"];
if (bannedAbilities.includes(target.ability)) {
return;
}
if (pokemon.setAbility(ability)) {
this.add("-ability", pokemon, ability, "[from] ability: Trace", "[of] " + target);
}
}
},
unburden: {
inherit: true,
condition: {
onModifySpe(spe, pokemon) {
if ((!pokemon.item || pokemon.itemState.knockedOff) && !pokemon.ignoringAbility()) {
return this.chainModify(2);
}
}
}
},
vitalspirit: {
inherit: true,
rating: 2.5
},
wonderguard: {
inherit: true,
onTryHit(target, source, move) {
if (move.id === "firefang") {
this.hint("In Gen 4, Fire Fang is always able to hit through Wonder Guard.");
return;
}
if (target === source || move.category === "Status" || move.type === "???" || move.id === "struggle")
return;
this.debug("Wonder Guard immunity: " + move.id);
if (target.runEffectiveness(move) <= 0) {
this.add("-immune", target, "[from] ability: Wonder Guard");
return null;
}
}
}
};
//# sourceMappingURL=abilities.js.map
+7
View File
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../../../../../data/mods/gen4/abilities.ts"],
"sourcesContent": ["export const Abilities: {[k: string]: ModdedAbilityData} = {\r\n\tairlock: {\r\n\t\tinherit: true,\r\n\t\tonSwitchIn() {},\r\n\t\tonStart() {},\r\n\t},\r\n\tangerpoint: {\r\n\t\tinherit: true,\r\n\t\tonAfterSubDamage(damage, target, source, move) {\r\n\t\t\tif (!target.hp) return;\r\n\t\t\tif (move && move.effectType === 'Move' && target.getMoveHitData(move).crit) {\r\n\t\t\t\ttarget.setBoost({atk: 6});\r\n\t\t\t\tthis.add('-setboost', target, 'atk', 12, '[from] ability: Anger Point');\r\n\t\t\t}\r\n\t\t},\r\n\t\trating: 1.5,\r\n\t},\r\n\tbaddreams: {\r\n\t\tinherit: true,\r\n\t\tonResidualOrder: 10,\r\n\t\tonResidualSubOrder: 10,\r\n\t},\r\n\tblaze: {\r\n\t\tonBasePowerPriority: 2,\r\n\t\tonBasePower(basePower, attacker, defender, move) {\r\n\t\t\tif (move.type === 'Fire' && attacker.hp <= attacker.maxhp / 3) {\r\n\t\t\t\tthis.debug('Blaze boost');\r\n\t\t\t\treturn this.chainModify(1.5);\r\n\t\t\t}\r\n\t\t},\r\n\t\tname: \"Blaze\",\r\n\t\trating: 2,\r\n\t\tnum: 66,\r\n\t},\r\n\tcloudnine: {\r\n\t\tinherit: true,\r\n\t\tonSwitchIn() {},\r\n\t\tonStart() {},\r\n\t},\r\n\tcolorchange: {\r\n\t\tinherit: true,\r\n\t\tonDamagingHit(damage, target, source, move) {\r\n\t\t\tif (!damage || !target.hp) return;\r\n\t\t\tconst type = move.type;\r\n\t\t\tif (target.isActive && move.category !== 'Status' && type !== '???' && !target.hasType(type)) {\r\n\t\t\t\tif (!target.setType(type)) return false;\r\n\t\t\t\tthis.add('-start', target, 'typechange', type, '[from] ability: Color Change');\r\n\t\t\t}\r\n\t\t},\r\n\t\tonAfterMoveSecondary() {},\r\n\t},\r\n\tcompoundeyes: {\r\n\t\tonSourceModifyAccuracyPriority: 9,\r\n\t\tonSourceModifyAccuracy(accuracy) {\r\n\t\t\tif (typeof accuracy !== 'number') return;\r\n\t\t\tthis.debug('compoundeyes - enhancing accuracy');\r\n\t\t\treturn accuracy * 1.3;\r\n\t\t},\r\n\t\tinherit: true,\r\n\t},\r\n\tcutecharm: {\r\n\t\tinherit: true,\r\n\t\tonDamagingHit(damage, target, source, move) {\r\n\t\t\tif (damage && move.flags['contact']) {\r\n\t\t\t\tif (this.randomChance(3, 10)) {\r\n\t\t\t\t\tsource.addVolatile('attract', this.effectState.target);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t},\r\n\teffectspore: {\r\n\t\tinherit: true,\r\n\t\tonDamagingHit(damage, target, source, move) {\r\n\t\t\tif (damage && move.flags['contact'] && !source.status) {\r\n\t\t\t\tconst r = this.random(100);\r\n\t\t\t\tif (r < 10) {\r\n\t\t\t\t\tsource.setStatus('slp', target);\r\n\t\t\t\t} else if (r < 20) {\r\n\t\t\t\t\tsource.setStatus('par', target);\r\n\t\t\t\t} else if (r < 30) {\r\n\t\t\t\t\tsource.setStatus('psn', target);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t},\r\n\tflamebody: {\r\n\t\tinherit: true,\r\n\t\tonDamagingHit(damage, target, source, move) {\r\n\t\t\tif (damage && move.flags['contact']) {\r\n\t\t\t\tif (this.randomChance(3, 10)) {\r\n\t\t\t\t\tsource.trySetStatus('brn', target);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t},\r\n\tflashfire: {\r\n\t\tinherit: true,\r\n\t\tonTryHit(target, source, move) {\r\n\t\t\tif (target !== source && move.type === 'Fire') {\r\n\t\t\t\tif (target.status === 'frz') {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif (!target.addVolatile('flashfire')) {\r\n\t\t\t\t\tthis.add('-immune', target, '[from] ability: Flash Fire');\r\n\t\t\t\t}\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t},\r\n\t\tcondition: {\r\n\t\t\tnoCopy: true, // doesn't get copied by Baton Pass\r\n\t\t\tonStart(target) {\r\n\t\t\t\tthis.add('-start', target, 'ability: Flash Fire');\r\n\t\t\t},\r\n\t\t\tonModifyDamagePhase1(atk, attacker, defender, move) {\r\n\t\t\t\tif (move.type === 'Fire') {\r\n\t\t\t\t\tthis.debug('Flash Fire boost');\r\n\t\t\t\t\treturn this.chainModify(1.5);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonEnd(target) {\r\n\t\t\t\tthis.add('-end', target, 'ability: Flash Fire', '[silent]');\r\n\t\t\t},\r\n\t\t},\r\n\t},\r\n\tflowergift: {\r\n\t\tinherit: true,\r\n\t\tonAllyModifyAtk(atk) {\r\n\t\t\tif (this.field.isWeather('sunnyday')) {\r\n\t\t\t\treturn this.chainModify(1.5);\r\n\t\t\t}\r\n\t\t},\r\n\t\tonAllyModifySpD(spd) {\r\n\t\t\tif (this.field.isWeather('sunnyday')) {\r\n\t\t\t\treturn this.chainModify(1.5);\r\n\t\t\t}\r\n\t\t},\r\n\t},\r\n\tforewarn: {\r\n\t\tinherit: true,\r\n\t\tonStart(pokemon) {\r\n\t\t\tlet warnMoves: Move[] = [];\r\n\t\t\tlet warnBp = 1;\r\n\t\t\tfor (const target of pokemon.foes()) {\r\n\t\t\t\tfor (const moveSlot of target.moveSlots) {\r\n\t\t\t\t\tconst move = this.dex.moves.get(moveSlot.move);\r\n\t\t\t\t\tlet bp = move.basePower;\r\n\t\t\t\t\tif (move.ohko) bp = 160;\r\n\t\t\t\t\tif (move.id === 'counter' || move.id === 'metalburst' || move.id === 'mirrorcoat') bp = 120;\r\n\t\t\t\t\tif (!bp && move.category !== 'Status') bp = 80;\r\n\t\t\t\t\tif (bp > warnBp) {\r\n\t\t\t\t\t\twarnMoves = [move];\r\n\t\t\t\t\t\twarnBp = bp;\r\n\t\t\t\t\t} else if (bp === warnBp) {\r\n\t\t\t\t\t\twarnMoves.push(move);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (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IACT,QAAQ;AAAA,EACT;AAAA,EACA,YAAY;AAAA,IACX,SAAS;AAAA,IACT,QAAQ,SAAS;AAChB,YAAM,YAAY,QAAQ,aAAa,EAAE,KAAK,YAC7C,EAAE,OAAO,UAAU,YAAY,KAAK,OAAO,UAAU,kBAAkB,GAAG,SAAS,QACnF;AAED,UAAI,CAAC,WAAW;AACf,aAAK,KAAK,0HAA0H,OAAO,QAAQ,IAAI;AACvJ;AAAA,MACD;AACA,WAAK,IAAI,YAAY,SAAS,cAAc,OAAO;AAEnD,iBAAW,UAAU,QAAQ,aAAa,GAAG;AAC5C,YAAI,OAAO,UAAU,YAAY,GAAG;AACnC,eAAK,IAAI,WAAW,MAAM;AAAA,QAC3B,WAAW,OAAO,UAAU,kBAAkB,GAAG,SAAS,SAAS;AAClE,eAAK,KAAK,6EAA6E;AAAA,QACxF,OAAO;AACN,eAAK,MAAM,EAAC,KAAK,GAAE,GAAG,QAAQ,SAAS,MAAM,IAAI;AAAA,QAClD;AAAA,MACD;AAAA,IACD;AAAA,EACD;AAAA,EACA,WAAW;AAAA,IACV,SAAS;AAAA,IACT,YAAY,QAAQ,QAAQ,QAAQ,QAAQ;AAC3C,UAAI,UAAU,OAAO,OAAO,QAAQ;AACnC;AAAA,MACD,WAAW,KAAK,MAAM,UAAU,UAAU,GAAG;AAC5C,eAAO;AAAA,MACR;AAAA,IACD;AAAA,EACD;AAAA,EACA,cAAc;AAAA,IACb,SAAS;AAAA,IACT,WAAW;AAAA,IAAC;AAAA,IACZ,QAAQ;AAAA,EACT;AAAA,EACA,YAAY;AAAA,IACX,SAALine truncated
"names": []
}
+198
View File
@@ -0,0 +1,198 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var conditions_exports = {};
__export(conditions_exports, {
Conditions: () => Conditions
});
module.exports = __toCommonJS(conditions_exports);
const Conditions = {
brn: {
inherit: true,
onResidualOrder: 10,
onResidualSubOrder: 6
},
par: {
inherit: true,
onModifySpe(spe, pokemon) {
if (!pokemon.hasAbility("quickfeet")) {
return this.chainModify(0.25);
}
return spe;
},
onBeforeMove(pokemon) {
if (!pokemon.hasAbility("magicguard") && this.randomChance(1, 4)) {
this.add("cant", pokemon, "par");
return false;
}
}
},
slp: {
name: "slp",
effectType: "Status",
onStart(target, source, sourceEffect) {
if (sourceEffect && sourceEffect.effectType === "Move") {
this.add("-status", target, "slp", "[from] move: " + sourceEffect.name);
} else {
this.add("-status", target, "slp");
}
this.effectState.time = this.random(2, 6);
if (target.removeVolatile("nightmare")) {
this.add("-end", target, "Nightmare", "[silent]");
}
},
onBeforeMovePriority: 10,
onBeforeMove(pokemon, target, move) {
if (pokemon.hasAbility("earlybird")) {
pokemon.statusState.time--;
}
pokemon.statusState.time--;
if (pokemon.statusState.time <= 0) {
pokemon.cureStatus();
return;
}
this.add("cant", pokemon, "slp");
if (move.sleepUsable) {
return;
}
return false;
}
},
psn: {
inherit: true,
onResidualOrder: 10,
onResidualSubOrder: 6
},
tox: {
inherit: true,
onResidualOrder: 10,
onResidualSubOrder: 6
},
confusion: {
inherit: true,
onBeforeMove(pokemon) {
pokemon.volatiles["confusion"].time--;
if (!pokemon.volatiles["confusion"].time) {
pokemon.removeVolatile("confusion");
return;
}
this.add("-activate", pokemon, "confusion");
if (this.randomChance(1, 2)) {
return;
}
const damage = this.actions.getDamage(pokemon, pokemon, 40);
if (typeof damage !== "number")
throw new Error("Confusion damage not dealt");
this.damage(damage, pokemon, pokemon, {
id: "confused",
effectType: "Move",
type: "???"
});
return false;
}
},
frz: {
inherit: true,
onBeforeMove(pokemon, target, move) {
if (this.randomChance(1, 5)) {
pokemon.cureStatus();
return;
}
if (move.flags["defrost"])
return;
this.add("cant", pokemon, "frz");
return false;
}
},
substitutebroken: {
noCopy: true
},
trapped: {
inherit: true,
noCopy: false
},
trapper: {
inherit: true,
noCopy: false
},
partiallytrapped: {
inherit: true,
durationCallback(target, source) {
if (source.hasItem("gripclaw"))
return 6;
return this.random(3, 7);
},
onResidualOrder: 10,
onResidualSubOrder: 9
},
choicelock: {
inherit: true,
onStart(pokemon) {
if (!pokemon.lastMove)
return false;
this.effectState.move = pokemon.lastMove.id;
}
},
futuremove: {
inherit: true,
onResidualOrder: 11
},
stall: {
// In gen 3-4, the chance of protect succeeding does not fall below 1/8.
// See http://upokecenter.dreamhosters.com/dex/?lang=en&move=182
inherit: true,
counterMax: 8
},
raindance: {
inherit: true,
onFieldResidualOrder: 8
},
sunnyday: {
inherit: true,
onFieldResidualOrder: 8
},
sandstorm: {
inherit: true,
onFieldResidualOrder: 8
},
hail: {
inherit: true,
onFieldResidualOrder: 8
},
// Arceus's true typing for all its formes is Normal, and it's only Multitype
// that changes its type, but its formes are specified to be their corresponding
// type in the Pokedex, so that needs to be overridden. Without Multitype it
// starts as Normal type, but its type can be changed by other effects.
// This is mainly relevant for Hackmons Cup and Balanced Hackmons.
arceus: {
name: "Arceus",
onBeforeSwitchIn(pokemon) {
pokemon.setType("Normal");
},
onSwitchIn(pokemon) {
if (pokemon.ability === "multitype") {
const item = pokemon.getItem();
const targetForme = item?.onPlate ? "Arceus-" + item.onPlate : "Arceus";
if (pokemon.species.name !== targetForme) {
pokemon.formeChange(targetForme);
}
}
}
}
};
//# sourceMappingURL=conditions.js.map
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../../../../../data/mods/gen4/conditions.ts"],
"sourcesContent": ["export const Conditions: {[k: string]: ModdedConditionData} = {\r\n\tbrn: {\r\n\t\tinherit: true,\r\n\t\tonResidualOrder: 10,\r\n\t\tonResidualSubOrder: 6,\r\n\t},\r\n\tpar: {\r\n\t\tinherit: true,\r\n\t\tonModifySpe(spe, pokemon) {\r\n\t\t\tif (!pokemon.hasAbility('quickfeet')) {\r\n\t\t\t\treturn this.chainModify(0.25);\r\n\t\t\t}\r\n\t\t\treturn spe;\r\n\t\t},\r\n\t\tonBeforeMove(pokemon) {\r\n\t\t\tif (!pokemon.hasAbility('magicguard') && this.randomChance(1, 4)) {\r\n\t\t\t\tthis.add('cant', pokemon, 'par');\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t},\r\n\t},\r\n\tslp: {\r\n\t\tname: 'slp',\r\n\t\teffectType: 'Status',\r\n\t\tonStart(target, source, sourceEffect) {\r\n\t\t\tif (sourceEffect && sourceEffect.effectType === 'Move') {\r\n\t\t\t\tthis.add('-status', target, 'slp', '[from] move: ' + sourceEffect.name);\r\n\t\t\t} else {\r\n\t\t\t\tthis.add('-status', target, 'slp');\r\n\t\t\t}\r\n\t\t\t// 1-4 turns\r\n\t\t\tthis.effectState.time = this.random(2, 6);\r\n\r\n\t\t\tif (target.removeVolatile('nightmare')) {\r\n\t\t\t\tthis.add('-end', target, 'Nightmare', '[silent]');\r\n\t\t\t}\r\n\t\t},\r\n\t\tonBeforeMovePriority: 10,\r\n\t\tonBeforeMove(pokemon, target, move) {\r\n\t\t\tif (pokemon.hasAbility('earlybird')) {\r\n\t\t\t\tpokemon.statusState.time--;\r\n\t\t\t}\r\n\t\t\tpokemon.statusState.time--;\r\n\t\t\tif (pokemon.statusState.time <= 0) {\r\n\t\t\t\tpokemon.cureStatus();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tthis.add('cant', pokemon, 'slp');\r\n\t\t\tif (move.sleepUsable) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t},\r\n\t},\r\n\tpsn: {\r\n\t\tinherit: true,\r\n\t\tonResidualOrder: 10,\r\n\t\tonResidualSubOrder: 6,\r\n\t},\r\n\ttox: {\r\n\t\tinherit: true,\r\n\t\tonResidualOrder: 10,\r\n\t\tonResidualSubOrder: 6,\r\n\t},\r\n\tconfusion: {\r\n\t\tinherit: true,\r\n\t\tonBeforeMove(pokemon) {\r\n\t\t\tpokemon.volatiles['confusion'].time--;\r\n\t\t\tif (!pokemon.volatiles['confusion'].time) {\r\n\t\t\t\tpokemon.removeVolatile('confusion');\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tthis.add('-activate', pokemon, 'confusion');\r\n\t\t\tif (this.randomChance(1, 2)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tconst damage = this.actions.getDamage(pokemon, pokemon, 40);\r\n\t\t\tif (typeof damage !== 'number') throw new Error(\"Confusion damage not dealt\");\r\n\t\t\tthis.damage(damage, pokemon, pokemon, {\r\n\t\t\t\tid: 'confused',\r\n\t\t\t\teffectType: 'Move',\r\n\t\t\t\ttype: '???',\r\n\t\t\t} as ActiveMove);\r\n\t\t\treturn false;\r\n\t\t},\r\n\t},\r\n\tfrz: {\r\n\t\tinherit: true,\r\n\t\tonBeforeMove(pokemon, target, move) {\r\n\t\t\tif (this.randomChance(1, 5)) {\r\n\t\t\t\tpokemon.cureStatus();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (move.flags['defrost']) return;\r\n\t\t\tthis.add('cant', pokemon, 'frz');\r\n\t\t\treturn false;\r\n\t\t},\r\n\t},\r\n\tsubstitutebroken: {\r\n\t\tnoCopy: true,\r\n\t},\r\n\ttrapped: {\r\n\t\tinherit: true,\r\n\t\tnoCopy: false,\r\n\t},\r\n\ttrapper: {\r\n\t\tinherit: true,\r\n\t\tnoCopy: false,\r\n\t},\r\n\tpartiallytrapped: {\r\n\t\tinherit: true,\r\n\t\tdurationCallback(target, source) {\r\n\t\t\tif (source.hasItem('gripclaw')) return 6;\r\n\t\t\treturn this.random(3, 7);\r\n\t\t},\r\n\t\tonResidualOrder: 10,\r\n\t\tonResidualSubOrder: 9,\r\n\t},\r\n\tchoicelock: {\r\n\t\tinherit: true,\r\n\t\tonStart(pokemon) {\r\n\t\t\tif (!pokemon.lastMove) return false;\r\n\t\t\tthis.effectState.move = pokemon.lastMove.id;\r\n\t\t},\r\n\t},\r\n\tfuturemove: {\r\n\t\tinherit: true,\r\n\t\tonResidualOrder: 11,\r\n\t},\r\n\tstall: {\r\n\t\t// In gen 3-4, the chance of protect succeeding does not fall below 1/8.\r\n\t\t// See http://upokecenter.dreamhosters.com/dex/?lang=en&move=182\r\n\t\tinherit: true,\r\n\t\tcounterMax: 8,\r\n\t},\r\n\traindance: {\r\n\t\tinherit: true,\r\n\t\tonFieldResidualOrder: 8,\r\n\t},\r\n\tsunnyday: {\r\n\t\tinherit: true,\r\n\t\tonFieldResidualOrder: 8,\r\n\t},\r\n\tsandstorm: {\r\n\t\tinherit: true,\r\n\t\tonFieldResidualOrder: 8,\r\n\t},\r\n\thail: {\r\n\t\tinherit: true,\r\n\t\tonFieldResidualOrder: 8,\r\n\t},\r\n\t// Arceus's true typing for all its formes is Normal, and it's only Multitype\r\n\t// that changes its type, but its formes are specified to be their corresponding\r\n\t// type in the Pokedex, so that needs to be overridden. Without Multitype it\r\n\t// starts as Normal type, but its type can be changed by other effects.\r\n\t// This is mainly relevant for Hackmons Cup and Balanced Hackmons.\r\n\tarceus: {\r\n\t\tname: 'Arceus',\r\n\t\tonBeforeSwitchIn(pokemon) {\r\n\t\t\tpokemon.setType('Normal'); // Multitype will prevent this\r\n\t\t},\r\n\t\tonSwitchIn(pokemon) {\r\n\t\t\tif (pokemon.ability === 'multitype') {\r\n\t\t\t\tconst item = pokemon.getItem();\r\n\t\t\t\tconst targetForme = (item?.onPlate ? 'Arceus-' + item.onPlate : 'Arceus');\r\n\t\t\t\tif (pokemon.species.name !== targetForme) {\r\n\t\t\t\t\tpokemon.formeChange(targetForme);\r\n\t\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,kBAAkB;AAAA,IACjB,SAAS;AAAA,IACT,iBAAiB,QAAQ,QAAQ;AAChC,UAAI,OAAO,QAAQ,UAAU;AAAG,eAAO;AACvC,aAAO,KAAK,OAAO,GAAG,CAAC;AAAA,IACxB;AAAA,IACA,iBAAiB;AAAA,IACjB,oBAAoB;AAAA,EACrB;AAAA,EACA,YAAY;AAAA,IACX,SAAS;AAAA,IACT,QAAQ,SAAS;AAChB,UAAI,CAAC,QAAQ;AAAU,eAAO;AAC9B,WAAK,YAAY,OAAO,QAAQ,SAAS;AAAA,IAC1C;AAAA,EACD;AAAA,EACA,YAAY;AAAA,IACX,SAAS;AAAA,IACT,iBAAiB;AAAA,EAClB;AAAA,EACA,OAAO;AAAA;AAAA;AAAA,IAGN,SAAS;AAAA,IACT,YAAY;AAAA,EACb;AAAA,EACA,WAAW;AAAA,IACV,SAAS;AAAA,IACT,sBAAsB;AAAA,EACvB;AAAA,EACA,UAAU;AAAA,IACT,SAAS;AAAA,IACT,sBAAsB;AAAA,EACvB;AAAA,EACA,WAAW;AAAA,IACV,SAAS;AAAA,IACT,sBAAsB;AAAA,EACvB;AAAA,EACA,MAAM;AAAA,IACL,SAAS;AAAA,IACT,sBAAsB;AAAA,EACvB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,QAAQ;AAAA,IACP,MAAM;AAAA,IACN,iBAAiB,SAAS;AACzB,cAAQ,QAAQ,QAAQ;AAAA,IACzB;AAAA,IACA,WAAW,SAAS;AACnB,UAAI,QAAQ,YAAY,aAAa;AACpC,cAAM,OAAO,QAAQ,QAAQ;AAC7B,cAAM,cAAe,MAAM,UAAU,YAAY,KAAK,UAAU;AAChE,YAAI,QAAQ,QAAQ,SAAS,aAAa;AACzC,kBAAQ,YAAY,WAAW;AAAA,QAChC;AAAA,MACD;AAAA,IACD;AAAA,EACD;AACD;",
"names": []
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../../../../../data/mods/gen4/formats-data.ts"],
"sourcesContent": ["export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {\r\n\tbulbasaur: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tivysaur: {\r\n\t\ttier: \"NFE\",\r\n\t},\r\n\tvenusaur: {\r\n\t\ttier: \"UU\",\r\n\t},\r\n\tcharmander: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tcharmeleon: {\r\n\t\ttier: \"NFE\",\r\n\t},\r\n\tcharizard: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tsquirtle: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\twartortle: {\r\n\t\ttier: \"NFE\",\r\n\t},\r\n\tblastoise: {\r\n\t\ttier: \"UU\",\r\n\t},\r\n\tcaterpie: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tmetapod: {\r\n\t\ttier: \"NFE\",\r\n\t},\r\n\tbutterfree: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tweedle: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tkakuna: {\r\n\t\ttier: \"NFE\",\r\n\t},\r\n\tbeedrill: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tpidgey: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tpidgeotto: {\r\n\t\ttier: \"NFE\",\r\n\t},\r\n\tpidgeot: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\trattata: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\traticate: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tspearow: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tfearow: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tekans: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tarbok: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tpichu: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tpichuspikyeared: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tpikachu: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\traichu: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tsandshrew: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tsandslash: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tnidoranf: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tnidorina: {\r\n\t\ttier: \"NFE\",\r\n\t},\r\n\tnidoqueen: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tnidoranm: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tnidorino: {\r\n\t\ttier: \"NFE\",\r\n\t},\r\n\tnidoking: {\r\n\t\ttier: \"UU\",\r\n\t},\r\n\tcleffa: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tclefairy: {\r\n\t\ttier: \"NFE\",\r\n\t},\r\n\tclefable: {\r\n\t\ttier: \"UU\",\r\n\t},\r\n\tvulpix: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tninetales: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tigglybuff: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tjigglypuff: {\r\n\t\ttier: \"NFE\",\r\n\t},\r\n\twigglytuff: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tzubat: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tgolbat: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tcrobat: {\r\n\t\ttier: \"UUBL\",\r\n\t},\r\n\toddish: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tgloom: {\r\n\t\ttier: \"NFE\",\r\n\t},\r\n\tvileplume: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tbellossom: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tparas: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tparasect: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tvenonat: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tvenomoth: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tdiglett: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tdugtrio: {\r\n\t\ttier: \"UU\",\r\n\t},\r\n\tmeowth: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tpersian: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tpsyduck: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tgolduck: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tmankey: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tprimeape: {\r\n\t\ttier: \"UU\",\r\n\t},\r\n\tgrowlithe: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tarcanine: {\r\n\t\ttier: \"UU\",\r\n\t},\r\n\tpoliwag: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tpoliwhirl: {\r\n\t\ttier: \"NFE\",\r\n\t},\r\n\tpoliwrath: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tpolitoed: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tabra: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tkadabra: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\talakazam: {\r\n\t\ttier: \"UU\",\r\n\t},\r\n\tmachop: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tmachoke: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tmachamp: {\r\n\t\ttier: \"OU\",\r\n\t},\r\n\tbellsprout: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tweepinbell: {\r\n\t\ttier: \"NFE\",\r\n\t},\r\n\tvictreebel: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\ttentacool: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\ttentacruel: {\r\n\t\ttier: \"(OU)\",\r\n\t},\r\n\tgeodude: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tgraveler: {\r\n\t\ttier: \"NFE\",\r\n\t},\r\n\tgolem: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tponyta: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\trapidash: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tslowpoke: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tslowbro: {\r\n\t\ttier: \"UU\",\r\n\t},\r\n\tslowking: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tmagnemite: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tmagneton: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tmagnezone: {\r\n\t\ttier: \"OU\",\r\n\t},\r\n\tfarfetchd: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tdoduo: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tdodrio: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tseel: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tdewgong: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tgrimer: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tmuk: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tshellder: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tcloyster: {\r\n\t\ttier: \"UU\",\r\n\t},\r\n\tgastly: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\thaunter: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tgengar: {\r\n\t\ttier: \"OU\",\r\n\t},\r\n\tonix: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\tsteelix: {\r\n\t\ttier: \"UU\",\r\n\t},\r\n\tdrowzee: {\r\n\t\ttier: \"LC\",\r\n\t},\r\n\thypno: {\r\n\t\ttier: \"NU\",\r\n\t},\r\n\tkrabby: {\r\n\t\ttieLine truncated
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,cAAuD;AAAA,EACnE,WAAW;AAAA,IACV,MAAM;AAAA,EACP;AAAA,EACA,SAAS;AAAA,IACR,MAAM;AAAA,EACP;AAAA,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,WAAW;AAAA,IACV,MAAM;AAAA,EACP;AAAA,EACA,QAAQ;AAAA,IACP,MAAM;AAAA,EACP;AAAA,EACA,SAAS;AAAA,IACR,MAAM;AAAA,EACP;AAAA,EACA,SAAS;AAAA,IACR,MAAM;AAAA,EACP;AAAA,EACA,WAAW;AAAA,IACV,MAAM;AAAA,EACP;AAAA,EACA,YAAY;AAAA,IACX,MAAM;AAAA,EACP;AAAA,EACA,WAAW;AAAA,IACV,MAAM;AAAA,EACP;AAAA,EACA,WAAW;AAAA,IACV,MAAM;AAAA,EACP;AAAA,EACA,YAAY;AAAA,IACX,MAAM;AAAA,EACP;AAAA,EACA,SAAS;AAAA,IACR,MAAM;AAAA,EACP;AAAA,EACA,SAAS;AAAA,IACR,MAAM;AAAA,EACP;ALine truncated
"names": []
}
+824
View File
@@ -0,0 +1,824 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var items_exports = {};
__export(items_exports, {
Items: () => Items
});
module.exports = __toCommonJS(items_exports);
const Items = {
adamantorb: {
inherit: true,
onBasePower(basePower, user, target, move) {
if (move && user.species.name === "Dialga" && (move.type === "Steel" || move.type === "Dragon")) {
return this.chainModify(1.2);
}
}
},
bigroot: {
inherit: true,
onTryHeal(damage, target, source, effect) {
const heals = ["drain", "leechseed", "ingrain", "aquaring"];
if (heals.includes(effect.id)) {
return Math.floor(damage * 1.3);
}
}
},
blacksludge: {
inherit: true,
onResidualOrder: 10,
onResidualSubOrder: 4
},
brightpowder: {
inherit: true,
onModifyAccuracyPriority: 5,
onModifyAccuracy(accuracy) {
if (typeof accuracy !== "number")
return;
this.debug("brightpowder - decreasing accuracy");
return accuracy * 0.9;
}
},
choiceband: {
inherit: true,
onStart() {
},
onModifyMove() {
},
onAfterMove(pokemon) {
pokemon.addVolatile("choicelock");
}
},
choicescarf: {
inherit: true,
onStart() {
},
onModifyMove() {
},
onAfterMove(pokemon) {
pokemon.addVolatile("choicelock");
}
},
choicespecs: {
inherit: true,
onStart() {
},
onModifyMove() {
},
onAfterMove(pokemon) {
pokemon.addVolatile("choicelock");
}
},
chopleberry: {
inherit: true,
onSourceModifyDamage(damage, source, target, move) {
if (move.causedCrashDamage)
return damage;
if (move.type === "Fighting" && target.getMoveHitData(move).typeMod > 0) {
const hitSub = target.volatiles["substitute"] && !move.flags["bypasssub"];
if (hitSub)
return;
if (target.eatItem()) {
this.debug("-50% reduction");
this.add("-enditem", target, this.effect, "[weaken]");
return this.chainModify(0.5);
}
}
}
},
custapberry: {
inherit: true,
onFractionalPriority() {
},
onBeforeTurn(pokemon) {
if (pokemon.hp <= pokemon.maxhp / 4 || pokemon.hp <= pokemon.maxhp / 2 && pokemon.ability === "gluttony") {
const action = this.queue.willMove(pokemon);
if (!action)
return;
this.queue.insertChoice({
choice: "event",
event: "Custap",
priority: action.priority + 0.1,
pokemon: action.pokemon,
move: action.move,
targetLoc: action.targetLoc
});
}
},
onCustap(pokemon) {
const action = this.queue.willMove(pokemon);
this.debug("custap action: " + action);
if (action && pokemon.eatItem()) {
this.queue.cancelAction(pokemon);
this.add("-message", "Custap Berry activated.");
this.runAction(action);
}
}
},
deepseascale: {
inherit: true,
onModifySpD(spd, pokemon) {
if (pokemon.species.name === "Clamperl") {
return this.chainModify(2);
}
}
},
deepseatooth: {
inherit: true,
onModifySpA(spa, pokemon) {
if (pokemon.species.name === "Clamperl") {
return this.chainModify(2);
}
}
},
fastball: {
inherit: true,
isNonstandard: null
},
flameorb: {
inherit: true,
onResidualOrder: 10,
onResidualSubOrder: 20
},
focussash: {
inherit: true,
onDamage() {
},
onTryHit(target, source, move) {
if (target !== source && target.hp === target.maxhp) {
target.addVolatile("focussash");
}
},
condition: {
duration: 1,
onDamage(damage, target, source, effect) {
if (effect && effect.effectType === "Move" && damage >= target.hp) {
this.effectState.activated = true;
return target.hp - 1;
}
},
onAfterMoveSecondary(target) {
if (this.effectState.activated)
target.useItem();
target.removeVolatile("focussash");
}
}
},
griseousorb: {
inherit: true,
onBasePower(basePower, user, target, move) {
if (user.species.num === 487 && (move.type === "Ghost" || move.type === "Dragon")) {
return this.chainModify(1.2);
}
}
},
heavyball: {
inherit: true,
isNonstandard: null
},
ironball: {
inherit: true,
onEffectiveness() {
}
},
kingsrock: {
inherit: true,
onModifyMove(move) {
const affectedByKingsRock = [
"aerialace",
"aeroblast",
"aircutter",
"airslash",
"aquajet",
"aquatail",
"armthrust",
"assurance",
"attackorder",
"aurasphere",
"avalanche",
"barrage",
"beatup",
"bide",
"bind",
"blastburn",
"bonerush",
"bonemerang",
"bounce",
"bravebird",
"brickbreak",
"brine",
"bugbite",
"bulletpunch",
"bulletseed",
"chargebeam",
"clamp",
"closecombat",
"cometpunch",
"crabhammer",
"crosschop",
"crosspoison",
"crushgrip",
"cut",
"darkpulse",
"dig",
"discharge",
"dive",
"doublehit",
"doublekick",
"doubleslap",
"doubleedge",
"dracometeor",
"dragonbreath",
"dragonclaw",
"dragonpulse",
"dragonrage",
"dragonrush",
"drainpunch",
"drillpeck",
"earthpower",
"earthquake",
"eggbomb",
"endeavor",
"eruption",
"explosion",
"extremespeed",
"falseswipe",
"feintattack",
"firefang",
"firespin",
"flail",
"flashcannon",
"fly",
"forcepalm",
"frenzyplant",
"frustration",
"furyattack",
"furycutter",
"furyswipes",
"gigaimpact",
"grassknot",
"gunkshot",
"gust",
"gyroball",
"hammerarm",
"headsmash",
"hiddenpower",
"highjumpkick",
"hornattack",
"hydrocannon",
"hydropump",
"hyperbeam",
"iceball",
"icefang",
"iceshard",
"iciclespear",
"ironhead",
"judgment",
"jumpkick",
"karatechop",
"lastresort",
"lavaplume",
"leafblade",
"leafstorm",
"lowkick",
"machpunch",
"magicalleaf",
"magmastorm",
"magnetbomb",
"magnitude",
"megakick",
"megapunch",
"megahorn",
"meteormash",
"mirrorshot",
"mudbomb",
"mudshot",
"muddywater",
"nightshade",
"nightslash",
"ominouswind",
"outrage",
"overheat",
"payday",
"payback",
"peck",
"petaldance",
"pinmissile",
"pluck",
"poisonjab",
"poisontail",
"pound",
"powergem",
"powerwhip",
"psychoboost",
"psychocut",
"psywave",
"punishment",
"quickattack",
"rage",
"rapidspin",
"razorleaf",
"razorwind",
"return",
"revenge",
"reversal",
"roaroftime",
"rockblast",
"rockclimb",
"rockthrow",
"rockwrecker",
"rollingkick",
"rollout",
"sandtomb",
"scratch",
"seedbomb",
"seedflare",
"seismictoss",
"selfdestruct",
"shadowclaw",
"shadowforce",
"shadowpunch",
"shadowsneak",
"shockwave",
"signalbeam",
"silverwind",
"skullbash",
"skyattack",
"skyuppercut",
"slam",
"slash",
"snore",
"solarbeam",
"sonicboom",
"spacialrend",
"spikecannon",
"spitup",
"steelwing",
"stoneedge",
"strength",
"struggle",
"submission",
"suckerpunch",
"surf",
"swift",
"tackle",
"takedown",
"thrash",
"thunderfang",
"triplekick",
"trumpcard",
"twister",
"uturn",
"uproar",
"vacuumwave",
"visegrip",
"vinewhip",
"vitalthrow",
"volttackle",
"wakeupslap",
"watergun",
"waterpulse",
"waterfall",
"weatherball",
"whirlpool",
"wingattack",
"woodhammer",
"wrap",
"wringout",
"xscissor",
"zenheadbutt"
];
if (affectedByKingsRock.includes(move.id)) {
if (!move.secondaries)
move.secondaries = [];
move.secondaries.push({
chance: 10,
volatileStatus: "flinch"
});
}
}
},
laxincense: {
inherit: true,
onModifyAccuracyPriority: 5,
onModifyAccuracy(accuracy) {
if (typeof accuracy !== "number")
return;
this.debug("lax incense - decreasing accuracy");
return accuracy * 0.9;
}
},
leftovers: {
inherit: true,
onResidualOrder: 10,
onResidualSubOrder: 4
},
levelball: {
inherit: true,
isNonstandard: null
},
lifeorb: {
inherit: true,
onModifyDamage() {
},
onAfterMoveSecondarySelf() {
},
onBasePower(basePower, user, target) {
if (!target.volatiles["substitute"]) {
user.addVolatile("lifeorb");
}
return basePower;
},
onModifyDamagePhase2(damage, source, target, move) {
if (!move.flags["futuremove"])
return damage * 1.3;
},
condition: {
duration: 1,
onAfterMoveSecondarySelf(source, target, move) {
if (move && move.effectType === "Move" && source && source.volatiles["lifeorb"]) {
this.damage(source.baseMaxhp / 10, source, source, this.dex.items.get("lifeorb"));
source.removeVolatile("lifeorb");
}
}
}
},
lightball: {
inherit: true,
onModifyAtk() {
},
onModifySpA() {
},
onBasePower(basePower, pokemon) {
if (pokemon.species.name === "Pikachu") {
return this.chainModify(2);
}
}
},
loveball: {
inherit: true,
isNonstandard: null
},
luckypunch: {
inherit: true,
onModifyCritRatio(critRatio, user) {
if (user.species.name === "Chansey") {
return critRatio + 2;
}
}
},
lureball: {
inherit: true,
isNonstandard: null
},
lustrousorb: {
inherit: true,
onBasePower(basePower, user, target, move) {
if (move && user.species.name === "Palkia" && (move.type === "Water" || move.type === "Dragon")) {
return this.chainModify(1.2);
}
}
},
mentalherb: {
inherit: true,
fling: {
basePower: 10,
effect(pokemon) {
if (pokemon.removeVolatile("attract")) {
this.add("-end", pokemon, "move: Attract", "[from] item: Mental Herb");
}
}
},
onUpdate(pokemon) {
if (pokemon.volatiles["attract"] && pokemon.useItem()) {
pokemon.removeVolatile("attract");
this.add("-end", pokemon, "move: Attract", "[from] item: Mental Herb");
}
}
},
metronome: {
inherit: true,
condition: {
onStart(pokemon) {
this.effectState.numConsecutive = 0;
this.effectState.lastMove = "";
},
onTryMovePriority: -2,
onTryMove(pokemon, target, move) {
if (!pokemon.hasItem("metronome")) {
pokemon.removeVolatile("metronome");
return;
}
if (this.effectState.lastMove === move.id && pokemon.moveLastTurnResult) {
this.effectState.numConsecutive++;
} else {
this.effectState.numConsecutive = 0;
}
this.effectState.lastMove = move.id;
},
onModifyDamagePhase2(damage, source, target, move) {
return damage * (1 + this.effectState.numConsecutive / 10);
}
}
},
micleberry: {
inherit: true,
condition: {
duration: 2,
onSourceModifyAccuracyPriority: 3,
onSourceModifyAccuracy(accuracy, target, source) {
this.add("-enditem", source, "Micle Berry");
source.removeVolatile("micleberry");
if (typeof accuracy === "number") {
return accuracy * 1.2;
}
}
}
},
moonball: {
inherit: true,
isNonstandard: null
},
razorfang: {
inherit: true,
onModifyMove(move) {
const affectedByRazorFang = [
"aerialace",
"aeroblast",
"aircutter",
"airslash",
"aquajet",
"aquatail",
"armthrust",
"assurance",
"attackorder",
"aurasphere",
"avalanche",
"barrage",
"beatup",
"bide",
"bind",
"blastburn",
"bonerush",
"bonemerang",
"bounce",
"bravebird",
"brickbreak",
"brine",
"bugbite",
"bulletpunch",
"bulletseed",
"chargebeam",
"clamp",
"closecombat",
"cometpunch",
"crabhammer",
"crosschop",
"crosspoison",
"crushgrip",
"cut",
"darkpulse",
"dig",
"discharge",
"dive",
"doublehit",
"doublekick",
"doubleslap",
"doubleedge",
"dracometeor",
"dragonbreath",
"dragonclaw",
"dragonpulse",
"dragonrage",
"dragonrush",
"drainpunch",
"drillpeck",
"earthpower",
"earthquake",
"eggbomb",
"endeavor",
"eruption",
"explosion",
"extremespeed",
"falseswipe",
"feintattack",
"firefang",
"firespin",
"flail",
"flashcannon",
"fly",
"forcepalm",
"frenzyplant",
"frustration",
"furyattack",
"furycutter",
"furyswipes",
"gigaimpact",
"grassknot",
"gunkshot",
"gust",
"gyroball",
"hammerarm",
"headsmash",
"hiddenpower",
"highjumpkick",
"hornattack",
"hydrocannon",
"hydropump",
"hyperbeam",
"iceball",
"icefang",
"iceshard",
"iciclespear",
"ironhead",
"judgment",
"jumpkick",
"karatechop",
"lastresort",
"lavaplume",
"leafblade",
"leafstorm",
"lowkick",
"machpunch",
"magicalleaf",
"magmastorm",
"magnetbomb",
"magnitude",
"megakick",
"megapunch",
"megahorn",
"meteormash",
"mirrorshot",
"mudbomb",
"mudshot",
"muddywater",
"nightshade",
"nightslash",
"ominouswind",
"outrage",
"overheat",
"payday",
"payback",
"peck",
"petaldance",
"pinmissile",
"pluck",
"poisonjab",
"poisontail",
"pound",
"powergem",
"powerwhip",
"psychoboost",
"psychocut",
"psywave",
"punishment",
"quickattack",
"rage",
"rapidspin",
"razorleaf",
"razorwind",
"return",
"revenge",
"reversal",
"roaroftime",
"rockblast",
"rockclimb",
"rockthrow",
"rockwrecker",
"rollingkick",
"rollout",
"sandtomb",
"scratch",
"seedbomb",
"seedflare",
"seismictoss",
"selfdestruct",
"shadowclaw",
"shadowforce",
"shadowpunch",
"shadowsneak",
"shockwave",
"signalbeam",
"silverwind",
"skullbash",
"skyattack",
"skyuppercut",
"slam",
"slash",
"snore",
"solarbeam",
"sonicboom",
"spacialrend",
"spikecannon",
"spitup",
"steelwing",
"stoneedge",
"strength",
"struggle",
"submission",
"suckerpunch",
"surf",
"swift",
"tackle",
"takedown",
"thrash",
"thunderfang",
"triplekick",
"trumpcard",
"twister",
"uturn",
"uproar",
"vacuumwave",
"visegrip",
"vinewhip",
"vitalthrow",
"volttackle",
"wakeupslap",
"watergun",
"waterpulse",
"waterfall",
"weatherball",
"whirlpool",
"wingattack",
"woodhammer",
"wrap",
"wringout",
"xscissor",
"zenheadbutt"
];
if (affectedByRazorFang.includes(move.id)) {
if (!move.secondaries)
move.secondaries = [];
move.secondaries.push({
chance: 10,
volatileStatus: "flinch"
});
}
}
},
sportball: {
inherit: true,
isNonstandard: null
},
stick: {
inherit: true,
onModifyCritRatio(critRatio, user) {
if (user.species.id === "farfetchd") {
return critRatio + 2;
}
}
},
stickybarb: {
inherit: true,
onResidualOrder: 10,
onResidualSubOrder: 20
},
thickclub: {
inherit: true,
onModifyAtk(atk, pokemon) {
if (pokemon.species.name === "Cubone" || pokemon.species.name === "Marowak") {
return this.chainModify(2);
}
}
},
toxicorb: {
inherit: true,
onResidualOrder: 10,
onResidualSubOrder: 20
},
widelens: {
inherit: true,
onSourceModifyAccuracyPriority: 4,
onSourceModifyAccuracy(accuracy) {
if (typeof accuracy === "number") {
return accuracy * 1.1;
}
}
},
zoomlens: {
inherit: true,
onSourceModifyAccuracyPriority: 4,
onSourceModifyAccuracy(accuracy, target) {
if (typeof accuracy === "number" && !this.queue.willMove(target)) {
this.debug("Zoom Lens boosting accuracy");
return accuracy * 1.2;
}
}
}
};
//# sourceMappingURL=items.js.map
+7
View File
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../../../../../data/mods/gen4/items.ts"],
"sourcesContent": ["export const Items: {[k: string]: ModdedItemData} = {\r\n\tadamantorb: {\r\n\t\tinherit: true,\r\n\t\tonBasePower(basePower, user, target, move) {\r\n\t\t\tif (move && user.species.name === 'Dialga' && (move.type === 'Steel' || move.type === 'Dragon')) {\r\n\t\t\t\treturn this.chainModify(1.2);\r\n\t\t\t}\r\n\t\t},\r\n\t},\r\n\tbigroot: {\r\n\t\tinherit: true,\r\n\t\tonTryHeal(damage, target, source, effect) {\r\n\t\t\tconst heals = ['drain', 'leechseed', 'ingrain', 'aquaring'];\r\n\t\t\tif (heals.includes(effect.id)) {\r\n\t\t\t\treturn Math.floor(damage * 1.3);\r\n\t\t\t}\r\n\t\t},\r\n\t},\r\n\tblacksludge: {\r\n\t\tinherit: true,\r\n\t\tonResidualOrder: 10,\r\n\t\tonResidualSubOrder: 4,\r\n\t},\r\n\tbrightpowder: {\r\n\t\tinherit: true,\r\n\t\tonModifyAccuracyPriority: 5,\r\n\t\tonModifyAccuracy(accuracy) {\r\n\t\t\tif (typeof accuracy !== 'number') return;\r\n\t\t\tthis.debug('brightpowder - decreasing accuracy');\r\n\t\t\treturn accuracy * 0.9;\r\n\t\t},\r\n\t},\r\n\tchoiceband: {\r\n\t\tinherit: true,\r\n\t\tonStart() {},\r\n\t\tonModifyMove() {},\r\n\t\tonAfterMove(pokemon) {\r\n\t\t\tpokemon.addVolatile('choicelock');\r\n\t\t},\r\n\t},\r\n\tchoicescarf: {\r\n\t\tinherit: true,\r\n\t\tonStart() {},\r\n\t\tonModifyMove() {},\r\n\t\tonAfterMove(pokemon) {\r\n\t\t\tpokemon.addVolatile('choicelock');\r\n\t\t},\r\n\t},\r\n\tchoicespecs: {\r\n\t\tinherit: true,\r\n\t\tonStart() {},\r\n\t\tonModifyMove() {},\r\n\t\tonAfterMove(pokemon) {\r\n\t\t\tpokemon.addVolatile('choicelock');\r\n\t\t},\r\n\t},\r\n\tchopleberry: {\r\n\t\tinherit: true,\r\n\t\tonSourceModifyDamage(damage, source, target, move) {\r\n\t\t\tif (move.causedCrashDamage) return damage;\r\n\t\t\tif (move.type === 'Fighting' && target.getMoveHitData(move).typeMod > 0) {\r\n\t\t\t\tconst hitSub = target.volatiles['substitute'] && !move.flags['bypasssub'];\r\n\t\t\t\tif (hitSub) return;\r\n\r\n\t\t\t\tif (target.eatItem()) {\r\n\t\t\t\t\tthis.debug('-50% reduction');\r\n\t\t\t\t\tthis.add('-enditem', target, this.effect, '[weaken]');\r\n\t\t\t\t\treturn this.chainModify(0.5);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t},\r\n\tcustapberry: {\r\n\t\tinherit: true,\r\n\t\tonFractionalPriority() {},\r\n\t\tonBeforeTurn(pokemon) {\r\n\t\t\tif (pokemon.hp <= pokemon.maxhp / 4 || (pokemon.hp <= pokemon.maxhp / 2 && pokemon.ability === 'gluttony')) {\r\n\t\t\t\tconst action = this.queue.willMove(pokemon);\r\n\t\t\t\tif (!action) return;\r\n\t\t\t\tthis.queue.insertChoice({\r\n\t\t\t\t\tchoice: 'event',\r\n\t\t\t\t\tevent: 'Custap',\r\n\t\t\t\t\tpriority: action.priority + 0.1,\r\n\t\t\t\t\tpokemon: action.pokemon,\r\n\t\t\t\t\tmove: action.move,\r\n\t\t\t\t\ttargetLoc: action.targetLoc,\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t},\r\n\t\tonCustap(pokemon) {\r\n\t\t\tconst action = this.queue.willMove(pokemon);\r\n\t\t\tthis.debug('custap action: ' + action);\r\n\t\t\tif (action && pokemon.eatItem()) {\r\n\t\t\t\tthis.queue.cancelAction(pokemon);\r\n\t\t\t\tthis.add('-message', \"Custap Berry activated.\");\r\n\t\t\t\tthis.runAction(action);\r\n\t\t\t}\r\n\t\t},\r\n\t},\r\n\tdeepseascale: {\r\n\t\tinherit: true,\r\n\t\tonModifySpD(spd, pokemon) {\r\n\t\t\tif (pokemon.species.name === 'Clamperl') {\r\n\t\t\t\treturn this.chainModify(2);\r\n\t\t\t}\r\n\t\t},\r\n\t},\r\n\tdeepseatooth: {\r\n\t\tinherit: true,\r\n\t\tonModifySpA(spa, pokemon) {\r\n\t\t\tif (pokemon.species.name === 'Clamperl') {\r\n\t\t\t\treturn this.chainModify(2);\r\n\t\t\t}\r\n\t\t},\r\n\t},\r\n\tfastball: {\r\n\t\tinherit: true,\r\n\t\tisNonstandard: null,\r\n\t},\r\n\tflameorb: {\r\n\t\tinherit: true,\r\n\t\tonResidualOrder: 10,\r\n\t\tonResidualSubOrder: 20,\r\n\t},\r\n\tfocussash: {\r\n\t\tinherit: true,\r\n\t\tonDamage() { },\r\n\t\tonTryHit(target, source, move) {\r\n\t\t\tif (target !== source && target.hp === target.maxhp) {\r\n\t\t\t\ttarget.addVolatile('focussash');\r\n\t\t\t}\r\n\t\t},\r\n\t\tcondition: {\r\n\t\t\tduration: 1,\r\n\t\t\tonDamage(damage, target, source, effect) {\r\n\t\t\t\tif (effect && effect.effectType === 'Move' && damage >= target.hp) {\r\n\t\t\t\t\tthis.effectState.activated = true;\r\n\t\t\t\t\treturn target.hp - 1;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonAfterMoveSecondary(target) {\r\n\t\t\t\tif (this.effectState.activated) target.useItem();\r\n\t\t\t\ttarget.removeVolatile('focussash');\r\n\t\t\t},\r\n\t\t},\r\n\t},\r\n\tgriseousorb: {\r\n\t\tinherit: true,\r\n\t\tonBasePower(basePower, user, target, move) {\r\n\t\t\tif (user.species.num === 487 && (move.type === 'Ghost' || move.type === 'Dragon')) {\r\n\t\t\t\treturn this.chainModify(1.2);\r\n\t\t\t}\r\n\t\t},\r\n\t},\r\n\theavyball: {\r\n\t\tinherit: true,\r\n\t\tisNonstandard: null,\r\n\t},\r\n\tironball: {\r\n\t\tinherit: true,\r\n\t\tonEffectiveness() {},\r\n\t},\r\n\tkingsrock: {\r\n\t\tinherit: true,\r\n\t\tonModifyMove(move) {\r\n\t\t\tconst affectedByKingsRock = [\r\n\t\t\t\t'aerialace', 'aeroblast', 'aircutter', 'airslash', 'aquajet', 'aquatail', 'armthrust', 'assurance', 'attackorder', 'Line truncated
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,QAAuC;AAAA,EACnD,YAAY;AAAA,IACX,SAAS;AAAA,IACT,YAAY,WAAW,MAAM,QAAQ,MAAM;AAC1C,UAAI,QAAQ,KAAK,QAAQ,SAAS,aAAa,KAAK,SAAS,WAAW,KAAK,SAAS,WAAW;AAChG,eAAO,KAAK,YAAY,GAAG;AAAA,MAC5B;AAAA,IACD;AAAA,EACD;AAAA,EACA,SAAS;AAAA,IACR,SAAS;AAAA,IACT,UAAU,QAAQ,QAAQ,QAAQ,QAAQ;AACzC,YAAM,QAAQ,CAAC,SAAS,aAAa,WAAW,UAAU;AAC1D,UAAI,MAAM,SAAS,OAAO,EAAE,GAAG;AAC9B,eAAO,KAAK,MAAM,SAAS,GAAG;AAAA,MAC/B;AAAA,IACD;AAAA,EACD;AAAA,EACA,aAAa;AAAA,IACZ,SAAS;AAAA,IACT,iBAAiB;AAAA,IACjB,oBAAoB;AAAA,EACrB;AAAA,EACA,cAAc;AAAA,IACb,SAAS;AAAA,IACT,0BAA0B;AAAA,IAC1B,iBAAiB,UAAU;AAC1B,UAAI,OAAO,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AAAA,QAAe;AAAA,QAAW;AAAA,QAAY;AAAA,QAAW;AAAA,QAAY;AAAA,QAAa;AAAA,QAAe;AAAA,QAAgB;AAAA,QAAc;AAAA,QAAe;AAAA,QAAe;AAAA,QAAe;AAAA,QAAa;AAAA,QAAc;AAAA,QAAc;AAAA,QAAa;AAAA,QAAa;AAAA,QAAe;AAAA,QAAQ;AAAA,QAAS;AAAALine truncated
"names": []
}
File diff suppressed because it is too large. Load diff
+7
View File
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../../../../../data/mods/gen4/moves.ts"],
"sourcesContent": ["export const Moves: {[k: string]: ModdedMoveData} = {\r\n\tacupressure: {\r\n\t\tinherit: true,\r\n\t\tflags: {snatch: 1},\r\n\t\tonHit(target) {\r\n\t\t\tif (target.volatiles['substitute']) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tconst stats: BoostID[] = [];\r\n\t\t\tlet stat: BoostID;\r\n\t\t\tfor (stat in target.boosts) {\r\n\t\t\t\tif (target.boosts[stat] < 6) {\r\n\t\t\t\t\tstats.push(stat);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (stats.length) {\r\n\t\t\t\tconst randomStat = this.sample(stats);\r\n\t\t\t\tconst boost: SparseBoostsTable = {};\r\n\t\t\t\tboost[randomStat] = 2;\r\n\t\t\t\tthis.boost(boost);\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t},\r\n\t},\r\n\taromatherapy: {\r\n\t\tinherit: true,\r\n\t\tonHit(target, source) {\r\n\t\t\tthis.add('-cureteam', source, '[from] move: Aromatherapy');\r\n\t\t\tconst allies = [...target.side.pokemon, ...target.side.allySide?.pokemon || []];\r\n\t\t\tfor (const ally of allies) {\r\n\t\t\t\tally.clearStatus();\r\n\t\t\t}\r\n\t\t},\r\n\t},\r\n\taquaring: {\r\n\t\tinherit: true,\r\n\t\tflags: {},\r\n\t\tcondition: {\r\n\t\t\tonStart(pokemon) {\r\n\t\t\t\tthis.add('-start', pokemon, 'Aqua Ring');\r\n\t\t\t},\r\n\t\t\tonResidualOrder: 10,\r\n\t\t\tonResidualSubOrder: 2,\r\n\t\t\tonResidual(pokemon) {\r\n\t\t\t\tthis.heal(pokemon.baseMaxhp / 16);\r\n\t\t\t},\r\n\t\t},\r\n\t},\r\n\tbeatup: {\r\n\t\tinherit: true,\r\n\t\tbasePower: 10,\r\n\t\tbasePowerCallback(pokemon, target, move) {\r\n\t\t\tif (!move.allies?.length) return null;\r\n\t\t\treturn 10;\r\n\t\t},\r\n\t\tonModifyMove(move, pokemon) {\r\n\t\t\tpokemon.addVolatile('beatup');\r\n\t\t\tmove.type = '???';\r\n\t\t\tmove.category = 'Physical';\r\n\t\t\tmove.allies = pokemon.side.pokemon.filter(ally => !ally.fainted && !ally.status);\r\n\t\t\tmove.multihit = move.allies.length;\r\n\t\t},\r\n\t\tcondition: {\r\n\t\t\tduration: 1,\r\n\t\t\tonModifyAtkPriority: -101,\r\n\t\t\tonModifyAtk(atk, pokemon, defender, move) {\r\n\t\t\t\t// https://www.smogon.com/forums/posts/8992145/\r\n\t\t\t\t// this.add('-activate', pokemon, 'move: Beat Up', '[of] ' + move.allies![0].name);\r\n\t\t\t\tthis.event.modifier = 1;\r\n\t\t\t\treturn move.allies!.shift()!.species.baseStats.atk;\r\n\t\t\t},\r\n\t\t\tonFoeModifyDefPriority: -101,\r\n\t\t\tonFoeModifyDef(def, pokemon) {\r\n\t\t\t\tthis.event.modifier = 1;\r\n\t\t\t\treturn pokemon.species.baseStats.def;\r\n\t\t\t},\r\n\t\t},\r\n\t},\r\n\tbide: {\r\n\t\tinherit: true,\r\n\t\tcondition: {\r\n\t\t\tduration: 3,\r\n\t\t\tonLockMove: 'bide',\r\n\t\t\tonStart(pokemon) {\r\n\t\t\t\tthis.effectState.totalDamage = 0;\r\n\t\t\t\tthis.add('-start', pokemon, 'move: Bide');\r\n\t\t\t},\r\n\t\t\tonDamagePriority: -101,\r\n\t\t\tonDamage(damage, target, source, move) {\r\n\t\t\t\tif (!move || move.effectType !== 'Move' || !source) return;\r\n\t\t\t\tthis.effectState.totalDamage += damage;\r\n\t\t\t\tthis.effectState.lastDamageSource = source;\r\n\t\t\t},\r\n\t\t\tonAfterSetStatus(status, pokemon) {\r\n\t\t\t\tif (status.id === 'slp' || status.id === 'frz') {\r\n\t\t\t\t\tpokemon.removeVolatile('bide');\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonBeforeMove(pokemon, target, move) {\r\n\t\t\t\tif (this.effectState.duration === 1) {\r\n\t\t\t\t\tthis.add('-end', pokemon, 'move: Bide');\r\n\t\t\t\t\tif (!this.effectState.totalDamage) {\r\n\t\t\t\t\t\tthis.add('-fail', pokemon);\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttarget = this.effectState.lastDamageSource;\r\n\t\t\t\t\tif (!target) {\r\n\t\t\t\t\t\tthis.add('-fail', pokemon);\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!target.isActive) {\r\n\t\t\t\t\t\tconst possibleTarget = this.getRandomTarget(pokemon, this.dex.moves.get('pound'));\r\n\t\t\t\t\t\tif (!possibleTarget) {\r\n\t\t\t\t\t\t\tthis.add('-miss', pokemon);\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttarget = possibleTarget;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tconst moveData = {\r\n\t\t\t\t\t\tid: 'bide',\r\n\t\t\t\t\t\tname: \"Bide\",\r\n\t\t\t\t\t\taccuracy: true,\r\n\t\t\t\t\t\tdamage: this.effectState.totalDamage * 2,\r\n\t\t\t\t\t\tcategory: \"Physical\",\r\n\t\t\t\t\t\tpriority: 1,\r\n\t\t\t\t\t\tflags: {contact: 1, protect: 1},\r\n\t\t\t\t\t\tignoreImmunity: true,\r\n\t\t\t\t\t\teffectType: 'Move',\r\n\t\t\t\t\t\ttype: 'Normal',\r\n\t\t\t\t\t} as unknown as ActiveMove;\r\n\t\t\t\t\tthis.actions.tryMoveHit(target, pokemon, moveData);\r\n\t\t\t\t\tpokemon.removeVolatile('bide');\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\tthis.add('-activate', pokemon, 'move: Bide');\r\n\t\t\t},\r\n\t\t\tonMoveAborted(pokemon) {\r\n\t\t\t\tpokemon.removeVolatile('bide');\r\n\t\t\t},\r\n\t\t\tonEnd(pokemon) {\r\n\t\t\t\tthis.add('-end', pokemon, 'move: Bide', '[silent]');\r\n\t\t\t},\r\n\t\t},\r\n\t},\r\n\tbind: {\r\n\t\tinherit: true,\r\n\t\taccuracy: 75,\r\n\t},\r\n\tbonerush: {\r\n\t\tinherit: true,\r\n\t\taccuracy: 80,\r\n\t},\r\n\tbravebird: {\r\n\t\tinherit: true,\r\n\t\trecoil: [1, 3],\r\n\t},\r\n\tbLine truncated
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,QAAuC;AAAA,EACnD,aAAa;AAAA,IACZ,SAAS;AAAA,IACT,OAAO,EAAC,QAAQ,EAAC;AAAA,IACjB,MAAM,QAAQ;AACb,UAAI,OAAO,UAAU,YAAY,GAAG;AACnC,eAAO;AAAA,MACR;AACA,YAAM,QAAmB,CAAC;AAC1B,UAAI;AACJ,WAAK,QAAQ,OAAO,QAAQ;AAC3B,YAAI,OAAO,OAAO,IAAI,IAAI,GAAG;AAC5B,gBAAM,KAAK,IAAI;AAAA,QAChB;AAAA,MACD;AACA,UAAI,MAAM,QAAQ;AACjB,cAAM,aAAa,KAAK,OAAO,KAAK;AACpC,cAAM,QAA2B,CAAC;AAClC,cAAM,UAAU,IAAI;AACpB,aAAK,MAAM,KAAK;AAAA,MACjB,OAAO;AACN,eAAO;AAAA,MACR;AAAA,IACD;AAAA,EACD;AAAA,EACA,cAAc;AAAA,IACb,SAAS;AAAA,IACT,MA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D;AAAA,MACA,iBAAiB;AAAA,MACjB,oBAAoB;AAAA,MACpB,WAAW,SAAS;AACnB,aAAK,OAAO,QAAQ,YAAY,CAAC;AAAA,MAClC;AAAA,IACD;AAAA,IACA,MAAM;AAAA,EACP;AAAA,EACA,OAAO;AAAA,IACN,SAAS;AAAA,IACT,OAAO,EAAC,SAAS,GAAG,QAAQ,GAAG,WAAW,EAAC;AAAA,EAC5C;AAAA,EACALine truncated
"names": ["type"]
}
+51
View File
@@ -0,0 +1,51 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var pokedex_exports = {};
__export(pokedex_exports, {
Pokedex: () => Pokedex
});
module.exports = __toCommonJS(pokedex_exports);
const Pokedex = {
milotic: {
inherit: true,
evoType: "levelExtra",
evoCondition: "with high Beauty"
},
rotomheat: {
inherit: true,
types: ["Electric", "Ghost"]
},
rotomwash: {
inherit: true,
types: ["Electric", "Ghost"]
},
rotomfrost: {
inherit: true,
types: ["Electric", "Ghost"]
},
rotomfan: {
inherit: true,
types: ["Electric", "Ghost"]
},
rotommow: {
inherit: true,
types: ["Electric", "Ghost"]
}
};
//# sourceMappingURL=pokedex.js.map
+7
View File
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../../../../../data/mods/gen4/pokedex.ts"],
"sourcesContent": ["export const Pokedex: {[k: string]: ModdedSpeciesData} = {\r\n\tmilotic: {\r\n\t\tinherit: true,\r\n\t\tevoType: 'levelExtra',\r\n\t\tevoCondition: 'with high Beauty',\r\n\t},\r\n\trotomheat: {\r\n\t\tinherit: true,\r\n\t\ttypes: [\"Electric\", \"Ghost\"],\r\n\t},\r\n\trotomwash: {\r\n\t\tinherit: true,\r\n\t\ttypes: [\"Electric\", \"Ghost\"],\r\n\t},\r\n\trotomfrost: {\r\n\t\tinherit: true,\r\n\t\ttypes: [\"Electric\", \"Ghost\"],\r\n\t},\r\n\trotomfan: {\r\n\t\tinherit: true,\r\n\t\ttypes: [\"Electric\", \"Ghost\"],\r\n\t},\r\n\trotommow: {\r\n\t\tinherit: true,\r\n\t\ttypes: [\"Electric\", \"Ghost\"],\r\n\t},\r\n};\r\n"],
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,UAA4C;AAAA,EACxD,SAAS;AAAA,IACR,SAAS;AAAA,IACT,SAAS;AAAA,IACT,cAAc;AAAA,EACf;AAAA,EACA,WAAW;AAAA,IACV,SAAS;AAAA,IACT,OAAO,CAAC,YAAY,OAAO;AAAA,EAC5B;AAAA,EACA,WAAW;AAAA,IACV,SAAS;AAAA,IACT,OAAO,CAAC,YAAY,OAAO;AAAA,EAC5B;AAAA,EACA,YAAY;AAAA,IACX,SAAS;AAAA,IACT,OAAO,CAAC,YAAY,OAAO;AAAA,EAC5B;AAAA,EACA,UAAU;AAAA,IACT,SAAS;AAAA,IACT,OAAO,CAAC,YAAY,OAAO;AAAA,EAC5B;AAAA,EACA,UAAU;AAAA,IACT,SAAS;AAAA,IACT,OAAO,CAAC,YAAY,OAAO;AAAA,EAC5B;AACD;",
"names": []
}
File diff suppressed because it is too large. Load diff
+692
View File
@@ -0,0 +1,692 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var random_teams_exports = {};
__export(random_teams_exports, {
RandomGen4Teams: () => RandomGen4Teams,
default: () => random_teams_default
});
module.exports = __toCommonJS(random_teams_exports);
var import_random_teams = __toESM(require("../gen5/random-teams"));
var import_lib = require("../../../lib");
var import_dex = require("../../../sim/dex");
const SetupException = ["dracometeor", "overheat"];
const recoveryMoves = [
"healorder",
"milkdrink",
"moonlight",
"morningsun",
"painsplit",
"recover",
"rest",
"roost",
"slackoff",
"softboiled",
"synthesis",
"wish"
];
const defensiveStatusMoves = ["aromatherapy", "haze", "healbell", "roar", "whirlwind", "willowisp", "yawn"];
class RandomGen4Teams extends import_random_teams.default {
constructor(format, prng) {
super(format, prng);
this.randomData = require("./random-data.json");
this.moveEnforcementCheckers = {
Bug: (movePool, moves, abilities, types, counter) => movePool.includes("bugbuzz") || movePool.includes("megahorn"),
Dark: (movePool, moves, abilities, types, counter) => !counter.get("damage") && (!counter.get("Dark") || counter.get("Dark") < 2 && moves.has("pursuit") && movePool.includes("suckerpunch")),
Dragon: (movePool, moves, abilities, types, counter) => !counter.get("Dragon"),
Electric: (movePool, moves, abilities, types, counter) => !counter.get("Electric"),
Fighting: (movePool, moves, abilities, types, counter) => !counter.get("Fighting") && (!!counter.setupType || !counter.get("Status") || movePool.includes("closecombat") || movePool.includes("highjumpkick")),
Fire: (movePool, moves, abilities, types, counter) => !counter.get("Fire"),
Flying: (movePool, moves, abilities, types, counter) => !counter.get("Flying") && (counter.setupType !== "Special" && movePool.includes("bravebird") || abilities.has("Serene Grace") && movePool.includes("airslash")),
Grass: (movePool, moves, abilities, types, counter) => !counter.get("Grass") && ["leafblade", "leafstorm", "seedflare", "woodhammer"].some((m) => movePool.includes(m)),
Ground: (movePool, moves, abilities, types, counter) => !counter.get("Ground"),
Ice: (movePool, moves, abilities, types, counter) => !counter.get("Ice") && (!types.has("Water") || !counter.get("Water")),
Rock: (movePool, moves, abilities, types, counter) => !counter.get("Rock") && (movePool.includes("headsmash") || movePool.includes("stoneedge")),
Steel: (movePool, moves, abilities, types, counter) => !counter.get("Steel") && movePool.includes("meteormash"),
Water: (movePool, moves, abilities, types, counter) => !counter.get("Water") && (moves.has("raindance") || !types.has("Ice") || !counter.get("Ice")),
Adaptability: (movePool, moves, abilities, types, counter, species) => !counter.setupType && species.types.length > 1 && (!counter.get(species.types[0]) || !counter.get(species.types[1])),
Guts: (movePool, moves, abilities, types) => types.has("Normal") && movePool.includes("facade"),
"Slow Start": (movePool) => movePool.includes("substitute"),
protect: (movePool) => movePool.includes("wish"),
wish: (movePool) => movePool.includes("protect")
};
}
shouldCullMove(move, types, moves, abilities, counter, movePool, teamDetails, species, isLead) {
const restTalk = moves.has("rest") && moves.has("sleeptalk");
switch (move.id) {
case "batonpass":
return { cull: !counter.setupType && !counter.get("speedsetup") && !moves.has("substitute") };
case "eruption":
case "waterspout":
return { cull: counter.get("Physical") + counter.get("Special") < 4 };
case "focuspunch":
return { cull: !moves.has("substitute") || counter.damagingMoves.size < 2 || moves.has("hammerarm") };
case "lightscreen":
if (movePool.length > 1) {
const screen = movePool.indexOf("reflect");
if (screen >= 0) {
this.fastPop(movePool, screen);
return { cull: true };
}
}
return { cull: false };
case "raindance":
return { cull: abilities.has("Hydration") ? !moves.has("rest") : counter.get("Physical") + counter.get("Special") < 2 };
case "reflect":
if (movePool.length > 1) {
const screen = movePool.indexOf("lightscreen");
if (screen >= 0) {
this.fastPop(movePool, screen);
return { cull: true };
}
}
return { cull: false };
case "refresh":
return { cull: !(moves.has("calmmind") && (moves.has("recover") || moves.has("roost"))) };
case "rest":
return { cull: movePool.includes("sleeptalk") || abilities.has("Hydration") && !moves.has("raindance") || moves.has("reflect") && moves.has("lightscreen") };
case "sleeptalk":
if (movePool.length > 1) {
const rest = movePool.indexOf("rest");
if (rest >= 0)
this.fastPop(movePool, rest);
}
return { cull: !moves.has("rest") };
case "sunnyday":
return { cull: !moves.has("solarbeam") };
case "weatherball":
return { cull: !moves.has("raindance") && !moves.has("sunnyday") };
case "bellydrum":
case "bulkup":
case "curse":
case "dragondance":
case "swordsdance":
const notEnoughPhysicalMoves = counter.get("Physical") + counter.get("physicalpool") < 2 && !moves.has("batonpass") && (!moves.has("rest") || !moves.has("sleeptalk"));
const badPhysicalMoveset = counter.setupType !== "Physical" || counter.get("physicalsetup") > 1;
return { cull: moves.has("sunnyday") || notEnoughPhysicalMoves || badPhysicalMoveset, isSetup: true };
case "calmmind":
case "nastyplot":
case "tailglow":
const notEnoughSpecialMoves = counter.get("Special") + counter.get("specialpool") < 2 && !moves.has("batonpass") && (!moves.has("rest") || !moves.has("sleeptalk"));
const badSpecialMoveset = counter.setupType !== "Special" || counter.get("specialsetup") > 1;
return { cull: notEnoughSpecialMoves || badSpecialMoveset, isSetup: true };
case "agility":
case "rockpolish":
return { cull: restTalk || counter.damagingMoves.size < 2 && !moves.has("batonpass"), isSetup: !counter.setupType };
case "destinybond":
return { cull: !!counter.setupType || moves.has("explosion") };
case "explosion":
case "selfdestruct":
return { cull: counter.setupType === "Special" || Array.from(moves).some((id) => recoveryMoves.includes(id) || defensiveStatusMoves.includes(id)) || ["batonpass", "protect", "substitute"].some((m) => moves.has(m)) };
case "foresight":
case "roar":
case "whirlwind":
return { cull: !!counter.setupType && !abilities.has("Speed Boost") };
case "healingwish":
case "lunardance":
return { cull: !!counter.setupType || moves.has("rest") || moves.has("substitute") };
case "protect":
return { cull: ["rest", "softboiled"].some((m) => moves.has(m)) || !["Guts", "Quick Feet", "Speed Boost"].some((abil) => abilities.has(abil)) && !["toxic", "wish"].some((m) => moves.has(m)) };
case "wish":
return { cull: !["batonpass", "ironhead", "moonlight", "protect", "softboiled", "uturn"].some((m) => moves.has(m)) && !movePool.includes("protect") };
case "moonlight":
return { cull: moves.has("wish") && (moves.has("protect") || movePool.includes("protect")) };
case "rapidspin":
return { cull: !!teamDetails.rapidSpin || !!counter.setupType && counter.get("Physical") + counter.get("Special") < 2 };
case "fakeout":
return { cull: !!counter.setupType || !!counter.get("speedsetup") || moves.has("substitute") };
case "spikes":
return { cull: !!counter.setupType || !!counter.get("speedsetup") || moves.has("substitute") };
case "stealthrock":
return { cull: !!counter.setupType || !!counter.get("speedsetup") || moves.has("rest") || moves.has("substitute") || !!teamDetails.stealthRock };
case "switcheroo":
case "trick":
return { cull: counter.get("Physical") + counter.get("Special") < 3 || !!counter.setupType || ["fakeout", "lightscreen", "reflect", "suckerpunch", "trickroom"].some((m) => moves.has(m)) };
case "toxic":
case "toxicspikes":
return { cull: !!counter.setupType || !!counter.get("speedsetup") || !!teamDetails.toxicSpikes || moves.has("willowisp") };
case "trickroom":
return { cull: !!counter.setupType || !!counter.get("speedsetup") || counter.damagingMoves.size < 2 || moves.has("lightscreen") || moves.has("reflect") || restTalk };
case "uturn":
return { cull: abilities.has("Speed Boost") && moves.has("protect") || !!counter.setupType || !!counter.get("speedsetup") || moves.has("batonpass") || moves.has("substitute") };
case "bodyslam":
case "slash":
return { cull: moves.has("facade") || moves.has("return") };
case "bugbite":
return { cull: moves.has("uturn") };
case "doubleedge":
return { cull: ["bodyslam", "facade", "return"].some((m) => moves.has(m)) };
case "endeavor":
return { cull: !isLead };
case "facade":
return { cull: moves.has("substitute") };
case "headbutt":
return { cull: !moves.has("bodyslam") && !moves.has("thunderwave") };
case "swift":
return { cull: counter.setupType !== "Special" };
case "quickattack":
return { cull: moves.has("thunderwave") };
case "firepunch":
case "flamethrower":
return { cull: moves.has("fireblast") || moves.has("overheat") && !counter.setupType };
case "flareblitz":
return { cull: moves.has("superpower") && !!counter.get("speedsetup") };
case "lavaplume":
case "fireblast":
if (move.id === "fireblast" && moves.has("lavaplume") && !counter.get("speedsetup"))
return { cull: true };
if (move.id === "lavaplume" && moves.has("fireblast") && counter.get("speedsetup"))
return { cull: true };
if (moves.has("flareblitz") && counter.setupType !== "Special" && (!moves.has("superpower") || !counter.get("speedsetup")))
return { cull: true };
break;
case "overheat":
return { cull: counter.setupType === "Special" || ["batonpass", "fireblast", "flareblitz"].some((m) => moves.has(m)) };
case "aquajet":
return { cull: moves.has("dragondance") || moves.has("waterfall") && counter.get("Physical") < 3 };
case "hydropump":
return { cull: moves.has("surf") };
case "waterfall":
return { cull: moves.has("aquatail") || counter.setupType !== "Physical" && (moves.has("hydropump") || moves.has("surf")) };
case "chargebeam":
return { cull: moves.has("thunderbolt") && counter.get("Special") < 3 };
case "discharge":
return { cull: moves.has("thunderbolt") || moves.has("shadowball") };
case "energyball":
return { cull: moves.has("woodhammer") || moves.has("sunnyday") && moves.has("solarbeam") || moves.has("leafstorm") && counter.get("Physical") + counter.get("Special") < 4 };
case "grassknot":
case "leafblade":
case "seedbomb":
return { cull: moves.has("woodhammer") || moves.has("sunnyday") && moves.has("solarbeam") };
case "leafstorm":
return { cull: !!counter.setupType || moves.has("batonpass") || moves.has("powerwhip") || moves.has("leafblade") || moves.has("sunnyday") && moves.has("solarbeam") };
case "solarbeam":
return { cull: counter.setupType === "Physical" || !moves.has("sunnyday") };
case "icepunch":
return { cull: !counter.setupType && moves.has("icebeam") };
case "aurasphere":
case "drainpunch":
case "focusblast":
return { cull: moves.has("closecombat") && counter.setupType !== "Special" };
case "brickbreak":
case "closecombat":
case "crosschop":
case "lowkick":
return { cull: moves.has("substitute") && moves.has("focuspunch") };
case "machpunch":
return { cull: counter.damagingMoves.size <= counter.get("Fighting") };
case "seismictoss":
return { cull: moves.has("nightshade") || counter.get("Physical") + counter.get("Special") >= 1 };
case "superpower":
return { cull: moves.has("dragondance") || !!counter.get("speedsetup") && !types.has("Fighting") };
case "gunkshot":
return { cull: moves.has("poisonjab") };
case "earthpower":
return { cull: moves.has("earthquake") };
case "airslash":
return { cull: !counter.setupType && moves.has("bravebird") };
case "zenheadbutt":
return { cull: moves.has("psychocut") };
case "rockblast":
case "rockslide":
return { cull: moves.has("stoneedge") };
case "shadowclaw":
case "shadowsneak":
return { cull: moves.has("suckerpunch") && !types.has("Ghost") };
case "dracometeor":
return { cull: moves.has("calmmind") || restTalk || !!counter.setupType && counter.get("stab") < 2 };
case "dragonclaw":
return { cull: moves.has("outrage") };
case "dragonpulse":
return { cull: moves.has("dracometeor") || moves.has("outrage") };
case "crunch":
case "nightslash":
return { cull: moves.has("suckerpunch") && !types.has("Dark") };
case "pursuit":
return { cull: !!counter.setupType || moves.has("payback") };
case "flashcannon":
return { cull: (moves.has("ironhead") || movePool.includes("ironhead")) && counter.setupType !== "Special" };
case "encore":
return { cull: ["roar", "taunt", "whirlwind"].some((m) => moves.has(m)) || restTalk };
case "haze":
case "taunt":
return { cull: restTalk };
case "healbell":
return { cull: moves.has("reflect") && moves.has("lightscreen") };
case "leechseed":
case "painsplit":
return { cull: !!counter.setupType || !!counter.get("speedsetup") || moves.has("rest") };
case "recover":
case "slackoff":
return { cull: restTalk };
case "stunspore":
return { cull: !!counter.setupType || moves.has("toxic") || movePool.includes("sleeppowder") || movePool.includes("spore") };
case "substitute":
return { cull: ["lightscreen", "pursuit", "rapidspin", "reflect", "rest", "taunt"].some((m) => moves.has(m)) };
case "thunderwave":
return { cull: !!counter.setupType || moves.has("toxic") || moves.has("trickroom") || moves.has("bodyslam") && abilities.has("Serene Grace") };
case "yawn":
return { cull: moves.has("thunderwave") || moves.has("toxic") };
}
return { cull: false };
}
shouldCullAbility(ability, types, moves, abilities, counter, movePool, teamDetails, species) {
switch (ability) {
case "Anger Point":
case "Ice Body":
case "Steadfast":
case "Unaware":
return true;
case "Blaze":
return !counter.get("Fire");
case "Chlorophyll":
return !moves.has("sunnyday") && !teamDetails.sun;
case "Compound Eyes":
case "No Guard":
return !counter.get("inaccurate");
case "Early Bird":
return !moves.has("rest");
case "Gluttony":
return !moves.has("bellydrum");
case "Hustle":
return counter.get("Physical") < 2;
case "Mold Breaker":
return !moves.has("earthquake");
case "Overgrow":
return !counter.get("Grass");
case "Reckless":
case "Rock Head":
return !counter.get("recoil");
case "Sand Veil":
return !teamDetails.sand;
case "Serene Grace":
return !counter.get("serenegrace") || species.id === "blissey";
case "Simple":
return !counter.setupType && !moves.has("cosmicpower");
case "Skill Link":
return !counter.get("skilllink");
case "Snow Cloak":
return !teamDetails.hail;
case "Solar Power":
return !counter.get("Special") || !moves.has("sunnyday") && !teamDetails.sun;
case "Speed Boost":
return moves.has("uturn");
case "Swift Swim":
return !moves.has("raindance") && !teamDetails.rain;
case "Swarm":
return !counter.get("Bug");
case "Synchronize":
return counter.get("Status") < 2;
case "Technician":
return !counter.get("technician") || moves.has("toxic");
case "Thick Fat":
return (moves.has("facade") || moves.has("fakeout")) && abilities.has("Guts");
case "Tinted Lens":
return moves.has("protect");
case "Torrent":
return !counter.get("Water");
}
return false;
}
getHighPriorityItem(ability, types, moves, counter, teamDetails, species, isLead) {
if (species.requiredItem)
return species.requiredItem;
if (species.requiredItems)
return this.sample(species.requiredItems);
if (species.name === "Ditto")
return this.sample(["Salac Berry", "Sitrus Berry"]);
if (species.name === "Farfetch\u2019d" && counter.get("Physical") < 4)
return "Stick";
if (species.name === "Marowak")
return "Thick Club";
if (species.name === "Pikachu")
return "Light Ball";
if (species.name === "Shedinja" || species.name === "Smeargle")
return "Focus Sash";
if (species.name === "Unown")
return "Choice Specs";
if (species.name === "Wobbuffet") {
return moves.has("destinybond") ? "Custap Berry" : this.sample(["Leftovers", "Sitrus Berry"]);
}
if (moves.has("switcheroo") || moves.has("trick")) {
if (species.baseStats.spe >= 60 && species.baseStats.spe <= 108 && !counter.get("priority") && this.randomChance(2, 3)) {
return "Choice Scarf";
} else {
return counter.get("Physical") > counter.get("Special") ? "Choice Band" : "Choice Specs";
}
}
if (moves.has("bellydrum"))
return "Sitrus Berry";
if (ability === "Magic Guard" || ability === "Speed Boost" && counter.get("Status") < 2)
return "Life Orb";
if (ability === "Poison Heal" || ability === "Toxic Boost")
return "Toxic Orb";
if (moves.has("rest") && !moves.has("sleeptalk") && ability !== "Natural Cure" && ability !== "Shed Skin") {
return moves.has("raindance") && ability === "Hydration" ? "Damp Rock" : "Chesto Berry";
}
if (moves.has("raindance") && ability === "Swift Swim" && counter.get("Status") < 2)
return "Life Orb";
if (moves.has("sunnyday"))
return ability === "Chlorophyll" && counter.get("Status") < 2 ? "Life Orb" : "Heat Rock";
if (moves.has("lightscreen") && moves.has("reflect"))
return "Light Clay";
if ((ability === "Guts" || ability === "Quick Feet") && moves.has("facade"))
return "Toxic Orb";
if (ability === "Unburden")
return "Sitrus Berry";
if (species.baseStats.hp + species.baseStats.def + species.baseStats.spd <= 150) {
return isLead ? "Focus Sash" : "Life Orb";
}
if (moves.has("endeavor"))
return "Focus Sash";
}
getMediumPriorityItem(ability, moves, counter, species, isDoubles, isLead) {
if (ability === "Slow Start" || ["curse", "leechseed", "protect", "roar", "sleeptalk", "whirlwind"].some((m) => moves.has(m)) || ability === "Serene Grace" && ["bodyslam", "headbutt", "ironhead"].some((m) => moves.has(m))) {
return "Leftovers";
}
if (counter.get("Physical") >= 4 && !moves.has("fakeout") && !moves.has("rapidspin") && !moves.has("suckerpunch")) {
return species.baseStats.spe >= 60 && species.baseStats.spe <= 108 && !counter.get("priority") && !moves.has("bodyslam") && this.randomChance(2, 3) ? "Choice Scarf" : "Choice Band";
}
if ((counter.get("Special") >= 4 || counter.get("Special") >= 3 && ["batonpass", "uturn", "waterspout", "selfdestruct"].some((m) => moves.has(m))) && !moves.has("chargebeam")) {
return species.baseStats.spe >= 60 && species.baseStats.spe <= 108 && ability !== "Speed Boost" && !counter.get("priority") && this.randomChance(2, 3) ? "Choice Scarf" : "Choice Specs";
}
if (moves.has("outrage") && counter.setupType)
return "Lum Berry";
if (moves.has("substitute")) {
return counter.damagingMoves.size < 2 || !counter.get("drain") && (counter.damagingMoves.size < 3 || species.baseStats.hp >= 60 || species.baseStats.def + species.baseStats.spd >= 180) ? "Leftovers" : "Life Orb";
}
if (ability === "Guts")
return "Toxic Orb";
if (isLead && !counter.get("recoil") && !Array.from(moves).some((id) => !!recoveryMoves.includes(id)) && species.baseStats.hp + species.baseStats.def + species.baseStats.spd < 225) {
return "Focus Sash";
}
if (counter.get("Dark") >= 3)
return "Black Glasses";
if (counter.damagingMoves.size >= 4) {
return counter.get("Normal") || counter.get("Dragon") > 1 || moves.has("chargebeam") || moves.has("suckerpunch") ? "Life Orb" : "Expert Belt";
}
if (counter.damagingMoves.size >= 3 && !moves.has("superfang") && !moves.has("metalburst")) {
const totalBulk = species.baseStats.hp + species.baseStats.def + species.baseStats.spd;
return counter.get("speedsetup") || counter.get("priority") || moves.has("dragondance") || moves.has("trickroom") || totalBulk < 235 || species.baseStats.spe >= 70 && (totalBulk < 260 || !!counter.get("recovery") && totalBulk < 285) ? "Life Orb" : "Leftovers";
}
}
getLowPriorityItem(ability, types, moves, abilities, counter, teamDetails, species) {
if (types.has("Poison"))
return "Black Sludge";
if (this.dex.getEffectiveness("Rock", species) >= 1 || moves.has("roar"))
return "Leftovers";
if (counter.get("Status") <= 1 && ["metalburst", "rapidspin", "superfang"].every((m) => !moves.has(m)))
return "Life Orb";
return "Leftovers";
}
randomSet(species, teamDetails = {}, isLead = false) {
species = this.dex.species.get(species);
let forme = species.name;
if (typeof species.battleOnly === "string")
forme = species.battleOnly;
if (species.cosmeticFormes) {
forme = this.sample([species.name].concat(species.cosmeticFormes));
}
const data = this.randomData[species.id];
const movePool = (data.moves || Object.keys(this.dex.species.getLearnset(species.id))).slice();
const rejectedPool = [];
const moves = /* @__PURE__ */ new Set();
let ability = "";
let item;
const evs = { hp: 85, atk: 85, def: 85, spa: 85, spd: 85, spe: 85 };
const ivs = { hp: 31, atk: 31, def: 31, spa: 31, spd: 31, spe: 31 };
const types = new Set(species.types);
const abilities = new Set(Object.values(species.abilities));
let availableHP = 0;
for (const setMoveid of movePool) {
if (setMoveid.startsWith("hiddenpower"))
availableHP++;
}
let counter;
let hasHiddenPower = false;
do {
while (moves.size < this.maxMoveCount && movePool.length) {
const moveid = this.sampleNoReplace(movePool);
if (moveid.startsWith("hiddenpower")) {
availableHP--;
if (hasHiddenPower)
continue;
hasHiddenPower = true;
}
moves.add(moveid);
}
while (moves.size < this.maxMoveCount && rejectedPool.length) {
const moveid = this.sampleNoReplace(rejectedPool);
if (moveid.startsWith("hiddenpower")) {
if (hasHiddenPower)
continue;
hasHiddenPower = true;
}
moves.add(moveid);
}
counter = this.queryMoves(moves, species.types, abilities, movePool);
if (types.has("Dark") && moves.has("suckerpunch") && species.types.length === 1) {
counter.add("stab");
}
for (const moveid of moves) {
const move = this.dex.moves.get(moveid);
let { cull, isSetup } = this.shouldCullMove(
move,
types,
moves,
abilities,
counter,
movePool,
teamDetails,
species,
isLead
);
if (move.priority !== 0 && !!counter.get("speedsetup"))
cull = true;
if (move.category === "Physical" && counter.setupType === "Special" || move.category === "Special" && counter.setupType === "Physical") {
if (!SetupException.includes(moveid) && (!types.has(move.type) || counter.get("stab") > 1 || counter.get(move.category) < 2)) {
cull = true;
}
}
if (counter.setupType && !isSetup && move.category !== counter.setupType && counter.get(counter.setupType) < 2 && !moves.has("batonpass")) {
if (moveid !== "rest" && moveid !== "sleeptalk" && !(recoveryMoves.includes(moveid) && (moves.has("healbell") || moves.has("refresh"))) && !((moveid === "healbell" || moveid === "refresh") && Array.from(moves).some((id) => recoveryMoves.includes(id))) && // Reject Status moves only if there is nothing else to reject
(move.category !== "Status" || counter.get(counter.setupType) + counter.get("Status") > 3 && counter.get("physicalsetup") + counter.get("specialsetup") < 2)) {
cull = true;
}
}
if (moveid === "hiddenpower" && counter.setupType === "Special" && species.types.length > 1 && counter.get("Special") <= 2 && !types.has(move.type) && !counter.get("Physical") && counter.get("specialpool") && !(types.has("Ghost") && move.type === "Fighting" || types.has("Electric") && move.type === "Ice")) {
cull = true;
}
if (!Array.from(moves).some((id) => recoveryMoves.includes(id)) && movePool.some((id) => recoveryMoves.includes(id)) && (defensiveStatusMoves.includes(moveid) || moveid === "toxic" && (counter.get("Status") > 1 && !moves.has("protect") || counter.get("Status") > 2))) {
cull = true;
}
const runEnforcementChecker = (checkerName) => {
if (!this.moveEnforcementCheckers[checkerName])
return false;
return this.moveEnforcementCheckers[checkerName](
movePool,
moves,
abilities,
types,
counter,
species,
teamDetails
);
};
const moveIsRejectable = !move.weather && !move.damage && (move.category !== "Status" || !move.flags.heal) && (move.category === "Status" || !types.has(move.type) || move.basePower && move.basePower < 40 && !move.multihit) && // These moves cannot be rejected in favor of a forced move
!["judgment", "lightscreen", "reflect", "sleeptalk"].includes(moveid) && (counter.get("physicalsetup") + counter.get("specialsetup") < 2 && (!counter.setupType || counter.setupType === "Mixed" || move.category !== counter.setupType && move.category !== "Status" || counter.get(counter.setupType) + counter.get("Status") > 3));
if (!cull && !isSetup && moveIsRejectable) {
const canRollForcedMoves = (
// These moves should always be rolled
movePool.includes("spore") || !Array.from(moves).some((id) => recoveryMoves.includes(id)) && (movePool.includes("softboiled") && !moves.has("explosion") || species.baseSpecies === "Arceus" && movePool.includes("recover"))
);
const requiresStab = !counter.get("stab") && !counter.get("damage") && (species.types.length > 1 || species.types[0] !== "Normal" && species.types[0] !== "Psychic" || !moves.has("icebeam") || species.baseStats.spa >= species.baseStats.spd);
if (canRollForcedMoves || requiresStab || species.requiredMove && movePool.includes((0, import_dex.toID)(species.requiredMove)) || counter.get("defensesetup") && !counter.get("recovery") && !moves.has("rest")) {
cull = true;
} else {
for (const type of types) {
if (runEnforcementChecker(type))
cull = true;
}
for (const abil of abilities) {
if (runEnforcementChecker(abil))
cull = true;
}
for (const m of moves) {
if (runEnforcementChecker(m))
cull = true;
}
}
}
if (moveid === "rest" && cull) {
const sleeptalk = movePool.indexOf("sleeptalk");
if (sleeptalk >= 0) {
if (movePool.length < 2) {
cull = false;
} else {
this.fastPop(movePool, sleeptalk);
}
}
}
if (cull && (movePool.length - availableHP || availableHP && (moveid.startsWith("hiddenpower") || !hasHiddenPower))) {
if (move.category !== "Status" && (!moveid.startsWith("hiddenpower") || !availableHP))
rejectedPool.push(moveid);
moves.delete(moveid);
if (moveid.startsWith("hiddenpower"))
hasHiddenPower = false;
break;
}
if (cull && rejectedPool.length) {
moves.delete(moveid);
if (moveid.startsWith("hiddenpower"))
hasHiddenPower = false;
break;
}
}
} while (moves.size < this.maxMoveCount && (movePool.length || rejectedPool.length));
if (hasHiddenPower) {
let hpType;
for (const move of moves) {
if (move.startsWith("hiddenpower")) {
hpType = move.substr(11);
break;
}
}
if (!hpType)
throw new Error(`hasHiddenPower is true, but no Hidden Power move was found.`);
const HPivs = this.dex.types.get(hpType).HPivs;
let iv;
for (iv in HPivs) {
ivs[iv] = HPivs[iv];
}
}
const abilityData = Array.from(abilities).map((a) => this.dex.abilities.get(a));
import_lib.Utils.sortBy(abilityData, (abil) => -abil.rating);
let ability0 = abilityData[0];
let ability1 = abilityData[1];
if (abilityData[1]) {
if (ability0.rating <= ability1.rating && this.randomChance(1, 2)) {
[ability0, ability1] = [ability1, ability0];
} else if (ability0.rating - 0.6 <= ability1.rating && this.randomChance(2, 3)) {
[ability0, ability1] = [ability1, ability0];
}
ability = ability0.name;
while (this.shouldCullAbility(ability, types, moves, abilities, counter, movePool, teamDetails, species)) {
if (ability === ability0.name && ability1.rating >= 1) {
ability = ability1.name;
} else {
ability = abilityData[0].name;
break;
}
}
if (abilities.has("Hydration") && moves.has("raindance") && moves.has("rest")) {
ability = "Hydration";
} else if (abilities.has("Swift Swim") && moves.has("raindance")) {
ability = "Swift Swim";
} else if (abilities.has("Technician") && moves.has("machpunch") && types.has("Fighting") && counter.get("stab") < 2) {
ability = "Technician";
}
} else {
ability = ability0.name;
}
item = this.getHighPriorityItem(ability, types, moves, counter, teamDetails, species, isLead);
if (item === void 0)
item = this.getMediumPriorityItem(ability, moves, counter, species, false, isLead);
if (item === void 0) {
item = this.getLowPriorityItem(ability, types, moves, abilities, counter, teamDetails, species);
}
if (item === "Leftovers" && types.has("Poison")) {
item = "Black Sludge";
}
const level = this.adjustLevel || data.level || (species.nfe ? 90 : 80);
let hp = Math.floor(
Math.floor(
2 * species.baseStats.hp + (ivs.hp || 31) + Math.floor(evs.hp / 4) + 100
) * level / 100 + 10
);
if (moves.has("substitute") && item === "Sitrus Berry") {
while (hp % 4 > 0) {
evs.hp -= 4;
hp = Math.floor(
Math.floor(
2 * species.baseStats.hp + (ivs.hp || 31) + Math.floor(evs.hp / 4) + 100
) * level / 100 + 10
);
}
} else if (moves.has("bellydrum") && item === "Sitrus Berry") {
if (hp % 2 > 0)
evs.hp -= 4;
} else {
const srWeakness = this.dex.getEffectiveness("Rock", species);
if (srWeakness > 0 && hp % (4 / srWeakness) === 0)
evs.hp -= 4;
}
if (!counter.get("Physical") && !moves.has("transform")) {
evs.atk = 0;
ivs.atk = hasHiddenPower ? (ivs.atk || 31) - 28 : 0;
}
if (["gyroball", "metalburst", "trickroom"].some((m) => moves.has(m))) {
evs.spe = 0;
ivs.spe = hasHiddenPower ? (ivs.spe || 31) - 28 : 0;
}
return {
name: species.baseSpecies,
species: forme,
gender: species.gender,
shiny: this.randomChance(1, 1024),
moves: Array.from(moves),
ability,
evs,
ivs,
item,
level
};
}
}
var random_teams_default = RandomGen4Teams;
//# sourceMappingURL=random-teams.js.map
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../../../../../data/mods/gen4/random-teams.ts"],
"sourcesContent": ["import RandomGen5Teams from '../gen5/random-teams';\r\nimport {Utils} from '../../../lib';\r\nimport {toID} from '../../../sim/dex';\r\nimport {PRNG} from '../../../sim';\r\nimport type {MoveCounter, OldRandomBattleSpecies} from '../gen8/random-teams';\r\n\r\n\r\n// These moves can be used even if we aren't setting up to use them:\r\nconst SetupException = ['dracometeor', 'overheat'];\r\n\r\n// Give recovery moves priority over certain other defensive status moves\r\nconst recoveryMoves = [\r\n\t'healorder', 'milkdrink', 'moonlight', 'morningsun', 'painsplit', 'recover', 'rest', 'roost',\r\n\t'slackoff', 'softboiled', 'synthesis', 'wish',\r\n];\r\nconst defensiveStatusMoves = ['aromatherapy', 'haze', 'healbell', 'roar', 'whirlwind', 'willowisp', 'yawn'];\r\nexport class RandomGen4Teams extends RandomGen5Teams {\r\n\trandomData: {[species: string]: OldRandomBattleSpecies} = require('./random-data.json');\r\n\r\n\tconstructor(format: string | Format, prng: PRNG | PRNGSeed | null) {\r\n\t\tsuper(format, prng);\r\n\t\tthis.moveEnforcementCheckers = {\r\n\t\t\tBug: (movePool, moves, abilities, types, counter) => (\r\n\t\t\t\t(movePool.includes('bugbuzz') || movePool.includes('megahorn'))\r\n\t\t\t),\r\n\t\t\tDark: (movePool, moves, abilities, types, counter) => (\r\n\t\t\t\t!counter.get('damage') &&\r\n\t\t\t\t(!counter.get('Dark') || (counter.get('Dark') < 2 && moves.has('pursuit') && movePool.includes('suckerpunch')))),\r\n\t\t\tDragon: (movePool, moves, abilities, types, counter) => !counter.get('Dragon'),\r\n\t\t\tElectric: (movePool, moves, abilities, types, counter) => !counter.get('Electric'),\r\n\t\t\tFighting: (movePool, moves, abilities, types, counter) => (\r\n\t\t\t\t!counter.get('Fighting') &&\r\n\t\t\t\t(!!counter.setupType || !counter.get('Status') || movePool.includes('closecombat') || movePool.includes('highjumpkick'))\r\n\t\t\t),\r\n\t\t\tFire: (movePool, moves, abilities, types, counter) => !counter.get('Fire'),\r\n\t\t\tFlying: (movePool, moves, abilities, types, counter) => !counter.get('Flying') && (\r\n\t\t\t\t(counter.setupType !== 'Special' && movePool.includes('bravebird')) ||\r\n\t\t\t\t(abilities.has('Serene Grace') && movePool.includes('airslash'))\r\n\t\t\t),\r\n\t\t\tGrass: (movePool, moves, abilities, types, counter) => (\r\n\t\t\t\t!counter.get('Grass') &&\r\n\t\t\t\t['leafblade', 'leafstorm', 'seedflare', 'woodhammer'].some(m => movePool.includes(m))\r\n\t\t\t),\r\n\t\t\tGround: (movePool, moves, abilities, types, counter) => !counter.get('Ground'),\r\n\t\t\tIce: (movePool, moves, abilities, types, counter) => (\r\n\t\t\t\t!counter.get('Ice') && (!types.has('Water') || !counter.get('Water'))\r\n\t\t\t),\r\n\t\t\tRock: (movePool, moves, abilities, types, counter) => (\r\n\t\t\t\t!counter.get('Rock') && (movePool.includes('headsmash') || movePool.includes('stoneedge'))\r\n\t\t\t),\r\n\t\t\tSteel: (movePool, moves, abilities, types, counter) => !counter.get('Steel') && movePool.includes('meteormash'),\r\n\t\t\tWater: (movePool, moves, abilities, types, counter) => (\r\n\t\t\t\t!counter.get('Water') && (moves.has('raindance') || !types.has('Ice') || !counter.get('Ice'))\r\n\t\t\t),\r\n\t\t\tAdaptability: (movePool, moves, abilities, types, counter, species) => (\r\n\t\t\t\t!counter.setupType &&\r\n\t\t\t\tspecies.types.length > 1 &&\r\n\t\t\t\t(!counter.get(species.types[0]) || !counter.get(species.types[1]))\r\n\t\t\t),\r\n\t\t\tGuts: (movePool, moves, abilities, types) => types.has('Normal') && movePool.includes('facade'),\r\n\t\t\t'Slow Start': movePool => movePool.includes('substitute'),\r\n\t\t\tprotect: movePool => movePool.includes('wish'),\r\n\t\t\twish: movePool => movePool.includes('protect'),\r\n\t\t};\r\n\t}\r\n\tshouldCullMove(\r\n\t\tmove: Move,\r\n\t\ttypes: Set<string>,\r\n\t\tmoves: Set<string>,\r\n\t\tabilities: Set<string>,\r\n\t\tcounter: MoveCounter,\r\n\t\tmovePool: string[],\r\n\t\tteamDetails: RandomTeamsTypes.TeamDetails,\r\n\t\tspecies: Species,\r\n\t\tisLead: boolean,\r\n\t): {cull: boolean, isSetup?: boolean} {\r\n\t\tconst restTalk = moves.has('rest') && moves.has('sleeptalk');\r\n\r\n\t\tswitch (move.id) {\r\n\t\t// Not very useful without their supporting moves\r\n\t\tcase 'batonpass':\r\n\t\t\treturn {cull: !counter.setupType && !counter.get('speedsetup') && !moves.has('substitute')};\r\n\t\tcase 'eruption': case 'waterspout':\r\n\t\t\treturn {cull: counter.get('Physical') + counter.get('Special') < 4};\r\n\t\tcase 'focuspunch':\r\n\t\t\treturn {cull: !moves.has('substitute') || counter.damagingMoves.size < 2 || moves.has('hammerarm')};\r\n\t\tcase 'lightscreen':\r\n\t\t\tif (movePool.length > 1) {\r\n\t\t\t\tconst screen = movePool.indexOf('reflect');\r\n\t\t\t\tif (screen >= 0) {\r\n\t\t\t\t\tthis.fastPop(movePool, screen);\r\n\t\t\t\t\treturn {cull: true};\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn {cull: false};\r\n\t\tcase 'raindance':\r\n\t\t\treturn {cull: abilities.has('Hydration') ? !moves.has('rest') : counter.get('PhysicLine truncated
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAA4B;AAC5B,iBAAoB;AACpB,iBAAmB;AAMnB,MAAM,iBAAiB,CAAC,eAAe,UAAU;AAGjD,MAAM,gBAAgB;AAAA,EACrB;AAAA,EAAa;AAAA,EAAa;AAAA,EAAa;AAAA,EAAc;AAAA,EAAa;AAAA,EAAW;AAAA,EAAQ;AAAA,EACrF;AAAA,EAAY;AAAA,EAAc;AAAA,EAAa;AACxC;AACA,MAAM,uBAAuB,CAAC,gBAAgB,QAAQ,YAAY,QAAQ,aAAa,aAAa,MAAM;AACnG,MAAM,wBAAwB,oBAAAA,QAAgB;AAAA,EAGpD,YAAY,QAAyB,MAA8B;AAClE,UAAM,QAAQ,IAAI;AAHnB,sBAA0D,QAAQ,oBAAoB;AAIrF,SAAK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AACtB,eAAO,EAAC,MACP,QAAQ,cAAc,aACtB,MAAM,KAAK,KAAK,EAAE,KAAK,QAAM,cAAc,SAAS,EAAE,KAAK,qBAAqB,SAAS,EAAE,CAAC,KAC5F,CAAC,aAAa,WAAW,YAAY,EAAE,KAAK,OAAK,MAAM,IAAI,CAAC,CAAC,EAC7D;AAAA,MACF,KAAK;AAAA,MAAa,KAAK;AAAA,MAAQ,KAAK;AACnC,eAAO,EAAC,MAAM,CAAC,CAAC,QAAQ,aAAa,CAAC,UAAU,IAAI,aAAa,EAAC;AAAA,MACnE,KAAK;AAAA,MAAe,KAAK;AACxB,eAAO,EAAC,MAAM,CAAC,CAAC,QAAQ,aAAa,MAAM,IAAI,MAAM,KAAK,MAAM,IAAI,YAAY,EAAC;AAAA,MAClF,KAAK;AACJ,eAAO,EAAC,MACP,CALine truncated
"names": ["RandomGen5Teams"]
}
+66
View File
@@ -0,0 +1,66 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var rulesets_exports = {};
__export(rulesets_exports, {
Rulesets: () => Rulesets
});
module.exports = __toCommonJS(rulesets_exports);
const Rulesets = {
standard: {
inherit: true,
ruleset: ["Obtainable", "Sleep Clause Mod", "Species Clause", "Nickname Clause", "OHKO Clause", "Evasion Items Clause", "Evasion Moves Clause", "Endless Battle Clause", "HP Percentage Mod", "Cancel Mod"]
},
flatrules: {
inherit: true,
ruleset: ["Obtainable", "Species Clause", "Nickname Clause", "Item Clause", "Adjust Level Down = 50", "Cancel Mod"]
},
teampreview: {
inherit: true,
onTeamPreview() {
this.add("clearpoke");
for (const pokemon of this.getAllPokemon()) {
const details = pokemon.details.replace(", shiny", "").replace(/(Arceus|Gourgeist|Pumpkaboo|Xerneas|Silvally|Urshifu|Dudunsparce)(-[a-zA-Z?-]+)?/g, "$1-*").replace(/(Zacian|Zamazenta)(?!-Crowned)/g, "$1-*");
this.add("poke", pokemon.side.id, details, pokemon.item ? "item" : "");
}
this.makeRequest("teampreview");
}
},
validatestats: {
inherit: true,
onValidateSet(set) {
const species = this.dex.species.get(set.species);
const item = this.dex.items.get(set.item);
if (item && item.id === "griseousorb" && species.num !== 487) {
return ["Griseous Orb can only be held by Giratina in Generation 4."];
}
if (species.num === 493 && set.evs) {
const isEventArceus = set.moves.includes("roaroftime") || set.moves.includes("shadowforce") || set.moves.includes("spacialrend");
if (isEventArceus) {
let stat;
for (stat in set.evs) {
if (set.evs[stat] > 100) {
return ["Event Arceus may not have more than 100 of any EVs in Generation 4."];
}
}
}
}
}
}
};
//# sourceMappingURL=rulesets.js.map
+7
View File
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../../../../../data/mods/gen4/rulesets.ts"],
"sourcesContent": ["export const Rulesets: {[k: string]: ModdedFormatData} = {\r\n\tstandard: {\r\n\t\tinherit: true,\r\n\t\truleset: ['Obtainable', 'Sleep Clause Mod', 'Species Clause', 'Nickname Clause', 'OHKO Clause', 'Evasion Items Clause', 'Evasion Moves Clause', 'Endless Battle Clause', 'HP Percentage Mod', 'Cancel Mod'],\r\n\t},\r\n\tflatrules: {\r\n\t\tinherit: true,\r\n\t\truleset: ['Obtainable', 'Species Clause', 'Nickname Clause', 'Item Clause', 'Adjust Level Down = 50', 'Cancel Mod'],\r\n\t},\r\n\tteampreview: {\r\n\t\tinherit: true,\r\n\t\tonTeamPreview() {\r\n\t\t\tthis.add('clearpoke');\r\n\t\t\tfor (const pokemon of this.getAllPokemon()) {\r\n\t\t\t\tconst details = pokemon.details.replace(', shiny', '')\r\n\t\t\t\t\t.replace(/(Arceus|Gourgeist|Pumpkaboo|Xerneas|Silvally|Urshifu|Dudunsparce)(-[a-zA-Z?-]+)?/g, '$1-*')\r\n\t\t\t\t\t.replace(/(Zacian|Zamazenta)(?!-Crowned)/g, '$1-*'); // Hacked-in Crowned formes will be revealed\r\n\t\t\t\tthis.add('poke', pokemon.side.id, details, pokemon.item ? 'item' : '');\r\n\t\t\t}\r\n\t\t\tthis.makeRequest('teampreview');\r\n\t\t},\r\n\t},\r\n\tvalidatestats: {\r\n\t\tinherit: true,\r\n\t\tonValidateSet(set) {\r\n\t\t\tconst species = this.dex.species.get(set.species);\r\n\t\t\tconst item = this.dex.items.get(set.item);\r\n\t\t\tif (item && item.id === 'griseousorb' && species.num !== 487) {\r\n\t\t\t\treturn ['Griseous Orb can only be held by Giratina in Generation 4.'];\r\n\t\t\t}\r\n\t\t\tif (species.num === 493 && set.evs) {\r\n\t\t\t\tconst isEventArceus = set.moves.includes('roaroftime') || set.moves.includes('shadowforce') ||\r\n\t\t\t\t\tset.moves.includes('spacialrend');\r\n\t\t\t\tif (isEventArceus) {\r\n\t\t\t\t\tlet stat: StatID;\r\n\t\t\t\t\tfor (stat in set.evs) {\r\n\t\t\t\t\t\tif (set.evs[stat] > 100) {\r\n\t\t\t\t\t\t\treturn [\"Event Arceus may not have more than 100 of any EVs in Generation 4.\"];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t},\r\n};\r\n"],
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,WAA4C;AAAA,EACxD,UAAU;AAAA,IACT,SAAS;AAAA,IACT,SAAS,CAAC,cAAc,oBAAoB,kBAAkB,mBAAmB,eAAe,wBAAwB,wBAAwB,yBAAyB,qBAAqB,YAAY;AAAA,EAC3M;AAAA,EACA,WAAW;AAAA,IACV,SAAS;AAAA,IACT,SAAS,CAAC,cAAc,kBAAkB,mBAAmB,eAAe,0BAA0B,YAAY;AAAA,EACnH;AAAA,EACA,aAAa;AAAA,IACZ,SAAS;AAAA,IACT,gBAAgB;AACf,WAAK,IAAI,WAAW;AACpB,iBAAW,WAAW,KAAK,cAAc,GAAG;AAC3C,cAAM,UAAU,QAAQ,QAAQ,QAAQ,WAAW,EAAE,EACnD,QAAQ,qFAAqF,MAAM,EACnG,QAAQ,mCAAmC,MAAM;AACnD,aAAK,IAAI,QAAQ,QAAQ,KAAK,IAAI,SAAS,QAAQ,OAAO,SAAS,EAAE;AAAA,MACtE;AACA,WAAK,YAAY,aAAa;AAAA,IAC/B;AAAA,EACD;AAAA,EACA,eAAe;AAAA,IACd,SAAS;AAAA,IACT,cAAc,KAAK;AAClB,YAAM,UAAU,KAAK,IAAI,QAAQ,IAAI,IAAI,OAAO;AAChD,YAAM,OAAO,KAAK,IAAI,MAAM,IAAI,IAAI,IAAI;AACxC,UAAI,QAAQ,KAAK,OAAO,iBAAiB,QAAQ,QAAQ,KAAK;AAC7D,eAAO,CAAC,4DAA4D;AAAA,MACrE;AACA,UAAI,QAAQ,QAAQ,OAAO,IAAI,KAAK;AACnC,cAAM,gBAAgB,IAAI,MAAM,SAAS,YAAY,KAAK,IAAI,MAAM,SAAS,aAAa,KACzF,IAAI,MAAM,SAAS,aAAa;AACjC,YAAI,eAAe;AAClB,cAAI;AACJ,eAAK,QAAQ,IAAI,KAAK;AACrB,gBAAI,IAAI,IAAI,IAAI,IAAI,KAAK;AACxB,qBAAO,CAAC,qEAAqE;AAAA,YAC9E;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA,EACD;AACD;",
"names": []
}
+153
View File
@@ -0,0 +1,153 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var scripts_exports = {};
__export(scripts_exports, {
Scripts: () => Scripts
});
module.exports = __toCommonJS(scripts_exports);
const Scripts = {
inherit: "gen5",
gen: 4,
actions: {
inherit: true,
modifyDamage(baseDamage, pokemon, target, move, suppressMessages = false) {
if (!move.type)
move.type = "???";
const type = move.type;
if (pokemon.status === "brn" && baseDamage && move.category === "Physical" && !pokemon.hasAbility("guts")) {
baseDamage = this.battle.modify(baseDamage, 0.5);
}
baseDamage = this.battle.runEvent("ModifyDamagePhase1", pokemon, target, move, baseDamage);
if (move.spreadHit) {
const spreadModifier = move.spreadModifier || (this.battle.gameType === "freeforall" ? 0.5 : 0.75);
this.battle.debug("Spread modifier: " + spreadModifier);
baseDamage = this.battle.modify(baseDamage, spreadModifier);
}
baseDamage = this.battle.runEvent("WeatherModifyDamage", pokemon, target, move, baseDamage);
if (this.battle.gen === 3 && move.category === "Physical" && !Math.floor(baseDamage)) {
baseDamage = 1;
}
baseDamage += 2;
const isCrit = target.getMoveHitData(move).crit;
if (isCrit) {
baseDamage = this.battle.modify(baseDamage, move.critModifier || 2);
}
baseDamage = Math.floor(this.battle.runEvent("ModifyDamagePhase2", pokemon, target, move, baseDamage));
baseDamage = this.battle.randomizer(baseDamage);
if (move.forceSTAB || type !== "???" && pokemon.hasType(type)) {
baseDamage = this.battle.modify(baseDamage, move.stab || 1.5);
}
let typeMod = target.runEffectiveness(move);
typeMod = this.battle.clampIntRange(typeMod, -6, 6);
target.getMoveHitData(move).typeMod = typeMod;
if (typeMod > 0) {
if (!suppressMessages)
this.battle.add("-supereffective", target);
for (let i = 0; i < typeMod; i++) {
baseDamage *= 2;
}
}
if (typeMod < 0) {
if (!suppressMessages)
this.battle.add("-resisted", target);
for (let i = 0; i > typeMod; i--) {
baseDamage = Math.floor(baseDamage / 2);
}
}
if (isCrit && !suppressMessages)
this.battle.add("-crit", target);
baseDamage = this.battle.runEvent("ModifyDamage", pokemon, target, move, baseDamage);
if (!Math.floor(baseDamage)) {
return 1;
}
return Math.floor(baseDamage);
},
hitStepInvulnerabilityEvent(targets, pokemon, move) {
const hitResults = this.battle.runEvent("Invulnerability", targets, pokemon, move);
for (const [i, target] of targets.entries()) {
if (hitResults[i] === false) {
if (!move.spreadHit)
this.battle.attrLastMove("[miss]");
this.battle.add("-miss", pokemon, target);
}
}
return hitResults;
},
hitStepAccuracy(targets, pokemon, move) {
const hitResults = [];
for (const [i, target] of targets.entries()) {
this.battle.activeTarget = target;
let accuracy = move.accuracy;
if (move.ohko) {
if (!target.isSemiInvulnerable()) {
if (pokemon.level < target.level) {
this.battle.add("-immune", target, "[ohko]");
hitResults[i] = false;
continue;
}
accuracy = 30 + pokemon.level - target.level;
}
} else {
const boostTable = [1, 4 / 3, 5 / 3, 2, 7 / 3, 8 / 3, 3];
let boosts;
let boost;
if (accuracy !== true) {
if (!move.ignoreAccuracy) {
boosts = this.battle.runEvent("ModifyBoost", pokemon, null, null, { ...pokemon.boosts });
boost = this.battle.clampIntRange(boosts["accuracy"], -6, 6);
if (boost > 0) {
accuracy *= boostTable[boost];
} else {
accuracy /= boostTable[-boost];
}
}
if (!move.ignoreEvasion) {
boosts = this.battle.runEvent("ModifyBoost", target, null, null, { ...target.boosts });
boost = this.battle.clampIntRange(boosts["evasion"], -6, 6);
if (boost > 0) {
accuracy /= boostTable[boost];
} else if (boost < 0) {
accuracy *= boostTable[-boost];
}
}
}
accuracy = this.battle.runEvent("ModifyAccuracy", target, pokemon, move, accuracy);
}
if (move.alwaysHit) {
accuracy = true;
} else {
accuracy = this.battle.runEvent("Accuracy", target, pokemon, move, accuracy);
}
if (accuracy !== true && !this.battle.randomChance(accuracy, 100)) {
if (!move.spreadHit)
this.battle.attrLastMove("[miss]");
this.battle.add("-miss", pokemon, target);
hitResults[i] = false;
continue;
}
hitResults[i] = true;
}
return hitResults;
},
calcRecoilDamage(damageDealt, move) {
return this.battle.clampIntRange(Math.floor(damageDealt * move.recoil[0] / move.recoil[1]), 1);
}
}
};
//# sourceMappingURL=scripts.js.map
+7
View File
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../../../../../data/mods/gen4/scripts.ts"],
"sourcesContent": ["export const Scripts: ModdedBattleScriptsData = {\r\n\tinherit: 'gen5',\r\n\tgen: 4,\r\n\r\n\tactions: {\r\n\t\tinherit: true,\r\n\t\tmodifyDamage(baseDamage, pokemon, target, move, suppressMessages = false) {\r\n\t\t\t// DPP divides modifiers into several mathematically important stages\r\n\t\t\t// The modifiers run earlier than other generations are called with ModifyDamagePhase1 and ModifyDamagePhase2\r\n\r\n\t\t\tif (!move.type) move.type = '???';\r\n\t\t\tconst type = move.type;\r\n\r\n\t\t\t// Burn\r\n\t\t\tif (pokemon.status === 'brn' && baseDamage && move.category === 'Physical' && !pokemon.hasAbility('guts')) {\r\n\t\t\t\tbaseDamage = this.battle.modify(baseDamage, 0.5);\r\n\t\t\t}\r\n\r\n\t\t\t// Other modifiers (Reflect/Light Screen/etc)\r\n\t\t\tbaseDamage = this.battle.runEvent('ModifyDamagePhase1', pokemon, target, move, baseDamage);\r\n\r\n\t\t\t// Double battle multi-hit\r\n\t\t\tif (move.spreadHit) {\r\n\t\t\t\tconst spreadModifier = move.spreadModifier || (this.battle.gameType === 'freeforall' ? 0.5 : 0.75);\r\n\t\t\t\tthis.battle.debug('Spread modifier: ' + spreadModifier);\r\n\t\t\t\tbaseDamage = this.battle.modify(baseDamage, spreadModifier);\r\n\t\t\t}\r\n\r\n\t\t\t// Weather\r\n\t\t\tbaseDamage = this.battle.runEvent('WeatherModifyDamage', pokemon, target, move, baseDamage);\r\n\r\n\t\t\tif (this.battle.gen === 3 && move.category === 'Physical' && !Math.floor(baseDamage)) {\r\n\t\t\t\tbaseDamage = 1;\r\n\t\t\t}\r\n\r\n\t\t\tbaseDamage += 2;\r\n\r\n\t\t\tconst isCrit = target.getMoveHitData(move).crit;\r\n\t\t\tif (isCrit) {\r\n\t\t\t\tbaseDamage = this.battle.modify(baseDamage, move.critModifier || 2);\r\n\t\t\t}\r\n\r\n\t\t\t// Mod 2 (Damage is floored after all multipliers are in)\r\n\t\t\tbaseDamage = Math.floor(this.battle.runEvent('ModifyDamagePhase2', pokemon, target, move, baseDamage));\r\n\r\n\t\t\t// this is not a modifier\r\n\t\t\tbaseDamage = this.battle.randomizer(baseDamage);\r\n\r\n\t\t\t// STAB\r\n\t\t\tif (move.forceSTAB || type !== '???' && pokemon.hasType(type)) {\r\n\t\t\t\t// The \"???\" type never gets STAB\r\n\t\t\t\t// Not even if you Roost in Gen 4 and somehow manage to use\r\n\t\t\t\t// Struggle in the same turn.\r\n\t\t\t\t// (On second thought, it might be easier to get a MissingNo.)\r\n\t\t\t\tbaseDamage = this.battle.modify(baseDamage, move.stab || 1.5);\r\n\t\t\t}\r\n\t\t\t// types\r\n\t\t\tlet typeMod = target.runEffectiveness(move);\r\n\t\t\ttypeMod = this.battle.clampIntRange(typeMod, -6, 6);\r\n\t\t\ttarget.getMoveHitData(move).typeMod = typeMod;\r\n\t\t\tif (typeMod > 0) {\r\n\t\t\t\tif (!suppressMessages) this.battle.add('-supereffective', target);\r\n\r\n\t\t\t\tfor (let i = 0; i < typeMod; i++) {\r\n\t\t\t\t\tbaseDamage *= 2;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (typeMod < 0) {\r\n\t\t\t\tif (!suppressMessages) this.battle.add('-resisted', target);\r\n\r\n\t\t\t\tfor (let i = 0; i > typeMod; i--) {\r\n\t\t\t\t\tbaseDamage = Math.floor(baseDamage / 2);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (isCrit && !suppressMessages) this.battle.add('-crit', target);\r\n\r\n\t\t\t// Final modifier.\r\n\t\t\tbaseDamage = this.battle.runEvent('ModifyDamage', pokemon, target, move, baseDamage);\r\n\r\n\t\t\tif (!Math.floor(baseDamage)) {\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\r\n\t\t\treturn Math.floor(baseDamage);\r\n\t\t},\r\n\t\thitStepInvulnerabilityEvent(targets, pokemon, move) {\r\n\t\t\tconst hitResults = this.battle.runEvent('Invulnerability', targets, pokemon, move);\r\n\t\t\tfor (const [i, target] of targets.entries()) {\r\n\t\t\t\tif (hitResults[i] === false) {\r\n\t\t\t\t\tif (!move.spreadHit) this.battle.attrLastMove('[miss]');\r\n\t\t\t\t\tthis.battle.add('-miss', pokemon, target);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn hitResults;\r\n\t\t},\r\n\t\thitStepAccuracy(targets, pokemon, move) {\r\n\t\t\tconst hitResults = [];\r\n\t\t\tfor (const [i, target] of targets.entries()) {\r\n\t\t\t\tthis.battle.activeTarget = target;\r\n\t\t\t\t// calculate true accuracy\r\n\t\t\t\tlet accuracy = move.accuracy;\r\n\t\t\t\tif (move.ohko) { // bypasses accuracy modifiers\r\n\t\t\t\t\tif (!target.isSemiInvulnerable()) {\r\n\t\t\t\t\t\tif (pokemon.level < target.level) {\r\n\t\t\t\t\t\t\tthis.battle.add('-immune', target, '[ohko]');\r\n\t\t\t\t\t\t\thitResults[i] = false;\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\taccuracy = 30 + pokemon.level - target.level;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconst boostTable = [1, 4 / 3, 5 / 3, 2, 7 / 3, 8 / 3, 3];\r\n\r\n\t\t\t\t\tlet boosts;\r\n\t\t\t\t\tlet boost!: number;\r\n\t\t\t\t\tif (accuracy !== true) {\r\n\t\t\t\t\t\tif (!move.ignoreAccuracy) {\r\n\t\t\t\t\t\t\tboosts = this.battle.runEvent('ModifyBoost', pokemon, null, null, {...pokemon.boosts});\r\n\t\t\t\t\t\t\tboost = this.battle.clampIntRange(boosts['accuracy'], -6, 6);\r\n\t\t\t\t\t\t\tif (boost > 0) {\r\n\t\t\t\t\t\t\t\taccuracy *= boostTable[boost];\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\taccuracy /= boostTablLine truncated
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,UAAmC;AAAA,EAC/C,SAAS;AAAA,EACT,KAAK;AAAA,EAEL,SAAS;AAAA,IACR,SAAS;AAAA,IACT,aAAa,YAAY,SAAS,QAAQ,MAAM,mBAAmB,OAAO;AAIzE,UAAI,CAAC,KAAK;AAAM,aAAK,OAAO;AAC5B,YAAM,OAAO,KAAK;AAGlB,UAAI,QAAQ,WAAW,SAAS,cAAc,KAAK,aAAa,cAAc,CAAC,QAAQ,WAAW,MAAM,GAAG;AAC1G,qBAAa,KAAK,OAAO,OAAO,YAAY,GAAG;AAAA,MAChD;AAGA,mBAAa,KAAK,OAAO,SAAS,sBAAsB,SAAS,QAAQ,MAAM,UAAU;AAGzF,UAAI,KAAK,WAAW;AACnB,cAAM,iBAAiB,KAAK,mBAAmB,KAAK,OAAO,aAAa,eAAe,MAAM;AAC7F,aAAK,OAAO,MAAM,sBAAsB,cAAc;AACtD,qBAAa,KAAK,OAAO,OAAO,YAAY,cAAc;AAAA,MAC3D;AAGA,mBAAa,KAAK,OAAO,SAAS,uBAAuB,SAAS,QAAQ,MAAM,UAAU;AAE1F,UAAI,KAAK,OAAO,QAAQ,KAAK,KAAK,aAAa,cAAc,CAAC,KAAK,MAAM,UAAU,GAAG;AACrF,qBAAa;AAAA,MACd;AAEA,oBAAc;AAEd,YAAM,SAAS,OAAO,eAAe,IAAI,EAAE;AAC3C,UAAI,Q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