mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-04-26 02:39:38 -05:00
* Adding gen 3 colosseum format, updating win check * Update formats.ts * Adding Gen 3 Hoenn Stadium format * They want open team sheets on the format * Fixing selfKO clause code for the gen3colosseum mod. - Perish song only cares if the user is the last mon, we had that wrong. - Corrected the game resolution code to properly calculate winners/draws (Has been tested on a dev server) * forgot Destiny bond * Cleaning up ban and unban lists for hoenn stadium * Deoxys is not nonstandard --------- Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
28 lines
710 B
TypeScript
28 lines
710 B
TypeScript
export const Scripts: ModdedBattleScriptsData = {
|
|
inherit: 'gen3',
|
|
gen: 3,
|
|
|
|
checkWin(faintData?: Battle['faintQueue'][0]) {
|
|
if (this.sides.every(side => !side.pokemonLeft)) {
|
|
let isSelfKo = false;
|
|
if (faintData?.effect) {
|
|
isSelfKo = isSelfKo || this.dex.moves.getByID(faintData?.effect?.id).selfdestruct !== undefined;
|
|
isSelfKo = isSelfKo || this.dex.moves.getByID(faintData?.effect?.id).recoil !== undefined;
|
|
}
|
|
if (isSelfKo) {
|
|
this.win(faintData ? faintData.target.side : null);
|
|
return true;
|
|
} else {
|
|
this.win(undefined);
|
|
return true;
|
|
}
|
|
}
|
|
for (const side of this.sides) {
|
|
if (!side.foePokemonLeft()) {
|
|
this.win(side);
|
|
return true;
|
|
}
|
|
}
|
|
},
|
|
};
|