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.
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.
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.
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.
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.
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.
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".
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.
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.
Cards that need these mechanics aren't playable yet; they'll arrive as the engine learns them.