core: a Tag Field Spell takes the team's free Field slot (v1.7.2)
Release / release (push) Successful in 9s
Release / windows (push) Successful in 33s
Release / linux (push) Successful in 1m19s
Release / android (push) Successful in 59s
Release / attach-windows (push) Successful in 1s

get_fzone_landing sent a Field Spell to the playing partner's slot and
replaced the card there even when the other partner's slot was free; only
a control change took the free slot. A partner who got both of the team's
Fields back with Giant Trunade and played them one after the other lost
the first. Now a Field Spell takes the free slot whenever the playing
partner's is taken; with both taken it replaces the playing partner's.

Probe: new room "tag, two in one turn" (seq 5 then 6 on turn 1).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WoiqG2TqZQmJ8tTn8tYpgy
This commit is contained in:
donnyandClaude Opus 5.5 committed 2026-11-12 14:54:23 -07:00
1 parent 00ed2796f1
commit d31b7b62d8
4 files changed
+33 -11

No files matched your search

+9
View File
@@ -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.7.2 — 2026-11-12
In Tag, a Field Spell takes the team's free Field slot when the playing partner's slot is taken. No new export, message
or capability bit: exports 336 / 857 / 851, protocol 12, capabilities `0xF7FF`.
| Date | Change | Ticket | Contract part |
|---|---|---|---|
| 2026-11-12 | Core: `field::get_fzone_landing` sent a Field Spell to the playing partner's slot and replaced the card there even when the other partner's slot was free; only a control change took the free slot. A partner who got both of the team's Fields back to the hand ("Giant Trunade") and played them one after the other lost the first. Now any Field Spell that lands (activated, Set, `Duel.MoveToField` to `LOCATION_FZONE`) while the playing partner's slot is taken and the other is free takes the free one; when both are taken it replaces the playing partner's, as before. A Set offers that landing slot's bit. Probe: room "tag, two in one turn". | none (owner) | (d) Lua API: behaviour |
## v1.7.1 — 2026-11-11
A card whose cdb alias names another card keeps its own setcodes. No new export, message or capability bit:
+2 -1
View File
@@ -241,6 +241,7 @@ duelist's own side (v1.2.0), both sides for an observer when spectators see all
| `0x2000` | `FEATURE_TAG_PARTNER_CARDS` | 9 | v1.2.0 | Tag partner cards (`STOC_TAG_PARTNER_CARDS`, `ygol_query_tag_cards`) |
| `0x4000` | `FEATURE_TAG_SHARED_EXTRA` | 11 | v1.6.0 | Tag shared Extra Deck: the setup pair `ygol.tag.extra=shared`, `QUERY_TAG_MEMBER` on Extra Deck refreshes; a Tag room refuses a joiner without it |
| v1.7.1 | A card read with a `rule_code` (a distant cdb alias) is a member of its OWN setcodes as well as those of the card it names: `Card.IsSetCard`, `Card.IsPreviousSetCard` and `Card.IsSummonSetCard` check `data.setcode` while the card bears its own `rule_code` (`card::check_code_setcode`). A card renamed by `EFFECT_CHANGE_CODE` answers from the new name only, as stock. No new message, no capability bit. |
| v1.7.2 | In Tag on Master Rule 4/5 a Field Spell that lands while the playing partner's Field slot is taken and the other partner's is free takes the free slot (`field::get_fzone_landing`); with both taken it replaces the playing partner's. Before, only a card that changed control took the free slot, so a partner who played the team's two Fields one after the other lost the first. No new export, message or bit; protocol 12. |
| `0x8000` | `FEATURE_PROMPT_CONTEXT` | 12 | v1.7.0 | Prompt context (`STOC_PROMPT_CONTEXT`, `ygol_query_prompt_context`): which card and which effect asks; no room refuses a joiner without it |
`FEATURE_PROTOCOL` is bumped by every patch that adds a message a client must understand; the join
@@ -260,7 +261,7 @@ carry a new feature inside another feature's message.
| 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=<n>` (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. |
| v1.5.0 | Tag two Field slots (proposal 45, TICKET-384; core `field::has_two_fields` = `DUEL_TAG_MODE` on Master Rule 4 or 5): a team has a Field slot per partner, Spell/Trap sequence 5 for the partner who plays the team's first turn and 6 for the other (`player_info::tag_partner` flips in `tag_swap`). A Field Spell that lands (activated, Set, `Duel.MoveToField` to `LOCATION_FZONE`) goes to the playing partner's slot and replaces only the card there; one that changes control while that slot is taken and the other is free takes the free one. A Set opens only the landing slot's bit in `MSG_SELECT_PLACE`. `LOCATION_FZONE` covers both slots (`Card.IsLocation`, `Duel.GetMatchingGroup` and the other filters, `Duel.IsEnvironment`, `Duel.CheckLocation(p, LOCATION_FZONE, 0/1)`), `Duel.GetFieldCard(p, LOCATION_FZONE, 0)` is the playing partner's field, else the other one, and sequence 1 the remaining one; `Duel.GetFieldCard(p, LOCATION_SZONE, 6)` works. The second field reaches a client as `MSG_MOVE` to Spell/Trap sequence 6 and in `MSG_RELOAD_FIELD`'s sixth Spell/Trap entry: no new message. Singles, Match and Master Rule 3 (where slot 6 is a Pendulum Zone) are unchanged. Scripts that name Spell/Trap sequence 5 by number see one field (the TICKET-384 closing note lists them). Capability `0x1000`, protocol 9 -> 10. |
| v1.5.0 | Tag two Field slots (proposal 45, TICKET-384; core `field::has_two_fields` = `DUEL_TAG_MODE` on Master Rule 4 or 5): a team has a Field slot per partner, Spell/Trap sequence 5 for the partner who plays the team's first turn and 6 for the other (`player_info::tag_partner` flips in `tag_swap`). A Field Spell that lands (activated, Set, `Duel.MoveToField` to `LOCATION_FZONE`) goes to the playing partner's slot and replaces only the card there; while that slot is taken and the other is free it takes the free one (since v1.7.2; before, only a card that changed control did). A Set opens only the landing slot's bit in `MSG_SELECT_PLACE`. `LOCATION_FZONE` covers both slots (`Card.IsLocation`, `Duel.GetMatchingGroup` and the other filters, `Duel.IsEnvironment`, `Duel.CheckLocation(p, LOCATION_FZONE, 0/1)`), `Duel.GetFieldCard(p, LOCATION_FZONE, 0)` is the playing partner's field, else the other one, and sequence 1 the remaining one; `Duel.GetFieldCard(p, LOCATION_SZONE, 6)` works. The second field reaches a client as `MSG_MOVE` to Spell/Trap sequence 6 and in `MSG_RELOAD_FIELD`'s sixth Spell/Trap entry: no new message. Singles, Match and Master Rule 3 (where slot 6 is a Pendulum Zone) are unchanged. Scripts that name Spell/Trap sequence 5 by number see one field (the TICKET-384 closing note lists them). Capability `0x1000`, protocol 9 -> 10. |
| v1.6.0 | Tag shared Extra Deck (proposal 53, TICKET-433): with the setup pair `ygol.tag.extra=shared` (section (d)) `TagDuel` sets the duel option `DUEL_TAG_SHARED_EXTRA` `0x200`. `start_duel` moves each team's `tag_list_extra` into `list_extra` (the first partner's cards first) and renumbers the sequences, so either partner can Summon any of the cards; `tag_swap` leaves the Extra Deck alone, `MSG_TAG_SWAP` keeps its layout and sends the one list, and `ygol_query_tag_cards` / `0x5F` report an Extra count of 0. The opening `MSG_START` carries the sum of both partners' Extra Decks, and the opening Extra Deck refreshes run after `start_duel`. The core has one `owner` per team, so each card has `card::tag_member`, set once when it is loaded (0 `new_card`, 1 `new_tag_card`), and `RefreshExtra` adds `QUERY_TAG_MEMBER` to its flag in such a duel (section (c), Query records). Replays need no format change: `opt` holds the option and every reader passes `opt` to `start_duel`; a reader that writes its own `MSG_START` before `start_duel` must add the partner's Extra count. An older engine ignores the option and plays such a replay wrongly. Without the pair every stream is unchanged. Capability `0x4000`, protocol 10 -> 11. |
### Replay
+19 -6
View File
@@ -3105,8 +3105,11 @@ def error_msgs(pkts):
return [d[0] for p, d in pkts if p == STOC_ERROR_MSG and d]
def tag_two_fields_room(dll_path, port, label):
def tag_two_fields_room(dll_path, port, label, first_turn_fields=1):
if first_turn_fields == 1:
print("== tag two Field slots, %s (seat 0 plays a Field on turn 1, seat 1 on turn 3, seat 0 again on turn 5)" % label)
else:
print("== tag two Field slots, %s (seat 0 plays two Fields on turn 1, seat 1 one on turn 3, seat 0 one on turn 5)" % label)
root = make_workspace()
here = os.getcwd()
os.chdir(root)
@@ -3141,7 +3144,7 @@ def tag_two_fields_room(dll_path, port, label):
c.send(CTOS_UPDATE_DECK, deck_bytes(decks[c.seat]))
pump(seated, lambda: False, limit=0.8)
seated[0].send(CTOS_HS_START)
state = {"turn": 0, "acted": 0, "retries": 0, "moves": []}
state = {"turn": 0, "acted": {}, "retries": 0, "moves": []}
def answer(c, payload):
c.send(CTOS_TIME_CONFIRM)
@@ -3171,8 +3174,9 @@ def tag_two_fields_room(dll_path, port, label):
for k in range(5):
n += 1 + d[n] * 7
activatable = d[n]
if activatable and state["acted"] != state["turn"]:
state["acted"] = state["turn"]
allowed = first_turn_fields if state["turn"] == 1 else 1
if activatable and state["acted"].get(state["turn"], 0) < allowed:
state["acted"][state["turn"]] = state["acted"].get(state["turn"], 0) + 1
answer(c, struct.pack("<i", 5)) # activate the first card: a Probe Field
else:
answer(c, struct.pack("<i", 7)) # to the End Phase
@@ -3199,14 +3203,22 @@ def tag_two_fields_room(dll_path, port, label):
check(state["retries"] == 0, "%s: no answer was refused (MSG_RETRY x%d)" % (label, state["retries"]))
fields = [(turn, prev, cur) for turn, code, prev, cur in state["moves"] if code == PROBE_FIELD]
to_field = [(turn, cur[2]) for turn, prev, cur in fields if cur[0] == 0 and cur[1] == LOCATION_SZONE]
left = [(turn, prev[2], cur[1]) for turn, prev, cur in fields if prev[0] == 0 and prev[1] == LOCATION_SZONE]
hints = field_hints(seated[0].log)
if first_turn_fields == 1:
check(to_field == [(1, 5), (3, 6), (5, 5)],
"%s: seat 0's Field lands in sequence 5 on turn 1, seat 1's in sequence 6 on turn 3, seat 0's next in sequence 5 on turn 5 (%r)" % (label, to_field))
left = [(turn, prev[2], cur[1]) for turn, prev, cur in fields if prev[0] == 0 and prev[1] == LOCATION_SZONE]
check(left == [(5, 5, LOCATION_GRAVE)],
"%s: only the sequence-5 Field left, to the Graveyard on turn 5; the sequence-6 Field never moved (%r)" % (label, left))
hints = field_hints(seated[0].log)
check(hints == [0x53D1, 0x61F2, 0x51F2],
"%s: the core saw it so: turn 1 seq 5, 1 field, slot 1 free; turn 3 seq 6, 2 fields, GetFieldCard(FZONE, 0) = the playing partner's, 1 = the other; turn 5 seq 5, 2 fields (%s)" % (label, ["0x%X" % h for h in hints]))
else:
check(to_field == [(1, 5), (1, 6), (3, 6), (5, 5)],
"%s: seat 0's first Field lands in sequence 5 and its second in the free sequence 6 on turn 1; seat 1's replaces sequence 6 on turn 3, seat 0's replaces sequence 5 on turn 5 (%r)" % (label, to_field))
check(left == [(3, 6, LOCATION_GRAVE), (5, 5, LOCATION_GRAVE)],
"%s: no Field left on turn 1; the sequence-6 Field went to the Graveyard on turn 3, the sequence-5 one on turn 5 (%r)" % (label, left))
check(hints == [0x53D1, 0x60F2, 0x61F2, 0x51F2],
"%s: the core saw it so: turn 1 seq 5 then seq 6 with 2 fields and GetFieldCard(FZONE, 0) = the first; turn 3 seq 6; turn 5 seq 5 (%s)" % (label, ["0x%X" % h for h in hints]))
check(all(not c.closed for c in seated), "%s: every seat is still connected" % label)
marks = marks_of(seated)
for c in seated[:2]:
@@ -3248,6 +3260,7 @@ def tag_two_fields_suite(dll_path, port):
print()
print("hosting the tag two Field slots rooms from %s" % dll_path)
tag_two_fields_room(dll_path, port, "tag")
tag_two_fields_room(dll_path, port + 2, "tag, two in one turn", first_turn_fields=2)
tag_two_fields_single(dll_path, port + 1, "single")
# --- proposal 53 (TICKET-433): Tag shared Extra Deck --------------------------------------------
+3 -4
View File
@@ -649,8 +649,8 @@ uint8_t field::get_fzone_sequence(uint8_t playerid, uint8_t fseq) const {
bool field::is_fzone_zone(uint32_t zone) const {
return zone == (0x1U << 5) || (has_two_fields() && zone == (0x1U << 6));
}
// the slot a Field Spell lands in for playerid: the playing partner's, which it replaces; a card that changes control
// while the playing partner's slot is taken and the other is free takes the free one
// the slot a Field Spell lands in for playerid: the playing partner's, which it replaces; when the playing partner's
// slot is taken and the other is free, it takes the free one
uint8_t field::get_fzone_landing(card* pcard, uint8_t playerid) const {
if(!has_two_fields())
return 5;
@@ -659,8 +659,7 @@ uint8_t field::get_fzone_landing(card* pcard, uint8_t playerid) const {
return pcard->current.sequence;
uint8_t mine = get_fzone_sequence(playerid, 0);
uint8_t other = get_fzone_sequence(playerid, 1);
if(player[playerid].list_szone[mine] && !player[playerid].list_szone[other]
&& pcard->current.location == LOCATION_SZONE && pcard->current.controler != playerid)
if(player[playerid].list_szone[mine] && !player[playerid].list_szone[other])
return other;
return mine;
}