Update dice.py
This commit is contained in:
parent
926c4ee786
commit
1fbeb39221
1 changed files with 2 additions and 0 deletions
|
@ -41,6 +41,8 @@ def GetDiceArgs(dice: str):
|
||||||
diceType = midstrs[0]
|
diceType = midstrs[0]
|
||||||
if 'K' in midstrs[1]:
|
if 'K' in midstrs[1]:
|
||||||
advantage = midstrs[2].replace('L', '-')
|
advantage = midstrs[2].replace('L', '-')
|
||||||
|
if not len(advantage.removeprefix('-')):
|
||||||
|
advantage += '1' #K/KL后没有值默认为1
|
||||||
# 语法合法检定
|
# 语法合法检定
|
||||||
if not diceCount.isdigit():
|
if not diceCount.isdigit():
|
||||||
return '无效的骰子数量:' + diceCount
|
return '无效的骰子数量:' + diceCount
|
||||||
|
|
Reference in a new issue