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>
This commit is contained in:
1 parent
3f84b0b50b
commit
954fbfc65b
12 files changed
+70
-40
No files matched your search
@@ -492,6 +492,9 @@ OCGCORE_API int32_t ygol_query_prompt_context(intptr_t pduel, uint8_t playerid,
|
||||
card* handler = running.empty() ? nullptr : running.back().handler;
|
||||
if(handler && !pd->cards.count(handler))
|
||||
handler = nullptr;
|
||||
const auto& units = pd->game_field->core.units;
|
||||
const bool announce = !units.empty() && units.front().type == PROCESSOR_ANNOUNCE_NUMBER;
|
||||
const bool announce_level = announce && (units.front().arg1 >> 16) == 1; // Duel.AnnounceLevel passes playerid + 0x10000
|
||||
byte* ptr = out;
|
||||
buffer_write<uint8_t>(ptr, 1);
|
||||
if(!handler) {
|
||||
@@ -505,6 +508,7 @@ OCGCORE_API int32_t ygol_query_prompt_context(intptr_t pduel, uint8_t playerid,
|
||||
buffer_write<uint16_t>(ptr, 0xffff);
|
||||
buffer_write<uint8_t>(ptr, 0);
|
||||
buffer_write<uint8_t>(ptr, 0);
|
||||
buffer_write<uint8_t>(ptr, announce_level ? 1 : 0);
|
||||
return (int32_t)(ptr - out);
|
||||
}
|
||||
const auto& top = running.back();
|
||||
@@ -519,6 +523,7 @@ OCGCORE_API int32_t ygol_query_prompt_context(intptr_t pduel, uint8_t playerid,
|
||||
buffer_write<uint16_t>(ptr, visible ? top.script_index : 0xffff);
|
||||
buffer_write<uint8_t>(ptr, top.phase);
|
||||
buffer_write<uint8_t>(ptr, top.chain_link);
|
||||
buffer_write<uint8_t>(ptr, announce_level ? 1 : (announce && visible && (top.category & CATEGORY_DICE)) ? 2 : 0);
|
||||
return (int32_t)(ptr - out);
|
||||
}
|
||||
OCGCORE_API int32_t get_registry_value(intptr_t pduel, const char* key, byte* out_buf) {
|
||||
|
||||
Reference in new issue
Block a user