Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于掷骰表达式的形式化建议 #11

Open
SamuNatsu opened this issue Aug 6, 2023 · 0 comments
Open

关于掷骰表达式的形式化建议 #11

SamuNatsu opened this issue Aug 6, 2023 · 0 comments

Comments

@SamuNatsu
Copy link

如普通多面骰 d 的表达式在文档中是如下:

AdB(kq)C(pb)DaE

较为难以理解,需要配合下方的参数介绍和附加说明才能了解这串参数的定义

可以拆分成如下:

[骰数]d[面数][[骰池参数]|[选取线参数][奖惩数参数]]

骰池参数:a[点数阈值]
选取线参数:(k|q)[选取个数]
奖惩数参数:(p|b)[奖惩个数]

即将语法转变为和 Linux 参数列表正则类似的语言,相比旧有的表达方式,更能够一眼看出参数的组合与约束

其实这种表达法也可以减少附加说明/参数介绍中对于参数之间约束关系的文字

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant