feat(trigger-editor): 添加触发组概率与保底配置功能

1. 新增触发组条目字段t_chance(触发概率)和pity_add(保底叠加),仅攻击/受击组生效
2. 为TriggerGroupEditor传入分组标识,动态显示概率配置表单项
3. 新增条目创建时继承同组末档概率参数的逻辑
4. 更新常量定义与文档说明,补充概率参数使用规则
5. 在前端展示和服务端导出中添加概率相关信息展示
This commit is contained in:
pan
2026-09-21 16:01:41 +08:00
parent be6d941b90
commit cd9e7296a1
9 changed files with 93 additions and 28 deletions

View File

@@ -81,6 +81,13 @@ function removeGroup(sid) {
}
function addEntry(group) {
const lastLv = group.length ? group[group.length - 1].lv : 4
group.push({ lv: lastLv + 3, s_lv: 2, name: '', t_num: 3, overrides: {}, desc: '' })
const entry = { lv: lastLv + 3, s_lv: 2, name: '', t_num: 3, overrides: {}, desc: '' }
// 概率参数沿袭组内末档(攻/受击触发才生效)
if (chanceVisible.value && group.length) {
const last = group[group.length - 1]
entry.t_chance = last.t_chance ?? null
entry.pity_add = last.pity_add ?? null
}
group.push(entry)
}
</script>