class BCDice::GameSystem::Pendragon
Constants
- HELP_MESSAGE
ダイスボットの使い方
- ID
ゲームシステムの識別子
- NAME
ゲームシステム名
- SORT_KEY
ゲームシステム名の読みがな
Public Instance Methods
result_1d20(total, _dice_total, cmp_op, target)
click to toggle source
ゲーム別成功度判定(1d20)
# File lib/bcdice/game_system/Pendragon.rb, line 21 def result_1d20(total, _dice_total, cmp_op, target) return Result.nothing if target == '?' return nil unless cmp_op == :<= if total <= target if (total >= (40 - target)) || (total == target) Result.critical("クリティカル") else Result.success("成功") end elsif total == 20 Result.fumble("ファンブル") else Result.failure("失敗") end end