Commit Graph
26 Commits
Author SHA1 Message Date
donnyandClaude Fable 5.1 65fcc307bb server: life points per side through the setup pair ygol.side.b.lp (v1.4.0)
Release / linux (push) Successful in 1m21s
Release / windows (push) Successful in 52s
Release / android (push) Successful in 42s
Release / release (push) Successful in 5s
Release / attach-windows (push) Successful in 1s
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=<n> 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 <noreply@anthropic.com>
2026-10-16 11:45:49 -07:00
donnyandClaude Fable 5.1 14a4f80aab tag partner cards: observers who see all get 0x5F for both sides (TICKET-412)
Release / windows (push) Successful in 33s
Release / android (push) Successful in 41s
Release / linux (push) Successful in 1m14s
Release / release (push) Successful in 4s
Release / attach-windows (push) Successful in 1s
SendTagPartnerCards also sends to every observer under SpectatorsSeeAll(), so the
start and every MSG_TAG_SWAP reach the audience; an observer's field resync and the
late-watcher snapshot carry both sides after the deck lists. Hidden rooms and seated
duelists are unchanged. Same id, same payload, no new capability bit.

Contract row 0x5F + join snapshot + MSG_TAG_SWAP note, a behaviour row; the probe's
tag partner room runs twice (see all: the watcher gets both sides at every send
point, its resync and a late snapshot; hidden: never); CHANGELOG v1.3.0.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16 10:10:20 -07:00
donnyandClaude Fable 5.1 2344e5dae1 tag partner cards: ygol_query_tag_cards + STOC_TAG_PARTNER_CARDS 0x5F, capability 0x2000, protocol 9 (TICKET-405)
Core: ygol_query_tag_cards(pduel, playerid, out) reads the waiting tag
partner's tag_list_hand / tag_list_extra (bit 31 = face-up, like
MSG_TAG_SWAP) and tag_list_main sorted ascending; returns the byte length,
0 when not a tag duel. Read only.

Server: STOC_TAG_PARTNER_CARDS 0x5F = u8 side + those bytes, no stamp, to
that side's two seats only (never the other team, never an observer):
after start_duel, after every MSG_TAG_SWAP, and in a seated duelist's
field resync. FEATURE_TAG_PARTNER_CARDS 0x2000 advertised by single_duel
and tag_duel; FEATURE_PROTOCOL 8 -> 9. 0x800 / 0x1000 stay reserved for
proposals 44 / 45.

Binding: StocMessage.TagPartnerCards, FeatureFlags.TagPartnerCards, the
TagPartnerCards record + StocCodecs.TagPartnerCards,
EngineApi.ygol_query_tag_cards, Capability.ProtocolVersion 9, tests.

Contract rows, CHANGELOG v1.2.0, the probe's tag partner cards room, the
export gates 334 / 855 / 849 -> 335 / 856 / 850.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-15 23:26:39 -07:00
donnyandClaude Fable 5.1 2e8b60ca33 server: include <algorithm> in netserver.cpp (GCC)
Patch 0023's attack preview handler calls std::find. MSVC's headers
include <algorithm> transitively, GCC's do not, so the Linux build
failed on the first compile. No behaviour change.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DJUFwdiGCHipsxLkgxssSR
2026-10-15 10:34:59 -07:00
donnyandClaude Fable 5.1 ae5f03c620 server: put libevent's build-aux/ back (its generated configure needs it)
The vendored libevent 2.1.13-stable had its autotools helpers trimmed, so
./configure could not run on Linux or Android (config.guess, config.sub,
install-sh, ltmain.sh ... are looked up in build-aux/). These are the
tarball's own files, unchanged (ltmain.sh 2.5.4, the version configure
was generated with). Needed by TICKET-389's Docker builds.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DJUFwdiGCHipsxLkgxssSR
2026-10-15 10:34:58 -07:00
donnyandClaude Fable 5.1 173df5d8e6 server: export ygol_engine_version; the Windows gate is 334
TICKET-388. ygol_engine_version() returns the string the build was given (build/windows.ps1 -Version, env YGOL_ENGINE_VERSION into a define by gframe/premake5.lua), "local" when none; static storage, no allocation. One new export, so the Windows export gate moves 333 -> 334 and the changelog gets its Unreleased row, all in this commit.

