Initial Modpack Upload
This commit is contained in:
1 parent
268b0650aa
commit
3d8b956ee4
1429 files changed
+820128
No files matched your search
@@ -0,0 +1,106 @@
|
||||
"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 = {
|
||||
neutralizinggas: {
|
||||
inherit: true,
|
||||
// Ability suppression implemented in sim/pokemon.ts:Pokemon#ignoringAbility
|
||||
onPreStart(pokemon) {
|
||||
this.add("-ability", pokemon, "Neutralizing Gas");
|
||||
pokemon.abilityState.ending = false;
|
||||
for (const target of this.getAllActive()) {
|
||||
if (target.illusion) {
|
||||
this.singleEvent("End", this.dex.abilities.get("Illusion"), target.abilityState, target, pokemon, "neutralizinggas");
|
||||
}
|
||||
if (target.volatiles["slowstart"]) {
|
||||
delete target.volatiles["slowstart"];
|
||||
this.add("-end", target, "Slow Start", "[silent]");
|
||||
}
|
||||
if (target.m.abils?.length) {
|
||||
for (const key of target.m.abils) {
|
||||
if (this.dex.abilities.get(key.slice(8)).isPermanent)
|
||||
continue;
|
||||
target.removeVolatile(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
onEnd(source) {
|
||||
this.add("-end", source, "ability: Neutralizing Gas");
|
||||
if (source.abilityState.ending)
|
||||
return;
|
||||
source.abilityState.ending = true;
|
||||
const sortedActive = this.getAllActive();
|
||||
this.speedSort(sortedActive);
|
||||
for (const pokemon of sortedActive) {
|
||||
if (pokemon !== source) {
|
||||
this.singleEvent("Start", pokemon.getAbility(), pokemon.abilityState, pokemon);
|
||||
}
|
||||
if (pokemon.m.abils?.length) {
|
||||
for (const innate of pokemon.m.abils) {
|
||||
if (pokemon.volatiles[innate])
|
||||
continue;
|
||||
pokemon.addVolatile(innate, pokemon);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
trace: {
|
||||
inherit: true,
|
||||
onUpdate(pokemon) {
|
||||
if (!pokemon.isStarted || this.effectState.gaveUp)
|
||||
return;
|
||||
const isAbility = pokemon.ability === "trace";
|
||||
const additionalBannedAbilities = [
|
||||
// Zen Mode included here for compatability with Gen 5-6
|
||||
"noability",
|
||||
"flowergift",
|
||||
"forecast",
|
||||
"hungerswitch",
|
||||
"illusion",
|
||||
"imposter",
|
||||
"neutralizinggas",
|
||||
"powerofalchemy",
|
||||
"receiver",
|
||||
"trace",
|
||||
"zenmode"
|
||||
];
|
||||
const possibleTargets = pokemon.adjacentFoes().filter((target2) => !target2.getAbility().isPermanent && !additionalBannedAbilities.includes(target2.ability));
|
||||
if (!possibleTargets.length)
|
||||
return;
|
||||
const target = this.sample(possibleTargets);
|
||||
const ability = target.getAbility();
|
||||
if (isAbility) {
|
||||
if (pokemon.setAbility(ability)) {
|
||||
this.add("-ability", pokemon, ability, "[from] ability: Trace", "[of] " + target);
|
||||
}
|
||||
} else {
|
||||
pokemon.removeVolatile("ability:trace");
|
||||
pokemon.addVolatile("ability:" + ability.id, pokemon);
|
||||
this.add("-ability", pokemon, ability, "[from] ability: Trace", "[of] " + target);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=abilities.js.map
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../../../../data/mods/sharedpower/abilities.ts"],
|
||||
"sourcesContent": ["export const Abilities: {[k: string]: ModdedAbilityData} = {\r\n\tneutralizinggas: {\r\n\t\tinherit: true,\r\n\t\t// Ability suppression implemented in sim/pokemon.ts:Pokemon#ignoringAbility\r\n\t\tonPreStart(pokemon) {\r\n\t\t\tthis.add('-ability', pokemon, 'Neutralizing Gas');\r\n\t\t\tpokemon.abilityState.ending = false;\r\n\t\t\t// Remove setter's innates before the ability starts\r\n\t\t\tfor (const target of this.getAllActive()) {\r\n\t\t\t\tif (target.illusion) {\r\n\t\t\t\t\tthis.singleEvent('End', this.dex.abilities.get('Illusion'), target.abilityState, target, pokemon, 'neutralizinggas');\r\n\t\t\t\t}\r\n\t\t\t\tif (target.volatiles['slowstart']) {\r\n\t\t\t\t\tdelete target.volatiles['slowstart'];\r\n\t\t\t\t\tthis.add('-end', target, 'Slow Start', '[silent]');\r\n\t\t\t\t}\r\n\t\t\t\tif (target.m.abils?.length) {\r\n\t\t\t\t\tfor (const key of target.m.abils) {\r\n\t\t\t\t\t\tif (this.dex.abilities.get(key.slice(8)).isPermanent) continue;\r\n\t\t\t\t\t\ttarget.removeVolatile(key);\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\tonEnd(source) {\r\n\t\t\tthis.add('-end', source, 'ability: Neutralizing Gas');\r\n\r\n\t\t\t// FIXME this happens before the pokemon switches out, should be the opposite order.\r\n\t\t\t// Not an easy fix since we cant use a supported event. Would need some kind of special event that\r\n\t\t\t// gathers events to run after the switch and then runs them when the ability is no longer accessible.\r\n\t\t\t// (If you're tackling this, do note extreme weathers have the same issue)\r\n\r\n\t\t\t// Mark this pokemon's ability as ending so Pokemon#ignoringAbility skips it\r\n\t\t\tif (source.abilityState.ending) return;\r\n\t\t\tsource.abilityState.ending = true;\r\n\t\t\tconst sortedActive = this.getAllActive();\r\n\t\t\tthis.speedSort(sortedActive);\r\n\t\t\tfor (const pokemon of sortedActive) {\r\n\t\t\t\tif (pokemon !== source) {\r\n\t\t\t\t\t// Will be suppressed by Pokemon#ignoringAbility if needed\r\n\t\t\t\t\tthis.singleEvent('Start', pokemon.getAbility(), pokemon.abilityState, pokemon);\r\n\t\t\t\t}\r\n\t\t\t\tif (pokemon.m.abils?.length) {\r\n\t\t\t\t\tfor (const innate of pokemon.m.abils) {\r\n\t\t\t\t\t\t// permanent abilities\r\n\t\t\t\t\t\tif (pokemon.volatiles[innate]) continue;\r\n\t\t\t\t\t\tpokemon.addVolatile(innate, pokemon);\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\ttrace: {\r\n\t\tinherit: true,\r\n\t\tonUpdate(pokemon) {\r\n\t\t\tif (!pokemon.isStarted || this.effectState.gaveUp) return;\r\n\t\t\tconst isAbility = pokemon.ability === 'trace';\r\n\r\n\t\t\tconst additionalBannedAbilities = [\r\n\t\t\t\t// Zen Mode included here for compatability with Gen 5-6\r\n\t\t\t\t'noability', 'flowergift', 'forecast', 'hungerswitch', 'illusion', 'imposter', 'neutralizinggas', 'powerofalchemy', 'receiver', 'trace', 'zenmode',\r\n\t\t\t];\r\n\t\t\tconst possibleTargets = pokemon.adjacentFoes().filter(target => (\r\n\t\t\t\t!target.getAbility().isPermanent && !additionalBannedAbilities.includes(target.ability)\r\n\t\t\t));\r\n\t\t\tif (!possibleTargets.length) return;\r\n\r\n\t\t\tconst target = this.sample(possibleTargets);\r\n\t\t\tconst ability = target.getAbility();\r\n\r\n\t\t\tif (isAbility) {\r\n\t\t\t\tif (pokemon.setAbility(ability)) {\r\n\t\t\t\t\tthis.add('-ability', pokemon, ability, '[from] ability: Trace', '[of] ' + target);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tpokemon.removeVolatile('ability:trace');\r\n\t\t\t\tpokemon.addVolatile('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AAErC,gBAAI,QAAQ,UAAU,MAAM;AAAG;AAC/B,oBAAQ,YAAY,QAAQ,OAAO;AAAA,UACpC;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA,EACD;AAAA,EACA,OAAO;AAAA,IACN,SAAS;AAAA,IACT,SAAS,SAAS;AACjB,UAAI,CAAC,QAAQ,aAAa,KAAK,YAAY;AAAQ;AACnD,YAAM,YAAY,QAAQ,YAAY;AAEtC,YAAM,4BAA4B;AAAA;AAAA,QAEjC;AAAA,QAAa;AAAA,QAAc;AAAA,QAAY;AAAA,QAAgB;AAAA,QAAY;AAAA,QAAY;AAAA,QAAmB;AAAA,QAAkB;AAAA,QAAY;AAAA,QAAS;AAAA,MAC1I;AACA,YAAM,kBAAkB,QAAQ,aAAa,EAAE,OAAO,CAAAA,YACrD,CAACA,QAAO,WAAW,EAAE,eAAe,CAAC,0BAA0B,SAASA,QAAO,OAAO,CACtF;AACD,UAAI,CAAC,gBAAgB;AAAQ;AAE7B,YAAM,SAAS,KAAK,OAAO,eAAe;AAC1C,YAAM,UAAU,OAAO,WAAW;AAElC,UAAI,WAAW;AACd,YAAI,QAAQ,WAAW,OAAO,GAAG;AAChC,eAAK,IAAI,YAAY,SAAS,SAAS,yBAAyB,UAAU,MAAM;AAAA,QACjF;AAAA,MACD,OAAO;AACN,gBAAQ,eAAe,eAAe;AACtC,gBAAQ,YAAY,aAAa,QAAQ,IAAI,OAAO;AACpD,aAAK,IAAI,YAAY,SAAS,SAAS,yBAAyB,UAAU,MAAM;AAAA,MACjF;AAAA,IACD;AAAA,EACD;AACD;",
|
||||
"names": ["target"]
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
"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 moves_exports = {};
|
||||
__export(moves_exports, {
|
||||
Moves: () => Moves
|
||||
});
|
||||
module.exports = __toCommonJS(moves_exports);
|
||||
const Moves = {
|
||||
gastroacid: {
|
||||
inherit: true,
|
||||
condition: {
|
||||
// Ability suppression implemented in Pokemon.ignoringAbility() within sim/pokemon.js
|
||||
onStart(pokemon) {
|
||||
this.add("-endability", pokemon);
|
||||
this.singleEvent("End", pokemon.getAbility(), pokemon.abilityState, pokemon, pokemon, "gastroacid");
|
||||
const keys = Object.keys(pokemon.volatiles).filter((x) => x.startsWith("ability:"));
|
||||
if (keys.length) {
|
||||
for (const abil of keys) {
|
||||
pokemon.removeVolatile(abil);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=moves.js.map
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../../../../data/mods/sharedpower/moves.ts"],
|
||||
"sourcesContent": ["export const Moves: {[k: string]: ModdedMoveData} = {\r\n\tgastroacid: {\r\n\t\tinherit: true,\r\n\t\tcondition: {\r\n\t\t\t// Ability suppression implemented in Pokemon.ignoringAbility() within sim/pokemon.js\r\n\t\t\tonStart(pokemon) {\r\n\t\t\t\tthis.add('-endability', pokemon);\r\n\t\t\t\tthis.singleEvent('End', pokemon.getAbility(), pokemon.abilityState, pokemon, pokemon, 'gastroacid');\r\n\t\t\t\tconst keys = Object.keys(pokemon.volatiles).filter(x => x.startsWith(\"ability:\"));\r\n\t\t\t\tif (keys.length) {\r\n\t\t\t\t\tfor (const abil of keys) {\r\n\t\t\t\t\t\tpokemon.removeVolatile(abil);\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,QAAuC;AAAA,EACnD,YAAY;AAAA,IACX,SAAS;AAAA,IACT,WAAW;AAAA;AAAA,MAEV,QAAQ,SAAS;AAChB,aAAK,IAAI,eAAe,OAAO;AAC/B,aAAK,YAAY,OAAO,QAAQ,WAAW,GAAG,QAAQ,cAAc,SAAS,SAAS,YAAY;AAClG,cAAM,OAAO,OAAO,KAAK,QAAQ,SAAS,EAAE,OAAO,OAAK,EAAE,WAAW,UAAU,CAAC;AAChF,YAAI,KAAK,QAAQ;AAChB,qBAAW,QAAQ,MAAM;AACxB,oBAAQ,eAAe,IAAI;AAAA,UAC5B;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA,EACD;AACD;",
|
||||
"names": []
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
"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, {
|
||||
RandomSharedPowerTeams: () => RandomSharedPowerTeams,
|
||||
default: () => random_teams_default
|
||||
});
|
||||
module.exports = __toCommonJS(random_teams_exports);
|
||||
var import_random_teams = __toESM(require("../../random-teams"));
|
||||
class RandomSharedPowerTeams extends import_random_teams.default {
|
||||
}
|
||||
var random_teams_default = RandomSharedPowerTeams;
|
||||
//# sourceMappingURL=random-teams.js.map
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../../../../data/mods/sharedpower/random-teams.ts"],
|
||||
"sourcesContent": ["import RandomTeams from '../../random-teams';\r\n\r\nexport class RandomSharedPowerTeams extends RandomTeams {}\r\n\r\nexport default RandomSharedPowerTeams;\r\n"],
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAwB;AAEjB,MAAM,+BAA+B,oBAAAA,QAAY;AAAC;AAEzD,IAAO,uBAAQ;",
|
||||
"names": ["RandomTeams"]
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
"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 = {
|
||||
field: {
|
||||
suppressingWeather() {
|
||||
for (const pokemon of this.battle.getAllActive()) {
|
||||
const innates = Object.keys(pokemon.volatiles).filter((x) => x.startsWith("ability:"));
|
||||
if (pokemon && !pokemon.ignoringAbility() && (pokemon.getAbility().suppressWeather || innates.some((x) => this.battle.dex.abilities.get(x.replace("ability:", "")).suppressWeather))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
},
|
||||
pokemon: {
|
||||
hasAbility(ability) {
|
||||
if (this.ignoringAbility())
|
||||
return false;
|
||||
if (Array.isArray(ability))
|
||||
return ability.some((abil) => this.hasAbility(abil));
|
||||
const abilityid = this.battle.toID(ability);
|
||||
return this.ability === abilityid || !!this.volatiles["ability:" + abilityid];
|
||||
},
|
||||
ignoringAbility() {
|
||||
let neutralizinggas = false;
|
||||
for (const pokemon of this.battle.getAllActive()) {
|
||||
if ((pokemon.ability === "neutralizinggas" || pokemon.m.abils?.includes("ability:neutralizinggas")) && !pokemon.volatiles["gastroacid"] && !pokemon.abilityState.ending) {
|
||||
neutralizinggas = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return !!(this.battle.gen >= 5 && !this.isActive || (this.volatiles["gastroacid"] || neutralizinggas && (this.ability !== "neutralizinggas" || this.m.abils?.includes("ability:neutralizinggas"))) && !this.getAbility().isPermanent);
|
||||
}
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=scripts.js.map
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../../../../data/mods/sharedpower/scripts.ts"],
|
||||
"sourcesContent": ["export const Scripts: ModdedBattleScriptsData = {\r\n\tfield: {\r\n\t\tsuppressingWeather() {\r\n\t\t\tfor (const pokemon of this.battle.getAllActive()) {\r\n\t\t\t\tconst innates = Object.keys(pokemon.volatiles).filter(x => x.startsWith('ability:'));\r\n\t\t\t\tif (pokemon && !pokemon.ignoringAbility() &&\r\n\t\t\t\t\t(pokemon.getAbility().suppressWeather || innates.some(x => (\r\n\t\t\t\t\t\tthis.battle.dex.abilities.get(x.replace('ability:', '')).suppressWeather\r\n\t\t\t\t\t)))) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t},\r\n\t},\r\n\tpokemon: {\r\n\t\thasAbility(ability) {\r\n\t\t\tif (this.ignoringAbility()) return false;\r\n\t\t\tif (Array.isArray(ability)) return ability.some(abil => this.hasAbility(abil));\r\n\t\t\tconst abilityid = this.battle.toID(ability);\r\n\t\t\treturn this.ability === abilityid || !!this.volatiles['ability:' + abilityid];\r\n\t\t},\r\n\t\tignoringAbility() {\r\n\t\t\t// Check if any active pokemon have the ability Neutralizing Gas\r\n\t\t\tlet neutralizinggas = false;\r\n\t\t\tfor (const pokemon of this.battle.getAllActive()) {\r\n\t\t\t\t// can't use hasAbility because it would lead to infinite recursion\r\n\t\t\t\tif (\r\n\t\t\t\t\t(pokemon.ability === ('neutralizinggas' as ID) || pokemon.m.abils?.includes('ability:neutralizinggas')) &&\r\n\t\t\t\t\t!pokemon.volatiles['gastroacid'] && !pokemon.abilityState.ending\r\n\t\t\t\t) {\r\n\t\t\t\t\tneutralizinggas = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn !!(\r\n\t\t\t\t(this.battle.gen >= 5 && !this.isActive) ||\r\n\t\t\t\t((this.volatiles['gastroacid'] ||\r\n\t\t\t\t\t(neutralizinggas && (this.ability !== ('neutralizinggas' as ID) ||\r\n\t\t\t\t\t\tthis.m.abils?.includes('ability:neutralizinggas'))\r\n\t\t\t\t\t)) && !this.getAbility().isPermanent\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,UAAmC;AAAA,EAC/C,OAAO;AAAA,IACN,qBAAqB;AACpB,iBAAW,WAAW,KAAK,OAAO,aAAa,GAAG;AACjD,cAAM,UAAU,OAAO,KAAK,QAAQ,SAAS,EAAE,OAAO,OAAK,EAAE,WAAW,UAAU,CAAC;AACnF,YAAI,WAAW,CAAC,QAAQ,gBAAgB,MACtC,QAAQ,WAAW,EAAE,mBAAmB,QAAQ,KAAK,OACrD,KAAK,OAAO,IAAI,UAAU,IAAI,EAAE,QAAQ,YAAY,EAAE,CAAC,EAAE,eACzD,IAAI;AACL,iBAAO;AAAA,QACR;AAAA,MACD;AACA,aAAO;AAAA,IACR;AAAA,EACD;AAAA,EACA,SAAS;AAAA,IACR,WAAW,SAAS;AACnB,UAAI,KAAK,gBAAgB;AAAG,eAAO;AACnC,UAAI,MAAM,QAAQ,OAAO;AAAG,eAAO,QAAQ,KAAK,UAAQ,KAAK,WAAW,IAAI,CAAC;AAC7E,YAAM,YAAY,KAAK,OAAO,KAAK,OAAO;AAC1C,aAAO,KAAK,YAAY,aAAa,CAAC,CAAC,KAAK,UAAU,aAAa,SAAS;AAAA,IAC7E;AAAA,IACA,kBAAkB;AAEjB,UAAI,kBAAkB;AACtB,iBAAW,WAAW,KAAK,OAAO,aAAa,GAAG;AAEjD,aACE,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