feat(迭代38卡④ 明细收敛批): 扩展行型收敛——四个专长实名行型(fx_reveal/mine_neutralized/insurance_used/fx_preview_area)收敛为单一 extended 行型+effect_id 载荷(六发射点:orchestrator 三处+grant_segment 三处,display_name/value/highlight 逐字不动);a2 _emit_row 扩展行必载 effect_id 校验(emit 之前,违约 assert 炸零发射);a3 fx_preview_area 来源类别空串违约修复(→fx_warning_beacon,对齐 fx_seal_smith 先例);a4 头注换代两层词表(基础 9 类+扩展行 1 类+四效果身份发射点指引);a5 呈现零改动核验(_format_row fallback 承载、AGG_TYPES 不含扩展行);a6 裁点甲重锚(parity_anchor freeze 改后行为立新锚+复闸三变体双面全同;改前对拍绿基线在案——stash 干净跑批实测);验收=wr2 断言五条(insurance_used〔V6 扩展〕+fx_reveal 兑付/落空〔真实揭示管线〕+mine_neutralized/fx_preview_area〔treasure 套件首次 feats 注入〕)+wr2-np 负面小套件(extended_row_violation_test,expect=1 negative,manifest 登记行)+wr3 并⑤断言;撤销证明三条实测红绿复现;JSONL 读数对拍 PASS(type 迁移计数与 T0 基线对账 264/304/0/0,字段口径外零差异——type/effect_id/source_class/source 四字段,source=logger:133 同值改名副本);改动面封闭(基础 9 类零触碰、豁免集合零变化、数值随机零变化)
This commit is contained in:
1 parent
ce49a8eec2
commit
d5a03db1a8
7 files changed
+174
-12
No files matched your search
@@ -12,11 +12,18 @@ signal round_started(round_index: int)
|
||||
signal board_changed()
|
||||
signal settlement_snapshot(snap: Dictionary) ## 每结算末尾的全量状态快照(playtest_logger 消费——JSONL 数值分析)
|
||||
|
||||
# 明细流水行型协议(战斗结算 Core Rule;9 类;
|
||||
# 明细流水行型协议(战斗结算 Core Rule;两层词表——基础 9 类封闭+扩展行 1 类;
|
||||
# 清单改动须同步 battle_log_view 的 _format_row 与本文档头注):
|
||||
# 效果行 effect · 伤害行 damage · 治疗行 heal ·
|
||||
# 基础 9 类:效果行 effect · 伤害行 damage · 治疗行 heal ·
|
||||
# 奖励未生效行 reward_ineffective · 封印未中行 seal_miss · 施放行 cast · 衰减行 decay ·
|
||||
# 判定行 verdict · 高光行 highlight
|
||||
# 扩展行:行型值=extended(单一扩展行型),效果身份由 effect_id 载荷携带(_emit_row 强制必载,
|
||||
# 缺载即断言失败零发射)。现役效果身份与发射点:
|
||||
# fx_reveal(专长揭示掷格——battle_orchestrator _flush_pending_reveals 三发射点:兑付行+落空行×2)
|
||||
# mine_neutralized(封印匠·危险格中立移除——grant_segment 封印命中 remove_mines 面)
|
||||
# fx_preview_area(示警烟火·周围资源类型——grant_segment 封印命中 preview_area 面)
|
||||
# insurance_used(完美保险·标错豁免——grant_segment 标错 forgive_seal_miss 面)
|
||||
# 新增专长效果只新增 effect_id 身份不再新增行型;行型词表改动须同步 owner 文档「扩展行」节。
|
||||
# 行来源断言豁免集合(行型层)——判定段 / 衰减段本就无棋盘来源,勿一刀切误炸
|
||||
const SOURCE_EXEMPT_TYPES := ["decay", "verdict"]
|
||||
# 行来源断言豁免集合(来源类别层)——事实来源是单位 / 清图而非棋盘格;
|
||||
@@ -146,7 +153,7 @@ func _flush_pending_reveals(ri: int) -> void:
|
||||
if not minesweeper.is_revealed(c) and not board.is_mine(c):
|
||||
cands.append(c)
|
||||
if cands.is_empty():
|
||||
_emit_row("fx_reveal", "fx_reveal", Vector2i(-1, -1), ri, "揭示落空(无未揭示安全格)", 0, {}, "")
|
||||
_emit_row("extended", "fx_reveal", Vector2i(-1, -1), ri, "揭示落空(无未揭示安全格)", 0, {"effect_id": "fx_reveal"}, "")
|
||||
continue
|
||||
var rg: RandomNumberGenerator = rng.open_stream("fx_reveal")
|
||||
var cell: Vector2i = cands[rg.randi_range(0, cands.size() - 1)]
|
||||
@@ -154,12 +161,12 @@ func _flush_pending_reveals(ri: int) -> void:
|
||||
var ok: bool = minesweeper.fx_reveal(cell)
|
||||
_fx_revealing = false
|
||||
if not ok:
|
||||
_emit_row("fx_reveal", "fx_reveal", Vector2i(-1, -1), ri, "揭示落空(格子不可揭)", 0, {}, "")
|
||||
_emit_row("extended", "fx_reveal", Vector2i(-1, -1), ri, "揭示落空(格子不可揭)", 0, {"effect_id": "fx_reveal"}, "")
|
||||
continue
|
||||
var snap = _reward_economy.query_full_snapshot(cell)
|
||||
if snap is Dictionary:
|
||||
_grant_routed(snap, "positive", "fx_reveal", cell, ri, "fx_reveal")
|
||||
_emit_row("fx_reveal", "fx_reveal", cell, ri, "专长揭示", 0, {}, "fx_reveal")
|
||||
_emit_row("extended", "fx_reveal", cell, ri, "专长揭示", 0, {"effect_id": "fx_reveal"}, "fx_reveal")
|
||||
|
||||
|
||||
# 补充事实面(fact 取值第二优先源——payload 未携带的运行态读数)
|
||||
@@ -1260,6 +1267,11 @@ func _reset_round_facts() -> void:
|
||||
# ---- 行协议(Core Rule:公共字段 + 行类型特有字段)----
|
||||
|
||||
func _emit_row(type: String, source_class: String, origin_cell: Vector2i, ri: int, display: String, value: int, extra: Dictionary, highlight: String = "") -> void:
|
||||
# 扩展行必载效果身份(行协议 fail-fast——违约行先炸后不发,零发射;开发期违约即炸,
|
||||
# 与 _assert_row_source 同族 assert 形态)
|
||||
if type == "extended" and String(extra.get("effect_id", "")) == "":
|
||||
assert(false, "[战斗结算] 扩展行缺 effect_id 载荷——行协议违约")
|
||||
return
|
||||
_assert_row_source(type, source_class, origin_cell)
|
||||
var row := {
|
||||
"type": type,
|
||||
|
||||
@@ -268,7 +268,7 @@ func _judge_seal(evt: Dictionary, ri: int) -> void:
|
||||
"remove_mines":
|
||||
var removed: Array[Variant] = oc.minesweeper.remove_mines_in([cell])
|
||||
if not removed.is_empty():
|
||||
oc._emit_row("mine_neutralized", "fx_seal_smith", cell, ri, "封印匠·危险格中立移除", 0, {}, "")
|
||||
oc._emit_row("extended", "fx_seal_smith", cell, ri, "封印匠·危险格中立移除", 0, {"effect_id": "mine_neutralized"}, "")
|
||||
"preview_area":
|
||||
var board_p: BoardData = oc.minesweeper.current_board()
|
||||
var types: Array[Variant] = []
|
||||
@@ -278,7 +278,7 @@ func _judge_seal(evt: Dictionary, ri: int) -> void:
|
||||
types.append(String((n_snap as Dictionary).get("cell_type", "")))
|
||||
if oc.treasure_inventory != null and not types.is_empty():
|
||||
oc.treasure_inventory.apply_overlay("reward_preview", board_p.neighbors8(cell))
|
||||
oc._emit_row("fx_preview_area", "", cell, ri, "示警烟火·周围资源类型", 0, {"types": types}, "")
|
||||
oc._emit_row("extended", "fx_warning_beacon", cell, ri, "示警烟火·周围资源类型", 0, {"effect_id": "fx_preview_area", "types": types}, "")
|
||||
# 雷区图谱(封印流——标中雷额外获得一份格面资源:封印开始产出对标开格;
|
||||
# 复用 grant 单点,额外兑付走同一 _grant_routed 正向路由)
|
||||
for h in fh_hits:
|
||||
@@ -306,8 +306,8 @@ func _judge_seal(evt: Dictionary, ri: int) -> void:
|
||||
# _perfect_forgiven,绝不回写 _perfect_hit_false=契约 2 计数纯净;发射时机与消费点零改动=契约 3)
|
||||
oc._perfect_forgiven += 1
|
||||
_apply_counter_hit(h) # 豁免同时记账(insurance_used battle 域——下次标错 when lt 1 不再命中)
|
||||
oc._emit_row("insurance_used", "seal_miss", cell, ri, "完美保险·标错豁免", 0,
|
||||
{"forgiven": oc._perfect_forgiven}, "")
|
||||
oc._emit_row("extended", "seal_miss", cell, ri, "完美保险·标错豁免", 0,
|
||||
{"effect_id": "insurance_used", "forgiven": oc._perfect_forgiven}, "")
|
||||
var hl := "perfect_broken" if oc._perfect_hit_false - oc._perfect_forgiven == 1 else ""
|
||||
oc._emit_row("seal_miss", "seal_miss", cell, ri, "封印未中", 0, {}, hl)
|
||||
var snap = oc._reward_economy.grant(cell)
|
||||
|
||||
Reference in new issue
Block a user