Clauses
File: config/frontier/clauses.conf
Clauses define battle rules and restrictions. Each clause is enforced at a specific point — before battle (team validation), during battle (in-battle), or by the Showdown engine (native). Formats reference clauses by ID.
Quick Example
Section titled “Quick Example”clauses { species_clause { displayName = "Species Clause" description = "A player cannot have two of the same species of Pokemon on their team." type = "TEAM_VALIDATION" showdownRule = "Species Clause" perPokemon = false molangExpression = ["!query.has_duplicate_species"] failureMessage = "Species Clause: Your team has duplicate species" }}Fields
Section titled “Fields”| Field | Type | Default | Description |
|---|---|---|---|
displayName | String | "" | Human-readable name shown in GUIs. |
description | String | "" | What this clause does. |
type | ClauseType | "SHOWDOWN_NATIVE" | When and how the clause is enforced. |
showdownRule | String? | null | Showdown rule string (for SHOWDOWN_NATIVE clauses). |
molangExpression | List<String>? | null | MoLang expressions for validation. Each entry is a separate expression. |
perPokemon | Boolean | true | If true, expression runs once per Pokemon. If false, once for the whole team. |
failureMessage | String? | null | Message shown when validation fails. Placeholders: {pokemon} (per-Pokemon only), {clause}. |
Clause Types
Section titled “Clause Types”| Type | Description |
|---|---|
TEAM_VALIDATION | Checked during team validation before the battle starts. Uses MoLang expressions. |
SHOWDOWN_NATIVE | Passed directly to the Showdown battle engine as a rule string. |
IN_BATTLE | Enforced during battle by Frontier (gimmick bans). |
Enforcement Flow
Section titled “Enforcement Flow”- Queue Join —
TEAM_VALIDATIONclauses run against the player’s team. If any fail, the player can’t join the queue and sees the failure message. - Battle Start —
SHOWDOWN_NATIVEclauses are passed to the Showdown engine. Format-level bans (species, moves, abilities, items) also apply here. - During Battle —
IN_BATTLEclauses (gimmick bans) fire when players attempt banned mechanics.
Default Clauses
Section titled “Default Clauses”Frontier ships with 13 clauses across all three types.
Team Validation Clauses
Section titled “Team Validation Clauses”| ID | Name | Per-Pokemon | Expression | Description |
|---|---|---|---|---|
species_clause | Species Clause | No | !query.has_duplicate_species | No duplicate species on a team. |
item_clause | Item Clause | No | !query.has_duplicate_items | No duplicate held items. |
evasion_clause | Evasion Clause | Yes | !query.pokemon.has_any_move('doubleteam,minimize') | Bans evasion-boosting moves. |
ohko_clause | OHKO Clause | Yes | !query.pokemon.has_any_move('fissure,sheercold,horndrill,guillotine') | Bans one-hit KO moves. |
monotype | Monotype | No | query.team_shares_type | All team members must share a type. |
level_cap | Level Cap | Yes | query.format_target_level == 0 || query.pokemon.level <= query.format_target_level | Pokemon must be at or below the format’s target level. |
no_legendaries | No Legendaries | Yes | !query.pokemon.species.has_label('legendary') | Legendary Pokemon are banned. |
nfe_only | NFE Only | Yes | query.pokemon.can_evolve | Only unevolved Pokemon (Little Cup). |
Showdown Native Clauses
Section titled “Showdown Native Clauses”| ID | Name | Showdown Rule | Description |
|---|---|---|---|
sleep_clause | Sleep Clause | "Sleep Clause Mod" | Only one opposing Pokemon can be asleep at a time. |
In-Battle Clauses (Gimmick Bans)
Section titled “In-Battle Clauses (Gimmick Bans)”| ID | Name | What It Bans |
|---|---|---|
gimmick_ban | Gimmick Ban | Mega Evolution, Ultra Burst, Z-Moves, Dynamax, Terastallization |
ban_mega | Mega Evolution Ban | Mega Evolution, Ultra Burst |
ban_tera | Terastallization Ban | Terastallization |
ban_dynamax | Dynamax Ban | Dynamax |
ban_zmoves | Z-Moves Ban | Z-Moves |
MoLang Query API
Section titled “MoLang Query API”Frontier exposes custom MoLang queries for use in clause expressions.
Per-Pokemon Queries
Section titled “Per-Pokemon Queries”Available when perPokemon = true. Access through query.pokemon.
| Query | Returns | Description |
|---|---|---|
query.pokemon.level | Double | Pokemon’s current level. |
query.pokemon.can_evolve | 1.0/0.0 | Whether the Pokemon can still evolve. |
query.pokemon.has_move('name') | 1.0/0.0 | Whether the Pokemon knows a specific move (Showdown ID). |
query.pokemon.has_any_move('m1,m2,...') | 1.0/0.0 | Whether the Pokemon knows any of the listed moves. |
query.pokemon.species.has_label('label') | 1.0/0.0 | Whether the species has a label (e.g., legendary). |
Team-Wide Queries
Section titled “Team-Wide Queries”Available in both per-Pokemon and team mode.
| Query | Returns | Description |
|---|---|---|
query.team_size | Double | Number of Pokemon on the team. |
query.has_duplicate_species | 1.0/0.0 | Whether the team has duplicate species. |
query.has_duplicate_items | 1.0/0.0 | Whether the team has duplicate held items. |
query.team_shares_type | 1.0/0.0 | Whether all team members share at least one type. |
query.format_target_level | Double | Format’s target level (0 if none). |
query.format_team_size | Double | Format’s max team size. |
Custom Clauses
Section titled “Custom Clauses”You can define your own clauses with MoLang expressions. Here are two examples:
clauses { no_uber_abilities { displayName = "No Uber Abilities" description = "Bans Shadow Tag and Arena Trap." type = "TEAM_VALIDATION" perPokemon = true molangExpression = [ "query.pokemon.ability.name != 'shadowtag' && query.pokemon.ability.name != 'arenatrap'" ] failureMessage = "{pokemon} has a banned ability" } max_level_50 { displayName = "Level 50 Cap" description = "All Pokemon must be level 50 or below." type = "TEAM_VALIDATION" perPokemon = true molangExpression = ["query.pokemon.level <= 50"] failureMessage = "{pokemon} exceeds the level 50 cap" }}