39 lines
2.7 KiB
GDScript
39 lines
2.7 KiB
GDScript
# VERTICAL SLICE - NOT FOR PRODUCTION
|
||
# Validation Question: 玩家能否无指导在一场完整战斗中经历「开战→挖掘规划→轮末结算逐行兑现→胜/负」并逐行归因(P2)
|
||
# Date: 2026-09-10
|
||
# 数据配置 ActionEconomyTable schema(行动经济 回填值,单行全局;Rule 4 豁免)。
|
||
# 数值域与跨字段校验依据 design/archive/gdd-2026-09-14/a3-action-economy.md "ActionEconomyTable Schema 定稿"。
|
||
class_name ActionEconomyTable
|
||
extends Resource
|
||
|
||
@export var ap_per_round: int = 6 # [1,32] knob(默认值 = 现行表值基线,2026-09-16 AP 压速批 8→6 随动)
|
||
@export var dig_ap_cost: int = 1 # [1,8] knob(域下限 1 = 零预算系统失效拒绝)
|
||
@export var flag_place_ap_cost: int = 1 # [0,8] knob(flag_pull_ap_cost 随拔旗退役批 2026-09-19 删除)
|
||
@export var rap_refresh_cost: int = 6 # [1,64] knob(默认值随 AP 压速批 8→6 随动)
|
||
@export var refresh_cap_per_round: int = 2 # [1,8] knob(2026-09-12 轮内刷新批——每轮刷新兜底上限,Active/Waiting 合计)
|
||
@export var move_ap_cost: int = 0 # 冻结 0(P4 氛围承载)
|
||
@export var chain_ap_cost: int = 0 # 冻结 0(v2 定稿)
|
||
|
||
|
||
func validate() -> Array:
|
||
var errs: Array[Dictionary] = []
|
||
if ap_per_round < 1 or ap_per_round > 32:
|
||
errs.append({"category": "domain", "message": "ap_per_round 越域 [1,32]: %d" % ap_per_round})
|
||
if dig_ap_cost < 1 or dig_ap_cost > 8:
|
||
errs.append({"category": "domain", "message": "dig_ap_cost 越域 [1,8]: %d" % dig_ap_cost})
|
||
if flag_place_ap_cost < 0 or flag_place_ap_cost > 8:
|
||
errs.append({"category": "domain", "message": "flag_place_ap_cost 越域 [0,8]: %d" % flag_place_ap_cost})
|
||
if rap_refresh_cost < 1 or rap_refresh_cost > 64:
|
||
errs.append({"category": "domain", "message": "rap_refresh_cost 越域 [1,64]: %d" % rap_refresh_cost})
|
||
if refresh_cap_per_round < 1 or refresh_cap_per_round > 8:
|
||
errs.append({"category": "domain", "message": "refresh_cap_per_round 越域 [1,8]: %d" % refresh_cap_per_round})
|
||
if move_ap_cost != 0:
|
||
errs.append({"category": "frozen", "message": "move_ap_cost 结构冻结为 0: %d" % move_ap_cost})
|
||
if chain_ap_cost != 0:
|
||
errs.append({"category": "frozen", "message": "chain_ap_cost 结构冻结为 0: %d" % chain_ap_cost})
|
||
# 跨字段(行动经济 三轮评审增补):任一动作成本 ≤ ap_per_round,违规加载期致命
|
||
for pair in [["dig_ap_cost", dig_ap_cost], ["flag_place_ap_cost", flag_place_ap_cost]]:
|
||
if pair[1] > ap_per_round:
|
||
errs.append({"category": "cross_field", "message": "%s(%d) > ap_per_round(%d)——挖掘/旗动作永久不可用软锁" % [pair[0], pair[1], ap_per_round]})
|
||
return errs
|