[色子游戏]奖励配置-新增按规则自动生成奖励配置
This commit is contained in:
@@ -53,7 +53,7 @@
|
||||
"infoNoBigwin": "No BIGWIN rows. Set tier to BIGWIN in the Reward Index tab first.",
|
||||
"btnRuleGenerate": "Generate by rules",
|
||||
"ruleGenerateTitle": "Generate reward index by rules",
|
||||
"ruleGenerateRules": "[Generation logic (same as Create Reward Reference)]\n• 26 cells ordered by id ascending are positions 0–25; each row’s grid_number is 5–30 and unique.\n• Roll D (5–30): start at the cell whose grid_number equals D (start_index); clockwise landing = (start position + D) mod 26; counter-clockwise = start − D (if negative, +26).\n• Each reference row’s “dice points” column is the roll D; tier / real_ev / display text come from the config at the landing id.\n\n[Leopard rolls]\nFor rolls 5, 10, 15, 20, 25, 30, clockwise and counter-clockwise landing tiers must NOT be T4 or T5 (avoid leopard roll + penalty / try again).\n\n[real_ev vs tier]\nreal < −100 → T4; −100 < real < 0 → T3; 0 < real < 100 → T2; 100 < real < 500 → T1; T5 “try again” real_ev=0. Set per-tier real_ev standards below; values are written into the config and can be edited later.\n\n[Inputs]\nT1/T2: minimum weighted counts. T4 and T5: fixed weighted counts — clockwise and counter-clockwise must each match the number you set (one value per tier, applied to both directions). real_ev standards: one value per tier. Generated T1–T4 use ui_text / ui_text_en = 100 + real_ev (same EN); T5 uses “try again” / “Once again”. Remarks still distinguish break-even vs small win where applicable.",
|
||||
"ruleGenerateRules": "[Generation logic (same as Create Reward Reference)]\n• 26 cells ordered by id ascending are positions 0–25; each row’s grid_number is 5–30 and unique.\n• Roll D (5–30): start at the cell whose grid_number equals D (start_index); clockwise landing = (start position + D) mod 26; counter-clockwise = start − D (if negative, +26).\n• Each reference row’s “dice points” column is the roll D; tier / real_ev / display text come from the config at the landing id.\n\n[Leopard rolls]\nFor rolls 5, 10, 15, 20, 25, 30, clockwise and counter-clockwise landing tiers must NOT be T4 or T5 (avoid leopard roll + penalty / try again).\n\n[real_ev vs tier]\nreal < −100 → T4; −100 < real < 0 → T3; 0 < real < 100 → T2; 100 < real < 500 → T1; T5 “try again” real_ev=0. Set per-tier real_ev standards below; values are written into the config and can be edited later.\n\n[Inputs]\nT1/T4/T5: fixed weighted counts. T2: minimum weighted count — clockwise and counter-clockwise must satisfy the corresponding constraints (one value per tier, applied to both directions). real_ev standards: one value per tier. Generated T1–T4 use ui_text / ui_text_en = 100 + real_ev (same EN); T5 uses “try again” / “Once again”. Remarks still distinguish break-even vs small win where applicable.",
|
||||
"ruleGenT1Row": "T1 (big prize)",
|
||||
"ruleGenT2Row": "T2 (small win / break-even)",
|
||||
"ruleGenT3RealEvOnly": "T3 (rake)",
|
||||
@@ -68,11 +68,11 @@
|
||||
"ruleGenInvalidT3RealEv": "T3 real_ev must satisfy -100 < value < 0",
|
||||
"ruleGenInvalidT4RealEv": "T4 real_ev must satisfy value < -100",
|
||||
"ruleGenInvalidT5RealEv": "T5 “try again” real_ev must be 0",
|
||||
"ruleGenT1Min": "T1 min (CW & CCW)",
|
||||
"ruleGenT1Min": "T1 fixed count (CW & CCW)",
|
||||
"ruleGenT2Min": "T2 min (CW & CCW)",
|
||||
"ruleGenT4Max": "T4 fixed count (CW & CCW)",
|
||||
"ruleGenT5Max": "T5 fixed count (CW & CCW)",
|
||||
"ruleGenScopeHint": "T1/T2 are minimums; T4 and T5 are exact: clockwise and counter-clockwise weighted counts must each equal the fixed value.",
|
||||
"ruleGenScopeHint": "T1/T4/T5 are exact; T2 is minimum: clockwise and counter-clockwise weighted counts must satisfy each constraint.",
|
||||
"ruleGenApply": "Generate and save",
|
||||
"ruleGenNeedFullGrid": "Missing id 0–25 rows or incomplete grid_number; cannot generate",
|
||||
"ruleGenFreqFail": "Cannot compute board frequencies; check grid_number",
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
"infoNoBigwin": "暂无 BIGWIN 档位配置,请先在「奖励索引」中设置 tier 为 BIGWIN",
|
||||
"btnRuleGenerate": "按规则生成",
|
||||
"ruleGenerateTitle": "按规则生成奖励索引",
|
||||
"ruleGenerateRules": "【生成逻辑(与创建奖励对照一致)】\n• 盘面 26 格按 id 升序为位置 0~25;每条配置的 grid_number 为 5~30 且不重复。\n• 摇取点数 D(5~30):起点为「grid_number=D」所在格位的 id(即 start_index),顺时针落点位置 = (起点位置 + D) mod 26,逆时针落点 = 起点位置 − D(若小于 0 则 +26)。\n• 对照表每条记录的「色子点数」列为摇取点数 D;档位、真实结算、显示文案取自落点格位对应 id 的配置。\n\n【豹子摇取点数】\n摇取点数为 5、10、15、20、25、30 时,其顺/逆时针落点档位不能为 T4、T5(避免对照表上出现豹子点数 + 惩罚/再来一次)。\n\n【real_ev 与 tier】\nreal < −100 → T4;−100 < real < 0 → T3;0 < real < 100 → T2;100 < real < 500 → T1;T5「再来一次」real_ev=0。下方可为各档位填写统一的 real_ev 标准,生成时写入配置;细则可稍后在表格中再改。\n\n【本弹窗输入】\n条数:T1/T2「不少于」;T4、T5「固定」——顺时针与逆时针的加权条数(每条摇取结果计一次)须分别恰好等于所填数值;T4 与 T5 分开填写。\nreal_ev 标准:同档位各格使用同一数值。生成时 T1~T4 的 ui_text / ui_text_en 均为「100+真实结算」;T5 固定为「再来一次」/「Once again」。备注仍区分完美回本/小赚等。",
|
||||
"ruleGenerateRules": "【生成逻辑(与创建奖励对照一致)】\n• 盘面 26 格按 id 升序为位置 0~25;每条配置的 grid_number 为 5~30 且不重复。\n• 摇取点数 D(5~30):起点为「grid_number=D」所在格位的 id(即 start_index),顺时针落点位置 = (起点位置 + D) mod 26,逆时针落点 = 起点位置 − D(若小于 0 则 +26)。\n• 对照表每条记录的「色子点数」列为摇取点数 D;档位、真实结算、显示文案取自落点格位对应 id 的配置。\n\n【豹子摇取点数】\n摇取点数为 5、10、15、20、25、30 时,其顺/逆时针落点档位不能为 T4、T5(避免对照表上出现豹子点数 + 惩罚/再来一次)。\n\n【real_ev 与 tier】\nreal < −100 → T4;−100 < real < 0 → T3;0 < real < 100 → T2;100 < real < 500 → T1;T5「再来一次」real_ev=0。下方可为各档位填写统一的 real_ev 标准,生成时写入配置;细则可稍后在表格中再改。\n\n【本弹窗输入】\n条数:T1/T4/T5「固定」;T2「不少于」——顺时针与逆时针的加权条数(每条摇取结果计一次)须分别满足所填数值;T1、T4 与 T5 分开填写。\nreal_ev 标准:同档位各格使用同一数值。生成时 T1~T4 的 ui_text / ui_text_en 均为「100+真实结算」;T5 固定为「再来一次」/「Once again」。备注仍区分完美回本/小赚等。",
|
||||
"ruleGenT1Row": "T1 大奖",
|
||||
"ruleGenT2Row": "T2 小赚/回本",
|
||||
"ruleGenT3RealEvOnly": "T3 抽水",
|
||||
@@ -68,11 +68,11 @@
|
||||
"ruleGenInvalidT3RealEv": "T3 的 real_ev 须满足:-100 < 值 < 0",
|
||||
"ruleGenInvalidT4RealEv": "T4 的 real_ev 须满足:值 < -100",
|
||||
"ruleGenInvalidT5RealEv": "T5「再来一次」的 real_ev 须为 0",
|
||||
"ruleGenT1Min": "T1 最少条数(顺/逆)",
|
||||
"ruleGenT1Min": "T1 固定条数(顺/逆)",
|
||||
"ruleGenT2Min": "T2 最少条数(顺/逆)",
|
||||
"ruleGenT4Max": "T4 固定条数(顺/逆)",
|
||||
"ruleGenT5Max": "T5 固定条数(顺/逆)",
|
||||
"ruleGenScopeHint": "T1/T2 为「不少于」;T4、T5 为「恰好」:顺时针与逆时针加权条数须分别等于所填固定值。",
|
||||
"ruleGenScopeHint": "T1/T4/T5 为「恰好」;T2 为「不少于」:顺时针与逆时针加权条数须分别满足对应约束。",
|
||||
"ruleGenApply": "生成并保存",
|
||||
"ruleGenNeedFullGrid": "当前列表缺少 id 0~25 的奖励索引行或色子点数不完整,无法生成",
|
||||
"ruleGenFreqFail": "无法计算盘面频率,请检查 grid_number",
|
||||
|
||||
@@ -243,9 +243,9 @@
|
||||
<ElFormItem :label="$t('page.configPage.ruleGenT1Row')">
|
||||
<div class="rule-gen-row">
|
||||
<div class="rule-gen-cell">
|
||||
<span class="rule-gen-hint">{{ $t('page.configPage.ruleGenMinCount') }}</span>
|
||||
<span class="rule-gen-hint">{{ $t('page.configPage.ruleGenFixedCount') }}</span>
|
||||
<ElInputNumber
|
||||
v-model="ruleGenT1Min"
|
||||
v-model="ruleGenT1Fixed"
|
||||
class="rule-gen-input-num"
|
||||
:min="0"
|
||||
:max="26"
|
||||
@@ -429,7 +429,7 @@
|
||||
const createRewardLoading = ref(false)
|
||||
const ruleGenerateDialogVisible = ref(false)
|
||||
const ruleGenSubmitting = ref(false)
|
||||
const ruleGenT1Min = ref(3)
|
||||
const ruleGenT1Fixed = ref(3)
|
||||
const ruleGenT2Min = ref(5)
|
||||
const ruleGenT4Fixed = ref(1)
|
||||
const ruleGenT5Fixed = ref(1)
|
||||
@@ -654,7 +654,7 @@
|
||||
ElMessage.warning(t('page.configPage.ruleGenNeedFullGrid'))
|
||||
return
|
||||
}
|
||||
const t1 = Math.max(0, Math.min(26, Math.floor(Number(ruleGenT1Min.value))))
|
||||
const t1 = Math.max(0, Math.min(26, Math.floor(Number(ruleGenT1Fixed.value))))
|
||||
const t2 = Math.max(0, Math.min(26, Math.floor(Number(ruleGenT2Min.value))))
|
||||
const x4 = Math.max(0, Math.min(26, Math.floor(Number(ruleGenT4Fixed.value))))
|
||||
const x5 = Math.max(0, Math.min(26, Math.floor(Number(ruleGenT5Fixed.value))))
|
||||
@@ -671,11 +671,11 @@
|
||||
return
|
||||
}
|
||||
const constraints = {
|
||||
t1MinCw: t1,
|
||||
t1FixedCw: t1,
|
||||
t2MinCw: t2,
|
||||
t4FixedCw: x4,
|
||||
t5FixedCw: x5,
|
||||
t1MinCcw: t1,
|
||||
t1FixedCcw: t1,
|
||||
t2MinCcw: t2,
|
||||
t4FixedCcw: x4,
|
||||
t5FixedCcw: x5
|
||||
|
||||
@@ -27,16 +27,16 @@ export interface BoardFrequencies {
|
||||
}
|
||||
|
||||
/**
|
||||
* 条数约束:T1/T2 为「不少于」;T4/T5 为「恰好」(加权条数,与 dice_reward 中顺/逆各 26 条摇取结果一致)
|
||||
* 条数约束:T1/T4/T5 为「恰好」;T2 为「不少于」(加权条数,与 dice_reward 中顺/逆各 26 条摇取结果一致)
|
||||
*/
|
||||
export interface TierCountConstraints {
|
||||
t1MinCw: number
|
||||
t1FixedCw: number
|
||||
t2MinCw: number
|
||||
/** 顺时针方向 T4 加权条数固定为该值 */
|
||||
t4FixedCw: number
|
||||
/** 顺时针方向 T5 加权条数固定为该值 */
|
||||
t5FixedCw: number
|
||||
t1MinCcw: number
|
||||
t1FixedCcw: number
|
||||
t2MinCcw: number
|
||||
/** 逆时针方向 T4 加权条数固定为该值 */
|
||||
t4FixedCcw: number
|
||||
@@ -172,11 +172,11 @@ function meetsConstraints(
|
||||
const cc4 = sumWeighted(freqCcw, tiers, 'T4')
|
||||
const cc5 = sumWeighted(freqCcw, tiers, 'T5')
|
||||
return (
|
||||
cw1 >= c.t1MinCw &&
|
||||
cw1 === c.t1FixedCw &&
|
||||
cw2 >= c.t2MinCw &&
|
||||
cw4 === c.t4FixedCw &&
|
||||
cw5 === c.t5FixedCw &&
|
||||
cc1 >= c.t1MinCcw &&
|
||||
cc1 === c.t1FixedCcw &&
|
||||
cc2 >= c.t2MinCcw &&
|
||||
cc4 === c.t4FixedCcw &&
|
||||
cc5 === c.t5FixedCcw
|
||||
@@ -268,7 +268,7 @@ export function generateTiers(input: GenerateTierInput): GenerateTierResult {
|
||||
}
|
||||
}
|
||||
|
||||
return { ok: false, message: '在当前盘面与约束下未找到可行解,请放宽 T1/T2 下限或调整 T4/T5 固定条数后重试' }
|
||||
return { ok: false, message: '在当前盘面与约束下未找到可行解,请调整 T1/T4/T5 固定条数或放宽 T2 下限后重试' }
|
||||
}
|
||||
|
||||
/** 展示文案:100 + 真实结算(中英文相同);T5 不使用 */
|
||||
|
||||
Reference in New Issue
Block a user