contract: the probe's tag attack preview room battles on turn 4
Release / windows (push) Successful in 40s
Release / android (push) Successful in 40s
Release / linux (push) Successful in 1m22s
Release / release (push) Successful in 5s
Release / attach-windows (push) Successful in 1s

v1.1.1 took the Battle Phase away from tag turns 1-3, and the room still
asked the turn-2 duelist to enter it, so the probe failed there on every
run since. The room now passes turns 3 and 4 (both swaps) and the fourth
duelist asks the preview; the checks are unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
donnyandClaude Fable 5.1 committed 2026-10-15 23:26:39 -07:00
1 parent 2789a82ef4
commit f52eca74ce
1 file changed
+13 -2
+13 -2
View File
@@ -113,7 +113,8 @@
#
# With --dll it also gates patch 0023 (TICKET-378, attack preview): the server's
# capability says protocol 8 + flag 0x400; each side summons a Probe Knight and
# the second seat enters its Battle Phase; its ATTACK_PREVIEW ask (0x5E: version,
# the second seat enters its Battle Phase (Tag: the fourth duelist on turn 4, since
# v1.1.1 allows no Battle Phase on tag turns 1-3); its ATTACK_PREVIEW ask (0x5E: version,
# count, 4 bytes per pair) is answered to that seat alone (0x5E: version, count,
# per pair the 4 bytes echoed + the engine's 24-byte answer): the knight into the
# knight says both die, a direct attack says illegal, a pair the prompt does not
@@ -2412,7 +2413,7 @@ def preview_answer(flags, attacker=0, target=0, damage0=0, damage1=0):
def attack_preview_room(dll_path, port, label, mode):
seats = 4 if mode == 2 else 2
print("== attack preview, %s (%d seats + a watcher: a summon each, then the second seat's Battle Phase)" % (label, seats))
print("== attack preview, %s (%d seats + a watcher: a summon each, then the %s Battle Phase)" % (label, seats, "fourth duelist's turn-4" if mode == 2 else "second seat's"))
root = make_workspace()
here = os.getcwd()
os.chdir(root)
@@ -2475,6 +2476,16 @@ def attack_preview_room(dll_path, port, label, mode):
second = summon("turn 2")
if not second:
return
if mode == 2:
# v1.1.1: a Tag duel has no Battle Phase on turns 1-3; the fourth duelist (2B) is the first who may battle
for stage in ("turn 3", "turn 4"):
before = marks_of(everyone)
answer(second, struct.pack("<i", 7)) # idle command 7: to the End Phase
ok = pump(everyone, lambda: any(game_msgs(since(c, before), MSG_SELECT_IDLECMD) for c in seated if c is not second), limit=8, chain=True)
holders = [c for c in seated if game_msgs(since(c, before), MSG_SELECT_IDLECMD)]
if not check(ok and len(holders) == 1, "%s: %s: the turn passed and one swapped-in seat holds the idle prompt (%s)" % (label, stage, [c.name for c in holders])):
return
second = holders[0]
before = marks_of(everyone)
answer(second, struct.pack("<i", 6)) # idle command 6: to the Battle Phase
ok = pump(everyone, lambda: game_msgs(since(second, before), MSG_SELECT_BATTLECMD), limit=6, chain=True)