合并(迭代44): 组合根注册面批+战斗编排归约批+测速循环批v1.1三卡合回——S13零豁免三键真实清偿(main.gd 49→15/battle_orchestrator 38→15/tune_sim裸键消除)·批末全量域闸13/14绿(02/05/09三闸从基线红改善归绿·唯一红08c为并行写卡会话在飞件)·独立验收审计通过·卡③v1.1停卡重裁实况见实现报告§5
This commit is contained in:
commit
bee73db51b
54 files changed
+1833
-1226
No files matched your search
@@ -850,7 +850,7 @@ func _drive_to_pref(autoplay, prefer: String) -> Dictionary:
|
||||
r.pick_next_node(int(hit.get("id", -1)))
|
||||
out["node"] = hit
|
||||
if prefer == "battle":
|
||||
out["enc"] = r.current_battle().encounter
|
||||
out["enc"] = r.current_battle()._facts.encounter
|
||||
else:
|
||||
var cands: Array = (adr.stop().node_curio_candidates() as Dictionary).get("candidates", []) as Array
|
||||
adr.stop().present_node_curio(cands)
|
||||
|
||||
@@ -178,10 +178,10 @@ func _init() -> void:
|
||||
Kit.check_quiet(safe_cells.size() == 2, "保险 rig:两枚安全格定位(去重闸按格实例——限次样本须异格)〔卡② R2〕")
|
||||
var rows_orch: Array[Dictionary] = []
|
||||
orch.step_row.connect(func(row): rows_orch.append(row)) # step_row 公开信号面(insurance_used 载荷/seal_miss highlight=豁免账与误标账观测面)
|
||||
Kit.check_quiet(int(orch._perfect_hit_false) == 0 and int(orch._perfect_forgiven) == 0,
|
||||
Kit.check_quiet(int(orch._facts.perfect_hit_false) == 0 and int(orch._facts.perfect_forgiven) == 0,
|
||||
"保险前置:误标账与豁免账双零起〔卡② R2〕")
|
||||
orch._grant_seg._judge_seal({"cell": safe_cells[0], "hit": false}, 1)
|
||||
Kit.check_quiet(int(orch._perfect_hit_false) == 1,
|
||||
orch._rounds._grant_seg._judge_seal({"cell": safe_cells[0], "hit": false}, 1)
|
||||
Kit.check_quiet(int(orch._facts.perfect_hit_false) == 1,
|
||||
"计数纯净:首次标错 _perfect_hit_false 落 1 未被回退改写(契约 2)〔卡② R2〕")
|
||||
var ins_row := {}
|
||||
for r in rows_orch:
|
||||
@@ -191,7 +191,7 @@ func _init() -> void:
|
||||
"豁免一次:首次标错 _perfect_forgiven=1(forgive_seal_miss 派发)〔卡② R2〕")
|
||||
Kit.check_quiet(int(orch.action_economy.pending_ap_delta()) == 1,
|
||||
"事件不吞:同一标错的 seal_missed 仍被危险直觉·守收到(queue AP+1)〔卡② R2〕")
|
||||
orch._grant_seg._judge_seal({"cell": safe_cells[1], "hit": false}, 2)
|
||||
orch._rounds._grant_seg._judge_seal({"cell": safe_cells[1], "hit": false}, 2)
|
||||
var ins_count := 0
|
||||
var miss_hl_last := ""
|
||||
for r in rows_orch:
|
||||
@@ -203,11 +203,11 @@ func _init() -> void:
|
||||
"限次:第二次标错不获豁免(forgiven 恒 1——when counter lt 1)〔卡② R2〕")
|
||||
Kit.check_quiet(not orch.perfect_sweep_earned(),
|
||||
"判定相减:误标 2 − 豁免 1 = 有效 1 → 完美不成立〔卡② R2 真值表〕")
|
||||
orch._perfect_hit_false = 1
|
||||
orch._perfect_hit_true = 1
|
||||
orch._facts.perfect_hit_false = 1
|
||||
orch._facts.perfect_hit_true = 1
|
||||
Kit.check_quiet(orch.perfect_sweep_earned(),
|
||||
"判定相减:误标1−豁免1=有效0且标中≥1→完美成立(保险每战限次一次迁移保绿)〔无状态化 V7〕")
|
||||
orch._perfect_hit_true = 0
|
||||
orch._facts.perfect_hit_true = 0
|
||||
Kit.check_quiet(not orch.perfect_sweep_earned(),
|
||||
"判定守卫:标中数 0 时零误标也不成立(整图 ≥1 标中条件零松动)〔卡② R2 真值表〕")
|
||||
var rig_rng2 = RngScript.new()
|
||||
@@ -222,7 +222,7 @@ func _init() -> void:
|
||||
var rows_orch2: Array[Dictionary] = []
|
||||
orch2.step_row.connect(func(row): rows_orch2.append(row)) # step_row 公开信号面(insurance_used 载荷=豁免账观测面)
|
||||
var sc2 = safe_cells[0]
|
||||
orch2._grant_seg._judge_seal({"cell": sc2, "hit": false}, 1)
|
||||
orch2._rounds._grant_seg._judge_seal({"cell": sc2, "hit": false}, 1)
|
||||
var ins_row2 := {}
|
||||
for r in rows_orch2:
|
||||
if String(r.get("effect_id", "")) == "insurance_used":
|
||||
@@ -249,7 +249,7 @@ func _init() -> void:
|
||||
if not o10.minesweeper.current_board().is_mine(c10):
|
||||
sc10 = c10
|
||||
break
|
||||
o10._grant_seg._judge_seal({"cell": sc10, "hit": false}, 1)
|
||||
o10._rounds._grant_seg._judge_seal({"cell": sc10, "hit": false}, 1)
|
||||
var sm10: Dictionary = {}
|
||||
for r10 in rows10:
|
||||
if String(r10.get("type", "")) == "seal_miss":
|
||||
@@ -276,14 +276,14 @@ func _init() -> void:
|
||||
if not o11.minesweeper.current_board().is_mine(c11):
|
||||
sc11 = c11
|
||||
break
|
||||
o11._grant_seg._judge_seal({"cell": sc11, "hit": false}, 1)
|
||||
o11._rounds._grant_seg._judge_seal({"cell": sc11, "hit": false}, 1)
|
||||
var sm11: Dictionary = {}
|
||||
for r11 in rows11:
|
||||
if String(r11.get("type", "")) == "seal_miss":
|
||||
sm11 = r11
|
||||
Kit.check_quiet(String(sm11.get("highlight", "")) == "",
|
||||
"A11 豁免:首次标错获豁免 → seal_miss 行 highlight==空串〔卡① N7〕")
|
||||
o11._perfect_hit_true = 1
|
||||
o11._facts.perfect_hit_true = 1
|
||||
Kit.check_quiet(o11.perfect_sweep_earned(),
|
||||
"A11 真值:误标 1 − 豁免 1 = 有效 0 且标中≥1 → 完美成立(与 highlight==空 一致)〔卡① N7〕")
|
||||
|
||||
|
||||
@@ -339,7 +339,7 @@ func _meta_settle_and_workshop() -> void:
|
||||
adr_res.resume_adventure(bp_min, p_resume))
|
||||
Kit.check("继续上局受理面:tree_rules 随参数面进 runner._tree_rules(消费面 set_tree_rules 下传现成)",
|
||||
adr_res.runner() != null and adr_res.runner().pick_next_node(int(adr_res.runner().next_candidate_ids()[0]))
|
||||
and ((adr_res.runner().current_battle().encounter.get("tree_rules", []) as Array) == rules_e))
|
||||
and ((adr_res.runner().current_battle()._facts.encounter.get("tree_rules", []) as Array) == rules_e))
|
||||
_meta_smoke_cleanup()
|
||||
|
||||
|
||||
@@ -705,16 +705,16 @@ func _smoke_tree_rules() -> void:
|
||||
Kit.check("守侧 rig:首轮后 queue 干净(开局 posture queue 已兑现)",
|
||||
int(orch.action_economy.pending_ap_delta()) == 0)
|
||||
# 场景①:当回合新封印、结算判标错且封印仍在场 → queue +1(本轮 AP 零变化=queue 承载、下轮 notify_round_start 兑现)
|
||||
orch._grant_seg._judge_seal({"cell": safe, "hit": false}, 1)
|
||||
orch._rounds._grant_seg._judge_seal({"cell": safe, "hit": false}, 1)
|
||||
Kit.check("守①:当回合标错且封印在场 → 下轮 AP+1(queue 排队——本轮 AP 逐位零变化)",
|
||||
int(orch.action_economy.pending_ap_delta()) == 1)
|
||||
# 场景③④:之前回合标错重判(封印在场状态)与同格重复——去重闸挡回,最多返还一次
|
||||
orch._grant_seg._judge_seal({"cell": safe, "hit": false}, 2)
|
||||
orch._grant_seg._judge_seal({"cell": safe, "hit": false}, 3)
|
||||
orch._rounds._grant_seg._judge_seal({"cell": safe, "hit": false}, 2)
|
||||
orch._rounds._grant_seg._judge_seal({"cell": safe, "hit": false}, 3)
|
||||
Kit.check("守③④:旧封印重判零触发+同格最多一次(_seal_miss_seen 去重闸=「当回合标错动作」判别器)",
|
||||
int(orch.action_economy.pending_ap_delta()) == 1)
|
||||
# 场景②负样本:封印命中(hit=true 正向兑付路径)零触发
|
||||
orch._grant_seg._judge_seal({"cell": safe, "hit": true}, 4)
|
||||
orch._rounds._grant_seg._judge_seal({"cell": safe, "hit": true}, 4)
|
||||
Kit.check("守②负样本:标中/被挖封印零触发(标错事件只在 miss 分支发射——发射面过滤承载)",
|
||||
int(orch.action_economy.pending_ap_delta()) == 1)
|
||||
# 场景⑤:末轮判出→无下一轮=queue 不兑现(编排器每战新建——队列实例随战亡,合法作废态)
|
||||
@@ -746,7 +746,7 @@ func _smoke_tree_rules() -> void:
|
||||
"feats": [], "tree_rules": [], "battle_index": 1,
|
||||
"bonus_ref": {"atk": 0, "max_hp": 0, "armor_class": 0}, "adventure_counters": {},
|
||||
"voucher_rap": 0, "voucher_time_sand": 0, "node_type": "battle"}))
|
||||
orch3.encounter["tree_rules"] = []
|
||||
orch3._facts.encounter["tree_rules"] = []
|
||||
var gp_base: int = orch3._roll_gp_drop()
|
||||
var orch4 = load("res://core/battle_orchestrator.gd").new(_db, _fresh_rng(777005))
|
||||
Kit.check("聚 rig:增益编排启动(tree_rules=economy_hoard)",
|
||||
@@ -755,7 +755,7 @@ func _smoke_tree_rules() -> void:
|
||||
"feats": [], "tree_rules": ["economy_hoard"], "battle_index": 1,
|
||||
"bonus_ref": {"atk": 0, "max_hp": 0, "armor_class": 0}, "adventure_counters": {},
|
||||
"voucher_rap": 0, "voucher_time_sand": 0, "node_type": "battle"}))
|
||||
orch4.encounter["tree_rules"] = ["economy_hoard"]
|
||||
orch4._facts.encounter["tree_rules"] = ["economy_hoard"]
|
||||
var gp_hoard: int = orch4._roll_gp_drop()
|
||||
Kit.check("聚:战斗掉落乘算 ×1.5(provisional——同种子配对 %d→%d,入账前=结算框显示实得)",
|
||||
gp_hoard == int(round(float(gp_base) * 1.5)) and gp_hoard >= gp_base)
|
||||
|
||||
@@ -72,7 +72,7 @@ func _seal_propagation(db) -> bool:
|
||||
rng_a.set_master_seed(5)
|
||||
var oc_bg = OrchestratorScript.new(db, rng_a)
|
||||
var bi_bg = BoardInstallerScript.new({"db": db, "rng": rng_a, "minesweeper": oc_bg.minesweeper,
|
||||
"reward_economy": oc_bg._reward_economy, "encounter": oc_bg.encounter, "fatal_cb": oc_bg._fatal})
|
||||
"reward_economy": oc_bg._reward_economy, "encounter": oc_bg._facts.encounter, "fatal_cb": oc_bg._fatal})
|
||||
bi_bg.generator._fatal("测试违约①棋盘生成")
|
||||
if oc_bg.battle_result != "fatal_error":
|
||||
push_error("[run_time_fatal_test/wr5] 棋盘生成违约未传导封印(battle_result=%s)" % str(oc_bg.battle_result))
|
||||
|
||||
@@ -23,12 +23,15 @@ func _init() -> void:
|
||||
Kit.check_quiet(load("res://core/settlement/decay_segment.gd").new(oc) != null, "V4 DecaySegment 直接 new()〔迭代27 T2〕")
|
||||
Kit.check_quiet(load("res://core/settlement/verdict_segment.gd").new(oc) != null, "V4 VerdictSegment 直接 new()〔迭代27 T2〕")
|
||||
|
||||
# V4-2 编排器 _init 接线(段持宿主引用;段序编排面在位)
|
||||
Kit.check_quiet(oc._grant_seg != null and oc._grant_seg.oc == oc, "V4 编排器接线·授予段(宿主回指)〔迭代27 T2〕")
|
||||
Kit.check_quiet(oc._aura_seg != null and oc._aura_seg.oc == oc, "V4 编排器接线·增益/减益段〔迭代27 T2〕")
|
||||
Kit.check_quiet(oc._combat_seg != null and oc._combat_seg.oc == oc, "V4 编排器接线·战斗段〔迭代27 T2〕")
|
||||
Kit.check_quiet(oc._decay_seg != null and oc._decay_seg.oc == oc, "V4 编排器接线·衰减段〔迭代27 T2〕")
|
||||
Kit.check_quiet(oc._verdict_seg != null and oc._verdict_seg.oc == oc, "V4 编排器接线·判定段〔迭代27 T2〕")
|
||||
# V4-2 编排器 _init 接线(段持宿主引用;段序编排面在位)——注册面批同代归约 V1:
|
||||
# 段件宿主直持改经 _rounds(轮循环驱动件)承载,接线断言改指 _rounds 段族
|
||||
Kit.check_quiet(oc._rounds != null and oc._rounds.oc == oc, "V1 编排器接线·轮循环驱动件在座且宿主回指〔编排归约 V1〕")
|
||||
Kit.check_quiet(oc._facts != null, "V1 编排器接线·战斗事实件在座〔编排归约 V1〕")
|
||||
Kit.check_quiet(oc._rounds._grant_seg != null and oc._rounds._grant_seg.oc == oc, "V4 编排器接线·授予段(宿主回指)〔迭代27 T2〕")
|
||||
Kit.check_quiet(oc._rounds._aura_seg != null and oc._rounds._aura_seg.oc == oc, "V4 编排器接线·增益/减益段〔迭代27 T2〕")
|
||||
Kit.check_quiet(oc._rounds._combat_seg != null and oc._rounds._combat_seg.oc == oc, "V4 编排器接线·战斗段〔迭代27 T2〕")
|
||||
Kit.check_quiet(oc._rounds._decay_seg != null and oc._rounds._decay_seg.oc == oc, "V4 编排器接线·衰减段〔迭代27 T2〕")
|
||||
Kit.check_quiet(oc._rounds._verdict_seg != null and oc._rounds._verdict_seg.oc == oc, "V4 编排器接线·判定段〔迭代27 T2〕")
|
||||
# counter_add 写口真实路径(geologist 订阅行承载:公共命令链 begin_battle→move→dig→stop
|
||||
# 经授予段 counter_add 单点落 counters_ctx battle 桶——受理载荷+公开读数口 fx_host().counters_ctx)
|
||||
var rng_c = load("res://core/rng_service.gd").new()
|
||||
|
||||
@@ -162,13 +162,13 @@ func _init() -> void:
|
||||
"线香:装配起战(battle 级充能 1)")
|
||||
var inv8 = load("res://core/treasure_items.gd").new(db)
|
||||
var rec8: Dictionary = inv8.add_item("incense_stick", "attunement", Vector2i(-1, -1), 0)
|
||||
ob8.treasure_inventory = inv8
|
||||
ob8.reward_grant().treasure_inventory = inv8
|
||||
var h8: int = int(rec8.get("handle", -1)) # handle 取 add_item 返回(snapshot 投影无 handle 键)
|
||||
var tgt8: Vector2i = _first_closed_safe(ob8)
|
||||
Kit.check_quiet(tgt8 != Vector2i(-9, -9), "线香:夹具存在未开安全格")
|
||||
var v8: Dictionary = ob8.reward_grant().use_treasure(h8, tgt8)
|
||||
Kit.check_quiet(bool(v8.get("ok", false)), "线香正常:单格真视受理(cell 目标解析)")
|
||||
Kit.check_quiet(bool(ob8.treasure_inventory.query_overlays().get("mine_reveal", []).has(tgt8))
|
||||
Kit.check_quiet(bool(ob8.reward_grant().treasure_inventory.query_overlays().get("mine_reveal", []).has(tgt8))
|
||||
and ob8.minesweeper.is_revealed(tgt8) == false,
|
||||
"线香断言:目标格入真视叠加层且未被开格(真视≠开格——信息红线)")
|
||||
Kit.check_quiet(inv8.snapshot_inventory().is_empty() or bool(inv8.snapshot_inventory()[0].get("used", false)),
|
||||
@@ -240,7 +240,7 @@ func _init() -> void:
|
||||
"天眼:装配起战(level 级充能 1)")
|
||||
var inv11 = load("res://core/treasure_items.gd").new(db)
|
||||
var rec11: Dictionary = inv11.add_item("sky_eye", "attunement", Vector2i(-1, -1), 0)
|
||||
ob11.treasure_inventory = inv11
|
||||
ob11.reward_grant().treasure_inventory = inv11
|
||||
var h11: int = int(rec11.get("handle", -1))
|
||||
var tgt11: Vector2i = _first_closed_safe(ob11)
|
||||
var v11: Dictionary = ob11.reward_grant().use_treasure(h11, tgt11)
|
||||
@@ -254,7 +254,7 @@ func _init() -> void:
|
||||
if ob11.minesweeper.is_revealed(c):
|
||||
opened_safe = false
|
||||
Kit.check_quiet(mines_shown == 0 or opened_safe, "天眼反例①:危险格仅显示不被开格(棋盘事实不可变)")
|
||||
var overlay11: Array = ob11.treasure_inventory.query_overlays().get("mine_reveal", [])
|
||||
var overlay11: Array = ob11.reward_grant().treasure_inventory.query_overlays().get("mine_reveal", [])
|
||||
var overlay_ok := true
|
||||
for c_v in (v11.get("resolved", []) as Array):
|
||||
if not overlay11.has(c_v):
|
||||
@@ -289,7 +289,7 @@ func _init() -> void:
|
||||
"计数链:装配起战(GainJournal 携带)")
|
||||
var inv13 = load("res://core/treasure_items.gd").new(db)
|
||||
var rec13: Dictionary = inv13.add_item("incense_stick", "attunement", Vector2i(-1, -1), 0)
|
||||
ob13.treasure_inventory = inv13
|
||||
ob13.reward_grant().treasure_inventory = inv13
|
||||
var h13: int = int(rec13.get("handle", -1))
|
||||
var tgt13: Vector2i = _first_closed_safe(ob13)
|
||||
if tgt13 != Vector2i(-9, -9):
|
||||
@@ -306,8 +306,13 @@ func _init() -> void:
|
||||
"装配不可变:双件装配冒险启动")
|
||||
Kit.check_quiet(adr14.runner().pick_next_node(int(adr14.runner().next_candidate_ids()[0])), "装配不可变:进首战")
|
||||
var ob14 = adr14.runner().current_battle()
|
||||
Kit.check_quiet(ob14 != null and (ob14.attunement as Array) == ["morning_order", "wide_scout_band"],
|
||||
Kit.check_quiet(ob14 != null and (ob14._facts.attunement as Array) == ["morning_order", "wide_scout_band"],
|
||||
"装配不可变:战斗运行态装配集与冒险装配集逐位同源(运行零写口——快照对比)")
|
||||
# 注册面批同代编排归约 V5:库存注入改址(level_runner 注入改经 reward_grant() 出口直注)后
|
||||
# 引用同一性——战斗域经出口持有的库存与关卡域同一实例;use_treasure 受理链经新地址走通
|
||||
# 由本套件 ob8/ob11/ob13 三段既有受理链承载(注入面同批改址后全绿即证据)。
|
||||
Kit.check_quiet(ob14 != null and ob14.reward_grant().treasure_inventory == adr14.runner().treasure_inventory,
|
||||
"库存注入改址:战斗域经 reward_grant 出口持有的库存与关卡域同一引用〔编排归约 V5〕")
|
||||
|
||||
# ⑮ 扩展行收敛(迭代 38 卡④ wr2④⑤——套件首次 feats 注入,V6 形态自 round_flow_skill_pool_test 移植:
|
||||
# enc 带 feats 键+ledger,专长触发经 _judge_seal 真实封印判定管线)
|
||||
@@ -332,7 +337,7 @@ func _init() -> void:
|
||||
Kit.check_quiet(mines15.size() == 3, "封印匠:板上存在三枚危险格(断言前提)")
|
||||
if mines15.size() == 3:
|
||||
for mv in mines15:
|
||||
ob15._grant_seg._judge_seal({"cell": mv, "hit": true}, 1)
|
||||
ob15._rounds._grant_seg._judge_seal({"cell": mv, "hit": true}, 1)
|
||||
var smith_row := {}
|
||||
for r in rows15:
|
||||
if String(r.get("effect_id", "")) == "mine_neutralized":
|
||||
@@ -354,7 +359,7 @@ func _init() -> void:
|
||||
cell15b = cv
|
||||
break
|
||||
if cell15b != null:
|
||||
ob15b._grant_seg._judge_seal({"cell": cell15b, "hit": true}, 1)
|
||||
ob15b._rounds._grant_seg._judge_seal({"cell": cell15b, "hit": true}, 1)
|
||||
var beacon_row := {}
|
||||
for r in rows15b:
|
||||
if String(r.get("effect_id", "")) == "fx_preview_area":
|
||||
|
||||
Reference in new issue
Block a user