pokemon-showdown/data/mods/gen2stadium2/rulesets.ts
Ivo Julca 29f778f233 Stricter typing for formats and rules
- Legacy effect type ``Ruleset`` removed
- New type ``RuleValueType`` for ``rule.hasValue``
- New interface ``RuleTableBuildContext`` for ``onValidateRule`` handlers
- New interface: ``RuleEventMethods`` extending ``EventMethods``
- ``data/rulesets.ts``: Different tag-discriminated types for
  ``effectType='Rule'`` vs ``effectType='ValidatorRule'``:
  ``RuleData`` vs ``ValidatorRuleData``.
- ``data/rulesets.ts``: Renamed ``FormatDataTable`` to ``RulesetTable``
- Distinguishes types for formats in ``config/formats.ts`` vs in ``Dex.data.Rulesets``:
  ``FormatData`` vs ``LoadedFormatData``.
- Union type for formats OR rulesets in ``Dex.data.Rulesets``: ``RulesetData``
- Implements ``DexFormats#find|some``, for searches excluding rules.
- Remove obsolete comment regarding former lack of support for format.onResidual
2026-04-16 12:02:45 -05:00

25 lines
813 B
TypeScript

export const Rulesets: import('../../../sim/dex-formats').ModdedRulesetTable = {
standardag: {
inherit: true,
ruleset: [
'Obtainable', 'Team Preview', 'Exact HP Mod', 'Cancel Mod', 'Beat Up Nicknames Mod',
],
},
standard: {
effectType: 'ValidatorRule',
name: 'Standard',
ruleset: [
'Standard AG',
'Stadium Sleep Clause', 'Freeze Clause Mod', 'Self-KO Clause', 'Species Clause', 'Nickname Clause', 'OHKO Clause', 'Evasion Moves Clause', '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');
},
},
};