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

TRPG『慈悲なきアイオニア』のダイスボット #720

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

hattarhaptag
Copy link

慈悲なきアイオニアのダイスボットを作成しました。
技能判定の際に使うダイスボットで、ダメージチェックやストレスチェック、表などは作成していません。
作成したテスト(Aionia.toml)をすべてpassしています。
そのほか、ソートキー等のテストも通過しています。

Copy link
Member

@ysakasin ysakasin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1文字コマンドは共通コマンドのために開けておきたいので、技能判定のsは形式を変更してください。コマンドの主要部分は2文字以上であることが望ましいです。

また、既存のコマンドの先頭にsをつけるとシークレットダイスになる機能があるため、形式を変更する際には気をつけてください。たとえば、STSSTというコマンドを実装した場合にSSTと入力した際にSTのシークレットダイスなのか、SSTというコマンドなのか区別ができなくなります。

@hattarhaptag
Copy link
Author

@ysakasin
コメントいただきありがとうございます。
技能をSkillと訳しS(ST)としていましたが、Abilityと解釈してAB(ABT)のようにコマンドを修正しました。
お手数をおかけしますがご確認よろしくお願いいたします。

end

# 結果を返す
return "(#{command}) > #{dice_total}[#{dice_list.join(',')}]#{bonus_text} > #{bonus_result}#{result}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

成否やクリティカル・ファンブルの結果を伴う出力には BCDice::Result クラスのインスタンスを用いるようにしてください。

以下が使用例です。

Result.new.tap do |r|
r.text = "(#{dice_cnt}B6>=4)#{over_modify > 0 ? "+#{over_modify * 2}" : ''} > [#{dice_str}]#{over_modify > 0 ? "+#{over_modify * 2}" : ''} > 成功数#{success_cnt}#{result ? '成功' : '失敗'}#{has_critical ? '(クリティカル)' : ''}#{has_fumble ? '(ファンブル)' : ''}"
r.critical = has_critical
r.fumble = has_fumble
r.success = result
r.failure = !result
end

@hattarhaptag
Copy link
Author

@ysakasin
コメントいただきありがとうございます。
Resultクラスを用いて判定を返すようにプログラムを修正しました。
また、その変更に伴いテストデータにもsuccess, failure, critical, fumble情報を追加しました。
テストが100%パスしていることを確認しましたので、メンションする形でご連絡いたします。
ご確認よろしくお願いいたします。

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

Successfully merging this pull request may close these issues.

None yet

2 participants