feat: 资质概率按难度配置化,新增普通/困难两档权重
- game_config.cfg 新增 difficulty 档位与 [recruitment_normal]/[recruitment_hard] 权重表 - GameConfig 解析各档权重,get_aptitude_weights() 按当前难度返回 - DiscipleManager 资质判定改读配置权重,删除代码常量 - 设计文档补充配置写法说明(VariantParser 数组字面量陷阱) - 计划表同步 D3 进度
This commit is contained in:
+20
-12
@@ -80,16 +80,16 @@
|
||||
|
||||
### 4. 资质(入宗分流)
|
||||
|
||||
按权重表掷骰:
|
||||
按权重表掷骰,权重**随难度档位变化**(配置驱动):
|
||||
|
||||
| 资质 | 权重 | 概率 |
|
||||
|------|------|------|
|
||||
| 下品 | 45 | 45% |
|
||||
| 中品 | 35 | 35% |
|
||||
| 上品 | 15 | 15% |
|
||||
| 天骄 | 5 | 5% |
|
||||
| 难度 | 下品 | 中品 | 上品 | 天骄 |
|
||||
|------|------|------|------|------|
|
||||
| 普通(normal) | 45 | 35 | 15 | 5 |
|
||||
| 困难(hard) | 60 | 30 | 8 | 2 |
|
||||
|
||||
> 概率说明:开发阶段固定此分布,后期根据游戏难度测试调整权重即可,不改代码结构。
|
||||
- 当前难度由配置 `[recruitment] difficulty` 指定("normal"/"hard")
|
||||
- 权重表在 `[recruitment_normal]` / `[recruitment_hard]` 节,INI 数组字面量写法:`aptitude_weights=[45, 35, 15, 5]`
|
||||
- 改配置即调难度,后续可加更多档位(代码字典加一项 + 配置加一节)
|
||||
|
||||
---
|
||||
|
||||
@@ -148,12 +148,20 @@
|
||||
|
||||
```ini
|
||||
[recruitment]
|
||||
opening_applicant_count=5 ; 开局候选人数
|
||||
opening_pick_count=3 ; 开局必须选满数
|
||||
recruit_interval_years=0.1 ; 定期招募间隔(游戏年)
|
||||
recruit_applicant_count=3 ; 定期弹窗候选人数
|
||||
difficulty="normal" ; 当前难度档位
|
||||
opening_applicant_count=5 ; 开局候选人数
|
||||
opening_pick_count=3 ; 开局必须选满数
|
||||
recruit_interval_years=0.1 ; 定期招募间隔(游戏年)
|
||||
recruit_applicant_count=3 ; 定期弹窗候选人数
|
||||
|
||||
[recruitment_normal] ; 普通难度资质权重(下品/中品/上品/天骄)
|
||||
aptitude_weights=[45, 35, 15, 5]
|
||||
|
||||
[recruitment_hard] ; 困难难度资质权重
|
||||
aptitude_weights=[60, 30, 8, 2]
|
||||
```
|
||||
|
||||
> 注意:ConfigFile 用 VariantParser 解析值,**数组必须写 `[45, 35, 15, 5]` 字面量**,字符串值必须加引号(如 `difficulty="normal"`);裸写 `45,35,15,5` 会被截断为 45 并破坏后续节解析。
|
||||
> 以后所有可调参数(天赋权重、价格、境界门槛等)统一加到这里。
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user