Files
gplan-2/game/data/schemas/hero_table.gd
T
DKChan 00d98b6f74 feat(迭代23-T2): 两根类型轴所有权移交——hero.tres 两字段删除+ForgeTable 默认值常驻持有+单位快照改读注入面
- hero.tres:armor_type/attack_type 两字段删除(含 2026-09-18 前置批登记注记退役);armor_class=10 保留为甲路线缺失兜底基准
- hero_table.gd schema:两 @export 字段与枚举校验同步删除(三数值轴 max_hp/atk/armor_class)
- unit_container.gd:spawn 签名 +2(hero_attack_type/hero_armor_type,空串=db.forge_default_* 回退)——三参旧调用方零适配,行为逐位连续(normal/light)
- smoke_all.gd::1901 hero_attack 行类型键主语换代为 forge_default_attack_type();新增 _smoke_forge_axes 段(V5 前半:字段不在位+默认值+零注入回退快照)4 断言
- 轻闸:冒烟 902/0(898 基线 +4)+run_all 23 套全绿
2026-10-12 23:31:50 +08:00

26 lines
1.8 KiB
GDScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# VERTICAL SLICE - NOT FOR PRODUCTION
# Validation Question: 玩家能否无指导在一场完整战斗中经历「开战→挖掘规划→轮末结算逐行兑现→胜/负」并逐行归因(P2)
# Date: 2026-09-10
# 数据配置 HeroTable schema(敌人系统 接口漂移新增;单行全局,Rule 4 豁免)。
# atk = 基础攻击恒存在(2026-09-11 用户裁决):域 [1,999]、0 = 加载拒绝——零基线死锁 schema 层杜绝。
# 〔2026-10-12 迭代 23 锻造工坊实装批 T2:armor_type/attack_type 两根类型轴字段删除——契约 2
# 所有权移交,默认值归锻造工坊配置(forge.tres)常驻持有、选中态写存档经参数面注入;本表只剩
# 三数值轴 max_hp/atk/armor_class(armor_class=甲路线缺失时兜底基准,甲型基础 AC 归 forge.tres 行)。〕
class_name HeroTable
extends Resource
@export var max_hp: int = 50 # [1,999] knob(provisional,溯源 = 原型锚)
@export var atk: int = 6 # [1,999] knob——基础攻击(溯源 = 概念原型 HERO_BASE_ATK,provisional 归 难度曲线与Boss);消费面 = 战斗结算·战斗段先手攻击
@export var armor_class: int = 10 # [0,999] knob——防守方护甲等级基准(2026-09-16 护甲等级掷点批,暂定 10 归 难度曲线与Boss);消费面 = 战斗结算掷点判定阈值基数(ac_up 效果加算其上)
func validate() -> Array:
var errs: Array[Dictionary] = []
if max_hp < 1 or max_hp > 999:
errs.append({"category": "domain", "message": "max_hp 越域 [1,999]: %d" % max_hp})
if atk < 1 or atk > 999:
errs.append({"category": "domain", "message": "atk 越域 [1,999]: %d" % atk})
if armor_class < 0 or armor_class > 999:
errs.append({"category": "domain", "message": "armor_class 越域 [0,999]: %d" % armor_class})
return errs