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
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
The Unity copy found the repo three folders up from its own file (Tools/YGOLegacy/); from contract/ that resolved to C:\Data\script.zip and the 0009 room setup crashed. Every other path in the probe already uses the cwd, and every --dll run must be from the Unity repo root anyway, so the one line now uses the cwd too. The only change from the Unity copy.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DJUFwdiGCHipsxLkgxssSR
TICKET-388. Four sections, one table each, every fact read from the source (ocgapi.h, serverapi.h, network.h, netserver.cpp, single_duel.cpp, common.h, gframe.cpp): (a) every export with its signature and the patch / ticket that added it, plus the host string slots and the three dead DllImports in the Unity client; (b) every fork CTOS / STOC id 0x40-0x43, 0x50-0x5E with payload layout, sender stamp, who may send, what happens otherwise, capability bit and protocol number, plus the bits table, the no-message behaviour changes and the replay flag; (c) the MSG_* table as LocalDuelHost.Scan reads it, the fork's only effect (0015) marked; (d) the setup pairs the server reads and the ones the client sends, and the generated Lua reference. Also defines engine.json.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DJUFwdiGCHipsxLkgxssSR
TICKET-388. contract/lua-reference/generate.py is a Python port of yugioh-legacy-server's duel-engine/ocgcore/lua-reference.sh (bash + awk): one api-<class>.md per luaL_Reg table in core/lib*.cpp (Card, Duel, Effect, Group, Debug; 670 functions) and api-globals.md for the 37 globals interpreter.cpp sets. Row counts match the server repo's committed reference exactly. Regenerate and commit after any core change to those files.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DJUFwdiGCHipsxLkgxssSR
TICKET-388. Byte-identical copy of Tools/YGOLegacy/probe-feature-messages.py; the Unity copy stays until Phase 2. Run from the Unity repo root: python contract/probe-feature-messages.py --dll out/win64/ygol-engine.dll.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DJUFwdiGCHipsxLkgxssSR
TICKET-388. contract/ocgapi.h is core/ocgapi.h verbatim plus the server's YGOSERVER_API lines in a marked block. windows.ps1 refuses to build when either part differs (tested: a changed server line and a changed core line each fail; the real file passes). After the export gate it writes out/win64/engine.json { version, exports, protocol, capabilities }: protocol from FEATURE_PROTOCOL in gframe/network.h, capabilities as the OR of the FEATURE_* bits on the cap.flags line of single_duel.cpp and tag_duel.cpp (which must agree), each bit resolved from network.h. Nothing typed in. Verified: protocol 8, capabilities 0x7FF (2047), exports 334.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DJUFwdiGCHipsxLkgxssSR
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>
Each row: the date the patch first shipped in the Unity repo, the ticket, and the contract part it touched. Rules-only patches say so.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
server/build, server/obj, server/bin and out/ are generated; so are the
files libevent's Windows prebuild step copies from WIN32-Code into
event/include. Upstream's own .gitignore is not carried over: it ignores
the dependency folders this repo vendors.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
premake vs2022 in server/ (SERVER_PRO3_SUPPORT, LOG_IN_CHAT, USE_SIMD=best),
MSBuild on build\YGOPro.sln target ygoserver, Release x64, always from a
wiped obj/bin/build; refuses a repo path with a space (libevent's unquoted
xcopy); copies the result to out/win64/ and FAILS unless dumpbin counts
exactly 333 exports: start_server, stop_server and the core's C API with
ygol_sb_* and ygol_preview_attack. The old ygoserver.dll had 327 because its
own core copy never carried patch 0008; one core means one export list.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
The vendored ocgcore from the Unity repo (Tools/YGOLegacy/ocgcore at dev
HEAD). Upstream is nanahira/ygopro-core at 973672dc9ce7cb49f47173277ab1ad0e318b7593;
the seven files that differ from it carry the fork's core patches, already
applied: 0001 face-down Token setcode, 0004 effect damage step outside a
chain, 0008 Sandbox god mode, 0015 tag first seat holds the hand, 0022
attack preview, 0024 attack preview legality. Generated build/ output is
left out.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>