mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-04-26 02:39:38 -05:00
TypeScript 4.8+ supports Lowercase for lowercase strings, which isn't exactly what ID is, but can be used to type IDs in object keys and data entries that previously required string. I'm calling it IDEntry in places where it should be an ID but TypeScript doesn't support that. Very conveniently, no additional casts will be needed when using ID where IDEntry is expected. It's caught at least a few bugs, which is also why I'm PRing: I didn't write the code for the bugs it found, and don't know if it's the right way to fix them. This ballooned into several other type refactors.
16 lines
708 B
TypeScript
16 lines
708 B
TypeScript
export const Rulesets: import('../../../sim/dex-formats').ModdedFormatDataTable = {
|
|
standard: {
|
|
effectType: 'ValidatorRule',
|
|
name: 'Standard',
|
|
ruleset: ['Obtainable', 'Team Preview', 'Stadium Sleep Clause', 'Freeze Clause Mod', 'Self-KO Clause', 'Species Clause', 'Nickname 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');
|
|
},
|
|
},
|
|
};
|