Verified: build -Version v0.0.1 prints exports: 334 (expected 334); ctypes call prints v0.0.1.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-14 22:38:18 -07:00
donnyandClaude Fable 5.1 ff665ea99f server: gframe includes the core from ../../core
Six literal "../ocgcore/" includes (config.h, data_manager.h, netserver.h,
replay.h, single_duel.cpp, tag_duel.cpp) pointed at the submodule this repo
does not have. They now name ../../core, the one copy.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-14 21:07:06 -07:00
donnyandClaude Fable 5.1 2387be1f16 build: the library is ygol-engine
Proposal 47, Rule 1: the one native library ships as ygol-engine
(ygol-engine.dll on Windows). The premake project keeps its name,
ygoserver, so build targets do not change.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-14 20:59:35 -07:00
donnyandClaude Fable 5.1 8945edc9e2 build: the server workspace builds the core from ../core
There is one copy of the core in this repo. The server's premake includes
../core instead of its old ocgcore submodule, gframe takes its headers
from there, and the core's premake takes the Lua include dir the server
workspace resolves (LUA_INCLUDE_DIR) instead of assuming a sibling lua/.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-14 20:59:29 -07:00
donnyandClaude Fable 5.1 3993b8c5e5 server: 0023-attack-preview-server
TICKET-378: the attack preview over the wire. CTOS/STOC 0x5E: the seat whose battle prompt is open asks for pairs, the host answers from its embedded core (ygol_preview_attack). Capability bit 0x400, protocol 8.

Replayed from Tools/YGOLegacy/patches/0023-attack-preview-server.patch in the Unity repo.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-14 20:59:00 -07:00
donnyandClaude Fable 5.1 b7c5cb2467 server: 0021-restart-clock-stops-at-start
Fix for 0012: START stops the lobby clock (it shares the duel timer), so a reservation window still open after a rules restart no longer ends the duel at once on time limit up.

Replayed from Tools/YGOLegacy/patches/0021-restart-clock-stops-at-start.patch in the Unity repo.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-14 20:58:59 -07:00
donnyandClaude Fable 5.1 27c35b81bd server: 0020-profile
TICKET-360: profile. CTOS/STOC 0x5D (98 bytes): a seated human's avatar id and frame id, stored per seat, in the join snapshot, swapped with the seat. Capability bit 0x200, protocol 7.

Replayed from Tools/YGOLegacy/patches/0020-profile.patch in the Unity repo.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-14 20:58:59 -07:00
donnyandClaude Fable 5.1 980228945e server: 0019-deck-lists
TICKET-338: deck lists. STOC 0x5C: the owner gets its remaining cards sorted, observers the real order and the submitted Main Deck only when SpectatorsSeeAll(). Capability bit 0x100, protocol 6.

Replayed from Tools/YGOLegacy/patches/0019-deck-lists.patch in the Unity repo.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-14 20:58:59 -07:00
donnyandClaude Fable 5.1 a9e5f2d5eb server: 0018-spectators-see-all
TICKET-326: spectators see everything. Without the pair ygol.room.spectatorview=hidden every observer gets the unmasked stream, the late-watcher snapshot included; with it the stock masked stream.

Replayed from Tools/YGOLegacy/patches/0018-spectators-see-all.patch in the Unity repo.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-14 20:58:59 -07:00
donnyandClaude Fable 5.1 2c081162ff server: 0017-coin-toss
TICKET-328: the server rolls the coin: STOC 0x5B to every seat and watcher, the stock SELECT_TP to the chooser, a one-shot 10 s timer that answers FIRST for them; game 2+ sends face 0xFF. Capability bit 0x80, protocol 5.

Replayed from Tools/YGOLegacy/patches/0017-coin-toss.patch in the Unity repo.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-14 20:58:58 -07:00
donnyandClaude Fable 5.1 06391120b5 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 <noreply@anthropic.com>
2026-10-14 20:58:58 -07:00
donnyandClaude Fable 5.1 3b09bf36b1 server: 0014-lobby-after-match
TICKET-299: the room survives the match. A match end returns the server to the lobby stage on the same connections; READY cleared, CPU seats held, STOC 0x5A after DUEL_END. Capability bit 0x40, protocol 4.

