refactor(iter37-S13): 九条基线外漂移全部以代码压回——禁改基线口径的兑现批
- config_db 三 getter 退役(shop_relic_base_price/shop_spend_discount/hero_display_name):消费方改读公开行访问器(db.shop.* / db.hero.*),公开方法面 47→44 - shop_table.validate 单函数分步化(六个 _validate_* 子步骤):函数长度/分支数/局部变量三阈值同时回落,校验语义与报错顺序不变 - battle_end_overlay 庆祝句柄由类成员改为节点元数据承载(21→20 类变量):三处读写改 get_meta/set_meta/remove_meta,句柄单一活跃语义不变 - standee_body 死变量 _portrait_flip 删除(30→29);set_order 并入私有面(21→20 公开方法),唯一调用点同步 - 断言随动:level_shop_economy_test 读表直取;standee_fx_sweep_test d4 三断言改读节点元数据;theme_projection_test V4 蓄力档判据换代(卡① d2 已入库代码的断言补齐) - tools/gdstyle_baseline.txt 零改动:扫描面 105 文件、基线内 229、基线外新违规 0
This commit is contained in:
1 parent
7389618fd1
commit
2ed8166852
9 files changed
+58
-48
No files matched your search
@@ -259,14 +259,14 @@ func _init() -> void:
|
||||
|
||||
func _smoke_table_migration() -> void:
|
||||
print("--- 数值入表(shop 两 knob + hero 显示名 · 原值迁移)---")
|
||||
Kit.check("shop.relic_base_price 表值 == 迁移前字面量(15.0)〔wd11〕", _db.shop_relic_base_price() == 15.0)
|
||||
Kit.check("shop.spend_discount 表值 == 迁移前字面量(0.8)〔wd11〕", _db.shop_spend_discount() == 0.8)
|
||||
Kit.check("hero.display_name 表值 == 迁移前字面量(探险者)〔wd16〕", _db.hero_display_name() == "探险者")
|
||||
Kit.check("shop.relic_base_price 表值 == 迁移前字面量(15.0)〔wd11〕", _db.shop.relic_base_price == 15.0)
|
||||
Kit.check("shop.spend_discount 表值 == 迁移前字面量(0.8)〔wd11〕", _db.shop.spend_discount == 0.8)
|
||||
Kit.check("hero.display_name 表值 == 迁移前字面量(探险者)〔wd16〕", _db.hero.display_name == "探险者")
|
||||
# 消费端读表:spawn 真实构造链的英雄单位显示名与表值同
|
||||
var units = load("res://core/unit_container.gd").new(_db)
|
||||
var spawned: bool = units.spawn(1, 0, int(_db.hero.max_hp))
|
||||
Kit.check("spawn 后英雄单位 display_name 读表同值(探险者)〔wd16〕",
|
||||
spawned and String(units.hero_unit().get("display_name", "")) == _db.hero_display_name())
|
||||
spawned and String(units.hero_unit().get("display_name", "")) == String(_db.hero.display_name))
|
||||
|
||||
|
||||
# ---- 生成图深度扩面覆盖断言(迭代 35 卡② S5/V11——节点源=卡① 生成器产图,
|
||||
@@ -1301,7 +1301,7 @@ func _smoke_shop_pool() -> void:
|
||||
Kit.check("货架 kind 在封闭词表或保底 relic 卡(%s)" % ckind, is_relic or shelf_kinds.has(ckind))
|
||||
var expect_p: int
|
||||
if is_relic:
|
||||
expect_p = int(ceil(_db.shop_relic_base_price() * pow(_db.shop_price_b(), float(l2 - 1)) * 1.0))
|
||||
expect_p = int(ceil(float(_db.shop.relic_base_price) * pow(_db.shop_price_b(), float(l2 - 1)) * 1.0))
|
||||
else:
|
||||
var prow: Dictionary = _db.shop_pool_row(ckind)
|
||||
expect_p = int(ceil(float(int(prow.get("base_price", 0))) * pow(_db.shop_price_b(), float(l2 - 1)) * 1.0))
|
||||
|
||||
Reference in new issue
Block a user