mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-04-26 02:39:38 -05:00
- rulesets.ts -> format-rules.ts - formats-data.ts -> pokedex-tiers.ts Variable names were updated to match.
27 lines
892 B
TypeScript
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;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
};
|