Engine rules

A real rules engine,
not a shortcut.

Yu-Gi-Oh! Legacy of the Twin Masters runs on its own rules engine, written to follow the official rules and card rulings of the classic era. The AI, story duels and online duels all play on the same engine: online, it runs on our server, so both players see the same duel.

The turn

Phases

Each turn goes Draw Phase, Standby Phase, Main Phase 1, Battle Phase, Main Phase 2 and End Phase. The player who goes first skips their first draw. Each player starts with 8000 Life Points and 5 cards.

Summoning

Every kind of Summon

  • Normal Summon or Set once per turn. Level 5–6 monsters need 1 Tribute, Level 7+ need 2.
  • Flip Summon and FLIP effects.
  • Special Summons by effects, and by a monster's own condition ("Tribute 2 monsters…").
  • Fusion and Ritual Summons, including Fusion substitutes and Contact Fusions.
  • Gemini Summons that give Gemini monsters their effects.
Chains

Chains and Spell Speeds

Cards are activated in chains: each player may answer the last card with something of equal or higher Spell Speed (Spell Speed 1, 2 or 3 for Counter Traps). The chain resolves last in, first out. A card whose target is gone resolves with no effect, and negated cards do nothing.

Timing

When you can respond

You get a window to answer at the right moments: after a Summon, when an attack is declared, during the Damage Step (only for cards allowed there), when a card is activated, and right after events like "when a card is destroyed". Cards that act "during the Standby or End Phase" get their windows too, and Counter Traps like Solemn Judgment can negate a Summon before it succeeds.

Battle

Attacks and the Damage Step

Attack, defense and direct damage follow the official rules, including piercing damage and multiple attacks. If the defender's monsters change after an attack is declared (Scapegoat against a direct attack), a replay happens: the attacker picks a new target or stops.

Effects

Continuous effects, done properly

Field-wide boosts, locks ("your opponent cannot…"), protection, and "unaffected by" effects all apply continuously. Being unaffected doesn't stop a card from being targeted, as in the official rulings. "This turn" effects keep working after their card is gone. Replacement effects ask you first, like the Six Samurai's "destroy another instead".

Winning

How a duel ends

Reduce your opponent's Life Points to 0, or make them draw from an empty Deck. Special wins work too: all five pieces of Exodia, or the four Spirit Messages with Destiny Board. If both players hit 0 at once, the duel is a draw.

Quality

Tested, card by card

Every scripted card has its own tests, over 5,400 in all. A chain test then plays every effect against every kind of response, and 200 AI-vs-AI duels check that nothing breaks. When players report a wrong ruling, it's fixed with a test so it stays fixed.

Work in progress

Not in the engine yet.

Cards that need these mechanics aren't playable yet; they'll arrive as the engine learns them.

Synchro, Xyz, Pendulum and Link Monsters (later eras) Hand size limitsCard name changesForced attacks Zone blockingExtra Battle PhasesActivating Traps from the hand Replacing the normal draw

Screenshot