pokemon-showdown/data/mods/gen9ssb/format-rules.ts
Guangcong Luo e9ec82327f Rename files in data for consistency
- rulesets.ts -> format-rules.ts
- formats-data.ts -> pokedex-tiers.ts

Variable names were updated to match.
2024-07-02 03:06:33 -07:00

27 lines
892 B
TypeScript

export const Rulesets: import('../../../sim/dex-formats').ModdedFormatDataTable = {
sleepclausemod: {
inherit: true,
onSetStatus(status, target, source) {
if (source && source.isAlly(target)) {
return;
}
if (status.id === 'slp') {
for (const pokemon of target.side.pokemon) {
if (pokemon.hp && pokemon.status === 'slp') {
if (!pokemon.statusState.source || !pokemon.statusState.source.isAlly(pokemon)) {
if (source.hasAbility('ididitagain') && !source.m.bypassedSleepClause) {
this.add('-ability', source, 'I Did It Again');
source.m.bypassedSleepClause = true;
return;
}
this.add('-message', 'Sleep Clause Mod activated.');
this.hint("Sleep Clause Mod prevents players from putting more than one of their opponent's Pokémon to sleep at a time");
return false;
}
}
}
}
},
},
};