There are 39 opponents in the game. Opponent IDs 1 through 38 follow the story progression, while ID 39 is Duel Master K, who does not appear in the campaign.
A forced duel halts story progress until you win it. An optional duel can be declined or repeated as often as you like.
Each opponent defeated in the campaign becomes unlocked in Free Duel, with two missable exceptions explained below.
The story script is structured not as narrative prose, but as dialogues and internal jump tables. Every campaign duel begins with an opcode marker in the text stream containing the opponent ID, two parameters, and the duel’s Field terrain.
The final byte in that marker defines the terrain. Heishin’s duel, for instance, is fought on Yami (Dark) terrain.
The six field terrains are indexed 1 through 6 in order: Forest, Wasteland, Mountain, Sogen (meadow), Umi (sea), and Yami (dark). An index of 0 indicates a standard duel with no active field.
These match the names of the corresponding Field Magic cards: Forest, Wasteland, Mountain, Sogen, Umi, and Yami (also referenced as Meadow, Sea, and Dark).
When the terrain parameter is 0, the duel takes place without any terrain bonus. With this mapping, every duel’s Field condition is known in advance.
Stage 1 — Ancient Egypt I: The Palace, Duel Ground, and Festival
You begin the game as the prince. Your tutor, Simon Muran, lectures you in your bedchamber, presenting the choice <Run away> or <Keep listening>. Choosing to run places you on the city map: Pharaoh’s Palace, Card Shop, Duel Ground, Town Plaza, and Shrine.
Simon Muran (ID 1) is found at the Pharaoh’s Palace. He offers <Duel> or <Pass> as soon as you return to the palace. This is the first duel of the campaign.
Teana (ID 2) and the three villagers (IDs 4, 5, 6) reside at the Duel Ground. You can challenge any of them repeatedly. Note: Villager 3 is present only at this point, before the festival takes place.
Selecting <Go outside> after these matches leads you and Teana to the festival in the Town Plaza (the procession of the mages).
At the plaza, you witness Jono (ID 3) losing to Seto, Heishin’s prodigy. Seto agrees to duel you later and departs.
Returning to the Duel Ground, Jono (ID 3) waits for you, followed by the arrival of Seto (ID 7) and his guards. This is a forced duel and marks your first real challenge.
Heishin’s Coup
That night, Simon sends you to bed. A guard bursts in reporting that High Mage Heishin has invaded the palace. Seto confronts you, demanding the Millennium Puzzle. Simon arrives wounded, hands you the Puzzle, and urges you to flee. Heishin blocks your escape and forces a duel (ID 8) that you must lose: winning simply replays the encounter.
This is the only scripted loss in the entire campaign. Upon defeat, Heishin demands the artifact, leaving only one prompt: <Shatter the Puzzle>. Simon seals both of you within its fragments. A millennium passes.
Stage 1 Terrains: Only the duel against Heishin features a Field terrain, set to Yami (Dark).
Stage 2 — The KaibaCorp Tournament
You now awaken as Yugi in modern times. Every round originates in the Card Shop (where you can save your game), and every victory returns you there.
Preliminaries (forced, back-to-back): Rex Raptor (9), Weevil Underwood (10), Mai Valentine (11), and Bandit Keith (12).
Between the preliminaries and finals, Shadi appears and unlocks Yugi’s mind with the Millennium Key. Inside the Puzzle, Yugi meets the ancient prince and receives six blank cards.
Finals: Shadi (13), Yami Bakura (14), Pegasus (15), Isis (16), and Kaiba (17). Each victory seals that finalist’s Millennium Item into one of the blank cards.
With all seven items gathered, the prince can return to his era.
Stage 2 Terrains: None. All tournament duels are played on neutral ground without terrain.
Stage 3 — Ancient Egypt II: Palace, Stronghold, and Hidden Grounds
Simon awakens the prince within the Puzzle and reveals that Heishin holds six items, ruling from the Vast Shrine. He explains that five High Mages guard one item each across five regional shrines, and that the key to defeating them lies in the Forbidden Ruins. Simon then passes away.
The map now expands into King’s Valley (left) and the Metropolis (right).
The Metropolis contains the Old Duel Ground (ruined), the hidden Dueling Grounds (Teana, Jono 2nd, Teana 2nd, and villagers), the Hiding Card Shop (save point), and the Pharaoh’s Palace, where you encounter the Mage Soldier (ID 18). Defeating him in this forced duel yields the map to the Forbidden Ruins.
Jono 2nd (19) and Teana 2nd (20) can be fought at the hidden grounds as optional duels until advanced by story progression.
Delivering the map to Sadin in King’s Valley opens five regional shrines on the map: Sea, Forest, Mountain, Desert, and Meadow.
Stage 4 — The Five Shrines
Each shrine follows an identical structure. At the entrance, a Low Mage (Ocean, Forest, Mountain, Desert, or Meadow Mage) blocks your path in a forced duel on the shrine’s native terrain. Inside awaits the High Mage (Secmeton, Anubisius, Atenza, Martis, or Kepura), also forced and fought on the same terrain. The High Mage’s AI script resets the Field to their home terrain whenever you attempt to overwrite it.
Victory recovers that shrine’s Millennium Item and clears the shrine. You can challenge the five shrines in any order, and the map marks remaining locations.
| Shrine | Gate Mage (ID) | High Mage (ID) | Terrain |
|---|---|---|---|
| Sea Shrine | Ocean Mage (21) | High Mage Secmeton (22) | Umi (sea) |
| Forest Shrine | Forest Mage (23) | High Mage Anubisius (24) | Forest |
| Mountain Shrine | Mountain Mage (25) | High Mage Atenza (26) | Mountain |
| Desert Shrine | Desert Mage (27) | High Mage Martis (28) | Wasteland |
| Meadow Shrine | Meadow Mage (29) | High Mage Kepura (30) | Sogen (meadow) |
Each shrine commands its own environmental Field: Sea, Forest, Mountain, Desert, and Meadow.
Stage 5 — The Labyrinth (Optional Branch)
If you have cleared between two and four shrines, visiting the hidden Dueling Grounds triggers an event with Jono: Teana has been captured. You infiltrate the Vast Shrine labyrinth, where the Labyrinth Mage (ID 31) forces a duel. After victory, navigate the four corridor choices: Right, Right, Left, Right. Any mistake restarts the Labyrinth Mage duel. At the end, you find Heishin and Seto 2nd (ID 32), where Seto releases Teana after a duel.
If you clear all five shrines first, this encounter is skipped entirely: Seto 2nd is never fought and remains permanently locked in Free Duel.
Stage 6 — Endgame Part 1: The Vast Shrine
With all five shrine items reclaimed (six including the Puzzle), save your game for the final time at the Hiding Card Shop. Entering the Vast Shrine initiates an unbroken gauntlet without save points:
All three battles take place on Yami (Dark) terrain.
Stage 7 — Endgame Part 2: The Forbidden Ruins
Seto arrives bearing the Millennium Rod, bringing all seven items together. You travel to the Forbidden Ruins, where Seto reveals his ambition and unseals the chamber containing DarkNite’s statue. You face a forced duel against Seto 3rd (ID 36). Heishin subsequently reappears, captures Seto, and demands the items. Seto reminds you of the Millennium Card, and DarkNite agrees to withdraw if defeated (ID 37). Upon losing, he reneges and transforms into Nitemare: the final duel of the campaign (ID 38).
Epilogue
Nitemare dissolves, Seto flees, the ruins are sealed forever, and the prince ascends the throne. The game prompts you to save and rolls the credits. A cleared save file unlocks Free Duel with all campaign opponents available.
If You Lose
Losing a campaign duel leads to a Game Over screen offering to retry the duel or return to the title screen. The saved game file remains intact, meaning your true penalty is losing any progress made since your last Card Shop save.
The single exception is Heishin’s initial palace duel, which must be lost to proceed.
Free Duel Unlocks
Free Duel unlock status is tracked by game flags: one per opponent.
Each duelist’s unlock trigger is embedded inside their victory dialogue (IDs 1–38), confirming their canonical ID sequence.
The engine sets two flags whenever a campaign duel concludes: “duelist defeated” and “unlocked in Free Duel.”
The Free Duel roster hides opponents whose flags remain unflagged (0).
The selection screen displays all duelists beaten in the campaign, plus Heishin (unlocked via the scripted loss) and Duel Master K (always accessible).
The list appears in campaign progression order: Simon Muran first, Duel Master K last.
Duel Master K is unique: he is excluded from the campaign, unlocked by default, and mirrors a copy of your active deck.
Exceptions to “every defeated rival unlocks”:
- Villager 3 (ID 6) is only available before the festival, making him one of two permanently missable Free Duel opponents.
- Seto 2nd (ID 32) is the other: if you clear all five shrines beforehand, you bypass his duel and he is never unlocked.
Free Duel is the core endgame: standard farming guides (“farm X for Y”) revolve entirely around Free Duel loops.
Opponent Card Drops
After every duel, one card is awarded from the defeated opponent’s drop pool according to your awarded duel rank.
Your rank maps to one of three drop tables: S/A POW, B/C/D, or S/A TEC.
Drop weights across each pool sum to 2048, so a card’s weight represents its exact drop probability: a weight of 152 equals 7.4%.
Full drop rates are detailed in the project’s deck and drop data. The probabilities below reflect the S/A POW pool for each duelist, active when achieving S or A rank on the offensive axis.
| Stage | Opponent | Highest Probability Card | % |
|---|---|---|---|
| Egypt I | Simon Muran (1) | Shadow Specter | 4.39% |
| Egypt I | Teana (2) | Skull Servant | 8.79% |
| Egypt I | Villager 3 (6) | Zombie Warrior | 1.37% |
| Tournament | Weevil Underwood (10) | Gokibore | 4.79% |
| Tournament | Mai Valentine (11) | Tyhone | 4.59% |
| Tournament | Bandit Keith (12) | The Snake Hair | 4.49% |
| Tournament | Kaiba (17) | Battle Ox | 7.42% |
| Sea Shrine | Ocean Mage (21) | Kairyu-shin | 2.54% |
| Sea Shrine | High Mage Secmeton (22) | Winged Egg of New Life | 2.54% |
| Forest Shrine | Forest Mage (23) | Man-eating Plant | 5.86% |
| Forest Shrine | High Mage Anubisius (24) | Killer Needle | 4.98% |
| Mountain Shrine | Mountain Mage (25) | Zone Eater | 3.52% |
| Mountain Shrine | High Mage Atenza (26) | Tyhone | 3.66% |
| Desert Shrine | Desert Mage (27) | Sword Arm of Dragon | 3.91% |
| Desert Shrine | High Mage Martis (28) | Wasteland | 1.46% |
| Meadow Shrine | Meadow Mage (29) | Shadow Specter | 7.32% |
| Meadow Shrine | High Mage Kepura (30) | Judge Man | 3.52% |
| Endgame | Guardian Sebek (33) | Zanki | 3.61% |
| Endgame | Guardian Neku (34) | Reaper of the Cards | 3.27% |
| Endgame | Seto 3rd (36) | Zoa | 2.34% |
| Endgame | DarkNite (37) | Illusionist Faceless Mage | 3.42% |
| Endgame | Nitemare (38) | Roaring Ocean Snake | 3.22% |
Online Campaign Mode
Distinguish between what is implemented and what is currently only designed. The server’s campaign specification document is an architectural blueprint, not the active deployment.
Campaign Saved to User Account
The server module operates as follows: classic campaign progression stored directly on the user’s account.
Upon login, the server delivers the latest saved slot as a copy, overriding authoritative values: player name, duelist code, Starchips, deck, and trunk.
Game state is persisted to the account, recording version, slot, campaign scene, and deck composition.
The project milestone is defined as “classic story progression saved in the cloud.”
Server Duel Verification
Each duel against the CPU is opened by the server: it rolls drops across all three reward pools using its secret key and seeds the match for later arbiter replay.
The arbiter replays the duel using the native game engine, verifying two mandatory criteria: matching hashes and exact engine-calculated victory/rank parity against client claims. A raw list of hashes submitted by a browser is never accepted as proof of victory on its own.
If the client claims a rank level outside the range of 0 (D) through 4 (S), the server rejects the submission.
In CPU mode, no rewards of value are credited until the arbiter successfully replays and confirms the match.
Verification is currently implemented but uncompiled and unexecuted: no legitimate duels have been validated on production servers yet.
Duels against the CPU execute entirely within the browser, just like campaign mode: no video frames wait on network latency.
Campaign Ranking
Rank progression tracks the number of distinct classic opponents defeated (IDs 1–39) within the account’s eligible history. Beating the same opponent multiple times does not increase progression.
Tiebreakers are evaluated in order: total wins (descending), Starchips earned (descending), losses (ascending), and internal account UUID (ascending, used solely for deterministic tie resolution). The UUID is omitted from client responses.
Starchips represent cumulative earnings from these duels, not your current wallet balance: spending Starchips does not lower your ranking, and the score is not converted into a ”% of campaign completed” metric.
Campaign leaderboards are fetched via the server API and displayed on the Campaign screen.
Everything is computed in a single SQL query and snapshot: paginated ranking, weekly top 5, longest win streaks, most defeated opponents, and most feared opponents.
This ranking system is built on an uncommitted branch (codex/historia-novedades-20261020) and is not yet deployed live.
Note what the ranking omits: it explicitly displays “classic opponents defeated” without certifying reached stages or story completion.
Campaign AI
The original game AI does not have difficulty “levels”: it has personalities. There is one configuration row per personality, covering original playable duelists 1 through 39.
For any given duelist ID, the engine uses the identical interpreter, parameters, and card pool across both Free Duel and campaign mode. There is no dynamic difficulty scaling based on player wins or losses.
Campaign mode, however, reads opponent ID, terrain, BGM, and story flags directly from the scenario script before running.
The 39 Opponents Table
Detailed per-field specifications (ID, name, stage, terrain, overview, and dialogue quotes) are provided in the companion opponents data file.
Sources
notes/research/the-game.mdnotes/mapa-cartas/mazos-y-drops.csvnotes/mapa-cartas/cartas.csvnotes/gameplay-tables.mdlanguages/es.txtsrc/game/text_start_campaign_duel.csrc/game/text_start_campaign_duel.hsrc/game/card_constants.hsrc/game/duel_effect_object_commands.csrc/overlays/free_duel/screen_runtime.cdocs/online/RANKING-HISTORIA.mddocs/online/VERIFICAR-HISTORIA.mddocs/online/CPU-LOCAL.mddocs/online/IA-NIVELES.mddocs/online/SALAS-Y-MODOS.mdonline/servidor/crates/yfm-servidor/src/historia.rs
