SW2.x の威力表ロールで存在しないオプションが指定されていた場合を弾く#73
Open
ViVi-shark wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
内容
従来は未定義のオプションが指定されていてもそれを無視するかたちで動作していた。
これを、未定義のオプションらしきものがある場合にはコマンドとして解決しないように変更する。
従来の挙動の例
目的
コマンドとして動作してしまうと、そこに未定義のオプション(らしきもの)が含まれていたことがわかりづらい。
(厳密には、ログに表示されるコマンドにアルファベットが残っていたらそれは未定義のオプションらしきものがあったということになるのだが、これは明文化されていない仕様でありかつ出力フォーマットを把握していなければ認識できず、また直感的ではない)
指定したつもりのオプションが意図どおりに適用されないまま、(あたかも正常であるかのように)ダイスロールが解決されてしまうと、意図と異なった結果によってゲームが進行しかねないという問題がある。
未定義のオプション(らしきもの)が指定されてしまうケースには、
などがある。
後者の具体例として、頻発しやすいものに BCDice の半減オプション(
hを指定する)などがある。