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,156 @@
|
||||
"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: {
|
||||
name: "brn",
|
||||
effectType: "Status",
|
||||
onStart(target) {
|
||||
this.add("-status", target, "brn");
|
||||
target.addVolatile("brnattackdrop");
|
||||
},
|
||||
onAfterMoveSelfPriority: 3,
|
||||
onAfterMoveSelf(pokemon) {
|
||||
residualdmg(this, pokemon);
|
||||
},
|
||||
onSwitchIn(pokemon) {
|
||||
pokemon.addVolatile("brnattackdrop");
|
||||
},
|
||||
onAfterSwitchInSelf(pokemon) {
|
||||
residualdmg(this, pokemon);
|
||||
}
|
||||
},
|
||||
par: {
|
||||
name: "par",
|
||||
effectType: "Status",
|
||||
onStart(target) {
|
||||
this.add("-status", target, "par");
|
||||
target.addVolatile("parspeeddrop");
|
||||
},
|
||||
onBeforeMovePriority: 2,
|
||||
onBeforeMove(pokemon) {
|
||||
if (this.randomChance(1, 4)) {
|
||||
this.add("cant", pokemon, "par");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
onSwitchIn(pokemon) {
|
||||
pokemon.addVolatile("parspeeddrop");
|
||||
}
|
||||
},
|
||||
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, 5);
|
||||
if (target.removeVolatile("nightmare")) {
|
||||
this.add("-end", target, "Nightmare", "[silent]");
|
||||
}
|
||||
},
|
||||
onBeforeMovePriority: 10,
|
||||
onBeforeMove(pokemon, target, move) {
|
||||
pokemon.statusState.time--;
|
||||
if (pokemon.statusState.time <= 0) {
|
||||
pokemon.cureStatus();
|
||||
return;
|
||||
}
|
||||
this.add("cant", pokemon, "slp");
|
||||
if (move.sleepUsable) {
|
||||
return;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
},
|
||||
confusion: {
|
||||
inherit: true,
|
||||
// Stadium 2 fixed Berserk Gene afflicting Confusion for 255 turns.
|
||||
onStart(target, source, sourceEffect) {
|
||||
if (sourceEffect && sourceEffect.id === "lockedmove") {
|
||||
this.add("-start", target, "confusion", "[silent]");
|
||||
} else {
|
||||
this.add("-start", target, "confusion");
|
||||
}
|
||||
this.effectState.time = this.random(2, 6);
|
||||
},
|
||||
onBeforeMove(pokemon, target, move) {
|
||||
pokemon.volatiles["confusion"].time--;
|
||||
if (!pokemon.volatiles["confusion"].time) {
|
||||
pokemon.removeVolatile("confusion");
|
||||
return;
|
||||
}
|
||||
this.add("-activate", pokemon, "confusion");
|
||||
if (this.randomChance(1, 2)) {
|
||||
return;
|
||||
}
|
||||
move = {
|
||||
basePower: 40,
|
||||
type: "???",
|
||||
baseMoveType: move.type,
|
||||
category: "Physical",
|
||||
willCrit: false,
|
||||
isConfusionSelfHit: true,
|
||||
noDamageVariance: true,
|
||||
flags: {},
|
||||
selfdestruct: move.selfdestruct
|
||||
};
|
||||
const damage = this.actions.getDamage(pokemon, pokemon, move);
|
||||
if (typeof damage !== "number")
|
||||
throw new Error("Confusion damage not dealt");
|
||||
this.directDamage(damage);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
residualdmg: {
|
||||
name: "residualdmg",
|
||||
onStart(target) {
|
||||
target.volatiles["residualdmg"].counter = 0;
|
||||
},
|
||||
onAfterMoveSelfPriority: 100,
|
||||
onAfterMoveSelf(pokemon) {
|
||||
if (["brn", "psn", "tox"].includes(pokemon.status))
|
||||
pokemon.volatiles["residualdmg"].counter++;
|
||||
},
|
||||
onAfterSwitchInSelf(pokemon) {
|
||||
if (["brn", "psn", "tox"].includes(pokemon.status))
|
||||
pokemon.volatiles["residualdmg"].counter++;
|
||||
}
|
||||
}
|
||||
};
|
||||
function residualdmg(battle, pokemon) {
|
||||
if (pokemon.volatiles["residualdmg"]) {
|
||||
const residualDmg = battle.clampIntRange(
|
||||
Math.floor(pokemon.maxhp / 16) * pokemon.volatiles["residualdmg"].counter,
|
||||
1
|
||||
);
|
||||
battle.damage(residualDmg, pokemon);
|
||||
battle.hint("In Gen 2, Toxic's counter is retained through Baton Pass/Heal Bell and applies to PSN/BRN.", true);
|
||||
} else {
|
||||
battle.damage(battle.clampIntRange(Math.floor(pokemon.maxhp / 8), 1), pokemon);
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=conditions.js.map
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../../../../data/mods/gen2stadium2/conditions.ts"],
|
||||
"sourcesContent": ["/**\r\n * Since Stadium 2 ignores stat drops while recalculating stats due to boosting moves, haze,\r\n * or stat-lowering moves. The status conditions which affect a targets stats (brn and par) have\r\n * a volatile along with them to keep track of if their respective stat changes should be factored\r\n * in during stat calculations or not.\r\n */\r\nexport const Conditions: {[k: string]: ModdedConditionData} = {\r\n\tbrn: {\r\n\t\tname: 'brn',\r\n\t\teffectType: 'Status',\r\n\t\tonStart(target) {\r\n\t\t\tthis.add('-status', target, 'brn');\r\n\t\t\ttarget.addVolatile('brnattackdrop');\r\n\t\t},\r\n\t\tonAfterMoveSelfPriority: 3,\r\n\t\tonAfterMoveSelf(pokemon) {\r\n\t\t\tresidualdmg(this, pokemon);\r\n\t\t},\r\n\t\tonSwitchIn(pokemon) {\r\n\t\t\tpokemon.addVolatile('brnattackdrop');\r\n\t\t},\r\n\t\tonAfterSwitchInSelf(pokemon) {\r\n\t\t\tresidualdmg(this, pokemon);\r\n\t\t},\r\n\t},\r\n\tpar: {\r\n\t\tname: 'par',\r\n\t\teffectType: 'Status',\r\n\t\tonStart(target) {\r\n\t\t\tthis.add('-status', target, 'par');\r\n\t\t\ttarget.addVolatile('parspeeddrop');\r\n\t\t},\r\n\t\tonBeforeMovePriority: 2,\r\n\t\tonBeforeMove(pokemon) {\r\n\t\t\tif (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\tonSwitchIn(pokemon) {\r\n\t\t\tpokemon.addVolatile('parspeeddrop');\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, guaranteed 1 turn of sleep.\r\n\t\t\tthis.effectState.time = this.random(2, 5);\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\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\tconfusion: {\r\n\t\tinherit: true,\r\n\t\t// Stadium 2 fixed Berserk Gene afflicting Confusion for 255 turns.\r\n\t\tonStart(target, source, sourceEffect) {\r\n\t\t\tif (sourceEffect && sourceEffect.id === 'lockedmove') {\r\n\t\t\t\tthis.add('-start', target, 'confusion', '[silent]');\r\n\t\t\t} else {\r\n\t\t\t\tthis.add('-start', target, 'confusion');\r\n\t\t\t}\r\n\t\t\tthis.effectState.time = this.random(2, 6);\r\n\t\t},\r\n\t\tonBeforeMove(pokemon, target, move) {\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\tmove = {\r\n\t\t\t\tbasePower: 40,\r\n\t\t\t\ttype: '???',\r\n\t\t\t\tbaseMoveType: move.type,\r\n\t\t\t\tcategory: 'Physical',\r\n\t\t\t\twillCrit: false,\r\n\t\t\t\tisConfusionSelfHit: true,\r\n\t\t\t\tnoDamageVariance: true,\r\n\t\t\t\tflags: {},\r\n\t\t\t\tselfdestruct: move.selfdestruct,\r\n\t\t\t} as unknown as ActiveMove;\r\n\t\t\tconst damage = this.actions.getDamage(pokemon, pokemon, move);\r\n\t\t\tif (typeof damage !== 'number') throw new Error(\"Confusion damage not dealt\");\r\n\t\t\tthis.directDamage(damage);\r\n\t\t\treturn false;\r\n\t\t},\r\n\t},\r\n\tresidualdmg: {\r\n\t\tname: 'residualdmg',\r\n\t\tonStart(target) {\r\n\t\t\ttarget.volatiles['residualdmg'].counter = 0;\r\n\t\t},\r\n\t\tonAfterMoveSelfPriority: 100,\r\n\t\tonAfterMoveSelf(pokemon) {\r\n\t\t\tif (['brn', 'psn', 'tox'].includes(pokemon.status)) pokemon.volatiles['residualdmg'].counter++;\r\n\t\t},\r\n\t\tonAfterSwitchInSelf(pokemon) {\r\n\t\t\tif (['brn', 'psn', 'tox'].includes(pokemon.status)) pokemon.volatiles['residualdmg'].counter++;\r\n\t\t},\r\n\t},\r\n};\r\n\r\nfunction residualdmg(battle: Battle, pokemon: Pokemon) {\r\n\tif (pokemon.volatiles['residualdmg']) {\r\n\t\tconst residualDmg = battle.clampIntRange(\r\n\t\t\tMath.floor(pokemon.maxhp / 16) * pokemon.volatiles['residualdmg'].counter, 1\r\n\t\t);\r\n\t\tbattle.damage(residualDmg, pokemon);\r\n\t\tbattle.hint(\"In Gen 2, Toxic's counter is retained through Baton Pass/Heal Bell and applies to PSN/BRN.\", true);\r\n\t} else {\r\n\t\tbattle.damage(battle.clampIntRange(Math.floor(pokemon.maxhp / 8), 1), pokemon);\r\n\t}\r\n}\r\n"],
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,MAAM,aAAiD;AAAA,EAC7D,KAAK;AAAA,IACJ,MAAM;AAAA,IACN,YAAY;AAAA,IACZ,QAAQ,QAAQ;AACf,WAAK,IAAI,WAAW,QAAQ,KAAK;AACjC,aAAO,YAAY,eAAe;AAAA,IACnC;AAAA,IACA,yBAAyB;AAAA,IACzB,gBAAgB,SAAS;AACxB,kBAAY,MAAM,OAAO;AAAA,IAC1B;AAAA,IACA,WAAW,SAAS;AACnB,cAAQ,YAAY,eAAe;AAAA,IACpC;AAAA,IACA,oBAAoB,SAAS;AAC5B,kBAA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AU,aAAa,GAAG;AACrC,UAAM,cAAc,OAAO;AAAA,MAC1B,KAAK,MAAM,QAAQ,QAAQ,EAAE,IAAI,QAAQ,UAAU,aAAa,EAAE;AAAA,MAAS;AAAA,IAC5E;AACA,WAAO,OAAO,aAAa,OAAO;AAClC,WAAO,KAAK,8FAA8F,IAAI;AAAA,EAC/G,OAAO;AACN,WAAO,OAAO,OAAO,cAAc,KAAK,MAAM,QAAQ,QAAQ,CAAC,GAAG,CAAC,GAAG,OAAO;AAAA,EAC9E;AACD;",
|
||||
"names": []
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
"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 = {
|
||||
dragonfang: {
|
||||
inherit: true,
|
||||
onModifyDamage(damage, source, target, move) {
|
||||
if (move?.type === "Dragon") {
|
||||
return damage * 1.1;
|
||||
}
|
||||
}
|
||||
},
|
||||
dragonscale: {
|
||||
inherit: true,
|
||||
onModifyDamage() {
|
||||
}
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=items.js.map
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../../../../data/mods/gen2stadium2/items.ts"],
|
||||
"sourcesContent": ["// Gen 2 Stadium fixes Dragon Fang and Dragon Scale having the wrong effects.\r\nexport const Items: {[k: string]: ModdedItemData} = {\r\n\tdragonfang: {\r\n\t\tinherit: true,\r\n\t\tonModifyDamage(damage, source, target, move) {\r\n\t\t\tif (move?.type === 'Dragon') {\r\n\t\t\t\treturn damage * 1.1;\r\n\t\t\t}\r\n\t\t},\r\n\t},\r\n\tdragonscale: {\r\n\t\tinherit: true,\r\n\t\tonModifyDamage() {},\r\n\t},\r\n};\r\n"],
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACO,MAAM,QAAuC;AAAA,EACnD,YAAY;AAAA,IACX,SAAS;AAAA,IACT,eAAe,QAAQ,QAAQ,QAAQ,MAAM;AAC5C,UAAI,MAAM,SAAS,UAAU;AAC5B,eAAO,SAAS;AAAA,MACjB;AAAA,IACD;AAAA,EACD;AAAA,EACA,aAAa;AAAA,IACZ,SAAS;AAAA,IACT,iBAAiB;AAAA,IAAC;AAAA,EACnB;AACD;",
|
||||
"names": []
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
"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 = {
|
||||
// Belly Drum no longer boosts attack by 2 stages if under 50% health.
|
||||
bellydrum: {
|
||||
inherit: true,
|
||||
onHit(target) {
|
||||
if (target.boosts.atk >= 6 || target.hp <= target.maxhp / 2) {
|
||||
return false;
|
||||
}
|
||||
this.directDamage(target.maxhp / 2);
|
||||
const originalStage = target.boosts.atk;
|
||||
let currentStage = originalStage;
|
||||
let boosts = 0;
|
||||
let loopStage = 0;
|
||||
while (currentStage < 6) {
|
||||
loopStage = currentStage;
|
||||
currentStage++;
|
||||
if (currentStage < 6)
|
||||
currentStage++;
|
||||
target.boosts.atk = loopStage;
|
||||
if (target.getStat("atk", false, true) < 999) {
|
||||
target.boosts.atk = currentStage;
|
||||
continue;
|
||||
}
|
||||
target.boosts.atk = currentStage - 1;
|
||||
break;
|
||||
}
|
||||
boosts = target.boosts.atk - originalStage;
|
||||
target.boosts.atk = originalStage;
|
||||
this.boost({ atk: boosts });
|
||||
}
|
||||
},
|
||||
destinybond: {
|
||||
inherit: true,
|
||||
onPrepareHit(pokemon) {
|
||||
if (pokemon.side.pokemonLeft === 1) {
|
||||
this.hint("In Pokemon Stadium 2, Destiny Bond fails if it is being used by your last Pokemon.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* In Stadium 2, moves which affect the stat stages of a Pokemon, such as moves which boost ones own stats,
|
||||
* lower the targets stats, or Haze, causes the afflicted stat to be re-calculated without factoring in
|
||||
* status aliments, thus if a Pokemon is burned or paralyzed and either active Pokemon uses Haze, then their
|
||||
* attack and speed are re-calculated while ignoring their status ailments, so their attack would go from 50% to normal
|
||||
*/
|
||||
haze: {
|
||||
inherit: true,
|
||||
onHitField() {
|
||||
this.add("-clearallboost");
|
||||
for (const pokemon of this.getAllActive()) {
|
||||
pokemon.clearBoosts();
|
||||
pokemon.removeVolatile("brnattackdrop");
|
||||
pokemon.removeVolatile("parspeeddrop");
|
||||
}
|
||||
}
|
||||
},
|
||||
perishsong: {
|
||||
inherit: true,
|
||||
onPrepareHit(pokemon) {
|
||||
if (pokemon.side.pokemonLeft === 1) {
|
||||
this.hint("In Pokemon Stadium 2, Perish Song fails if it is being used by your last Pokemon.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=moves.js.map
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../../../../data/mods/gen2stadium2/moves.ts"],
|
||||
"sourcesContent": ["export const Moves: {[k: string]: ModdedMoveData} = {\r\n\t// Belly Drum no longer boosts attack by 2 stages if under 50% health.\r\n\tbellydrum: {\r\n\t\tinherit: true,\r\n\t\tonHit(target) {\r\n\t\t\tif (target.boosts.atk >= 6 || target.hp <= target.maxhp / 2) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tthis.directDamage(target.maxhp / 2);\r\n\t\t\tconst originalStage = target.boosts.atk;\r\n\t\t\tlet currentStage = originalStage;\r\n\t\t\tlet boosts = 0;\r\n\t\t\tlet loopStage = 0;\r\n\t\t\twhile (currentStage < 6) {\r\n\t\t\t\tloopStage = currentStage;\r\n\t\t\t\tcurrentStage++;\r\n\t\t\t\tif (currentStage < 6) currentStage++;\r\n\t\t\t\ttarget.boosts.atk = loopStage;\r\n\t\t\t\tif (target.getStat('atk', false, true) < 999) {\r\n\t\t\t\t\ttarget.boosts.atk = currentStage;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\ttarget.boosts.atk = currentStage - 1;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tboosts = target.boosts.atk - originalStage;\r\n\t\t\ttarget.boosts.atk = originalStage;\r\n\t\t\tthis.boost({atk: boosts});\r\n\t\t},\r\n\t},\r\n\tdestinybond: {\r\n\t\tinherit: true,\r\n\t\tonPrepareHit(pokemon) {\r\n\t\t\tif (pokemon.side.pokemonLeft === 1) {\r\n\t\t\t\tthis.hint(\"In Pokemon Stadium 2, Destiny Bond fails if it is being used by your last Pokemon.\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t},\r\n\t},\r\n\t/**\r\n\t * In Stadium 2, moves which affect the stat stages of a Pokemon, such as moves which boost ones own stats,\r\n\t * lower the targets stats, or Haze, causes the afflicted stat to be re-calculated without factoring in\r\n\t * status aliments, thus if a Pokemon is burned or paralyzed and either active Pokemon uses Haze, then their\r\n\t * attack and speed are re-calculated while ignoring their status ailments, so their attack would go from 50% to normal\r\n\t */\r\n\thaze: {\r\n\t\tinherit: true,\r\n\t\tonHitField() {\r\n\t\t\tthis.add('-clearallboost');\r\n\t\t\tfor (const pokemon of this.getAllActive()) {\r\n\t\t\t\tpokemon.clearBoosts();\r\n\t\t\t\tpokemon.removeVolatile('brnattackdrop');\r\n\t\t\t\tpokemon.removeVolatile('parspeeddrop');\r\n\t\t\t}\r\n\t\t},\r\n\t},\r\n\tperishsong: {\r\n\t\tinherit: true,\r\n\t\tonPrepareHit(pokemon) {\r\n\t\t\tif (pokemon.side.pokemonLeft === 1) {\r\n\t\t\t\tthis.hint(\"In Pokemon Stadium 2, Perish Song fails if it is being used by your last Pokemon.\");\r\n\t\t\t\treturn false;\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;AAAA,EAEnD,WAAW;AAAA,IACV,SAAS;AAAA,IACT,MAAM,QAAQ;AACb,UAAI,OAAO,OAAO,OAAO,KAAK,OAAO,MAAM,OAAO,QAAQ,GAAG;AAC5D,eAAO;AAAA,MACR;AACA,WAAK,aAAa,OAAO,QAAQ,CAAC;AAClC,YAAM,gBAAgB,OAAO,OAAO;AACpC,UAAI,eAAe;AACnB,UAAI,SAAS;AACb,UAAI,YAAY;AAChB,aAAO,eAAe,GAAG;AACxB,oBAAY;AACZ;AACA,YAAI,eAAe;AAAG;AACtB,eAAO,OAAO,MAAM;AACpB,YAAI,OAAO,QAAQ,OAAO,OAAO,IAAI,IAAI,KAAK;AAC7C,iBAAO,OAAO,MAAM;AACpB;AAAA,QACD;AACA,eAAO,OAAO,MAAM,eAAe;AACnC;AAAA,MACD;AACA,eAAS,OAAO,OAAO,MAAM;AAC7B,aAAO,OAAO,MAAM;AACpB,WAAK,MAAM,EAAC,KAAK,OAAM,CAAC;AAAA,IACzB;AAAA,EACD;AAAA,EACA,aAAa;AAAA,IACZ,SAAS;AAAA,IACT,aAAa,SAAS;AACrB,UAAI,QAAQ,KAAK,gBAAgB,GAAG;AACnC,aAAK,KAAK,oFAAoF;AAC9F,eAAO;AAAA,MACR;AAAA,IACD;AAAA,EACD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM;AAAA,IACL,SAAS;AAAA,IACT,aAAa;AACZ,WAAK,IAAI,gBAAgB;AACzB,iBAAW,WAAW,KAAK,aAAa,GAAG;AAC1C,gBAAQ,YAAY;AACpB,gBAAQ,eAAe,eAAe;AACtC,gBAAQ,eAAe,cAAc;AAAA,MACtC;AAAA,IACD;AAAA,EACD;AAAA,EACA,YAAY;AAAA,IACX,SAAS;AAAA,IACT,aAAa,SAAS;AACrB,UAAI,QAAQ,KAAK,gBAAgB,GAAG;AACnC,aAAK,KAAK,mFAAmF;AAC7F,eAAO;AAAA,MACR;AAAA,IACD;AAAA,EACD;AACD;",
|
||||
"names": []
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
"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: {
|
||||
effectType: "ValidatorRule",
|
||||
name: "Standard",
|
||||
ruleset: ["Obtainable", "Team Preview", "Stadium Sleep Clause", "Freeze Clause Mod", "Self-KO Clause", "Species Clause", "OHKO Clause", "Evasion Moves Clause", "Exact HP Mod", "Cancel Mod", "Stadium Items Clause"]
|
||||
},
|
||||
selfkoclause: {
|
||||
effectType: "Rule",
|
||||
name: "Self-KO Clause",
|
||||
desc: "If a player's last Pokemon uses Self-Destruct or Explosion, they automatically lose the battle.",
|
||||
onBegin() {
|
||||
this.add("rule", "Self-KO Clause: If a player's last Pokemon uses Self-Destruct/Explosion, they automatically lose");
|
||||
}
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=rulesets.js.map
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../../../../data/mods/gen2stadium2/rulesets.ts"],
|
||||
"sourcesContent": ["export const Rulesets: {[k: string]: ModdedFormatData} = {\r\n\tstandard: {\r\n\t\teffectType: 'ValidatorRule',\r\n\t\tname: 'Standard',\r\n\t\truleset: ['Obtainable', 'Team Preview', 'Stadium Sleep Clause', 'Freeze Clause Mod', 'Self-KO Clause', 'Species Clause', 'OHKO Clause', 'Evasion Moves Clause', 'Exact HP Mod', 'Cancel Mod', 'Stadium Items Clause'],\r\n\t},\r\n\tselfkoclause: {\r\n\t\teffectType: 'Rule',\r\n\t\tname: 'Self-KO Clause',\r\n\t\tdesc: \"If a player's last Pokemon uses Self-Destruct or Explosion, they automatically lose the battle.\",\r\n\t\tonBegin() {\r\n\t\t\tthis.add('rule', 'Self-KO Clause: If a player\\'s last Pokemon uses Self-Destruct/Explosion, they automatically lose');\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,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,SAAS,CAAC,cAAc,gBAAgB,wBAAwB,qBAAqB,kBAAkB,kBAAkB,eAAe,wBAAwB,gBAAgB,cAAc,sBAAsB;AAAA,EACrN;AAAA,EACA,cAAc;AAAA,IACb,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,MAAM;AAAA,IACN,UAAU;AACT,WAAK,IAAI,QAAQ,kGAAmG;AAAA,IACrH;AAAA,EACD;AACD;",
|
||||
"names": []
|
||||
}
|
||||
@@ -0,0 +1,522 @@
|
||||
"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: "gen2",
|
||||
gen: 2,
|
||||
pokemon: {
|
||||
inherit: true,
|
||||
getStat(statName, unboosted, unmodified, fastReturn) {
|
||||
if (statName === "hp")
|
||||
throw new Error("Please read `maxhp` directly");
|
||||
let stat = this.storedStats[statName];
|
||||
if (!unboosted) {
|
||||
let boost = this.boosts[statName];
|
||||
if (boost > 6)
|
||||
boost = 6;
|
||||
if (boost < -6)
|
||||
boost = -6;
|
||||
if (boost >= 0) {
|
||||
const boostTable = [1, 1.5, 2, 2.5, 3, 3.5, 4];
|
||||
stat = Math.floor(stat * boostTable[boost]);
|
||||
} else {
|
||||
const numerators = [100, 66, 50, 40, 33, 28, 25];
|
||||
stat = Math.floor(stat * numerators[-boost] / 100);
|
||||
}
|
||||
}
|
||||
if (this.status === "par" && statName === "spe" && this.volatiles["parspeeddrop"]) {
|
||||
stat = Math.floor(stat / 4);
|
||||
}
|
||||
if (!unmodified) {
|
||||
if (this.status === "brn" && statName === "atk" && this.volatiles["brnattackdrop"]) {
|
||||
stat = Math.floor(stat / 2);
|
||||
}
|
||||
}
|
||||
stat = this.battle.clampIntRange(stat, 1, 999);
|
||||
if (fastReturn)
|
||||
return stat;
|
||||
if (!unboosted) {
|
||||
if (statName === "def" && this.side.sideConditions["reflect"] || statName === "spd" && this.side.sideConditions["lightscreen"]) {
|
||||
stat *= 2;
|
||||
}
|
||||
}
|
||||
if (["Cubone", "Marowak"].includes(this.species.name) && this.item === "thickclub" && statName === "atk" || this.species.name === "Pikachu" && this.item === "lightball" && statName === "spa") {
|
||||
stat *= 2;
|
||||
} else if (this.species.name === "Ditto" && this.item === "metalpowder" && ["def", "spd"].includes(statName)) {
|
||||
stat = Math.floor(stat * 1.5);
|
||||
}
|
||||
return stat;
|
||||
}
|
||||
},
|
||||
// Stadium 2 shares gen 2 code but it fixes some problems with it.
|
||||
actions: {
|
||||
inherit: true,
|
||||
tryMoveHit(target, pokemon, move) {
|
||||
const positiveBoostTable = [1, 1.33, 1.66, 2, 2.33, 2.66, 3];
|
||||
const negativeBoostTable = [1, 0.75, 0.6, 0.5, 0.43, 0.36, 0.33];
|
||||
const doSelfDestruct = true;
|
||||
let damage = 0;
|
||||
if (move.selfdestruct && doSelfDestruct) {
|
||||
this.battle.faint(pokemon, pokemon, move);
|
||||
target.side.lastMove = null;
|
||||
pokemon.side.lastMove = move;
|
||||
}
|
||||
let hitResult = this.battle.singleEvent("PrepareHit", move, {}, target, pokemon, move);
|
||||
if (!hitResult) {
|
||||
if (hitResult === false)
|
||||
this.battle.add("-fail", target);
|
||||
return false;
|
||||
}
|
||||
this.battle.runEvent("PrepareHit", pokemon, target, move);
|
||||
if (!this.battle.singleEvent("Try", move, null, pokemon, target, move)) {
|
||||
return false;
|
||||
}
|
||||
if (move.target === "all" || move.target === "foeSide" || move.target === "allySide" || move.target === "allyTeam") {
|
||||
if (move.target === "all") {
|
||||
hitResult = this.battle.runEvent("TryHitField", target, pokemon, move);
|
||||
} else {
|
||||
hitResult = this.battle.runEvent("TryHitSide", target, pokemon, move);
|
||||
}
|
||||
if (!hitResult) {
|
||||
if (hitResult === false) {
|
||||
this.battle.add("-fail", pokemon);
|
||||
this.battle.attrLastMove("[still]");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return this.moveHit(target, pokemon, move);
|
||||
}
|
||||
hitResult = this.battle.runEvent("Invulnerability", target, pokemon, move);
|
||||
if (hitResult === false) {
|
||||
this.battle.attrLastMove("[miss]");
|
||||
this.battle.add("-miss", pokemon);
|
||||
return false;
|
||||
}
|
||||
if (move.ignoreImmunity === void 0) {
|
||||
move.ignoreImmunity = move.category === "Status";
|
||||
}
|
||||
if ((!move.ignoreImmunity || move.ignoreImmunity !== true && !move.ignoreImmunity[move.type]) && !target.runImmunity(move.type, true)) {
|
||||
return false;
|
||||
}
|
||||
hitResult = this.battle.singleEvent("TryImmunity", move, {}, target, pokemon, move);
|
||||
if (hitResult === false) {
|
||||
this.battle.add("-immune", target);
|
||||
return false;
|
||||
}
|
||||
hitResult = this.battle.runEvent("TryHit", target, pokemon, move);
|
||||
if (!hitResult) {
|
||||
if (hitResult === false)
|
||||
this.battle.add("-fail", target);
|
||||
return false;
|
||||
}
|
||||
let accuracy = move.accuracy;
|
||||
if (move.alwaysHit) {
|
||||
accuracy = true;
|
||||
} else {
|
||||
accuracy = this.battle.runEvent("Accuracy", target, pokemon, move, accuracy);
|
||||
}
|
||||
if (accuracy !== true) {
|
||||
accuracy = Math.floor(accuracy * 255 / 100);
|
||||
if (move.ohko) {
|
||||
if (pokemon.level >= target.level) {
|
||||
accuracy += (pokemon.level - target.level) * 2;
|
||||
accuracy = Math.min(accuracy, 255);
|
||||
} else {
|
||||
this.battle.add("-immune", target, "[ohko]");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!move.ignoreAccuracy) {
|
||||
if (pokemon.boosts.accuracy > 0) {
|
||||
accuracy *= positiveBoostTable[pokemon.boosts.accuracy];
|
||||
} else {
|
||||
accuracy *= negativeBoostTable[-pokemon.boosts.accuracy];
|
||||
}
|
||||
}
|
||||
if (!move.ignoreEvasion) {
|
||||
if (target.boosts.evasion > 0 && !move.ignorePositiveEvasion) {
|
||||
accuracy *= negativeBoostTable[target.boosts.evasion];
|
||||
} else if (target.boosts.evasion < 0) {
|
||||
accuracy *= positiveBoostTable[-target.boosts.evasion];
|
||||
}
|
||||
}
|
||||
accuracy = Math.min(Math.floor(accuracy), 255);
|
||||
accuracy = Math.max(accuracy, 1);
|
||||
} else {
|
||||
accuracy = this.battle.runEvent("Accuracy", target, pokemon, move, accuracy);
|
||||
}
|
||||
accuracy = this.battle.runEvent("ModifyAccuracy", target, pokemon, move, accuracy);
|
||||
if (accuracy !== true)
|
||||
accuracy = Math.max(accuracy, 0);
|
||||
if (move.alwaysHit) {
|
||||
accuracy = true;
|
||||
} else {
|
||||
accuracy = this.battle.runEvent("Accuracy", target, pokemon, move, accuracy);
|
||||
}
|
||||
if (accuracy !== true && accuracy !== 255 && !this.battle.randomChance(accuracy, 256)) {
|
||||
this.battle.attrLastMove("[miss]");
|
||||
this.battle.add("-miss", pokemon);
|
||||
damage = false;
|
||||
return damage;
|
||||
}
|
||||
move.totalDamage = 0;
|
||||
pokemon.lastDamage = 0;
|
||||
if (move.multihit) {
|
||||
let hits = move.multihit;
|
||||
if (Array.isArray(hits)) {
|
||||
if (hits[0] === 2 && hits[1] === 5) {
|
||||
hits = this.battle.sample([2, 2, 2, 3, 3, 3, 4, 5]);
|
||||
} else {
|
||||
hits = this.battle.random(hits[0], hits[1] + 1);
|
||||
}
|
||||
}
|
||||
hits = Math.floor(hits);
|
||||
let nullDamage = true;
|
||||
let moveDamage;
|
||||
const isSleepUsable = move.sleepUsable || this.dex.moves.get(move.sourceEffect).sleepUsable;
|
||||
let i;
|
||||
for (i = 0; i < hits && target.hp && pokemon.hp; i++) {
|
||||
if (pokemon.status === "slp" && !isSleepUsable)
|
||||
break;
|
||||
move.hit = i + 1;
|
||||
if (move.hit === hits)
|
||||
move.lastHit = true;
|
||||
moveDamage = this.moveHit(target, pokemon, move);
|
||||
if (moveDamage === false)
|
||||
break;
|
||||
if (nullDamage && (moveDamage || moveDamage === 0 || moveDamage === void 0))
|
||||
nullDamage = false;
|
||||
damage = moveDamage || 0;
|
||||
move.totalDamage += damage;
|
||||
this.battle.eachEvent("Update");
|
||||
}
|
||||
if (i === 0)
|
||||
return 1;
|
||||
if (nullDamage)
|
||||
damage = false;
|
||||
this.battle.add("-hitcount", target, i);
|
||||
} else {
|
||||
damage = this.moveHit(target, pokemon, move);
|
||||
move.totalDamage = damage;
|
||||
}
|
||||
if (move.category !== "Status") {
|
||||
target.gotAttacked(move, damage, pokemon);
|
||||
}
|
||||
if (move.ohko)
|
||||
this.battle.add("-ohko");
|
||||
if (!move.negateSecondary) {
|
||||
this.battle.singleEvent("AfterMoveSecondary", move, null, target, pokemon, move);
|
||||
this.battle.runEvent("AfterMoveSecondary", target, pokemon, move);
|
||||
}
|
||||
if (move.recoil && move.totalDamage && (pokemon.side.pokemonLeft > 1 || target.side.pokemonLeft > 1 || target.hp)) {
|
||||
this.battle.damage(this.calcRecoilDamage(move.totalDamage, move), pokemon, target, "recoil");
|
||||
}
|
||||
return damage;
|
||||
},
|
||||
getDamage(source, target, move, suppressMessages) {
|
||||
if (typeof move === "string") {
|
||||
move = this.dex.getActiveMove(move);
|
||||
} else if (typeof move === "number") {
|
||||
move = {
|
||||
basePower: move,
|
||||
type: "???",
|
||||
category: "Physical",
|
||||
willCrit: false,
|
||||
flags: {}
|
||||
};
|
||||
}
|
||||
if (!move.ignoreImmunity || move.ignoreImmunity !== true && !move.ignoreImmunity[move.type]) {
|
||||
if (!target.runImmunity(move.type, true)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (move.ohko) {
|
||||
return target.maxhp;
|
||||
}
|
||||
if (move.damageCallback) {
|
||||
return move.damageCallback.call(this.battle, source, target);
|
||||
}
|
||||
if (move.damage === "level") {
|
||||
return source.level;
|
||||
}
|
||||
if (move.damage) {
|
||||
return move.damage;
|
||||
}
|
||||
move.category = this.battle.getCategory(move);
|
||||
if (!move.type)
|
||||
move.type = "???";
|
||||
const type = move.type;
|
||||
let basePower = move.basePower;
|
||||
if (move.basePowerCallback) {
|
||||
basePower = move.basePowerCallback.call(this.battle, source, target, move);
|
||||
}
|
||||
if (!basePower) {
|
||||
if (basePower === 0)
|
||||
return;
|
||||
return basePower;
|
||||
}
|
||||
basePower = this.battle.clampIntRange(basePower, 1);
|
||||
let critRatio = this.battle.runEvent("ModifyCritRatio", source, target, move, move.critRatio || 0);
|
||||
critRatio = this.battle.clampIntRange(critRatio, 0, 5);
|
||||
const critMult = [0, 16, 8, 4, 3, 2];
|
||||
let isCrit = move.willCrit || false;
|
||||
if (typeof move.willCrit === "undefined") {
|
||||
if (critRatio) {
|
||||
isCrit = this.battle.randomChance(1, critMult[critRatio]);
|
||||
}
|
||||
}
|
||||
if (isCrit && this.battle.runEvent("CriticalHit", target, null, move)) {
|
||||
target.getMoveHitData(move).crit = true;
|
||||
}
|
||||
if (basePower) {
|
||||
if (move.isConfusionSelfHit) {
|
||||
move.type = move.baseMoveType;
|
||||
basePower = this.battle.runEvent("BasePower", source, target, move, basePower, true);
|
||||
move.type = "???";
|
||||
} else {
|
||||
basePower = this.battle.runEvent("BasePower", source, target, move, basePower, true);
|
||||
}
|
||||
if (basePower && move.basePowerModifier) {
|
||||
basePower *= move.basePowerModifier;
|
||||
}
|
||||
}
|
||||
if (!basePower)
|
||||
return 0;
|
||||
basePower = this.battle.clampIntRange(basePower, 1);
|
||||
let level = source.level;
|
||||
if (move.allies) {
|
||||
this.battle.add("-activate", source, "move: Beat Up", "[of] " + move.allies[0].name);
|
||||
level = move.allies[0].level;
|
||||
}
|
||||
const attacker = move.overrideOffensivePokemon === "target" ? target : source;
|
||||
const defender = move.overrideDefensivePokemon === "source" ? source : target;
|
||||
const isPhysical = move.category === "Physical";
|
||||
const atkType = move.overrideOffensiveStat || (isPhysical ? "atk" : "spa");
|
||||
const defType = move.overrideDefensiveStat || (isPhysical ? "def" : "spd");
|
||||
let unboosted = false;
|
||||
let noburndrop = false;
|
||||
if (isCrit) {
|
||||
if (!suppressMessages)
|
||||
this.battle.add("-crit", target);
|
||||
if (attacker.boosts[atkType] <= defender.boosts[defType]) {
|
||||
unboosted = true;
|
||||
noburndrop = true;
|
||||
}
|
||||
}
|
||||
let attack = attacker.getStat(atkType, unboosted, noburndrop);
|
||||
let defense = defender.getStat(defType, unboosted);
|
||||
if (move.allies) {
|
||||
attack = move.allies[0].species.baseStats.atk;
|
||||
move.allies.shift();
|
||||
defense = defender.species.baseStats.def;
|
||||
}
|
||||
if (move.ignoreOffensive) {
|
||||
this.battle.debug("Negating (sp)atk boost/penalty.");
|
||||
attack = attacker.getStat(atkType, true, true);
|
||||
}
|
||||
if (move.ignoreDefensive) {
|
||||
this.battle.debug("Negating (sp)def boost/penalty.");
|
||||
defense = target.getStat(defType, true, true);
|
||||
}
|
||||
if (attack >= 256 || defense >= 256) {
|
||||
attack = this.battle.clampIntRange(Math.floor(this.battle.clampIntRange(attack, 1, 999) / 4), 1);
|
||||
defense = this.battle.clampIntRange(Math.floor(this.battle.clampIntRange(defense, 1, 999) / 4), 1);
|
||||
}
|
||||
if (move.selfdestruct && defType === "def") {
|
||||
defense = this.battle.clampIntRange(Math.floor(defense / 2), 1);
|
||||
}
|
||||
let damage = level * 2;
|
||||
damage = Math.floor(damage / 5);
|
||||
damage += 2;
|
||||
damage *= basePower;
|
||||
damage *= attack;
|
||||
damage = Math.floor(damage / defense);
|
||||
damage = Math.floor(damage / 50);
|
||||
if (isCrit)
|
||||
damage *= 2;
|
||||
damage = Math.floor(this.battle.runEvent("ModifyDamage", attacker, defender, move, damage));
|
||||
damage = this.battle.clampIntRange(damage, 1, 997);
|
||||
damage += 2;
|
||||
if (type === "Water" && this.battle.field.isWeather("raindance") || type === "Fire" && this.battle.field.isWeather("sunnyday")) {
|
||||
damage = Math.floor(damage * 1.5);
|
||||
} else if ((type === "Fire" || move.id === "solarbeam") && this.battle.field.isWeather("raindance") || type === "Water" && this.battle.field.isWeather("sunnyday")) {
|
||||
damage = Math.floor(damage / 2);
|
||||
}
|
||||
if (type !== "???" && source.hasType(type)) {
|
||||
damage += Math.floor(damage / 2);
|
||||
}
|
||||
const totalTypeMod = target.runEffectiveness(move);
|
||||
if (totalTypeMod > 0) {
|
||||
if (!suppressMessages)
|
||||
this.battle.add("-supereffective", target);
|
||||
damage *= 2;
|
||||
if (totalTypeMod >= 2) {
|
||||
damage *= 2;
|
||||
}
|
||||
}
|
||||
if (totalTypeMod < 0) {
|
||||
if (!suppressMessages)
|
||||
this.battle.add("-resisted", target);
|
||||
damage = Math.floor(damage / 2);
|
||||
if (totalTypeMod <= -2) {
|
||||
damage = Math.floor(damage / 2);
|
||||
}
|
||||
}
|
||||
if (!move.noDamageVariance && damage > 1) {
|
||||
damage *= this.battle.random(217, 256);
|
||||
damage = Math.floor(damage / 255);
|
||||
}
|
||||
if (basePower && !Math.floor(damage)) {
|
||||
return 1;
|
||||
}
|
||||
return damage;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Stadium 2 ignores stat drops due to status ailments upon boosting the dropped stat.
|
||||
* For example: if a burned Snorlax uses Curse then it will ignore the attack drop from
|
||||
* burn when it is recalculating its attack stat. This is why volatiles are added to status
|
||||
* conditions, so that we can keep track of whether or not to apply the stat drop from
|
||||
* statuses.
|
||||
*/
|
||||
boost(boost, target, source = null, effect = null) {
|
||||
if (this.event) {
|
||||
if (!target)
|
||||
target = this.event.target;
|
||||
if (!source)
|
||||
source = this.event.source;
|
||||
if (!effect)
|
||||
effect = this.effect;
|
||||
}
|
||||
if (typeof effect === "string")
|
||||
effect = this.dex.conditions.get(effect);
|
||||
if (!target?.hp)
|
||||
return 0;
|
||||
let success = null;
|
||||
boost = this.runEvent("TryBoost", target, source, effect, { ...boost });
|
||||
let i;
|
||||
for (i in boost) {
|
||||
const currentBoost = {};
|
||||
currentBoost[i] = boost[i];
|
||||
let boostBy = target.boostBy(currentBoost);
|
||||
let msg = "-boost";
|
||||
if (boost[i] < 0) {
|
||||
msg = "-unboost";
|
||||
boostBy = -boostBy;
|
||||
}
|
||||
if (boostBy) {
|
||||
success = true;
|
||||
if (i === "atk" && target.status === "brn" && target.volatiles["brnattackdrop"]) {
|
||||
target.removeVolatile("brnattackdrop");
|
||||
}
|
||||
if (i === "spe" && target.status === "par" && target.volatiles["parspeeddrop"]) {
|
||||
target.removeVolatile("parspeeddrop");
|
||||
}
|
||||
if (!effect || effect.effectType === "Move") {
|
||||
this.add(msg, target, i, boostBy);
|
||||
} else {
|
||||
this.add(msg, target, i, boostBy, "[from] " + effect.fullname);
|
||||
}
|
||||
this.runEvent("AfterEachBoost", target, source, effect, currentBoost);
|
||||
}
|
||||
}
|
||||
this.runEvent("AfterBoost", target, source, effect, boost);
|
||||
return success;
|
||||
},
|
||||
/**
|
||||
* Implementing Self-KO Clause by having it check what the last move used by the players were
|
||||
* in the case both Pokemon faint. Since the only way this can happen in Stadium 2 is if a player
|
||||
* uses self-destruct or explosion, I can use this to determine who should win.
|
||||
*/
|
||||
faintMessages(lastFirst) {
|
||||
if (this.ended)
|
||||
return;
|
||||
const length = this.faintQueue.length;
|
||||
if (!length)
|
||||
return false;
|
||||
if (lastFirst) {
|
||||
this.faintQueue.unshift(this.faintQueue[this.faintQueue.length - 1]);
|
||||
this.faintQueue.pop();
|
||||
}
|
||||
let faintData;
|
||||
while (this.faintQueue.length) {
|
||||
faintData = this.faintQueue.shift();
|
||||
const pokemon = faintData.target;
|
||||
if (!pokemon.fainted && this.runEvent("BeforeFaint", pokemon, faintData.source, faintData.effect)) {
|
||||
this.add("faint", pokemon);
|
||||
pokemon.side.pokemonLeft--;
|
||||
if (pokemon.side.totalFainted < 100)
|
||||
pokemon.side.totalFainted++;
|
||||
this.runEvent("Faint", pokemon, faintData.source, faintData.effect);
|
||||
this.singleEvent("End", pokemon.getAbility(), pokemon.abilityState, pokemon);
|
||||
pokemon.clearVolatile(false);
|
||||
pokemon.fainted = true;
|
||||
pokemon.isActive = false;
|
||||
pokemon.isStarted = false;
|
||||
pokemon.side.faintedThisTurn = pokemon;
|
||||
}
|
||||
}
|
||||
if (this.gen <= 1) {
|
||||
this.queue.clear();
|
||||
for (const pokemon of this.getAllActive()) {
|
||||
if (pokemon.volatiles["bide"] && pokemon.volatiles["bide"].damage) {
|
||||
pokemon.volatiles["bide"].damage = 0;
|
||||
this.hint("Desync Clause Mod activated!");
|
||||
this.hint("In Gen 1, Bide's accumulated damage is reset to 0 when a Pokemon faints.");
|
||||
}
|
||||
}
|
||||
} else if (this.gen <= 3 && this.gameType === "singles") {
|
||||
for (const pokemon of this.getAllActive()) {
|
||||
if (this.gen <= 2) {
|
||||
this.queue.cancelMove(pokemon);
|
||||
} else {
|
||||
this.queue.cancelAction(pokemon);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!this.p1.pokemonLeft && !this.p2.pokemonLeft) {
|
||||
if (this.p1.lastMove !== null && this.p2.lastMove === null) {
|
||||
this.win(this.p2);
|
||||
return true;
|
||||
} else if (this.p2.lastMove !== null && this.p1.lastMove === null) {
|
||||
this.win(this.p1);
|
||||
return true;
|
||||
}
|
||||
this.win(faintData ? faintData.target.side.foe : null);
|
||||
return true;
|
||||
}
|
||||
if (!this.p1.pokemonLeft) {
|
||||
this.win(this.p2);
|
||||
return true;
|
||||
}
|
||||
if (!this.p2.pokemonLeft) {
|
||||
this.win(this.p1);
|
||||
return true;
|
||||
}
|
||||
if (faintData) {
|
||||
this.runEvent("AfterFaint", faintData.target, faintData.source, faintData.effect, length);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=scripts.js.map
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../../../../data/mods/gen2stadium2/scripts.ts"],
|
||||
"sourcesContent": ["/**\r\n * Stadium 2 mechanics inherit from gen 2 mechanics, but fixes some bugs.\r\n */\r\nexport const Scripts: ModdedBattleScriptsData = {\r\n\tinherit: 'gen2',\r\n\tgen: 2,\r\n\tpokemon: {\r\n\t\tinherit: true,\r\n\t\tgetStat(statName, unboosted, unmodified, fastReturn) {\r\n\t\t\t// @ts-ignore - type checking prevents 'hp' from being passed, but we're paranoid\r\n\t\t\tif (statName === 'hp') throw new Error(\"Please read `maxhp` directly\");\r\n\r\n\t\t\t// base stat\r\n\t\t\tlet stat = this.storedStats[statName];\r\n\r\n\t\t\t// Stat boosts.\r\n\t\t\tif (!unboosted) {\r\n\t\t\t\tlet boost = this.boosts[statName];\r\n\t\t\t\tif (boost > 6) boost = 6;\r\n\t\t\t\tif (boost < -6) boost = -6;\r\n\t\t\t\tif (boost >= 0) {\r\n\t\t\t\t\tconst boostTable = [1, 1.5, 2, 2.5, 3, 3.5, 4];\r\n\t\t\t\t\tstat = Math.floor(stat * boostTable[boost]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconst numerators = [100, 66, 50, 40, 33, 28, 25];\r\n\t\t\t\t\tstat = Math.floor(stat * numerators[-boost] / 100);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (this.status === 'par' && statName === 'spe' && this.volatiles['parspeeddrop']) {\r\n\t\t\t\tstat = Math.floor(stat / 4);\r\n\t\t\t}\r\n\t\t\tif (!unmodified) {\r\n\t\t\t\tif (this.status === 'brn' && statName === 'atk' && this.volatiles['brnattackdrop']) {\r\n\t\t\t\t\tstat = Math.floor(stat / 2);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Gen 2 caps stats at 999 and min is 1.\r\n\t\t\tstat = this.battle.clampIntRange(stat, 1, 999);\r\n\t\t\tif (fastReturn) return stat;\r\n\r\n\t\t\t// Screens\r\n\t\t\tif (!unboosted) {\r\n\t\t\t\tif (\r\n\t\t\t\t\t(statName === 'def' && this.side.sideConditions['reflect']) ||\r\n\t\t\t\t\t(statName === 'spd' && this.side.sideConditions['lightscreen'])\r\n\t\t\t\t) {\r\n\t\t\t\t\tstat *= 2;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Handle boosting items\r\n\t\t\tif (\r\n\t\t\t\t(['Cubone', 'Marowak'].includes(this.species.name) && this.item === 'thickclub' && statName === 'atk') ||\r\n\t\t\t\t(this.species.name === 'Pikachu' && this.item === 'lightball' && statName === 'spa')\r\n\t\t\t) {\r\n\t\t\t\tstat *= 2;\r\n\t\t\t} else if (this.species.name === 'Ditto' && this.item === 'metalpowder' && ['def', 'spd'].includes(statName)) {\r\n\t\t\t\tstat = Math.floor(stat * 1.5);\r\n\t\t\t}\r\n\r\n\t\t\treturn stat;\r\n\t\t},\r\n\t},\r\n\t// Stadium 2 shares gen 2 code but it fixes some problems with it.\r\n\tactions: {\r\n\t\tinherit: true,\r\n\t\ttryMoveHit(target, pokemon, move) {\r\n\t\t\tconst positiveBoostTable = [1, 1.33, 1.66, 2, 2.33, 2.66, 3];\r\n\t\t\tconst negativeBoostTable = [1, 0.75, 0.6, 0.5, 0.43, 0.36, 0.33];\r\n\t\t\tconst doSelfDestruct = true;\r\n\t\t\tlet damage: number | false | undefined = 0;\r\n\r\n\t\t\tif (move.selfdestruct && doSelfDestruct) {\r\n\t\t\t\tthis.battle.faint(pokemon, pokemon, move);\r\n\t\t\t\t/**\r\n\t\t\t\t * Keeping track of the last move used for self-ko clause,\r\n\t\t\t\t * making sure to clear the opponents last move so that self-destruct and explosion\r\n\t\t\t\t * does not persist between Pokemon, preventing problems caused by situations,\r\n\t\t\t\t * such as a player from blowing up both they and their opponents second last Pokemon\r\n\t\t\t\t * and their opponent blowing up their last Pokemon. If we did not clear here, there would be a problem.\r\n\t\t\t\t */\r\n\t\t\t\ttarget.side.lastMove = null;\r\n\t\t\t\tpokemon.side.lastMove = move;\r\n\t\t\t}\r\n\r\n\t\t\tlet hitResult = this.battle.singleEvent('PrepareHit', move, {}, target, pokemon, move);\r\n\t\t\tif (!hitResult) {\r\n\t\t\t\tif (hitResult === false) this.battle.add('-fail', target);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tthis.battle.runEvent('PrepareHit', pokemon, target, move);\r\n\r\n\t\t\tif (!this.battle.singleEvent('Try', move, null, pokemon, target, move)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tif (move.target === 'all' || move.target === 'foeSide' || move.target === 'allySide' || move.target === 'allyTeam') {\r\n\t\t\t\tif (move.target === 'all') {\r\n\t\t\t\t\thitResult = this.battle.runEvent('TryHitField', target, pokemon, move);\r\n\t\t\t\t} else {\r\n\t\t\t\t\thitResult = this.battle.runEvent('TryHitSide', target, pokemon, move);\r\n\t\t\t\t}\r\n\t\t\t\tif (!hitResult) {\r\n\t\t\t\t\tif (hitResult === false) {\r\n\t\t\t\t\t\tthis.battle.add('-fail', pokemon);\r\n\t\t\t\t\t\tthis.battle.attrLastMove('[still]');\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\treturn this.moveHit(target, pokemon, move);\r\n\t\t\t}\r\n\r\n\t\t\thitResult = this.battle.runEvent('Invulnerability', target, pokemon, move);\r\n\t\t\tif (hitResult === false) {\r\n\t\t\t\tthis.battle.attrLastMove('[miss]');\r\n\t\t\t\tthis.battle.add('-miss', pokemon);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tif (move.ignoreImmunity === undefined) {\r\n\t\t\t\tmove.ignoreImmunity = (move.category === 'Status');\r\n\t\t\t}\r\n\r\n\t\t\tif (\r\n\t\t\t\t(!move.ignoreImmunity || (move.ignoreImmunity !== true && !move.ignoreImmunityLine truncated
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,MAAM,UAAmC;AAAA,EAC/C,SAAS;AAAA,EACT,KAAK;AAAA,EACL,SAAS;AAAA,IACR,SAAS;AAAA,IACT,QAAQ,UAAU,WAAW,YAAY,YAAY;AAEpD,UAAI,aAAa;AAAM,cAAM,IAAI,MAAM,8BAA8B;AAGrE,UAAI,OAAO,KAAK,YAAY,QAAQ;AAGpC,UAAI,CAAC,WAAW;AACf,YAAI,QAAQ,KAAK,OAAO,QAAQ;AAChC,YAAI,QAAQ;AAAG,kBAAQ;AACvB,YAAI,QAAQ;AAAI,kBAAQ;AACxB,YAAI,SAAS,GAAG;AACf,gBAAM,aAAa,CAAC,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAC7C,iBAAO,KAAK,MAAM,OAAO,WAAW,KAAK,CAAC;AAAA,QAC3C,OAAO;AACN,gBAAM,aAAa,CAAC,KAAK,IAAI,IAAI,IAAI,IAAI,IAAI,EAAE;AAC/C,iBAAO,KAAK,MAAM,OAAO,WAAW,CAAC,K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