9 Commits
Author SHA1 Message Date
donnyandClaude Opus 5.5 954fbfc65b prompt context: announce kind byte, record 23 bytes, STOC 0x44 24 bytes (TICKET-451, v1.7.0)
u8 announce_kind after chain_link, set only while MSG_ANNOUNCE_NUMBER is
open: 1 when the script called Duel.AnnounceLevel (it passes playerid +
0x10000 to the unit), else 2 when the asking effect has CATEGORY_DICE and is
visible to the answering player, else 0. Contract, changelog, binding
PromptContext.AnnounceKind + AnnouncePlain / Level / Dice, codec 24 bytes,
probe: plain 0, AnnounceLevel 1, a dice effect's AnnounceNumber 2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 16:46:05 -07:00
donnyandClaude Opus 5.5 3f84b0b50b core: prompt context phase 4, the core asks whether to use an effect (TICKET-451, v1.7.0)
The core's own "use this effect?" prompts carry the asked effect in their
PROCESSOR_SELECT_EFFECTYN / SELECT_YESNO unit (optional trigger, lone quick
trigger 221, activation 94, replacements 218 / 219 / 220, Scrap Chimera), and
the unit pushes it on core.ygol_running as phase 4 while the prompt is open.
Contract row, changelog, binding PromptContext.PhaseAsk, probe check: an
optional End Phase trigger is asked with that card, index 2, phase 4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 16:11:14 -07:00
donnyandClaude Opus 5.5 458c9df105 binding: PromptContext record + codec, FeatureFlags.PromptContext, protocol 12 (TICKET-451, v1.7.0)
StocMessage.PromptContext 0x44, PromptContextCodec (23 bytes),
EngineApi.ygol_query_prompt_context, Capability.ProtocolVersion 12, tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 16:05:09 -07:00
donnyandClaude Opus 5.5 c0dfa8ef19 binding: FeatureFlags.TagSharedExtra, protocol 11 (TICKET-433, v1.6.0)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 00:54:35 -07:00
donnyandClaude Fable 5.1 c2eca90644 server: FEATURE_TAG_TWO_FIELDS 0x1000, protocol 10, a Tag room refuses a joiner without it (TICKET-384, v1.5.0)
Release / release (push) Successful in 3s
Release / attach-windows (push) Successful in 0s
Release / linux (push) Successful in 1m27s
Release / windows (push) Successful in 36s
Release / android (push) Successful in 48s
Single and Tag rooms advertise the bit; TagDuel::Capability answers a client whose
capability lacks it with ERRMSG_VERERROR and closes the connection. Binding:
FeatureFlags.TagTwoFields (in All), Capability.ProtocolVersion 10, tests pinned.
Probe: the tag two Field slots rooms (placement on turns 1, 3 and 5 with the core's
own view reported by the Probe Field's script, the Tag refusal, the Single room that
keeps an old client); the capability pins move to 10 / 0x37FF. Contract: the 0x1000
row, the v1.5.0 behaviour row, the Lua note; CHANGELOG v1.5.0.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-24 18:35:21 -07:00
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 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 ffd50fa147 binding: EngineApi, MessageScan, GameMessage, EngineBinding; contract section (e); v1.1.0 changelog (TICKET-398)
Release / linux (push) Successful in 1m4s
Release / windows (push) Successful in 32s
Release / android (push) Successful in 36s
Release / release (push) Successful in 5s
Release / attach-windows (push) Successful in 1s
Namespace YGOLegacy.Engine in binding/YGOLegacy.Engine:
- EngineApi: one DllImport("ygol-engine", Cdecl) extern per export of contract/ocgapi.h (45),
  C names kept, types by the contract's type rule; delegates ScriptReader, CardReader,
  MessageHandler beside it.
- MessageScan: MsgInfo, Scan, Blank, BlankPileCodes, PromptName moved from the Unity bot host
  (LocalDuelHost), public, bodies unchanged (+ the private FieldOffset helper and the five
  constants they read).
- GameMessage: enum : byte, one member per #define MSG_* in core/common.h (84), PascalCase names.
- EngineBinding: const Version generated at build from the EngineVersion property into
  obj/EngineBindingVersion.cs (local by default); CheckNative() compares it with
  ygol_engine_version() and throws InvalidOperationException naming both.

Tests: EngineApiParityTests (header names vs extern names, both ways; public, Cdecl, no
CharSet.Unicode, no overloads) and GameMessageParityTests (missing, extra, renumbered).
114 -> 122 tests, green.

contract/engine-contract.md: five parts; "(e) C# binding" with the 45-row extern table, the type
rule and the version rule; engine.json's binding key documented. CHANGELOG.md: Unreleased ->
v1.1.0 with the TICKET-397 and TICKET-398 rows. README.md: the Binding section names the four
types and CheckNative().

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DJUFwdiGCHipsxLkgxssSR
2026-10-15 16:30:24 -07:00
donnyandClaude Fable 5.1 7ec61d18e6 binding: YGOLegacy.Engine carries the wire protocol; CI builds, tests and ships ygol-engine-binding.zip (TICKET-397)
Release / linux (push) Successful in 1m8s
Release / release (push) Skipped
Release / attach-windows (push) Skipped
Release / windows (push) Successful in 33s
Release / android (push) Successful in 41s
binding/YGOLegacy.Engine (netstandard2.1, LangVersion 9, unsafe, no package, no Unity
reference) holds the Unity repo's Assets/YGOLegacy/Scripts/Protocol/ as
Protocol/{Contracts,Codecs,Framing,Routing}: 12 files copied byte-identical (LF), namespaces
YGOLegacy.Protocol.* unchanged. EngineVersion (default local) is stamped as the informational
version, so the DLL's ProductVersion is the tag it was built for.

binding/YGOLegacy.Engine.Tests (net8.0, NUnit 3.14) holds the six fixtures. 114 tests pass,
the Unity Edit Mode count. Two deviations from "as-is", lead-approved 2026-10-15:
LegacyReaders.cs is a frozen test-only copy of the legacy MDPro3 / YGOSharp readers and enums
the parity tests compare against (they live only in the Unity repo), and FrameCodecTests.cs
line 35 casts (short) instead of (byte): BitConverter.GetBytes((byte)) is ambiguous on
net8.0 (the Half overload), same bytes written.

The windows job builds and tests the binding after the native gates (both with
-p:EngineVersion so the test's project reference does not restamp the DLL as local), checks
the ProductVersion and stages ygol-engine-binding.zip (YGOLegacy.Engine.dll + .pdb) beside
ygol-engine-win64.zip; attach-windows attaches both. engine.json gains "binding": "<version>"
on every platform (windows.ps1 and the Dockerfile's export-gate, the only writers) and the
release job's agreement check includes it. README gains the Binding section and the asset row;
.gitignore ignores binding/**/bin and obj.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DJUFwdiGCHipsxLkgxssSR
2026-10-15 16:14:17 -07:00