core: ygol_query_prompt_context names the effect that asks a prompt (TICKET-451, v1.7.0)

field::execute_cost / execute_target / execute_operation push the running
effect (handler, description, stable index, phase 1 / 2 / 3, chain link) on
core.ygol_running at step 0 and pop it when the function finishes; the
innermost entry is the effect that asks. effect::ygol_script_index is stamped
in card::add_effect while the card loads (initial_effect.size()), 0xffff
otherwise. The export writes 22 bytes; a handler the asking player does not
control and that is not face-up answers code 0, index 0xffff, description 0.
Export gates 335 / 856 / 850 -> 336 / 857 / 851.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
donnyandClaude Opus 5.5 committed 2026-11-08 16:05:08 -07:00
1 parent 4cd908d7af
commit b6ef8a31bc
10 files changed
+109 -10

No files matched your search

+9
View File
@@ -90,6 +90,15 @@ OCGCORE_API int32_t ygol_preview_attack(intptr_t pduel, uint8_t playerid, uint8_
// tag duel); a refusal writes nothing. The duel is byte-identical afterwards (proposal 33 Rule 11).
OCGCORE_API int32_t ygol_query_tag_cards(intptr_t pduel, uint8_t playerid, uint8_t* out);
// [YGOL] v1.7.0 (prompt context, TICKET-451): which effect asks the prompt the engine is parked on, read only.
// playerid = the answering player. out (22 bytes): version (1), has_effect, uint32 code (the handler's current
// code), controller, location, sequence, position, uint64 description, uint16 effect_index (the order the
// card's script registered the effect in initial_effect; 0xffff unknown), phase (1 cost, 2 target, 3 operation),
// chain link (0 none). has_effect 0 = no effect function runs: every other byte 0, effect_index 0xffff. A
// handler playerid does not control and that is not face-up writes code 0, effect_index 0xffff, description 0.
// Returns 22, 0 refused (bad pointer, bad player); a refusal writes nothing.
OCGCORE_API int32_t ygol_query_prompt_context(intptr_t pduel, uint8_t playerid, uint8_t* out);
// koishi specific
OCGCORE_API int32_t get_registry_value(intptr_t pduel, const char* key, byte* out_buf);
OCGCORE_API void set_registry_value(intptr_t pduel, const char* key, const char* value);