Repository navigation
Duel Commander - #12090
Duel Commander#12090carldouglasbergentz-pixel wants to merge 13 commits into
Conversation
Duel Commander (duelcommander.org) as a commander variant: 20 starting life (401.1, documented in RegisteredPlayer), no commander damage loss (403.1), and the 903.9a graveyard/exile choice like Commander. The deck format is 99 + commander, singleton, with a sideboard of at most one card: the format has no sideboard (302.1), but Forge keeps a companion there (302.2). The mulligan needs no change: a 1v1 game already gets no free first mulligan. The card pool and ban lists come next. Based on Card-Forge#6596 by misha-colbourne. Co-authored-by: misha-colbourne <mishacolbourne@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
res/formats/Casual/DuelCommander.txt holds the official lists (duelcommander.org/banlist, updated 2026-07-27): banned in the deck, banned as commander, and banned as companion (Lutri). The file also carries the structural bans: conspiracies, ante, dexterity, attractions. Format files can now name BannedAsCommander and BannedAsCompanion. They are kept in a file, as kevlahnota asked on Card-Forge#6596, so the lists can be edited without code changes. DeckFormat.DuelCommander uses them: a card banned as commander may still be in the 99 (304.2). The sideboard may hold only a companion that isn't banned as one (302.1, 302.2). Based on Card-Forge#6596 by misha-colbourne. Co-authored-by: misha-colbourne <mishacolbourne@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tays castable there Duel Commander rules 404.1-404.4: with partners, once one of your commanders has been cast from the command zone, the others can't be cast from there for the rest of the game. They can still be cast from any other zone, for example after Command Beacon. The new NoOtherCommanderCastFromCommandZone card property reads the existing per-commander cast count (the one commander tax uses), and only the Duel Commander variant adds it to the command zone's MayPlay. The format's description (lblDuelCommanderDesc) now mentions the rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mirrors every Tiny Leaders hook in forge-gui for Duel Commander: - its own deck folder (decks/duel_commander), storage, remembered deck and per-player lobby deck states; - DeckType.DUEL_COMMANDER_DECK and DeckProxy.getAllDuelCommanderDecks; - random and card-based deck generation, using the Commander card matrix as Tiny Leaders does; - a net deck list holding the Current Duel Commander Metagame category (the Commander list is unchanged); - the lobby treats it as a commander format, exclusive with the others, and the applied-variant preference round-trips it; - FModel.getDuelCommanderCommander, the commanders the format allows; - a Duel Commander tab in the default deck editor layout; - the en-US labels the desktop and mobile commits use (lblDuelCommanderDeckEditor, lblDuelCommanderDecks, lblDuelCommanderDeck, lblDuelCommanderDeckRandomGenerated, lblSelectDuelCommanderDeckFor). A randomly generated partner must now also be a legal commander of the format (DeckgenUtil.getRandomPartnerCommander). Duel Commander needs it: Rograkh and Vial Smasher are banned as commander but legal in the 99. It also changes Tiny Leaders and Brawl generation: they could pair a "Choose a Background" commander with a Background, which neither format accepts as a commander, so the generated deck failed its own legality check. Co-authored-by: misha-colbourne <mishacolbourne@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mirrors the Tiny Leaders hooks in forge-gui-desktop: - a Duel Commander decks tab in the deck editor (VDuelCommanderDecks, CDuelCommanderDecks, EDocID.EDITOR_DUEL_COMMANDER), refreshed on save and hidden while a draft or sealed deck is edited, like the other constructed deck tabs; - Duel Commander in the editor's format dropdown, with its own tab caption, commander pool, deck storage and singleton limit; - opening, deleting and choosing Duel Commander decks from deck lists; - Duel Commander in the lobby's format dropdown, with a commander deck chooser per player. One deliberate difference from Tiny Leaders: the first lobby slot starts on COMMANDER_DECK, as Commander does, not on the variant deck type. The chooser lists the variant's own decks for COMMANDER_DECK (by game type), but has no list for TINY_LEADERS_DECK and the like, so starting there showed an empty list. Co-authored-by: misha-colbourne <mishacolbourne@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mirrors the Tiny Leaders hooks in forge-gui-mobile: - Duel Commander in the lobby's variant list and multi-variant selection, with a Duel Commander deck button and chooser per player and its own saved deck state; - a Duel Commander deck type in the deck manager, and a deck editor config that keeps the catalog to cards the format allows; - testing a Duel Commander deck starts a single match, as for the other commander formats. Co-authored-by: misha-colbourne <mishacolbourne@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The two deck-check messages Duel Commander adds (a sideboard that holds
anything but a companion, and a companion banned as one) now go through
the Localizer. Every Duel Commander key is added to all ten language
files, with English text in the other nine, as new keys usually are.
Two wordings change with it: the sideboard message now names the card
that doesn't belong there ("can't have X in its sideboard: Duel
Commander allows only a companion there"), and the description no
longer says "1v1", which the lobby doesn't enforce.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`sim -f DuelCommander` registers each player with their commanders and 20 life (RegisteredPlayer.forVariants). Without this they joined as in Constructed, with no commander at all. Deck names are looked up in the Duel Commander deck folder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Once one of a player's commanders has been cast from the command zone, the others can't be cast from there (404). Nothing on screen said so: the card just stopped being playable. A locked commander now shows one more line in its card text, under the existing "Cast from command zone N times". The line is derived from the cast counts PlayerView already holds (keyed by card id, so it follows the commander through zone changes), plus a player flag that the Duel Commander commander effect sets. It reaches desktop, mobile and network clients alike, and can't disagree with the cast-count line next to it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Commander list already holds the "Current Duel Commander Metagame" category, so the separate net-decks-duelcommander.txt only repeated it (review comment by paulsnoops). Duel Commander now reads the Commander list, and the extra file, its constant and its cache go. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Duel Commander joins the unified Format dropdown (Card-Forge#12521) as one of FormatChoices.COMMANDER_GAME_TYPES, in the lobby and the deck editor on desktop and mobile, in place of its own entry in the old lists. Its banned-as-commander and banned-as-companion lists move into GameFormat.DeckRules (Card-Forge#12522), read from the same format file keys, so the format's own rules stay in one record. Duel Commander also leaves Two-Headed Giant (Card-Forge#12587), as the other Commander variants with their own life totals do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
I've merged master into the branch (4ab6740), as it had conflicted since #12521, #12522 and #12523.
The full suite ( The workflow runs from the first push expired without being approved. Could a maintainer approve them for this push? |
Our Forge build was from 2026-10-14 while the database syncs daily, so newer cards (Star Trek, Secret Lair Countdown) were missing in play. tools/forge-dc is now mtg-oracle-forge with Forge's master of 2026-11-30 merged in (Card-Forge/forge#12090 kept mergeable). The seat follows Forge's new GUI interface: a prompt's marks arrive as one Selection, manipulateCardList names its second pile, getGamestate is gone, getUserAgent is new, MATCH_EXPERIMENTAL_RESTORE was removed. Tests: Duress reads Forge's own sentence now; a scenario's key press waits for the board to be drawn (Space was lost on a prompt not yet shown); the watch test waits for the hands to be drawn. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Further to item 1 in the Claude review above: I appreciate this PR is just building on what already exists, however I'm not a fan of creating separate deck editor tabs and infrastructure for new formats:
imo we should be trying to move away from that rather than add to it. Could this be done more like the Canadian Highlander precedent where we re-use the existing Commander deck editor type and it just filters when the format dropdown is set to Duel Commander? |
As MostCromulent suggested in review, Duel Commander follows the Canadian Highlander precedent instead of growing its own deck infrastructure: a Duel Commander deck is a Commander deck, listed for Duel Commander when its cards are legal there. Removed: the duel_commander deck folder and store, the Duel Commander deck-editor tab (VDuelCommanderDecks, CDuelCommanderDecks, its EDocID and editor.xml entry, and the tab handling in the draft and limited editors), DeckType.DUEL_COMMANDER_DECK, the Duel Commander deck preference and the eight lobby deck-state preferences. Kept: choosing Duel Commander in the lobby lists the Commander decks Duel Commander allows (DeckProxy.getAllDuelCommanderDecks), and in the deck editor it builds and checks a Commander deck under Duel Commander rules, saved with the Commander decks. The lobby slots share the Commander slots' saved state. sim -f DuelCommander reads decks from the Commander folder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The commander's card text said a mutated commander could not be cast from the command zone: PlayerView summed its CommanderCast map, where a merged permanent has a second entry with the same count. CardView.updateCommander now sets LockedInCommandZone, as it sets CommanderAltType, from the real commander, and a cast refreshes the other commanders. Player.isCommanderLockedInCommandZone is the one test, which NoOtherCommanderCastFromCommandZone uses too; the player-wide CommandZoneCastLock is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks, both of you. Done in two commits:
The full suite passes as master's does, the branch still merges cleanly, and the description is updated. I haven't played the shared deck lists by hand yet. |
|
Looks alright to me 👍 Not sure if we want basic translations in place immediately or that should be covered later (currently all translations duplicate the English text), otherwise it looks good, though I admit I'm not an expert on UI code intrinsics, so I'll vote Accept but I'd appreciate if someone else also took an additional look :) |
Adds Duel Commander as a game type and deck format, following the official rules at duelcommander.org (v2025.09.29) and its ban list (updated 2026-07-27).
This continues #6596 by @misha-colbourne, who said in #9156 that anyone was welcome to take it over. Thank you, Misha, for the groundwork. After #11885 the branch no longer rebased, so I re-implemented it on current master with #6596 as the blueprint. Misha is co-author on every commit that ports their work.
Closes #9156. Supersedes #6596.
Rules
RegisteredPlayer. The base total, so other variants still layer on top.Player, as for Brawl and Tiny Leaders.NoOtherCommanderCastFromCommandZonecard property on the commander effect'sMayPlay. It reads the existing per-commander cast count, the one commander tax uses. Casting from other zones (e.g. after Command Beacon) is unaffected, and other variants don't get the property. The locked commander's card text says why it can't be cast.DeckFormat.DuelCommander.res/formats/Casual/DuelCommander.txt. Format files can now nameBannedAsCommanderandBannedAsCompanion, read intoGameFormat.DeckRulesbeside #12522's deck rules, so the lists stay editable without code changes, as suggested in #6596. A card banned as commander may still be in the 99.UI
Duel Commander is an entry of the Format dropdown (#12521), under Commander, in the lobby and the deck editor on desktop and mobile, with the same exclusivity as the other Commander game types (Two-Headed Giant included).
Its decks are Commander decks, following the Canadian Highlander precedent (#12522): there is no deck folder, store or deck-editor tab of its own.
sim -f DuelCommander -d ...registers commanders and 20 life, and reads decks from the Commander folder. Tournament mode (-t) is unchanged, and it doesn't register commanders for-f Commandereither.All new strings are localisation keys, added to all ten language files (English text in the other nine).
One change touches other formats: a randomly generated partner must now also be a legal commander of the format (
DeckgenUtil.getRandomPartnerCommander).Testing
mvn -B clean test, as CI runs it, at 156d42c (the review changes): 3,437 tests, 0 failures, 13 skipped (leaving out the local test below), the same as master's own run at db50a13, with which the branch still merges cleanly. (The first version passedmvn -U -B clean -P windows-linux installfrom a clean checkout.)sim -f DuelCommanderwith real Duel Commander lists:Known limitations
Questions
This was written with an AI coding agent (Claude Code), credited as co-author on the commits, per CONTRIBUTING.md.