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>
This commit is contained in:
donnyandClaude Opus 5.5 committed 2026-11-08 16:11:14 -07:00
1 parent ca2004112b
commit 3f84b0b50b
10 files changed
+63 -20

No files matched your search

@@ -295,6 +295,7 @@ namespace YGOLegacy.Protocol.Tests
Assert.That(FeatureFlags.All & FeatureFlags.PromptContext, Is.EqualTo(FeatureFlags.PromptContext));
Assert.That(Capability.ProtocolVersion, Is.EqualTo(12));
Assert.That(PromptContextCodec.Size, Is.EqualTo(23));
Assert.That(new[] { PromptContext.PhaseOther, PromptContext.PhaseCost, PromptContext.PhaseTarget, PromptContext.PhaseOperation, PromptContext.PhaseAsk }, Is.EqualTo(new byte[] { 0, 1, 2, 3, 4 }));
const ulong description = 12960005233ul;
var payload = new PromptContext(true, 16178681u, 1, 0x04, 2, 0x1, description, 3, PromptContext.PhaseOperation, 2, 13);
@@ -597,6 +597,7 @@ namespace YGOLegacy.Protocol.Contracts
public const byte PhaseCost = 1;
public const byte PhaseTarget = 2;
public const byte PhaseOperation = 3;
public const byte PhaseAsk = 4;
public byte Version { get; }
// False: no effect function runs (battle and idle commands, a plain summon); every other value is zero and EffectIndex is UnknownIndex.
@@ -611,6 +612,7 @@ namespace YGOLegacy.Protocol.Contracts
public ulong Description { get; }
// The order the card's script registered the effect (the same in every duel); UnknownIndex for an effect the script did not register at load.
public ushort EffectIndex { get; }
// PhaseCost, PhaseTarget, PhaseOperation: that function of the effect runs; PhaseAsk: the core asks whether to use the effect.
public byte Phase { get; }
// The chain link the effect is, 0 when it is not on the chain.
public byte ChainLink { get; }