COBBLE TOURNEY - CONFIG GUIDE
=============================
Files in this folder: config.json, rules.json, rewards.json.
After editing, run /tournament reload in game (or restart).
If a file has a typo, the mod keeps the last good version and pauses schedules;
the error is printed in chat for admins and in the server log.

PLAYER COMMANDS
  /tournament            next tournament time and rule
  /tournament check      does my party meet the rule?
  /tournament join       sign up while signups are open
  /tournament ready      start your match
  /tournament leave
  /tournament leaderboard

ADMIN COMMANDS (permission level set in config.json)
  /tournament start      open signups now (a waiting tournament, or a fresh rule)
  /tournament stop       cancel the running, waiting or counting-down tournament
  /tournament reroll     pick a new rule for the next tournament
  /tournament rewards    show which rewards exist on this server
  /tournament testreward <player> <first|second|third|participation>
  /tournament skip <player>
  /tournament reload

HOW A TOURNAMENT RUNS
  1. The rule is picked and announced announceRuleHoursBefore (24h) ahead.
     If a tournament is running at that moment, the reveal waits until it ends,
     so two rules never get mixed up in chat. Players also see it on login.
  2. At the scheduled time, if minOnlinePlayers are online, signups open right away.
  3. If not (or a tournament is still running), the tournament WAITS. The moment
     enough players are online, a lateStartCountdownMinutes (20 min) countdown starts,
     then signups open. If players drop below the minimum by the end, it waits again.
     A waiting tournament that never starts is replaced by the next scheduled one.
  4. Signups stay open for signupMinutes. Then single elimination: each match,
     both players click [Ready]. Whoever isn't ready by readyTimeoutSeconds forfeits
     (after one 60s last call).
  5. Losers get rewards when they're knocked out; the champion at the end.
     Players who never battled get nothing (stops sign-up-and-idle farming).
     Offline players receive rewards on their next login.

LEVEL-SCALED FORMATS (levelScale > 0)
  Uses Cobblemon's own level-scaled battles, the same option as its challenge menu.
  Cobblemon battles with temporary healed copies, so real Pokemon are not damaged
  and gain no XP from tournament battles.

REAL-LEVEL FORMATS (levelScale -1, e.g. the Sunday Championship)
  Pokemon battle at their real levels, exactly like a normal Cobblemon PvP battle.
  maxLevel caps the level allowed (0 = no cap). With healBeforeMatch true, both teams
  are healed with Cobblemon's own heal before every match, so round 1 damage doesn't
  decide round 2.

TWIST TYPES (rules.json)
  monotype, allowed_types (types), random_allowed_types (count), banned_types (types),
  random_banned_types (count), no_shared_types, banned_labels (labels),
  random_generation (generations), evolution_stage (stage: unevolved |
  not_fully_evolved | fully_evolved), max_base_stat_total (maxBaseStatTotal),
  no_held_items, banned_item_tags (itemTags), required_item_tag (itemTags),
  banned_species (species)
  category: only one twist per category is used in a rule.
  difficulty: total per rule stays at or below maxDifficulty.
  requiresMod: the twist is skipped if that mod isn't installed.
  If an add-on legendary isn't caught by "No Legends", add it to bannedSpecies in config.json.

REWARDS (rewards.json)
  Option kinds: {"item": id, "count": n}  {"tag": id}  {"anyOf": [ids]}  {"command": "...", "label": "..."}
  Every list is a fallback chain: the first option that exists is used.
  {type} is replaced with a type from the rule; entries using it only appear on type days.
  themes: entries matching the rule (e.g. "fire", "underdog", "mega", "gen4") are
  themeWeightMultiplier times more likely.
