简体中文
提取系统
装备里的宝石取出来后按什么方式返还, 以及相关的配置项
宝石提取让玩家从装备中取出已镶嵌的宝石, 取出结果按你配置的返还模式决定
返还模式
| 模式 | 说明 |
|---|---|
original | 原样返还宝石, 保留等级和状态 |
downgrade | 降级返还, 宝石等级降低 |
destroy | 销毁宝石, 不返还 |
配置字段
提取返还配置写在宝石定义的 extract_return 节点下:
| 字段 | 类型 | 必填 | 默认值 | 取值范围 | 说明 |
|---|---|---|---|---|---|
extract_cost | object | 否 | 无费用 | 结构同 inlay_cost | 提取费用; 字段见宝石定义 |
extract_return | object | 否 | original / 1 / 0.0 | — | 返还配置; 整节缺失时使用默认值 |
extract_return.mode | string | 否 | "original" | original / downgrade / destroy (别名 degraded, destroyed) | 返还模式; 无法识别的值回退 original |
extract_return.degraded_chance | double | 否 | 0.0 | 0.0~1.0 (超范围会被夹紧) | 触发降级的概率: 0.0 表示从不降级, 1.0 表示必定降级. 仅 mode: downgrade 时生效 |
extract_return.downgrade_levels | integer | 否 | 1 | ≥ 1 | 降级时降低的等级数 |
提取流程
text
1. 玩家在 GUI 中选择要提取的宝石
↓
2. 检查提取条件 (经济, 材料等)
↓
3. 根据 mode 决定返还方式
↓
4. 撤销宝石镶嵌时对装备的操作 (名称/Lore 修改)
↓
5. 清除装备上该插槽的宝石数据
↓
6. 返还宝石 (如果 mode 不是 destroy)NOTE
提取时会执行操作撤销 (operationLedger.revert()), 即撤销宝石镶嵌时对装备名称和 Lore 的操作, 恢复装备原始展示
示例
原样返还
yaml
extract_return:
mode: original降级返还
yaml
extract_return:
mode: downgrade
degraded_chance: 0.7
downgrade_levels: 1这一档下, 70% 概率降级返还 (等级 -1), 30% 概率原样返还. 降级后等级小于等于 0 时不返还宝石
销毁模式
yaml
extract_return:
mode: destroy提取后宝石直接销毁, 不返还给玩家. 高价值宝石适合用这一档做平衡