奇物批T1:feature_*→curio_*词族换名(CURIO_KINDS/curio_quota/curio_value/curio_candidate_count+adventure.tres键名+entities.yaml换代登记续写,值零变更实测;T0差异回写:93处/7文件+bonus_aux_carry语义澄清剔除改名面+基线772/0)

This commit is contained in:
DKChan committed 2026-10-05 18:30:44 +08:00
1 parent 413c936b79
commit d4cde73976
10 files changed
+111 -109

No files matched your search

+9 -9
View File
@@ -267,14 +267,14 @@ func _reset_bonus_state() -> void:
_node_bonus_pending = {}
# 令牌池构建(TP0 v2.2——按表 kind×tier 配额展开为持久多重集;构建序确定 = FEATURE_KINDS×TIERS 逐层,
# 令牌池构建(TP0 v2.2——按表 kind×tier 配额展开为持久多重集;构建序确定 = CURIO_KINDS×TIERS 逐层,
# 随机性只发生在洗牌消费 reward_pick 封闭流的时刻。迭代 12 T1:规则改写型特性带=relic 活行每件 1 张追加
# (rarity common/rare→稀有令牌档、rarest→罕见令牌档——relic 永不入普通档;空表=零追加零扰动))
func _build_bonus_deck() -> Array:
var deck: Array = []
for kind in db.adventure.FEATURE_KINDS:
for kind in db.adventure.CURIO_KINDS:
for tier in db.adventure.TIERS:
for i in int(db.adventure.feature_quota(String(kind), String(tier))):
for i in int(db.adventure.curio_quota(String(kind), String(tier))):
deck.append({"kind": String(kind), "tier": String(tier)})
for row in db.relic_rows():
var rtier := "rarest" if String(row.get("rarity", "")) == "rarest" else "rare"
@@ -361,7 +361,7 @@ func pick_bonus(kind: String, tier: String = "", relic_id: String = "") -> bool:
if _find_token(candidates, kind, tier, relic_id).is_empty():
push_error("[冒险结构] pick_bonus 拒绝——令牌不在候选: %s|%s|%s" % [kind, tier, relic_id])
return false
var value: int = int(db.adventure.feature_value(kind, tier))
var value: int = int(db.adventure.curio_value(kind, tier))
var hp_before := int(ledger.get("hero_hp", 0))
if kind == "treasure_item":
return _pick_treasure_item(value) # 道具件分派通关渠道(持有容器 = 跨关携带——与节点渠道分轨;池种退役后不可达)
@@ -457,10 +457,10 @@ func pool_stock(kind: String) -> int:
# 写加算区+账本+摘牌(与奖励三选一真单点——买一件=奖励面少一件的库存语义由同库成立)。
# 未知 kind 拒绝(货架词表封闭的前置防御)。
func _consume_pool_purchase(kind: String, tier: String) -> bool:
if not db.adventure.FEATURE_KINDS.has(kind):
if not db.adventure.CURIO_KINDS.has(kind):
push_error("[冒险结构] 商店购买消费拒绝——件不在池词表: %s" % kind)
return false
return _apply_bonus_pick(kind, tier, int(db.adventure.feature_value(kind, tier)))
return _apply_bonus_pick(kind, tier, int(db.adventure.curio_value(kind, tier)))
# 终局池快照(_settle 清账前调用——_reset_bonus_state 会重置 _bonus_taken,摘要 additive 键
@@ -552,7 +552,7 @@ func apply_node_bonus(kind: String, tier: String = "", relic_id: String = "") ->
if _find_token(candidates, kind, tier, relic_id).is_empty():
push_error("[冒险结构] apply_node_bonus 拒绝——令牌不在候选: %s|%s|%s" % [kind, tier, relic_id])
return false
var value: int = int(db.adventure.feature_value(kind, tier))
var value: int = int(db.adventure.curio_value(kind, tier))
if kind == "treasure_item":
return _apply_node_treasure(value) # 道具件分派节点渠道(持有容器 = 关卡域库存——与通关渠道分轨;池种退役后不可达)
if not _apply_bonus_pick(kind, tier, value, relic_id):
@@ -573,7 +573,7 @@ func _apply_node_treasure(count: int) -> bool:
var records: Array = []
if _runner != null and _runner.treasure_inventory != null:
records = _runner.treasure_inventory.holding_records()
# 迭代 11 第①批 T7——守卫随过渡键退役拆除(FEATURE_KINDS 已除名 treasure_item,本分支不可达;
# 迭代 11 第①批 T7——守卫随过渡键退役拆除(CURIO_KINDS 已除名 treasure_item,本分支不可达;
# 替换子交互路由随容量闸一并退役——能力件容量闸正主 = 营地装配面满位禁选)
if _runner != null:
for iid in picked:
@@ -739,7 +739,7 @@ func _draw_bonus_candidates() -> Array:
if ident.begins_with("relic:"):
cand["relic_id"] = String((tok as Dictionary).get("relic_id", ""))
out.append(cand)
if out.size() >= int(db.adventure.feature_candidate_count):
if out.size() >= int(db.adventure.curio_candidate_count):
break
return out
+1 -1
View File
@@ -680,7 +680,7 @@ func set_treasure_unlocked(ids: Dictionary) -> void:
func _grant_routed(snap: Dictionary, polarity: String, source_class: String, cell: Vector2i, ri: int, highlight: String = "", label_suffix: String = "") -> bool:
# 迭代 11 第①批 T7——aux 授予分支随掉落/停点渠道退役拆除(reward 词表第十型 treasure_item 保留但零投放:
# 无 aux 行入池、FEATURE_KINDS 词表已除名);剩余类型走极性字典路由。
# 无 aux 行入池、CURIO_KINDS 词表已除名);剩余类型走极性字典路由。
var row: Dictionary = _reward_economy.polarity_row(String(snap.get("cell_type", "")), polarity)
if row.is_empty():
_fatal("极性字典缺行: %s %s" % [String(snap.get("cell_type", "")), polarity])
+4 -4
View File
@@ -99,18 +99,18 @@ func cross_validate(loaded: Dictionary, push_diag: Callable) -> void:
for e in validate_skill_pool_links(skt, en, loaded.get("status_effects")):
push_diag.call("error", e.category, e.message)
# ⑥ 商店货架 × 冒险共享池跨表校验(M-4 迭代 11 第②批 T1——次数上限域):
# pool_shelf kind 须命中 adventure.FEATURE_KINDS 且为有限库存种(cap ∈ [1,99]——gp 无上限种/牌库外种
# pool_shelf kind 须命中 adventure.CURIO_KINDS 且为有限库存种(cap ∈ [1,99]——gp 无上限种/牌库外种
# 入货架 = 库存账本无锚,加载致命;gp 袋负交易切边/规则改写型特性三轴切边由 ShopTable 词表封闭另拦)
var adv = loaded.get("adventure")
var shp = loaded.get("shop")
if adv != null and shp != null:
for row in shp.pool_shelf:
var kind: String = String(row.get("kind_id", ""))
if not adv.FEATURE_KINDS.has(kind):
push_diag.call("error", "shelf_dangling_kind", "ShopTable.pool_shelf kind %s 不在 AdventureTable.FEATURE_KINDS(共享池牌库外种)" % kind)
if not adv.CURIO_KINDS.has(kind):
push_diag.call("error", "shelf_dangling_kind", "ShopTable.pool_shelf kind %s 不在 AdventureTable.CURIO_KINDS(共享池牌库外种)" % kind)
continue
# TP0 令牌池——货架件须为有限令牌种(配额 >0;种类次数上限退役后库存=剩余令牌数)
var quota := int(adv.feature_quota(kind, adv.TIER_COMMON)) + int(adv.feature_quota(kind, adv.TIER_RARE)) + int(adv.feature_quota(kind, adv.TIER_RAREST))
var quota := int(adv.curio_quota(kind, adv.TIER_COMMON)) + int(adv.curio_quota(kind, adv.TIER_RARE)) + int(adv.curio_quota(kind, adv.TIER_RAREST))
if quota < 1:
push_diag.call("error", "shelf_zero_quota", "ShopTable.pool_shelf kind %s 令牌配额为 0(牌库空种入货架 = 库存无锚)" % kind)
+1 -1
View File
@@ -834,7 +834,7 @@ func shop_shelf() -> Array:
var tier := String((tok as Dictionary).get("tier", ""))
var row: Dictionary = db.shop_pool_row(kind)
var display := String(row.get("display_name", kind))
var value := int(db.adventure.feature_value(kind, tier))
var value := int(db.adventure.curio_value(kind, tier))
if row.is_empty() and kind == "relic":
var rrow: Dictionary = db.relic_row(String(tok.get("relic_id", "")))
display = String(rrow.get("display_name", "特性"))