You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.8 KiB
1.8 KiB
需求:宝石装备与合成
状态:局外 UI / 存档 / 合成本期实现;局内属性与技能生效后续切片。
背景
老项目武器功能改造为宝石:Weapon 表每行一颗宝石;部分宝石带 act_skill。宝石在局外宝石页镶嵌到金木水火土五行,装备后局内对应属性数字获得属性与技能。
配表
| 表 | 用途 |
|---|---|
Weapon |
宝石定义:type 1 通用 / 2~6 金木水火土;quality 0~5 与等级对应;itemid 道具;synthesisnumber 合成消耗本宝石数量;synthesisitem 合成目标 id 列表;attritubes / act_skill |
Item |
type=3 宝石道具;para 指向 Weapon.id |
镶嵌规则
- 每五行 4 槽(g1~g4)。
- 通用(
type=1)可装任意五行。 - 属性专属(
type=2~6)须type === elementType + 1(elementType 1~5 = 金木水火土),且每五行最多 1 颗专属。 - 目标槽有宝石:先卸再装(或交换)。
- 仓库拖到槽 = 装备;槽拖到仓库区 = 卸下。
拥有量
- 库存:
Item数量(Weapon.itemid)。 - 可用数 = 库存 − 已镶嵌数;仓库与合成只使用可用数。
存档
OtherDataType.ElementGem- 格式:
element|s0,s1,s2,s3#...(element=1~5,槽位宝石 id,0=空)
一键合成
- 每轮对当前可用数做快照,仅用快照计算可合成次数;本轮产出不参与本轮材料。
- 消耗
synthesisnumber个本宝石,产出 1 个目标:synthesisitem仅 1 个则取之,多个则随机取 1。 - 多轮直到无可合成。
- 弹窗展示:各宝石「合成后可用数 − 合成前可用数」中
delta > 0的条目。
局内(后续)
通过 gg.gem.getElementSlots(elementType) 读取镶嵌,再叠加 attritubes / act_skill。本期不接入战斗。