T5(迭代22秘宝批): 存档面+死通道拆除——treasure_inventory保留注记(主动件骑库存承载在役:线香/天眼handle+断点aux_items快照+set_attune_charges差额注入全链保留); 替换子交互整体拆除(CURIO_KINDS除名后不可达死通道=装配不可变契约1实现面保证): adventure_runner六函数删(_pick_treasure_item/resolve_treasure_replace/_resolve_node_replace/_replace_in_transit/_draw_pending_treasure/resolve_curio_replace)+_bonus_treasure_carry跨关携带/_last_draw_treasure掷定链/_roll_from/_bonus_treasure_pool/bonus_aux_carry断点键; level_runner.grant_treasure_item/treasure_items.holding_records删; 呈现面=controller替换子态三函数+aux_detail卡片直显链/curio_pick_overlay replace状态机(信号+面板+open_replace)/main两接线/level_autoplay替换策略; smoke与ui_click_probe替换分支摘除+reward_overlay_test替换段摘除; 修正则贪吃误删=apply_node_curio普通兑付主体补回。冒烟895/0+run_all 22套+探针全绿〔秘宝批 V15/V16拆除路线/V13〕
This commit is contained in:
1 parent
b7a2eadd2c
commit
73db171cb4
13 files changed
+42
-346
No files matched your search
@@ -43,7 +43,6 @@ extends RefCounted
|
||||
signal level_started(level_index: int, display_name: String) # 每关开始(含冒险首关)——呈现层重取 runner()、刷新图条与层名行
|
||||
signal curio_choice_presented(payload: Dictionary) # 专长三选一停点(非末关通关恰一次;迭代 20 T5 换代正名——旧「提升三选一」退役,通道白名单后候选恒专长+回血在载荷)——{level_index, candidates, heal_gained, hp_before, hp_after, keystone_gained, keystone_total, gp, aux_cleared}
|
||||
signal curio_resolved(result: Dictionary) # 三选一兑付完成(pick_curio/替换受理后恰一次)——{picked, value, hp_before, hp_after, level_index}
|
||||
signal treasure_replace_presented(items: Array, incoming: Dictionary) # 同调位满位替换子交互(pick_curio 道具件满位时)——items=现有持有件记录、incoming=新件记录
|
||||
signal adventure_finished(summary: Dictionary) # 冒险结算(completed/failed/abandoned)——summary 五件事:打穿没有/通关几关/止步第几关/钥石合计/主种子(+additive keystone_drops 迭代 10)
|
||||
# ---- 转发族(签名与 LevelRunner 同款——呈现层对接透明;ADR-0001 S6 经 _forward_* 方法)----
|
||||
signal node_entered(node: Dictionary, info: Dictionary)
|
||||
@@ -94,9 +93,7 @@ var _feats: Array[String] = [] # 特性持有集(迭代 12 T1——
|
||||
var _tree_rules: Array = [] # 树 rule 键集(迭代 12 T10——Fork 激活侧 effects 透传;下传 enc.tree_rules 消费面)
|
||||
var _curio_pending := {} # 停点态:{"candidates": Array, "payload": Dictionary, "chosen"/"incoming": 替换在途}——空 = 无停点
|
||||
var _curio_result := {} # 已兑付待推进态(curio_resolved 载荷副本——中断续玩不重兑付)
|
||||
var _bonus_treasure_carry: Array[String] = [] # 道具件跨关携带(兑付后注入下一关库存——清库后授予的体验窗)
|
||||
var _keystone_drops: Array = [] # Boss 逐杀掉落明细(additive 摘要键 keystone_drops——结算明细/复盘归因数据源)
|
||||
var _last_draw_treasure: Array[String] = [] # 最近一次抽签掷定的道具件(掷定前置——卡片直显具体道具;追加批二)
|
||||
var _node_curio_pending := {} # 奖励节点三选一停点态(迭代 10 追加批——共享池;断点不载:续玩重建到选路停点重走,恢复的计数器保证同候选重抽)
|
||||
var _feat_ticket_pity := 0 # 门票保底计数(T5——展示次数:节点开面/货架抽签/刷新重展各计一次;触发清零)
|
||||
var _feat_ticket_sold := 0 # 门票限购计数(T5——选中/买下即 +1;拿到即开不进持有集)
|
||||
@@ -212,8 +209,6 @@ func resume_adventure(bp: Dictionary, params: Dictionary = {}) -> bool:
|
||||
_feats = []
|
||||
for r in (bp.get("relics", []) as Array):
|
||||
_feats.append(String(r))
|
||||
for v in (bp.get("bonus_aux_carry", []) as Array):
|
||||
_bonus_treasure_carry.append(String(v))
|
||||
_keystone_drops = (bp.get("keystone_drops", []) as Array).duplicate(true)
|
||||
_base_override = _normalize_override(params.get("hero_override", {}))
|
||||
# 生命账本越界钳制(T17——spawn 守卫 EC16 免疫):断点可能由旧口径版本写出(如调试上限
|
||||
@@ -256,19 +251,7 @@ func resume_adventure(bp: Dictionary, params: Dictionary = {}) -> bool:
|
||||
else:
|
||||
migrated.append({"kind": String(c), "tier": db.adventure.TIER_COMMON})
|
||||
_curio_pending = {"candidates": migrated}
|
||||
if bp_pending.has("aux_detail"):
|
||||
_curio_pending["aux_detail"] = (bp_pending.get("aux_detail", []) as Array).duplicate(true) # 掷定前置随停点快照续接
|
||||
var payload: Dictionary = (bp_pending.get("payload", {}) as Dictionary).duplicate(true)
|
||||
if bp_pending.has("incoming"):
|
||||
_curio_pending["chosen"] = "treasure_item"
|
||||
var incoming: Array = (bp_pending.get("incoming", []) as Array).duplicate(true)
|
||||
_curio_pending["incoming"] = incoming
|
||||
state = "running"
|
||||
curio_choice_presented.emit(payload)
|
||||
# 替换在途续发(呈现层直落替换子态——持有件记录按恢复后 carry 重建)
|
||||
treasure_replace_presented.emit(_carry_records(),
|
||||
{"index": -1, "item_id": String(incoming[0]) if not incoming.is_empty() else "", "count": incoming.size()})
|
||||
return true
|
||||
state = "running"
|
||||
curio_choice_presented.emit(payload)
|
||||
return true
|
||||
@@ -295,7 +278,6 @@ func _reset_curio_state() -> void:
|
||||
_feats = []
|
||||
_curio_pending = {}
|
||||
_curio_result = {}
|
||||
_bonus_treasure_carry = []
|
||||
_keystone_drops = []
|
||||
_node_curio_pending = {}
|
||||
adventure_counters = {}
|
||||
@@ -420,8 +402,6 @@ func pick_curio(kind: String, tier: String = "", feat_id: String = "") -> bool:
|
||||
return _redeem_feat_ticket() # T5 拿到即开——停点候选替换为专长三选一(零摘牌/不进持有集)
|
||||
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) # 道具件分派通关渠道(持有容器 = 跨关携带——与节点渠道分轨;池种退役后不可达)
|
||||
if not _apply_curio_pick(kind, tier, value, feat_id):
|
||||
push_error("[冒险结构] pick_curio 拒绝——未知件: %s|%s|%s" % [kind, tier, feat_id])
|
||||
return false
|
||||
@@ -549,44 +529,6 @@ func _pool_stock_snapshot() -> Dictionary:
|
||||
return out
|
||||
|
||||
|
||||
# 道具件兑付(同调位约束):有位直接入跨关携带;满位转替换子交互(incoming 暂存、等 resolve_treasure_replace)。
|
||||
# 掷定前置(追加批二):具体道具随候选抽定(_last_draw_treasure / _curio_pending.aux_detail)——本函数消费预掷值,
|
||||
# 断点续玩/无预掷值时回退当场掷定(流序不同但消费数不变,确定性由调用序保证)。
|
||||
# 持有容器 = 跨关携带 _bonus_treasure_carry(与节点渠道的关卡域库存分轨——容器差异保守不合,注记在案)。
|
||||
func _pick_treasure_item(count: int) -> bool:
|
||||
var picked: Array = _draw_pending_treasure(_curio_pending, count, true)
|
||||
if picked.is_empty():
|
||||
push_error("[冒险结构] pick_curio(treasure_item) 拒绝——解锁道具池空集(白板/门控态不入牌库的防御兜底)")
|
||||
return false
|
||||
var hp_before := int(ledger.get("hero_hp", 0))
|
||||
# 迭代 11 第①批 T7——同调位守卫随过渡键退役拆除(aux 卡出池后本路径不可达;能力件容量闸
|
||||
# 正主 = 营地装配面 Attunement.slots 满位禁选)
|
||||
for iid in picked:
|
||||
_bonus_treasure_carry.append(String(iid))
|
||||
_finish_curio_pick("treasure_item", picked.size(), hp_before)
|
||||
return true
|
||||
|
||||
|
||||
# 替换子交互受理(discard_index = -1 放弃新件不获取;否则丢该件腾位收新)——终态恒 ≤ 同调位
|
||||
# 持有容器 = 跨关携带(序号寻址);与节点渠道(库存句柄寻址)的丢弃/授予/收尾三步保守不合。
|
||||
func resolve_treasure_replace(discard_index: int) -> bool:
|
||||
if not _replace_in_transit(_curio_pending):
|
||||
push_error("[冒险结构] resolve_treasure_replace 拒绝——无替换在途")
|
||||
return false
|
||||
var incoming: Array = _curio_pending.get("incoming", []) as Array
|
||||
var hp_before := int(ledger.get("hero_hp", 0))
|
||||
if discard_index >= 0:
|
||||
if discard_index >= _bonus_treasure_carry.size():
|
||||
push_error("[冒险结构] resolve_treasure_replace 拒绝——序号不在持有集: %d" % discard_index)
|
||||
return false
|
||||
_bonus_treasure_carry.remove_at(discard_index)
|
||||
for iid in incoming:
|
||||
_bonus_treasure_carry.append(String(iid))
|
||||
# 放弃新件(discard_index < 0)= 原持有集不动、新件不获取
|
||||
_finish_curio_pick("treasure_item", incoming.size(), hp_before)
|
||||
return true
|
||||
|
||||
|
||||
# 兑付收口(恰一次):清停点态 → 记已兑付态 → emit → 停点快照(等继续确认——中断续玩不重兑付)。
|
||||
# picked = kind;tier 随载荷(TP0——大小档位读数面);relic 伴随键随载荷(迭代 12 T1——反馈行取数)
|
||||
func _finish_curio_pick(picked: String, value: int, hp_before: int, tier: String = "", feat_id: String = "") -> void:
|
||||
@@ -608,16 +550,15 @@ func _finish_curio_pick(picked: String, value: int, hp_before: int, tier: String
|
||||
|
||||
# 候选呈现(节点到达时调用——恰一 reward_pick scope 洗牌 + 道具件掷定 scope;本停点断点不载,
|
||||
# 续玩重建到选路停点后重走重抽,恢复的全局计数器保证同候选逐位复现)。
|
||||
# 掷定前置(追加批二):返回 dict 带 aux_detail(道具件具体道具)供卡片直显。
|
||||
func node_curio_candidates() -> Dictionary:
|
||||
var cands: Array = _draw_curio_candidates("reward_node")
|
||||
return {"candidates": cands, "aux_detail": _last_draw_treasure.duplicate()}
|
||||
return {"candidates": cands}
|
||||
|
||||
|
||||
func present_node_curio(candidates: Array, treasure_detail: Array = []) -> void:
|
||||
func present_node_curio(candidates: Array) -> void:
|
||||
_reset_refresh_x() # 迭代 11 第①批 T5b——碰三选一重置 X 余量(不结转)
|
||||
_curio_paid_refreshes = 0 # 付费刷计数随停点清零(对齐商店进店清零——2026-10-06)
|
||||
_node_curio_pending = {"candidates": candidates.duplicate(true), "aux_detail": treasure_detail.duplicate(true)}
|
||||
_node_curio_pending = {"candidates": candidates.duplicate(true)}
|
||||
|
||||
|
||||
# 点选兑付(节点域——无部分回血无钥石;令牌消费与牌库摘牌与通关三选一同库;relic 同权入持有集)
|
||||
@@ -632,8 +573,6 @@ func apply_node_curio(kind: String, tier: String = "", feat_id: String = "") ->
|
||||
push_error("[冒险结构] apply_node_curio 拒绝——令牌不在候选: %s|%s|%s" % [kind, tier, feat_id])
|
||||
return false
|
||||
var value: int = int(db.adventure.curio_value(kind, tier))
|
||||
if kind == "treasure_item":
|
||||
return _apply_node_treasure(value) # 道具件分派节点渠道(持有容器 = 关卡域库存——与通关渠道分轨;池种退役后不可达)
|
||||
if not _apply_curio_pick(kind, tier, value, feat_id):
|
||||
push_error("[冒险结构] apply_node_curio 拒绝——未知件: %s|%s|%s" % [kind, tier, feat_id])
|
||||
return false
|
||||
@@ -641,46 +580,6 @@ func apply_node_curio(kind: String, tier: String = "", feat_id: String = "") ->
|
||||
return true
|
||||
|
||||
|
||||
# 节点渠道道具件(同调位约束):持有=关卡域库存+跨关携带,有位直接入本关库存(当关可用);
|
||||
# 满位转替换子交互(丢弃目标=库存件 handle——与通关渠道的 carry 序号分轨,容器语义保守不合)。
|
||||
# 掷定前置:消费 _node_curio_pending.aux_detail 预掷值(缺省回退当场掷定)。
|
||||
func _apply_node_treasure(count: int) -> bool:
|
||||
var picked: Array = _draw_pending_treasure(_node_curio_pending, count, false)
|
||||
if picked.is_empty():
|
||||
push_error("[冒险结构] apply_node_curio(treasure_item) 拒绝——解锁道具池空集(白板/门控态不入牌库的防御兜底)")
|
||||
return false
|
||||
var records: Array = []
|
||||
if _runner != null and _runner.treasure_inventory != null:
|
||||
records = _runner.treasure_inventory.holding_records()
|
||||
# 迭代 11 第①批 T7——守卫随过渡键退役拆除(CURIO_KINDS 已除名 treasure_item,本分支不可达;
|
||||
# 替换子交互路由随容量闸一并退役——能力件容量闸正主 = 营地装配面满位禁选)
|
||||
if _runner != null:
|
||||
for iid in picked:
|
||||
var rec: Dictionary = _runner.grant_treasure_item(String(iid), "reward_node")
|
||||
if rec.is_empty():
|
||||
push_warning("[冒险结构] 奖励节点道具授予被拒(防御兜底留痕): %s" % String(iid))
|
||||
_finish_node_bonus("treasure_item", picked.size())
|
||||
return true
|
||||
|
||||
|
||||
func _resolve_node_replace(discard_handle: int) -> bool:
|
||||
if not _replace_in_transit(_node_curio_pending):
|
||||
push_error("[冒险结构] resolve_node_replace 拒绝——无替换在途")
|
||||
return false
|
||||
var incoming: Array = _node_curio_pending.get("incoming", []) as Array
|
||||
if discard_handle >= 0:
|
||||
if _runner == null or _runner.treasure_inventory == null or not _runner.treasure_inventory.discard_item(discard_handle):
|
||||
push_error("[冒险结构] resolve_node_replace 拒绝——句柄不在持有集: %d" % discard_handle)
|
||||
return false
|
||||
for iid in incoming:
|
||||
var rec: Dictionary = _runner.grant_treasure_item(String(iid), "reward_node")
|
||||
if rec.is_empty():
|
||||
push_warning("[冒险结构] 替换子道具授予被拒(防御兜底留痕): %s" % String(iid))
|
||||
# 放弃新件(discard_handle < 0)= 原持有集不动、新件不获取
|
||||
_finish_node_bonus("treasure_item", incoming.size())
|
||||
return true
|
||||
|
||||
|
||||
# 冒险开始充能账本重置(T6——装备 active_charged 件各回 charges_per_adventure;被动件不入账)
|
||||
func _seed_attune_charges() -> void:
|
||||
attune_charges = {}
|
||||
@@ -742,11 +641,10 @@ func battery_pending() -> int:
|
||||
return _battery_pending
|
||||
|
||||
|
||||
# 节点停点在途态读回(组合根重 present 用——candidates/aux_detail 值拷贝)
|
||||
# 节点停点在途态读回(组合根重 present 用——candidates 值拷贝)
|
||||
func node_curio_pending_state() -> Dictionary:
|
||||
return {
|
||||
"candidates": (_node_curio_pending.get("candidates", []) as Array).duplicate(true),
|
||||
"aux_detail": (_node_curio_pending.get("aux_detail", []) as Array).duplicate(true),
|
||||
}
|
||||
|
||||
|
||||
@@ -792,10 +690,8 @@ func _refresh_curio_common(paid: bool) -> bool:
|
||||
if not _curio_pending.is_empty():
|
||||
var cands: Array = _draw_curio_candidates("level_clear")
|
||||
_curio_pending["candidates"] = cands.duplicate(true)
|
||||
_curio_pending["aux_detail"] = _last_draw_treasure.duplicate()
|
||||
var payload: Dictionary = (_curio_pending.get("payload", {}) as Dictionary).duplicate(true)
|
||||
payload["candidates"] = cands
|
||||
payload["aux_detail"] = _last_draw_treasure.duplicate()
|
||||
payload["refreshed"] = true # 重发载荷带标——呈现层直落选择面,不再重开胜利总结面(2026-10-06)
|
||||
curio_choice_presented.emit(payload) # 同信号重 present(零自动推进契约不破——停点仍在途)
|
||||
_snapshot_breakpoint()
|
||||
@@ -803,44 +699,10 @@ func _refresh_curio_common(paid: bool) -> bool:
|
||||
if not _node_curio_pending.is_empty():
|
||||
var cands2: Array = _draw_curio_candidates("reward_node")
|
||||
_node_curio_pending["candidates"] = cands2.duplicate(true)
|
||||
_node_curio_pending["aux_detail"] = _last_draw_treasure.duplicate()
|
||||
return true
|
||||
return false
|
||||
|
||||
|
||||
# 替换在途守卫(2026-10-02 修复批——双渠道替换受理的共用前置谓词:停点态非空且 chosen=treasure_item)
|
||||
func _replace_in_transit(pending: Dictionary) -> bool:
|
||||
return not pending.is_empty() and String(pending.get("chosen", "")) == "treasure_item"
|
||||
|
||||
|
||||
# 双渠道道具件掷定共享体(2026-10-02 修复批——_pick_treasure_item/_apply_node_treasure 复制债收口一步):
|
||||
# 解锁道具池空集守卫 + N 件掷定(先消费停点预掷 aux_detail,不足部分当场经 reward_pick 封闭流补掷——
|
||||
# 取数序与拆分前逐位一致)。返回空数组 = 池空集(调用方按渠道名报错)。
|
||||
# 保守不合处:通关渠道允许回退 _last_draw_treasure(allow_detail_fallback)、节点渠道不回退——掷定回退
|
||||
# 语义渠道各异,参数化保留差异;持有容器与兑付收尾仍归调用方渠道。
|
||||
func _draw_pending_treasure(pending: Dictionary, count: int, allow_detail_fallback: bool) -> Array:
|
||||
var pool: Array = _bonus_treasure_pool()
|
||||
if pool.is_empty():
|
||||
return []
|
||||
var picked: Array = []
|
||||
var detail: Array = (pending.get("aux_detail", []) as Array).duplicate()
|
||||
if detail.is_empty() and allow_detail_fallback:
|
||||
detail = _last_draw_treasure.duplicate()
|
||||
for i in maxi(1, count):
|
||||
if i < detail.size():
|
||||
picked.append(String(detail[i]))
|
||||
else:
|
||||
picked.append(_roll_bonus_treasure_item(pool))
|
||||
return picked
|
||||
|
||||
|
||||
# 替换受理分发(单入口——节点停点在途优先按库存句柄,否则按通关停点的携带序号)
|
||||
func resolve_curio_replace(discard: int) -> bool:
|
||||
if not _node_curio_pending.is_empty() and _node_curio_pending.has("incoming"):
|
||||
return _resolve_node_replace(discard)
|
||||
return resolve_treasure_replace(discard)
|
||||
|
||||
|
||||
func _finish_node_bonus(picked: String, value: int, tier: String = "", feat_id: String = "") -> void:
|
||||
_node_curio_pending = {}
|
||||
var payload := {
|
||||
@@ -858,8 +720,7 @@ func _finish_node_bonus(picked: String, value: int, tier: String = "", feat_id:
|
||||
# 一枚**〔先到先得,档位取该 kind 首枚——「三选一=三种不同选项」体验延续,与货架抽签同规则〕;
|
||||
# kind 出现率∝剩余令牌数〔档位配额即分布——无独立权重 knob〕;抽签不摘牌、兑付才摘牌=未选
|
||||
# 自动回池;池耗即枯竭——余库不足 N kind 时出齐剩余,空库 = 零候选合法态)。候选 = 令牌字典
|
||||
# {"kind","tier"}。消费 reward_pick 封闭流——一次停点恰一 scope,同种子同候选;道具件掷定前置
|
||||
# 随池种退役拆除(_last_draw_treasure 恒空集,机械惰性承载)。
|
||||
# {"kind","tier"}。消费 reward_pick 封闭流——一次停点恰一 scope,同种子同候选。
|
||||
# 渠道白名单过滤(迭代 15 卡② T4——渠道轴定位:关底 Boss 击败=通关渠道只出专长(feat 令牌);
|
||||
# 奖励节点/商店只出属性值提升+资源(非 relic 令牌),专长在非 Boss 渠道只以门票形态出现(T5)。
|
||||
# 过滤式而非物理拆池:deck 物理结构/存档键 bonus_deck 混编余库/消耗语义(选中踢池未选回池)原样,
|
||||
@@ -869,7 +730,6 @@ func _finish_node_bonus(picked: String, value: int, tier: String = "", feat_id:
|
||||
# 〔独立计数体系〕;已拿上限 cap(案②提前退役):taken≥cap 的身份在候选视图剔除〔牌库本体不动,
|
||||
# 拿了才计、刷出不计——_curio_cap_ok〕。
|
||||
func _draw_curio_candidates(channel: String = "reward_node") -> Array:
|
||||
_last_draw_treasure = []
|
||||
var pool := _curio_deck.duplicate()
|
||||
if channel == "level_clear":
|
||||
pool = pool.filter(func(tok): return String((tok as Dictionary).get("kind", "")) == "relic")
|
||||
@@ -1007,33 +867,6 @@ func _redeem_feat_ticket() -> bool:
|
||||
return true
|
||||
|
||||
|
||||
func _roll_from(rg: RandomNumberGenerator) -> String:
|
||||
var pool: Array = _bonus_treasure_pool()
|
||||
return String(pool[rg.randi_range(0, pool.size() - 1)])
|
||||
|
||||
|
||||
# 三选一道具件随机池(与投放门控同源:aux 活行 ∩ 解锁门控集——空集 = 道具件不入牌库)
|
||||
func _bonus_treasure_pool() -> Array:
|
||||
var out: Array = []
|
||||
var live: Dictionary = db.treasure_live_ids()
|
||||
for iid in live.keys():
|
||||
if _treasure_unlocked.has(String(iid)):
|
||||
out.append(String(iid))
|
||||
return out
|
||||
|
||||
|
||||
func _roll_bonus_treasure_item(pool: Array) -> String:
|
||||
var rg: RandomNumberGenerator = rng.open_stream("reward_pick")
|
||||
return String(pool[rg.randi_range(0, pool.size() - 1)])
|
||||
|
||||
|
||||
func _carry_records() -> Array:
|
||||
var out: Array = []
|
||||
for i in _bonus_treasure_carry.size():
|
||||
out.append({"index": i, "item_id": _bonus_treasure_carry[i]})
|
||||
return out
|
||||
|
||||
|
||||
# Boss 钥石逐杀掉落(迭代 10——渠道改 Boss/精英击杀掉落;首杀/复杀两档读 meta.tres boss_keystone;
|
||||
# 首杀判据 = 存档 boss_first_kill 标记位〔断点未注入 = 恒首杀——模拟/冒烟零扰动;标记仍在收束
|
||||
# apply_adventure_summary 逐通关关次置位〕;末关 Boss 照常入账;明细随摘要 additive 键供结算面归因)
|
||||
@@ -1158,7 +991,6 @@ func _on_level_finished(payload: Dictionary) -> void:
|
||||
var pick_payload: Dictionary = {
|
||||
"level_index": level_index,
|
||||
"candidates": _draw_curio_candidates("level_clear"), # T4 渠道白名单——关底 Boss 击败=通关渠道只出专长
|
||||
"aux_detail": _last_draw_treasure.duplicate(), # 掷定前置(追加批二——道具件具体道具随候选抽定,卡片直显)
|
||||
"heal_gained": heal,
|
||||
"hp_before": hp_before,
|
||||
"hp_after": int(ledger.get("hero_hp", 0)),
|
||||
@@ -1168,7 +1000,6 @@ func _on_level_finished(payload: Dictionary) -> void:
|
||||
"aux_cleared": int(payload.get("aux_cleared", 0)), # additive 扩签(迭代 7 T4——关卡末清空反馈取数)
|
||||
}
|
||||
_curio_pending = {"candidates": (pick_payload["candidates"] as Array).duplicate(true),
|
||||
"aux_detail": _last_draw_treasure.duplicate(),
|
||||
"payload": pick_payload.duplicate(true)}
|
||||
curio_choice_presented.emit(pick_payload)
|
||||
_snapshot_breakpoint() # 选择停点可中断(契约 5——续玩不重抽不静默丢失)
|
||||
@@ -1267,7 +1098,6 @@ func _snapshot_breakpoint() -> void:
|
||||
"refresh_stock": _refresh_stock, # 迭代 20 T4/T7——刷新存量账随断点(F-1 新账)
|
||||
"battery_pending": _battery_pending, # 迭代 20 T4/T7——电池待分配充能随断点
|
||||
"bonus_result": _curio_result.duplicate(true), # 已兑付待推进态(空 = 无——中断续玩不重兑付)
|
||||
"bonus_aux_carry": _bonus_treasure_carry.duplicate(true), # 道具件跨关携带(注入前中断防静默丢失)
|
||||
"keystone_drops": _keystone_drops.duplicate(true), # 逐杀掉落明细(摘要归因续接——迭代 10)
|
||||
}
|
||||
_save_manager.set_breakpoint(bp)
|
||||
|
||||
@@ -679,15 +679,6 @@ func set_attune_charges(charges: Dictionary) -> void:
|
||||
func set_vision_counter(counter: Dictionary) -> void:
|
||||
_vision_counter = counter
|
||||
|
||||
# 奖励节点兑付透传(迭代 7 T5——呈现层三选一 → 关卡域库存;来源归因 reward_node)。
|
||||
# 迭代 11 第①批 T7——同调位持有闸随过渡键退役拆除(aux 卡出池后仅剩防御面;能力件容量闸
|
||||
# 正主 = 营地装配面 Attunement.slots 满位禁选)。
|
||||
func grant_treasure_item(item_id: String, source: String) -> Dictionary:
|
||||
if treasure_inventory == null:
|
||||
treasure_inventory = TreasureItems.new(db)
|
||||
return treasure_inventory.add_item(item_id, source, Vector2i(-1, -1), 0)
|
||||
|
||||
|
||||
# 三选一 GP 袋件入账(迭代 10——钱包收口扩「奖励入账」入口;复用战斗完成同一入账原语,
|
||||
# wallet_changed 载荷带 source 供呈现归因)
|
||||
func grant_curio_gp(amount: int) -> void:
|
||||
|
||||
@@ -78,7 +78,7 @@ func _migrate_v1_v2(data: Dictionary) -> Dictionary:
|
||||
|
||||
|
||||
# v2→v3:断点附随件扩列(迭代 10 奖励重构批——bonus_taken/bonus_pending/bonus_result/
|
||||
# bonus_aux_carry/keystone_drops + bonus.ap 轴)与摘要 additive 键 keystone_drops——旧档缺键
|
||||
# keystone_drops + bonus.ap 轴)与摘要 additive 键 keystone_drops——旧档缺键〔bonus_aux_carry 键随迭代 22 T5 替换子交互拆除退役〕
|
||||
# = 合法空态(读取方 .get 兜底),无结构迁移体;版本号推进仅为 schema_version 对齐
|
||||
func _migrate_v2_v3(data: Dictionary) -> Dictionary:
|
||||
data["version"] = SAVE_FORMAT_VERSION
|
||||
|
||||
@@ -79,14 +79,6 @@ func holding_count() -> int:
|
||||
|
||||
|
||||
# 持有件记录(迭代 10 追加批——奖励节点替换子交互数据源:只列未消耗件,handle 定位丢弃目标)
|
||||
func holding_records() -> Array:
|
||||
var out: Array = []
|
||||
for rec in _items:
|
||||
if not bool(rec.get("used", false)):
|
||||
out.append({"handle": int(rec.get("handle", 0)), "item_id": String(rec.get("item_id", ""))})
|
||||
return out
|
||||
|
||||
|
||||
# 丢弃(同调位替换交互节点渠道——腾位收新;与 Used 消费分轨的一次性移除,快照不再含)
|
||||
func discard_item(handle: int) -> bool:
|
||||
for i in _items.size():
|
||||
|
||||
Reference in new issue
Block a user