Files
pixelheros/.trae/documents/塔防1-20级四选一成长系统设计.md
walkpan 8eedc2b4dd feat(塔防): 添加属性配置和等级成长系统
添加塔防生效属性配置文件 TDEnabledAttrs.ts,集中管理游戏属性
实现塔防等级成长系统 TDLevelOptions.ts,包含1-20级强化配置
调整数值平衡,除AP/HP_MAX外所有属性强度减半
2025-12-25 20:55:49 +08:00

62 lines
2.9 KiB
Markdown
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.
## 目标
创建 `TDLevelOptions.ts`
调整数值:**保持 AP/HP\_MAX 强度不变将其余所有属性的强度Base & Grow减半。**
并在配置中明确标注“20级极限总加成”。
## 调整后的数值表 (Revised V2)
| 属性 | Base | Grow | Lv1单次 | Lv20单次 | **20级累计总加成** | 调整说明 |
| :---------------- | :--- | :--- | :---- | :----- | :----------- | :-------------- |
| **AP** (攻) | 15 | 1.5 | 16 | 45 | **+610** | 保持不变 |
| **HP\_MAX** (血) | 100 | 10 | 110 | 300 | **+4100** | 保持不变 |
| **AS** (速) | 5 | 0.25 | 5% | 10% | **+150%** | 减半 |
| **DIS** (距) | 15 | 1.0 | 16 | 35 | **+510** | 减半 |
| **PIERCE** (穿) | 1 | 0 | 1 | 1 | **+20** | 无法减半(最小1),需接受 |
| **CRITICAL** (暴) | 2.5 | 0.1 | 2.6% | 4.5% | **+71%** | 减半 (需配合多次选择才满暴) |
| **CRITICAL\_DMG** | 10 | 0.5 | 10% | 20% | **+300%** | 减半 |
| **DEF** (防) | 2.5 | 0.25 | 2.7 | 7.5 | **+102** | 减半 |
| **控制类** | 1.5 | 0.05 | 1.5% | 2.5% | **+40%** | 减半 (不再必定永控) |
| **吸血** | 1 | 0.05 | 1% | 2% | **+30%** | 减半 |
*(注PIERCE 因作为整数逻辑,维持 +1但在随机池权重中可以不作特殊处理作为稀有强力项自然存在)*
## 配置文件内容
路径:`assets/script/game/common/config/TDLevelOptions.ts`
```typescript
import { Attrs } from "./HeroAttrs";
export interface IOptionGrowth {
base: number;
grow: number;
desc: string; // 使用 {val} 占位
totalNote: string; // 备注20级总加成
}
export const TD_OPTION_CONFIG: Record<number, IOptionGrowth> = {
[Attrs.AP]: { base: 15, grow: 1.5, desc: "攻击力 +{val}", totalNote: "+610" },
[Attrs.HP_MAX]: { base: 100, grow: 10, desc: "生命上限 +{val}", totalNote: "+4100" },
// 减半组
[Attrs.AS]: { base: 5, grow: 0.25, desc: "攻击速度 +{val}%", totalNote: "+150%" },
[Attrs.DIS]: { base: 15, grow: 1.0, desc: "攻击距离 +{val}", totalNote: "+510" },
[Attrs.CRITICAL]: { base: 2.5, grow: 0.1, desc: "暴击率 +{val}%", totalNote: "+71%" },
[Attrs.CRITICAL_DMG]: { base: 10, grow: 0.5, desc: "暴击伤害 +{val}%", totalNote: "+300%" },
[Attrs.DEF]: { base: 2.5, grow: 0.25, desc: "防御 +{val}", totalNote: "+102" },
// 控制与特效 (统一配置)
[Attrs.STUN_CHANCE]: { base: 1.5, grow: 0.05, desc: "眩晕概率 +{val}%", totalNote: "+40%" },
// ... 其他控制类同上
[Attrs.PIERCE]: { base: 1, grow: 0, desc: "穿透 +{val}", totalNote: "+20" },
};
// 辅助函数
export const getLevelOptions = (level: number): any[] => { ... }
```
## 执行
直接按此数值创建文件。无需再次确认。