diff --git a/saiadmin-artd/scripts/generate-dice-reward-index.ts b/saiadmin-artd/scripts/generate-dice-reward-index.ts index 4072ea0..14a1c54 100644 --- a/saiadmin-artd/scripts/generate-dice-reward-index.ts +++ b/saiadmin-artd/scripts/generate-dice-reward-index.ts @@ -1,6 +1,6 @@ /** * 命令行:按「当前盘面 grid_number 排布」与 T1/T2/T4/T5 约束生成 DiceRewardConfig 表 JSON(不含保存)。 - * 用法:pnpm tsx scripts/generate-dice-reward-index.ts [t1Min] [t2Min] [t4Fixed] [t5Fixed] + * 用法:pnpm tsx scripts/generate-dice-reward-index.ts [t1Fixed] [t2Min] [t4Fixed] [t5Fixed] * 默认:3 5 1 1(T4/T5 为顺、逆加权条数固定值) * * 生成逻辑见 src/views/plugin/dice/reward_config/utils/generateIndexByRules.ts @@ -25,11 +25,11 @@ const x4 = Number.isFinite(args[2]) ? args[2] : 1 const x5 = Number.isFinite(args[3]) ? args[3] : 1 const constraints = { - t1MinCw: t1, + t1FixedCw: t1, t2MinCw: t2, t4FixedCw: x4, t5FixedCw: x5, - t1MinCcw: t1, + t1FixedCcw: t1, t2MinCcw: t2, t4FixedCcw: x4, t5FixedCcw: x5 diff --git a/saiadmin-artd/src/locales/langs/en/dice/reward_config.json b/saiadmin-artd/src/locales/langs/en/dice/reward_config.json index 12acfad..bc5b719 100644 --- a/saiadmin-artd/src/locales/langs/en/dice/reward_config.json +++ b/saiadmin-artd/src/locales/langs/en/dice/reward_config.json @@ -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", diff --git a/saiadmin-artd/src/locales/langs/zh/dice/reward_config.json b/saiadmin-artd/src/locales/langs/zh/dice/reward_config.json index c65a1fe..6ad4774 100644 --- a/saiadmin-artd/src/locales/langs/zh/dice/reward_config.json +++ b/saiadmin-artd/src/locales/langs/zh/dice/reward_config.json @@ -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", diff --git a/saiadmin-artd/src/views/plugin/dice/reward_config/index/index.vue b/saiadmin-artd/src/views/plugin/dice/reward_config/index/index.vue index de82b4c..5bd08a3 100644 --- a/saiadmin-artd/src/views/plugin/dice/reward_config/index/index.vue +++ b/saiadmin-artd/src/views/plugin/dice/reward_config/index/index.vue @@ -243,9 +243,9 @@
- {{ $t('page.configPage.ruleGenMinCount') }} + {{ $t('page.configPage.ruleGenFixedCount') }} = 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 不使用 */