From 65fcc307bbd9046aafee0ad801289319ebd5eb84 Mon Sep 17 00:00:00 2001 From: donnyjang Date: Fri, 16 Oct 2026 11:45:49 -0700 Subject: [PATCH] server: life points per side through the setup pair ygol.side.b.lp (v1.4.0) The room's "Life Points - Side B" field had nowhere to go: the host string carries ONE start LP and the server gave it to both duel players. Now the setup pair ygol.side.b.lp= gives seat side B (seat 1; Tag seats 2 and 3) its own start LP while side A keeps slot 8; absent, both sides start at slot 8 exactly as before. - SideBStartLp(fallback) reads the pair (positive integer, else fallback). - single_duel / tag_duel keep player_lp[2] in DUEL PLAYER order, so the side that goes first keeps its own LP through the first-turn swap, in every duel of a Match: set_player_info per player, MSG_START at the start and in the late-watcher snapshot carry lp[0], lp[1]. - Replay flag REPLAY_YGOL_SIDE_LP 0x20000000: set only when the two differ; i32 lp[0], i32 lp[1] follow opt, before the decks. The binding gets ReplayFlags { SetupPairs, SideLp } for the readers. - Probe: two more setup-pair rooms (Single and Tag) check MSG_START on every seat in duel player order and the replay's flag + values; every other room's replay must have no such flag. - Contract: slot 8 row, the behaviour table, the Replay section, the server-read pairs table (three now), the binding row; CHANGELOG v1.4.0. No new export or capability bit: exports 335 / 856 / 850, protocol 9, capabilities 0x27FF. Co-Authored-By: Claude Fable 5.1 --- CHANGELOG.md | 9 ++++ .../Protocol/Contracts/ReplayFlags.cs | 11 +++++ contract/engine-contract.md | 13 +++-- contract/probe-feature-messages.py | 48 +++++++++++++++++-- server/gframe/netserver.cpp | 14 ++++++ server/gframe/network.h | 3 ++ server/gframe/single_duel.cpp | 21 +++++--- server/gframe/single_duel.h | 1 + server/gframe/tag_duel.cpp | 21 +++++--- server/gframe/tag_duel.h | 1 + 10 files changed, 124 insertions(+), 18 deletions(-) create mode 100644 binding/YGOLegacy.Engine/Protocol/Contracts/ReplayFlags.cs diff --git a/CHANGELOG.md b/CHANGELOG.md index a69ee27..0f38a45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,15 @@ wire protocol, the engine message stream, the setup pairs and the Lua API. A row change first shipped in the Unity repo, the ticket, and the contract part it touched. Rows 0001-0024 are the fork patches replayed into this repo as commits (`git log --oneline -- server/gframe core`). +## v1.4.0 — 2026-10-16 + +Life points per side: the setup pair `ygol.side.b.lp=` gives seat side B its own start LP. No new +export or capability bit: exports 335 / 856 / 850, protocol 9, capabilities `0x27FF`. + +| Date | Change | Ticket | Contract part | +|---|---|---|---| +| 2026-10-16 | `ygol.side.b.lp=`: seat side B (seat 1; Tag seats 2 and 3) starts at `n` LP, side A at slot 8; `set_player_info` per duel player, `MSG_START` (start and late-watcher snapshot) carries `lp[0]`, `lp[1]` in duel player order through the first-turn swap, and the replay gets flag `0x20000000` + `i32 lp[0]`, `i32 lp[1]` after `opt` when the two differ. Single, Match, Tag. Server. | - | Setup pair `ygol.side.b.lp`; engine message stream `MSG_START`; replay flag `0x20000000` | + ## v1.3.0 — 2026-10-16 Spectators with Show all get the Tag partner cards of both teams. Same message, same payload, no new diff --git a/binding/YGOLegacy.Engine/Protocol/Contracts/ReplayFlags.cs b/binding/YGOLegacy.Engine/Protocol/Contracts/ReplayFlags.cs new file mode 100644 index 0000000..4f523d9 --- /dev/null +++ b/binding/YGOLegacy.Engine/Protocol/Contracts/ReplayFlags.cs @@ -0,0 +1,11 @@ +namespace YGOLegacy.Protocol.Contracts +{ + // Fork replay header flags (contract section (b), Replay). The stock flags stay 0x1 (compressed) and 0x2 (tag). + public static class ReplayFlags + { + // Patch 0009: u32 length + the setup pairs block before the player names. + public const int SetupPairs = 0x40000000; + // v1.4.0, life points per side: i32 lp[0] + i32 lp[1] (duel player order) after opt. + public const int SideLp = 0x20000000; + } +} diff --git a/contract/engine-contract.md b/contract/engine-contract.md index e1954b8..d1f3630 100644 --- a/contract/engine-contract.md +++ b/contract/engine-contract.md @@ -73,7 +73,7 @@ The host string is space-separated tokens, in this order (`server/gframe/gframe. | 5 | duel rule: `T` (previous master rule), `F` (default), or a numeric `duel_flags` | | 6 | `T` = no deck check | | 7 | `T` = no deck shuffle | -| 8 | start LP | +| 8 | start LP (seat side A; side B too unless the setup pair `ygol.side.b.lp` names its own) | | 9 | start hand | | 10 | draw count | | 11 | time limit (seconds; 0 = none) | @@ -251,6 +251,7 @@ carry a new feature inside another feature's message. | 0021 | START ends a rules-restart reservation window and stops the lobby clock, so an untimed duel no longer ends at once on "time limit up". | | v1.1.1 | Tag: no Battle Phase on turns 1, 2 and 3 (1A, 2A, 1B); the fourth duelist (2B) is the first who can battle. `MSG_SELECT_IDLECMD` carries `to_bp` = 0 on those turns and `Duel.IsAbleToEnterBP` answers false. Single duels: turn 1 only, as stock. | | v1.3.0 | Tag partner cards reach observers: when spectators see all, `STOC_TAG_PARTNER_CARDS` goes to every observer for both sides at every send point, plus both sides in an observer's resync and the late-watcher snapshot. Same id, same payload, no new capability bit (TICKET-412). | +| v1.4.0 | Life points per side: with the setup pair `ygol.side.b.lp=` (section (d)) seat side B (seat 1; Tag seats 2 and 3) starts at `n` LP and side A at slot 8; without it both sides start at slot 8, as before. `set_player_info` gets each duel player its own LP, and `MSG_START` (the start and the late-watcher snapshot) carries `lp[0]`, `lp[1]` in duel player order: the side that goes first is player 0, so the two values swap when side B won the toss. `STOC_JOIN_GAME`'s `start_lp` stays side A's. Single, Match (every duel) and Tag; no new message, no capability bit. | ### Replay @@ -259,6 +260,11 @@ carries, before the player names, `u32 length` + the setup pairs block (`u16 cou `u16 length` + `key=value`). Limits: `SETUP_PAIRS_MAX` 64 pairs, `SETUP_PAIR_MAX_LEN` 512 bytes per pair. +v1.4.0 adds the replay flag `REPLAY_YGOL_SIDE_LP` = `0x20000000`, set only when the two duel players +start with different LP (`ygol.side.b.lp`). When set, `i32 lp[0]` + `i32 lp[1]` (duel player order) +follow the stock `opt` field, before the decks; a reader without the flag keeps the stock layout and +gives both players the header's `start_lp`. + ## (c) Engine message stream `process` + `get_message` hand the consumer a buffer of messages; each is `u8 id` + payload. The @@ -381,12 +387,13 @@ never interprets a pair: it stores the ordered list (max 64 pairs, 512 bytes eac `0x40000000`) and sends them to every joiner as `STOC_SETUP_PAIRS` (`0x43`). Values that need `,`, `=`, `%` or a space are percent-encoded by the client (`MatchSetup.cs`). -Two pairs ARE read by the server itself: +Three pairs ARE read by the server itself: | Key | Value | Read by | |---|---|---| | `ygol.room.watchers` | `0` = no observers: every observer join and HsToObserver is refused | 0012 | | `ygol.room.spectatorview` | `hidden` = the stock masked observer stream; absent = spectators see all | 0018, 0019 | +| `ygol.side.b.lp` | a positive integer: seat side B's start LP (seat 1; Tag seats 2 and 3); side A keeps slot 8. Absent, `0`, negative or not a number = both sides at slot 8 | v1.4.0 | Keys the Unity client sends today (`Assets/YGOLegacy/Scripts/Core/Duel/MatchSetup.cs`, `SetupPairKeys`); the rules Lua reads them from the registry: @@ -422,7 +429,7 @@ Namespaces: | Namespace | What | |---|---| -| `YGOLegacy.Protocol.{Contracts, Codecs, Framing, Routing}` | Section (b) in C#: the message ids and payload records, the CTOS / STOC codecs, the frame codec and the STOC router. Unchanged from the Unity repo (TICKET-397); v1.2.0 adds `StocMessage.TagPartnerCards`, `FeatureFlags.TagPartnerCards`, the `TagPartnerCards` record and `StocCodecs.TagPartnerCards`, and `Capability.ProtocolVersion` is 9. | +| `YGOLegacy.Protocol.{Contracts, Codecs, Framing, Routing}` | Section (b) in C#: the message ids and payload records, the CTOS / STOC codecs, the frame codec and the STOC router. Unchanged from the Unity repo (TICKET-397); v1.2.0 adds `StocMessage.TagPartnerCards`, `FeatureFlags.TagPartnerCards`, the `TagPartnerCards` record and `StocCodecs.TagPartnerCards`, and `Capability.ProtocolVersion` is 9; v1.4.0 adds `ReplayFlags` (`SetupPairs` = `0x40000000`, `SideLp` = `0x20000000`). | | `YGOLegacy.Engine` | The four types below (TICKET-398). | | Type | What | diff --git a/contract/probe-feature-messages.py b/contract/probe-feature-messages.py index 99b1af5..e64bc87 100644 --- a/contract/probe-feature-messages.py +++ b/contract/probe-feature-messages.py @@ -136,6 +136,13 @@ # a late watcher's snapshot carry both sides; with ygol.room.spectatorview=hidden # the watcher, its resync and the late watcher's snapshot never get one. # +# With --dll it also gates v1.4.0 (life points per side): two more setup-pair +# rooms (Single and Tag) with ygol.side.b.lp=4000 start a duel; every seat's +# MSG_START carries 8000 for seat side A and 4000 for side B in DUEL PLAYER +# order (the side that goes first is player 0, so the two values swap when +# side B won the toss), and the replay has flag 0x20000000 with the same two +# values after opt. Every other room's replay has no such flag. +# # Exit 0 only when every check passed. Stock DLL: the first check fails; the # 0011 DLL fails at the capability flags. import argparse, base64, ctypes, lzma, os, shutil, socket, sqlite3, struct, sys, tempfile, threading, time @@ -461,6 +468,7 @@ CTOS_UPDATE_DECK, CTOS_HAND_RESULT, CTOS_TP_RESULT, CTOS_SURRENDER, CTOS_HS_STAR STOC_SELECT_HAND, STOC_SELECT_TP, STOC_CHANGE_SIDE, STOC_REPLAY = 0x03, 0x04, 0x07, 0x17 STOC_SETUP_PAIRS = 0x43 REPLAY_COMPRESSED, REPLAY_TAG, REPLAY_YGOL_SETUP_PAIRS = 0x1, 0x2, 0x40000000 +REPLAY_YGOL_SIDE_LP = 0x20000000 PROBE_CARD = 89631139 PROBE_KNIGHT = PROBE_CARD + 500 # patch 0023: level 4, 1800 / 1000 NAMES.update({0x03: "SELECT_HAND", 0x04: "SELECT_TP", 0x05: "HAND_RESULT", 0x07: "CHANGE_SIDE", 0x09: "DECK_COUNT", @@ -608,11 +616,19 @@ def check_snapshot_pairs(who, pkts, pairs): check(decoded == pairs and size == len(got[0]) - 2, "%s: SETUP_PAIRS carries the %d pairs in host-string order, nothing else" % (who, len(pairs))) -def check_replay(who, c, pairs, seed_tag, tag=False): +def check_replay(who, c, pairs, seed_tag, tag=False, lp=None): reps = replays(c) if not check(len(reps) >= 1, "%s: a REPLAY arrived at duel end" % who): return flag, seeds, body = reps[-1] + seats = 4 if tag else 2 + lp_at = (4 + struct.unpack_from("= 11 and d[0] == MSG_START] + + +def check_side_lp(label, clients, lp): + # lp = (side A, side B) by SEAT side; MSG_START lists duel players, and the side that goes first is player 0 + duel_lp = None + for c in clients: + side = 1 if c.seat >= 2 else (1 if c.seat == 1 and len(clients) == 2 else 0) + got = starts_of(c) + if not check(len(got) == 1, "%s: seat %d got one MSG_START (got %d)" % (label, c.seat, len(got))): + continue + player = got[0][1] & 0xF + want = tuple(lp) if player == side else (lp[1], lp[0]) + pair = struct.unpack_from(" #include #include // [YGOL] std::find (attack preview); MSVC includes it transitively, GCC does not +#include // [YGOL] std::strtol (life points per side) #include #include #include @@ -786,6 +787,19 @@ bool SpectatorsSeeAll() { // YGOL spectators see all return false; return true; } +int32_t SideBStartLp(int32_t fallback) { // YGOL life points per side + static const char key[] = "ygol.side.b.lp="; + constexpr size_t key_len = sizeof(key) - 1; + for(const auto& pair : setup_pairs) { + if(pair.compare(0, key_len, key) != 0) + continue; + char* end = nullptr; + const long value = std::strtol(pair.c_str() + key_len, &end, 10); + if(end && *end == '\0' && value > 0 && value <= 0x7FFFFFFFL) + return (int32_t)value; + } + return fallback; +} size_t WriteSetupPairsBlock(unsigned char* dst) { auto pdst = dst; BufferIO::Write(pdst, (uint16_t)setup_pairs.size()); diff --git a/server/gframe/network.h b/server/gframe/network.h index 5be319a..3353773 100644 --- a/server/gframe/network.h +++ b/server/gframe/network.h @@ -234,6 +234,8 @@ constexpr size_t SETUP_PAIRS_MAX = 64; constexpr size_t SETUP_PAIR_MAX_LEN = 512; constexpr size_t SETUP_PAIRS_BLOCK_MAX = sizeof(uint16_t) + SETUP_PAIRS_MAX * (sizeof(uint16_t) + SETUP_PAIR_MAX_LEN); constexpr uint32_t REPLAY_YGOL_SETUP_PAIRS = 0x40000000; // replay flag: uint32_t length + the block, before the names +// YGOL life points per side: the setup pair ygol.side.b.lp gives seat side B (seat 1; Tag seats 2 and 3) its own start LP +constexpr uint32_t REPLAY_YGOL_SIDE_LP = 0x20000000; // replay flag: int32_t lp[0], int32_t lp[1] in duel player order, after opt extern std::vector setup_pairs; bool IsSetupPairToken(const char* token); bool AddSetupPair(const char* token); @@ -472,6 +474,7 @@ bool IsBootstrapToken(const char* token); void SetBootstrapSecret(const char* token); bool WatchersAllowed(); bool SpectatorsSeeAll(); // YGOL spectators see all +int32_t SideBStartLp(int32_t fallback); // YGOL life points per side: ygol.side.b.lp, else fallback inline bool IsZeroId(const uint8_t* id) { for(int i = 0; i < 16; ++i) if(id[i]) diff --git a/server/gframe/single_duel.cpp b/server/gframe/single_duel.cpp index 8b68358..be9a25f 100644 --- a/server/gframe/single_duel.cpp +++ b/server/gframe/single_duel.cpp @@ -1222,6 +1222,9 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) { swapped = true; } dp->state = CTOS_RESPONSE; + const int32_t side_b_lp = SideBStartLp(host_info.start_lp); // YGOL life points per side: seat side B keeps its LP through the swap + player_lp[0] = swapped ? side_b_lp : host_info.start_lp; + player_lp[1] = swapped ? host_info.start_lp : side_b_lp; std::random_device rd; ExtendedReplayHeader rh; rh.base.id = REPLAY_ID_YRP2; @@ -1238,6 +1241,8 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) { mtrandom rnd(rh.seed_sequence, SEED_COUNT); if(!setup_pairs.empty()) // YGOL setup pairs rh.base.flag |= REPLAY_YGOL_SETUP_PAIRS; + if(player_lp[0] != player_lp[1]) // YGOL life points per side + rh.base.flag |= REPLAY_YGOL_SIDE_LP; last_replay.BeginRecord(); last_replay.WriteHeader(rh); if(!setup_pairs.empty()) { @@ -1285,8 +1290,8 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) { const auto eq = pair.find('='); set_registry_value(pduel, pair.substr(0, eq).c_str(), pair.c_str() + eq + 1); } - set_player_info(pduel, 0, host_info.start_lp, host_info.start_hand, host_info.draw_count); - set_player_info(pduel, 1, host_info.start_lp, host_info.start_hand, host_info.draw_count); + set_player_info(pduel, 0, player_lp[0], host_info.start_hand, host_info.draw_count); // YGOL life points per side + set_player_info(pduel, 1, player_lp[1], host_info.start_hand, host_info.draw_count); preload_script(pduel, "./script/patches/entry.lua"); preload_script(pduel, "./script/special.lua"); preload_script(pduel, "./script/init.lua"); @@ -1298,6 +1303,10 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) { last_replay.WriteInt32(host_info.start_hand, false); last_replay.WriteInt32(host_info.draw_count, false); last_replay.WriteInt32(opt, false); + if(player_lp[0] != player_lp[1]) { // YGOL life points per side: REPLAY_YGOL_SIDE_LP + last_replay.WriteInt32(player_lp[0], false); + last_replay.WriteInt32(player_lp[1], false); + } last_replay.Flush(); auto load = [&](const std::vector& deck_container, uint8_t p, uint8_t location) { last_replay.WriteInt32(deck_container.size(), false); @@ -1334,8 +1343,8 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) { BufferIO::Write(pbuf, MSG_START); BufferIO::Write(pbuf, 0); BufferIO::Write(pbuf, host_info.duel_rule); - BufferIO::Write(pbuf, host_info.start_lp); - BufferIO::Write(pbuf, host_info.start_lp); + BufferIO::Write(pbuf, player_lp[0]); // YGOL life points per side + BufferIO::Write(pbuf, player_lp[1]); BufferIO::Write(pbuf, query_field_count(pduel, 0, LOCATION_DECK)); BufferIO::Write(pbuf, query_field_count(pduel, 0, LOCATION_EXTRA)); BufferIO::Write(pbuf, query_field_count(pduel, 1, LOCATION_DECK)); @@ -2700,8 +2709,8 @@ void SingleDuel::RequestField(DuelPlayer* dp) { BufferIO::Write(pbuf, MSG_START); BufferIO::Write(pbuf, watcher ? ((players[0] == pplayer[0]) ? 0x10 : 0x11) : player); // [YGOL] late watcher: the observer byte lobby watchers get BufferIO::Write(pbuf, host_info.duel_rule); - BufferIO::Write(pbuf, host_info.start_lp); - BufferIO::Write(pbuf, host_info.start_lp); + BufferIO::Write(pbuf, player_lp[0]); // YGOL life points per side + BufferIO::Write(pbuf, player_lp[1]); BufferIO::Write(pbuf, 0); BufferIO::Write(pbuf, 0); BufferIO::Write(pbuf, 0); diff --git a/server/gframe/single_duel.h b/server/gframe/single_duel.h index f2fdf87..bd83a79 100644 --- a/server/gframe/single_duel.h +++ b/server/gframe/single_duel.h @@ -147,6 +147,7 @@ protected: bool ygol_started{}; DuelPlayer* players[2]{}; DuelPlayer* pplayer[2]{}; + int32_t player_lp[2]{}; // YGOL life points per side: start LP in duel player order, set at every duel start bool ready[2]{}; Deck pdeck[2]; int deck_error[2]{}; diff --git a/server/gframe/tag_duel.cpp b/server/gframe/tag_duel.cpp index c4ad6a5..36f56ad 100644 --- a/server/gframe/tag_duel.cpp +++ b/server/gframe/tag_duel.cpp @@ -1214,6 +1214,9 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) { std::swap(pdeck[1], pdeck[3]); swapped = true; } + const int32_t side_b_lp = SideBStartLp(host_info.start_lp); // YGOL life points per side: seat side B keeps its LP through the swap + player_lp[0] = swapped ? side_b_lp : host_info.start_lp; + player_lp[1] = swapped ? host_info.start_lp : side_b_lp; turn_count = 0; cur_player[0] = players[0]; cur_player[1] = players[2]; // YGOL first seat holds the hand: the engine skips the swap on a team's first turn @@ -1234,6 +1237,8 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) { mtrandom rnd(rh.seed_sequence, SEED_COUNT); if(!setup_pairs.empty()) // YGOL setup pairs rh.base.flag |= REPLAY_YGOL_SETUP_PAIRS; + if(player_lp[0] != player_lp[1]) // YGOL life points per side + rh.base.flag |= REPLAY_YGOL_SIDE_LP; last_replay.BeginRecord(); last_replay.WriteHeader(rh); if(!setup_pairs.empty()) { @@ -1282,8 +1287,8 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) { const auto eq = pair.find('='); set_registry_value(pduel, pair.substr(0, eq).c_str(), pair.c_str() + eq + 1); } - set_player_info(pduel, 0, host_info.start_lp, host_info.start_hand, host_info.draw_count); - set_player_info(pduel, 1, host_info.start_lp, host_info.start_hand, host_info.draw_count); + set_player_info(pduel, 0, player_lp[0], host_info.start_hand, host_info.draw_count); // YGOL life points per side + set_player_info(pduel, 1, player_lp[1], host_info.start_hand, host_info.draw_count); preload_script(pduel, "./script/patches/entry.lua"); preload_script(pduel, "./script/special.lua"); preload_script(pduel, "./script/init.lua"); @@ -1296,6 +1301,10 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) { last_replay.WriteInt32(host_info.start_hand, false); last_replay.WriteInt32(host_info.draw_count, false); last_replay.WriteInt32(opt, false); + if(player_lp[0] != player_lp[1]) { // YGOL life points per side: REPLAY_YGOL_SIDE_LP + last_replay.WriteInt32(player_lp[0], false); + last_replay.WriteInt32(player_lp[1], false); + } last_replay.Flush(); auto load_single = [&](const std::vector& deck_container, uint8_t p, uint8_t location) { last_replay.WriteInt32(deck_container.size(), false); @@ -1347,8 +1356,8 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) { BufferIO::Write(pbuf, MSG_START); BufferIO::Write(pbuf, 0); BufferIO::Write(pbuf, host_info.duel_rule); - BufferIO::Write(pbuf, host_info.start_lp); - BufferIO::Write(pbuf, host_info.start_lp); + BufferIO::Write(pbuf, player_lp[0]); // YGOL life points per side + BufferIO::Write(pbuf, player_lp[1]); BufferIO::Write(pbuf, query_field_count(pduel, 0, LOCATION_DECK)); BufferIO::Write(pbuf, query_field_count(pduel, 0, LOCATION_EXTRA)); BufferIO::Write(pbuf, query_field_count(pduel, 1, LOCATION_DECK)); @@ -2852,8 +2861,8 @@ void TagDuel::RequestField(DuelPlayer* dp) { BufferIO::Write(pbuf, MSG_START); BufferIO::Write(pbuf, watcher ? ((players[0] == pplayer[0]) ? 0x10 : 0x11) : player); // [YGOL] late watcher: the observer byte lobby watchers get BufferIO::Write(pbuf, host_info.duel_rule); - BufferIO::Write(pbuf, host_info.start_lp); - BufferIO::Write(pbuf, host_info.start_lp); + BufferIO::Write(pbuf, player_lp[0]); // YGOL life points per side + BufferIO::Write(pbuf, player_lp[1]); BufferIO::Write(pbuf, 0); BufferIO::Write(pbuf, 0); BufferIO::Write(pbuf, 0); diff --git a/server/gframe/tag_duel.h b/server/gframe/tag_duel.h index fb941fe..36ff517 100644 --- a/server/gframe/tag_duel.h +++ b/server/gframe/tag_duel.h @@ -151,6 +151,7 @@ protected: bool ygol_started{}; DuelPlayer* players[4]{}; DuelPlayer* pplayer[4]{}; + int32_t player_lp[2]{}; // YGOL life points per side: start LP in duel player order, set at every duel start DuelPlayer* cur_player[2]{}; std::set observers; #ifdef YGOPRO_SERVER_MODE