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:
DKChan committed 2026-10-25 05:47:01 +08:00
1 parent 7389618fd1
commit 2ed8166852
9 files changed
+58 -48

No files matched your search

-14
View File
@@ -342,20 +342,6 @@ func shop_price_b() -> float:
return float(shop.price_b) if shop != null else 0.0
# relic 保底卡基价 / 散折(economy_spend 激活时购买价折扣——表未入库 = 表 schema 缺省值)
func shop_relic_base_price() -> float:
return float(shop.relic_base_price) if shop != null else 0.0
func shop_spend_discount() -> float:
return float(shop.spend_discount) if shop != null else 0.0
# 英雄显示名(单位快照读取面单源——与敌人行 display_name 同轴)
func hero_display_name() -> String:
return String(hero.display_name) if hero != null else ""
# 行族数组读取(ShopTable 属性名 = 行族名;表未已入库/属性缺失 = 空集非错误态)
func _shop_rows(family: String) -> Array:
if shop == null:
+2 -2
View File
@@ -763,7 +763,7 @@ func current_price(prow: Dictionary) -> int:
# + 池货架面 pool_price 同折〕——商店刷新价 shop_refresh_cost 与三选一付费刷新不折)
func _spend_discounted(price: int) -> int:
if _tree_rules.has("economy_spend"):
return maxi(1, int(floor(float(price) * db.shop_spend_discount())))
return maxi(1, int(floor(float(price) * float(db.shop.spend_discount))))
return price
@@ -879,7 +879,7 @@ func pool_price(kind: String) -> int:
var row: Dictionary[Variant, Variant] = db.shop_pool_row(kind)
if row.is_empty():
if kind == "relic":
return _spend_discounted(int(ceil(db.shop_relic_base_price() * pow(db.shop_price_b(), float(maxi(0, int(level_row.level_index) - 1))) * pow(db.shop_price_a(), float(_shop_visit_buys)))))
return _spend_discounted(int(ceil(float(db.shop.relic_base_price) * pow(db.shop_price_b(), float(maxi(0, int(level_row.level_index) - 1))) * pow(db.shop_price_a(), float(_shop_visit_buys)))))
return 999999
var base := float(maxi(1, int(row.get("base_price", 1))))
var price_f: float = base * pow(db.shop_price_b(), float(maxi(0, int(level_row.level_index) - 1))) \
+1 -1
View File
@@ -52,7 +52,7 @@ func spawn(level_index: int, node_depth: int, hero_hp: int, unit_count_overrides
return false
# max_hp = 生效上限(非入参 hero_hp)——跨战斗携带 HP 时上限不得压扁
# (恢复点/治疗包的满血守卫与治疗上限随之失效)
_hero = {"hp": hero_hp, "max_hp": eff_max_hp, "atk": eff_atk, "is_hero": true, "alive": true, "display_name": db.hero_display_name(), "enemy_id": "hero", "armor_type": hero_armor_type if hero_armor_type != "" else db.forge_default_armor_type(), "attack_type": hero_attack_type if hero_attack_type != "" else db.forge_default_attack_type()} # 护甲/攻击类型轴快照(读注入值,空串回退锻造工坊配置默认值 normal/light;甲效矩阵消费面)
_hero = {"hp": hero_hp, "max_hp": eff_max_hp, "atk": eff_atk, "is_hero": true, "alive": true, "display_name": String(db.hero.display_name), "enemy_id": "hero", "armor_type": hero_armor_type if hero_armor_type != "" else db.forge_default_armor_type(), "attack_type": hero_attack_type if hero_attack_type != "" else db.forge_default_attack_type()} # 护甲/攻击类型轴快照(读注入值,空串回退锻造工坊配置默认值 normal/light;甲效矩阵消费面)
_enemies.clear() # 难度曲线与Boss DifficultyTable 修饰:施加于行值、行值快照之前——MVP 空表 = 恒 1.0 无行为(AC-10);混编行集内全部敌种同乘((L,D) 精确匹配一次取值——F9 同乘不改变异,敌人系统 v0.15)
var mod: Dictionary[Variant, Variant] = db.resolve_difficulty_modifiers(level_index, node_depth)
var hp_mult: float = float(mod.get("hp_mult", 1.0))