From 06391120b59de3cb76b3742e9223a186d4d9e93a Mon Sep 17 00:00:00 2001 From: donnyjang Date: Wed, 14 Oct 2026 20:58:58 -0700 Subject: [PATCH] server: 0016-tag-first-seat-holds-hand-server Tag: the first seat of each team holds the hand from turn 1. Team B loads seat 2 as its main deck and seat 3 as the tag deck; the prompt owner starts at seat 2. Pairs with core patch 0015. Replayed from Tools/YGOLegacy/patches/0016-tag-first-seat-holds-hand-server.patch in the Unity repo. Co-Authored-By: Claude Fable 5.1 --- server/gframe/tag_duel.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/server/gframe/tag_duel.cpp b/server/gframe/tag_duel.cpp index 82f3ac1..c20c9aa 100644 --- a/server/gframe/tag_duel.cpp +++ b/server/gframe/tag_duel.cpp @@ -1188,7 +1188,7 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) { } turn_count = 0; cur_player[0] = players[0]; - cur_player[1] = players[3]; + cur_player[1] = players[2]; // YGOL first seat holds the hand: the engine skips the swap on a team's first turn dp->state = CTOS_RESPONSE; std::random_device rd; ExtendedReplayHeader rh; @@ -1299,19 +1299,19 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) { load_single(load_extra(0), 0, LOCATION_EXTRA); load_tag(pdeck[1].main, 0, LOCATION_DECK); load_tag(load_extra(1), 0, LOCATION_EXTRA); - load_single(pdeck[3].main, 1, LOCATION_DECK); - load_single(load_extra(3), 1, LOCATION_EXTRA); - load_tag(pdeck[2].main, 1, LOCATION_DECK); - load_tag(load_extra(2), 1, LOCATION_EXTRA); + load_single(pdeck[2].main, 1, LOCATION_DECK); // YGOL first seat holds the hand + load_single(load_extra(2), 1, LOCATION_EXTRA); + load_tag(pdeck[3].main, 1, LOCATION_DECK); + load_tag(load_extra(3), 1, LOCATION_EXTRA); #else load_single(pdeck[0].main, 0, LOCATION_DECK); load_single(pdeck[0].extra, 0, LOCATION_EXTRA); load_tag(pdeck[1].main, 0, LOCATION_DECK); load_tag(pdeck[1].extra, 0, LOCATION_EXTRA); - load_single(pdeck[3].main, 1, LOCATION_DECK); - load_single(pdeck[3].extra, 1, LOCATION_EXTRA); - load_tag(pdeck[2].main, 1, LOCATION_DECK); - load_tag(pdeck[2].extra, 1, LOCATION_EXTRA); + load_single(pdeck[2].main, 1, LOCATION_DECK); // YGOL first seat holds the hand + load_single(pdeck[2].extra, 1, LOCATION_EXTRA); + load_tag(pdeck[3].main, 1, LOCATION_DECK); + load_tag(pdeck[3].extra, 1, LOCATION_EXTRA); #endif last_replay.Flush(); unsigned char startbuf[32]{}; @@ -1896,7 +1896,7 @@ int TagDuel::Analyze(unsigned char* msgbuffer, unsigned int len) { NetServer::ReSendToPlayers(cache_recorder, replay_recorder); #endif if(!(r_player & 0x2)) { - if(turn_count > 0) { + if(turn_count > 1) { // YGOL first seat holds the hand: the engine swaps from turn 3 on if(turn_count % 2 == 0) { if(cur_player[0] == players[0]) cur_player[0] = players[1];