合并(测试判据试点归位): treasure_effects_test 12 处断言级内部直查改钉公开可观测面——新判据首次真实评估批(worktree c22c343b+并 master 尖 a92ef2e3,--code 域闸全绿存量红零新增,回执在册);评估结论:公开替代口在册率高(12/12 零产品码),成本重心=settle_batch 形态重塑×3,套件为后续顺带换代写法样板

This commit is contained in:
DKChan committed 2026-10-28 05:26:59 +08:00
commit e62e90c851
1 file changed
+23 -16
+23 -16
View File
@@ -28,7 +28,7 @@ func _init() -> void:
Kit.check_quiet(adr1.runner().pick_next_node(int(adr1.runner().next_candidate_ids()[0])), "晨操令:进首战")
var ob1 = adr1.runner().current_battle()
Kit.check_quiet(ob1 != null and ob1.attune_has("morning_order"), "晨操令:起战 attune_has=true")
var ap_with := int(ob1.action_economy._ap) # 测试夹具直读(呈现读数走 presentation_snapshot——本断言取账本真值)
var ap_with := int(ob1.action_economy.ap) # 公开读数口(呈现读数走 presentation_snapshot——本断言取账本真值)
Kit.check_quiet(ap_with >= 1, "晨操令:首轮 AP 已含队列兑现(ap_left=%d ≥1——queue 通道兑现)" % ap_with)
# 边界=第 2 轮不再发(round_index 条件 eq 1——队列仅首轮注入;直接断言效果引擎命中面)
var hits_r2 = ob1.fx_host().engine.dispatch(ob1.fx_host().counters_ctx, "round_start", {"round_index": 2})
@@ -77,10 +77,10 @@ func _init() -> void:
var ap_before4 := int(ob4.action_economy._ap)
for _i7 in 7:
ob4._on_cell_revealed({"kind": "safe", "cell": Vector2i(0, _i7)})
Kit.check_quiet(int(ob4.action_economy._ap) == ap_before4,
Kit.check_quiet(int(ob4.action_economy.ap) == ap_before4,
"试炼镐边界:7 格未达阈值零兑付(AP 不变)")
ob4._on_cell_revealed({"kind": "safe", "cell": Vector2i(0, 7)})
Kit.check_quiet(int(ob4.action_economy._ap) == ap_before4 + 1,
Kit.check_quiet(int(ob4.action_economy.ap) == ap_before4 + 1,
"试炼镐正常:第 8 格自动兑付当轮 AP+1(无玩家入口)")
var cs4: Dictionary = ob4.attune_convert_state()
Kit.check_quiet(bool(cs4.get("assembled", false)) and int(cs4.get("points", -1)) == 0
@@ -91,7 +91,7 @@ func _init() -> void:
ob4b.begin_battle({"level_index": 1, "node_depth": 0, "hero_hp": int(db.hero.max_hp)})
ob4b._on_cell_revealed({"kind": "safe", "cell": Vector2i(0, 0)})
var ap_base := int(db.action_economy.ap_per_round)
Kit.check_quiet(int(ob4b.action_economy._ap) == ap_base and not bool(ob4b.attune_convert_state().get("assembled", true)),
Kit.check_quiet(int(ob4b.action_economy.ap) == ap_base and not bool(ob4b.attune_convert_state().get("assembled", true)),
"试炼镐反例:未装配零兑付零计数(AP=整轮表值、读数口 assembled=false)")
# ④b 自动兑付件 C 区展示行(charges=0 不入骑库存〔_reseed 注入循环跳过〕,
@@ -121,8 +121,8 @@ func _init() -> void:
"刷新练习:装配冒险启动")
Kit.check_quiet(int(adr5.refresh_bank().refresh_stock()) == 1 and int(adr5.refresh_bank().free_left()) == 1,
"刷新练习:存量账 +1(装配即得一次性——attune_refresh_left 合计含 stock)")
Kit.check_quiet(int(adr5.refresh_bank()._refresh_x) == 0,
"刷新练习反例:临时账 X 不动(写临时账/重复加仓=违规形态)")
Kit.check_quiet(int(adr5.refresh_bank().free_left()) == int(adr5.refresh_bank().refresh_y()) + int(adr5.refresh_bank().refresh_stock()),
"刷新练习反例:临时账 X 不动(写临时账/重复加仓=违规形态——免费位合计=存量+Y,X=free_left−Y−存量 恒零)")
# ⑥ 储备罐(转存率 125=1.25:1 整除口径 / 100=1:1 逐位同旧)
var ae6 = load("res://core/action_economy.gd").new(db)
@@ -130,19 +130,19 @@ func _init() -> void:
ae6.notify_round_start()
ae6.request_stop()
ae6.finish_round_stop(false, 100)
Kit.check_quiet(int(ae6._rap) == 4, "储备罐基线:未装配 1:1(4 AP 停手转存 RAP 4——逐位同旧)")
Kit.check_quiet(ae6.rap == 4, "储备罐基线:未装配 1:1(4 AP 停手转存 RAP 4——逐位同旧)")
var ae6b = load("res://core/action_economy.gd").new(db)
ae6b.queue_ap_delta(4 - int(db.action_economy.ap_per_round))
ae6b.notify_round_start()
ae6b.request_stop()
ae6b.finish_round_stop(false, 125)
Kit.check_quiet(int(ae6b._rap) == 5, "储备罐正常:125% 转存(4 AP→RAP 5=1.25:1 整除口径;不碰 AP 上限)")
Kit.check_quiet(ae6b.rap == 5, "储备罐正常:125% 转存(4 AP→RAP 5=1.25:1 整除口径;不碰 AP 上限)")
var ae6c = load("res://core/action_economy.gd").new(db)
ae6c.queue_ap_delta(3 - int(db.action_economy.ap_per_round))
ae6c.notify_round_start()
ae6c.request_stop()
ae6c.finish_round_stop(false, 125)
Kit.check_quiet(int(ae6c._rap) == 3, "储备罐边界:3 AP→3(floor 3.75——不越参数面直改停手结算)")
Kit.check_quiet(ae6c.rap == 3, "储备罐边界:3 AP→3(floor 3.75——不越参数面直改停手结算)")
# ⑦ 巢穴预告(装板后一次报数量——明细行经 step_row 信号收集)
var rng7 = load("res://core/rng_service.gd").new(); rng7.set_master_seed(271)
@@ -212,10 +212,17 @@ func _init() -> void:
far9 = c
elif d >= 3 and far9b == Vector2i(-9, -9):
far9b = c
Kit.check_quiet(far9 != Vector2i(-9, -9) and ob9.minesweeper._board_face_dig(far9) == "",
"远程镐正常:距英雄 2 格未开格可挖(切比雪夫 ≤1+1 放宽;开格仍走既有格规则)")
Kit.check_quiet(far9b == Vector2i(-9, -9) or ob9.minesweeper._board_face_dig(far9b) == "not_adjacent",
# 反例先跑(拒绝零副作用);正例经公共意图面真实挖格(settle_batch——D1→A2 提交边界,受理即揭示)
var out9b: Array = ob9.minesweeper.settle_batch([{"action": "dig", "cell": far9b}]) if far9b != Vector2i(-9, -9) else []
Kit.check_quiet(far9b == Vector2i(-9, -9) or (not (out9b as Array).is_empty()
and not bool((out9b[0] as Dictionary).get("accepted", false))
and String((out9b[0] as Dictionary).get("sub_reason", "")) == "not_adjacent"
and not ob9.minesweeper.is_revealed(far9b)),
"远程镐反例:距 3 格未开格仍拒(有限放宽——无无限距离)")
var out9: Array = ob9.minesweeper.settle_batch([{"action": "dig", "cell": far9}])
Kit.check_quiet(far9 != Vector2i(-9, -9) and not (out9 as Array).is_empty()
and bool((out9[0] as Dictionary).get("accepted", false)) and ob9.minesweeper.is_revealed(far9),
"远程镐正常:距英雄 2 格未开格可挖(切比雪夫 ≤1+1 放宽;开格仍走既有格规则)")
# ⑩ 刷新执照(商店免费刷新 +2/店——读数叠加)
var lv10 = load("res://core/level_runner.gd").new(db, load("res://core/rng_service.gd").new())
@@ -262,7 +269,9 @@ func _init() -> void:
"信标网络:装配起战(seal_range_free 注入)")
var far12: Vector2i = _cell_at(ob12, ob12.minesweeper.hero_pos() + Vector2i(4, 4))
if far12 != Vector2i(-9, -9):
Kit.check_quiet(ob12.minesweeper._board_face_dig(far12) == "not_adjacent",
var out12: Array = ob12.minesweeper.settle_batch([{"action": "dig", "cell": far12}])
Kit.check_quiet(not (out12 as Array).is_empty() and not bool((out12[0] as Dictionary).get("accepted", false))
and String((out12[0] as Dictionary).get("sub_reason", "")) == "not_adjacent",
"信标网络边界:只放宽封印可达(挖掘判据不动——挖距零放宽)")
Kit.check_quiet(ob12.minesweeper.seal_range_free == true,
"信标网络正常:封印可达豁免在册(封印仍按标准动作价计费=try_spend 照走)")
@@ -296,10 +305,8 @@ func _init() -> void:
Kit.check_quiet(adr14.start_adventure(331, {"hero_override": {}, "treasure_unlocked": {}, "attunement": ["morning_order", "wide_scout_band"]}),
"装配不可变:双件装配冒险启动")
Kit.check_quiet(adr14.runner().pick_next_node(int(adr14.runner().next_candidate_ids()[0])), "装配不可变:进首战")
var snap14: Array = (adr14.runner()._attunement as Array).duplicate()
var ob14 = adr14.runner().current_battle()
Kit.check_quiet(ob14 != null and (ob14.attunement as Array) == snap14
and (adr14.runner()._attunement as Array) == snap14,
Kit.check_quiet(ob14 != null and (ob14.attunement as Array) == ["morning_order", "wide_scout_band"],
"装配不可变:战斗运行态装配集与冒险装配集逐位同源(运行零写口——快照对比)")
# ⑮ 扩展行收敛(迭代 38 卡④ wr2④⑤——套件首次 feats 注入,V6 形态自 round_flow_skill_pool_test 移植: