iter10 目检修复批: 掷定前置落籍(用户推荐案获批)——道具件具体道具随候选抽定(_last_draw_aux/reward_pick流序内挪)+卡片直显「魔法道具/道具名·效果摘要」(_aux_card_line+Narrator aux_line参)+断点快照随载aux_detail(续玩详情不丢)+node_bonus_candidates扩dict+候选一致要求降级(冒险结构/level-clear 措辞软化——用户裁决非验收义务)+fx_shot_probe演出抓帧探针入册+目检台账收口(7/9/10/11/14机测承载或实测PASS/8项用户终裁非本迭代不追)(冒烟628/0+run_all 15套+五探针+三闸零新增+熵增PASS)
This commit is contained in:
1 parent
1a46854337
commit
cc8807e66c
11 files changed
+255
-37
No files matched your search
@@ -80,6 +80,7 @@ var _bonus_pending := {} # 停点态:{"candidates": Array, "p
|
||||
var _bonus_result := {} # 已兑付待推进态(bonus_resolved 载荷副本——中断续玩不重兑付)
|
||||
var _bonus_aux_carry: Array[String] = [] # 道具件跨关携带(兑付后注入下一关库存——清库后授予的体验窗)
|
||||
var _keystone_drops: Array = [] # Boss 逐杀掉落明细(additive 摘要键 keystone_drops——结算明细/复盘归因数据源)
|
||||
var _last_draw_aux: Array[String] = [] # 最近一次抽签掷定的道具件(掷定前置——卡片直显具体道具;追加批二)
|
||||
var _node_bonus_pending := {} # 奖励节点三选一停点态(迭代 10 追加批——共享池;断点不载:续玩重建到选路停点重走,恢复的计数器保证同候选重抽)
|
||||
|
||||
|
||||
@@ -166,6 +167,8 @@ func resume_adventure(bp: Dictionary, params: Dictionary = {}) -> bool:
|
||||
if not bp_pending.is_empty():
|
||||
_pending_next_level = true
|
||||
_bonus_pending = {"candidates": (bp_pending.get("candidates", []) as Array).duplicate(true)}
|
||||
if bp_pending.has("aux_detail"):
|
||||
_bonus_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"):
|
||||
_bonus_pending["chosen"] = "aux_item"
|
||||
@@ -277,7 +280,9 @@ func pick_bonus(id: String) -> bool:
|
||||
return true
|
||||
|
||||
|
||||
# 道具件兑付(同调位约束):有位直接入跨关携带;满位转替换子交互(incoming 暂存、等 resolve_aux_replace)
|
||||
# 道具件兑付(同调位约束):有位直接入跨关携带;满位转替换子交互(incoming 暂存、等 resolve_aux_replace)。
|
||||
# 掷定前置(追加批二):具体道具随候选抽定(_last_draw_aux / _bonus_pending.aux_detail)——本函数消费预掷值,
|
||||
# 断点续玩/无预掷值时回退当场掷定(流序不同但消费数不变,确定性由调用序保证)。
|
||||
func _pick_aux_item(count: int) -> bool:
|
||||
var pool: Array = _bonus_aux_pool()
|
||||
if pool.is_empty():
|
||||
@@ -285,8 +290,14 @@ func _pick_aux_item(count: int) -> bool:
|
||||
return false
|
||||
var hp_before := int(ledger.get("hero_hp", 0))
|
||||
var picked: Array[String] = []
|
||||
var detail: Array = (_bonus_pending.get("aux_detail", []) as Array).duplicate()
|
||||
if detail.is_empty():
|
||||
detail = _last_draw_aux.duplicate()
|
||||
for i in maxi(1, count):
|
||||
picked.append(_roll_bonus_aux_item(pool))
|
||||
if i < detail.size():
|
||||
picked.append(String(detail[i]))
|
||||
else:
|
||||
picked.append(_roll_bonus_aux_item(pool))
|
||||
var slots := maxi(0, int(db.adventure.transitional_sync_slots))
|
||||
if _bonus_aux_carry.size() + picked.size() <= slots:
|
||||
for iid in picked:
|
||||
@@ -335,14 +346,16 @@ func _finish_bonus_pick(picked: String, value: int, hp_before: int) -> void:
|
||||
|
||||
# ---- 奖励节点三选一(迭代 10 追加批——用户拍板:与通关三选一共享同池同权重同次数上限)----
|
||||
|
||||
# 候选呈现(节点到达时调用——恰一 reward_pick scope 取数;本停点断点不载,
|
||||
# 续玩重建到选路停点后重走重抽,恢复的全局计数器保证同候选逐位复现)
|
||||
func node_bonus_candidates() -> Array:
|
||||
return _draw_bonus_candidates()
|
||||
# 候选呈现(节点到达时调用——恰一 reward_pick scope 洗牌 + 道具件掷定 scope;本停点断点不载,
|
||||
# 续玩重建到选路停点后重走重抽,恢复的全局计数器保证同候选逐位复现)。
|
||||
# 掷定前置(追加批二):返回 dict 带 aux_detail(道具件具体道具)供卡片直显。
|
||||
func node_bonus_candidates() -> Dictionary:
|
||||
var cands: Array = _draw_bonus_candidates()
|
||||
return {"candidates": cands, "aux_detail": _last_draw_aux.duplicate()}
|
||||
|
||||
|
||||
func present_node_bonus(candidates: Array) -> void:
|
||||
_node_bonus_pending = {"candidates": candidates.duplicate(true)}
|
||||
func present_node_bonus(candidates: Array, aux_detail: Array = []) -> void:
|
||||
_node_bonus_pending = {"candidates": candidates.duplicate(true), "aux_detail": aux_detail.duplicate(true)}
|
||||
|
||||
|
||||
# 点选兑付(节点域——无部分回血无钥石;件获取计数与牌库剔除与通关三选一同账)
|
||||
@@ -381,15 +394,20 @@ func apply_node_bonus(id: String) -> bool:
|
||||
|
||||
|
||||
# 节点渠道道具件(同调位约束):持有=关卡域库存+跨关携带,有位直接入本关库存(当关可用);
|
||||
# 满位转替换子交互(丢弃目标=库存件 handle——与通关渠道的 carry 序号分轨)
|
||||
# 满位转替换子交互(丢弃目标=库存件 handle——与通关渠道的 carry 序号分轨)。
|
||||
# 掷定前置:消费 _node_bonus_pending.aux_detail 预掷值(缺省回退当场掷定)。
|
||||
func _apply_node_aux(count: int) -> bool:
|
||||
var pool: Array = _bonus_aux_pool()
|
||||
if pool.is_empty():
|
||||
push_error("[冒险结构] apply_node_bonus(aux_item) 拒绝——解锁道具池空集(白板/门控态不入牌库的防御兜底)")
|
||||
return false
|
||||
var picked: Array[String] = []
|
||||
var detail: Array = (_node_bonus_pending.get("aux_detail", []) as Array).duplicate()
|
||||
for i in maxi(1, count):
|
||||
picked.append(_roll_bonus_aux_item(pool))
|
||||
if i < detail.size():
|
||||
picked.append(String(detail[i]))
|
||||
else:
|
||||
picked.append(_roll_bonus_aux_item(pool))
|
||||
var slots := maxi(0, int(db.adventure.transitional_sync_slots))
|
||||
var records: Array = []
|
||||
if _runner != null and _runner.aux_inventory != null:
|
||||
@@ -442,9 +460,11 @@ func _finish_node_bonus(picked: String, value: int) -> void:
|
||||
|
||||
# 加权洗牌不放回掷 3(E-S weight-key:每件 key = U(0,1)^(1/权重) 取前 3——单次零重复、逐件按权重出
|
||||
# 概率;达次数上限件先剔牌库〔AP 用尽 2 次/属性件达 3 次永不再现;GP/道具件无次数上限,牌库恒非空〕;
|
||||
# 道具件解锁池空集〔白板/门控态〕不入牌库。消费 reward_pick 封闭流——一次停点恰一 scope,同种子同三候选)
|
||||
# 道具件解锁池空集〔白板/门控态〕不入牌库。消费 reward_pick 封闭流——一次停点恰一 scope,同种子同三候选;
|
||||
# 道具件具体道具在本调用内掷定(_last_draw_aux——掷定前置,卡片直显,追加批二)。
|
||||
func _draw_bonus_candidates() -> Array:
|
||||
var deck: Array = []
|
||||
_last_draw_aux = []
|
||||
for id in db.adventure.BONUS_IDS:
|
||||
var cap := int(db.adventure.bonus_cap(String(id)))
|
||||
if cap != db.adventure.BONUS_CAP_UNLIMITED and int(_bonus_taken.get(String(id), 0)) >= cap:
|
||||
@@ -460,10 +480,20 @@ func _draw_bonus_candidates() -> Array:
|
||||
keyed.sort_custom(func(a, b): return float(a["key"]) > float(b["key"]))
|
||||
var out: Array = []
|
||||
for i in mini(3, keyed.size()):
|
||||
out.append(String(keyed[i]["id"]))
|
||||
var cid := String(keyed[i]["id"])
|
||||
out.append(cid)
|
||||
if cid == "aux_item":
|
||||
var roll_rg: RandomNumberGenerator = rng.open_stream("reward_pick")
|
||||
for j in maxi(1, int(db.adventure.bonus_aux_item_count)):
|
||||
_last_draw_aux.append(_roll_from(roll_rg))
|
||||
return out
|
||||
|
||||
|
||||
func _roll_from(rg: RandomNumberGenerator) -> String:
|
||||
var pool: Array = _bonus_aux_pool()
|
||||
return String(pool[rg.randi_range(0, pool.size() - 1)])
|
||||
|
||||
|
||||
# 三选一道具件随机池(与投放门控同源:aux 活行 ∩ 解锁门控集——空集 = 道具件不入牌库)
|
||||
func _bonus_aux_pool() -> Array:
|
||||
var out: Array = []
|
||||
@@ -587,6 +617,7 @@ func _on_level_finished(payload: Dictionary) -> void:
|
||||
var pick_payload: Dictionary = {
|
||||
"level_index": level_index,
|
||||
"candidates": _draw_bonus_candidates(),
|
||||
"aux_detail": _last_draw_aux.duplicate(), # 掷定前置(追加批二——道具件具体道具随候选抽定,卡片直显)
|
||||
"heal_gained": heal,
|
||||
"hp_before": hp_before,
|
||||
"hp_after": int(ledger.get("hero_hp", 0)),
|
||||
@@ -596,6 +627,7 @@ func _on_level_finished(payload: Dictionary) -> void:
|
||||
"aux_cleared": int(payload.get("aux_cleared", 0)), # additive 扩签(迭代 7 T4——关卡末清空反馈取数)
|
||||
}
|
||||
_bonus_pending = {"candidates": (pick_payload["candidates"] as Array).duplicate(true),
|
||||
"aux_detail": _last_draw_aux.duplicate(),
|
||||
"payload": pick_payload.duplicate(true)}
|
||||
bonus_choice_presented.emit(pick_payload)
|
||||
_snapshot_breakpoint() # 选择停点可中断(契约 5——续玩不重抽不静默丢失)
|
||||
|
||||
Reference in new issue
Block a user