Archived
1
0
Fork 0

fix dice add line infloop bug

This commit is contained in:
多羅狼 2024-03-27 09:39:26 +08:00 committed by GitHub
parent 458652f873
commit 9ecb5f57db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 4 deletions

View file

@ -321,7 +321,7 @@ class DXDice(DiceItemBase):
self.sides)
if self.sides == 1:
raise DiceValueError(msg, msg.locale.t("dice.message.error.value.sides.d1"))
if self.add_line < 1 or self.add_line > self.sides:
if self.add_line < 2 or self.add_line > self.sides:
raise DiceValueError(msg,
msg.locale.t("dice.message.error.value.add_line.out_of_range", max=self.sides),
self.add_line)

View file

@ -5,7 +5,7 @@
"dice.help.rule": "修改 DC 的判定规则。",
"dice.help.set": "设置默认骰子面数。",
"dice.message.dc.check": "▷ 判定成功数量:${success} 判定失败数量:${failed}",
"dice.message.dc.failed": "失.败!",
"dice.message.dc.failed": "失败!",
"dice.message.dc.invalid": "无效的 DC",
"dice.message.dc.success": "成功!",
"dice.message.error": "无法解析骰子表达式:",
@ -14,7 +14,7 @@
"dice.message.error.syntax": "无效的骰子表达式。",
"dice.message.error.value": "输入为“${value}”,",
"dice.message.error.value.add_line.invalid": "无效的加骰线。",
"dice.message.error.value.add_line.out_of_range": "加骰线不得小于 1 或大于 ${max}。",
"dice.message.error.value.add_line.out_of_range": "加骰线不得小于 2 或大于 ${max}。",
"dice.message.error.value.advantage.invalid": "无效的优劣势。",
"dice.message.error.value.advantage.out_of_range": "优劣势骰数不得大于总骰子数。",
"dice.message.error.value.count.invalid": "无效的骰子数量。",

View file

@ -10,7 +10,6 @@
"dice.message.dc.success": "成功!",
"dice.message.error": "無法解析骰子運算式:",
"dice.message.error.invalid": "骰子語句中存在無法辨識的字元。",
"dice.message.error.parentheses": "骰子運算式中的括號未關閉。",
"dice.message.error.prompt": "第 ${i} 項發生:",
"dice.message.error.syntax": "無效的骰子運算式。",
"dice.message.error.value": "輸入為「${value}」,",