Replayed from Tools/YGOLegacy/patches/0014-lobby-after-match.patch in the Unity repo.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-14 20:58:58 -07:00
donnyandClaude Fable 5.1 ba3264a943 server: 0013-seat-state
Seat state (0x59): a seated duelist says what it is doing (picking a deck); stored per seat, replayed in the join snapshot, cleared on leave / move / start. Capability bit 0x20, protocol 3.

Replayed from Tools/YGOLegacy/patches/0013-seat-state.patch in the Unity repo.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-14 20:58:58 -07:00
donnyandClaude Fable 5.1 cea91450f2 server: 0012-rules-restart
TICKET-286: the rules restart (0x54-0x58): Prepare / ack / Commit barrier, a replacement server opened by the bootstrap secret, Reserved seats with tokens and a deadline.

Replayed from Tools/YGOLegacy/patches/0012-rules-restart.patch in the Unity repo.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-14 20:58:57 -07:00
donnyandClaude Fable 5.1 9dbe0437f6 server: 0011-host-seats-rules-restart
TICKET-285: the host plans every seat (Open / Cpu, 0x50), a bot claims its Cpu seat with a token before JoinGame (0x51), host swap 0x52 and move 0x53; capability bit 0x8, protocol 2.

Replayed from Tools/YGOLegacy/patches/0011-host-seats-rules-restart.patch in the Unity repo.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-14 20:58:57 -07:00
donnyandClaude Fable 5.1 76e359f6cf server: 0009-setup-pairs
TICKET-258: ygol.<key>=<value> tokens after slot 11 go into the duel registry before special.lua, into the replay pairs block and to every joiner as STOC 0x43; argv sized from the token count.

Replayed from Tools/YGOLegacy/patches/0009-setup-pairs.patch in the Unity repo.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-14 20:58:57 -07:00
donnyandClaude Fable 5.1 00a715f181 server: 0006-feature-messages
TICKET-170: Capability / Appearance / Dialogue as real messages (0x40-0x42), sender stamped from the connection, appearance replayed in the join snapshot.

Replayed from Tools/YGOLegacy/patches/0006-feature-messages.patch in the Unity repo.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-14 20:58:56 -07:00
donnyandClaude Fable 5.1 d84fab84ed server: 0005-late-watcher-field-resync
TICKET-152: the server keeps listening after StartDuel and a late observer gets STOC_DUEL_START plus the field resync.

Replayed from Tools/YGOLegacy/patches/0005-late-watcher-field-resync.patch in the Unity repo.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-14 20:58:56 -07:00
donnyandClaude Fable 5.1 6480fd778d server: 0003-extra-deck-max
TICKET-059: YGOPRO_MAX_EXTRA 15 -> 99 so the server stops silently truncating the extra deck while receiving it. Server tree, gframe/deck_manager.h.

Replayed from Tools/YGOLegacy/patches/0003-extra-deck-max.patch in the Unity repo.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-14 20:58:56 -07:00
donnyandClaude Fable 5.1 e6d3ec30d0 server: 0002-tag-duel-shared-team-hand
Tag duel: teammates share one visible hand. Server tree, gframe/tag_duel.cpp.

Replayed from Tools/YGOLegacy/patches/0002-tag-duel-shared-team-hand.patch in the Unity repo.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-14 20:58:56 -07:00
donnyandClaude Fable 5.1 da27435cdb server: import the duel server (nanahira/ygopro server at 52c868ce)
The server tree of https://code.moenext.com/nanahira/ygopro.git, branch
server, commit 52c868ce071ea0f2fcb0cf39bf2fb4151d12b90c, stock: gframe/,
premake5.lua, .ci/, LICENSE, and gframe/ygopro.rc + .ico (upstream keeps
them in resource/ and copies them in before building). No game assets, no
scripts, no ocgcore submodule: the core is ../core.

The third-party sources upstream's Windows CI downloads are vendored here
at the positions its premake expects, each with its premake fragment from
upstream's premake/ folder inside it: lua 5.4.8, sqlite 3.53.3, libevent
2.1.13-stable (tests, samples and autotools helpers left out; the files
its Windows prebuild copies into include/ left out), zlib 1.3.2 (contrib
and examples left out), xz 5.8.3 (src/liblzma + src/common only), and
irrlicht 1.9 from mycard at 20f86d25: include/ plus the source/Irrlicht
headers and the 11 .cpp files the server's zip reader project compiles.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-14 20:58:21 -07:00