class BCDice::GameSystem::RuneQuest
Constants
- HELP_MESSAGE
ダイスボットの使い方
- ID
ゲームシステムの識別子
- NAME
ゲームシステム名
- SORT_KEY
ゲームシステム名の読みがな
Public Instance Methods
result_1d100(total, _dice_total, cmp_op, target)
click to toggle source
ゲーム別成功度判定(1d100)
# File lib/bcdice/game_system/RuneQuest.rb, line 21 def result_1d100(total, _dice_total, cmp_op, target) return Result.nothing if target == '?' return nil unless cmp_op == :<= # RuneQuest QUICK-START RULESを元に修正 # https://www.chaosium.com/content/FreePDFs/RuneQuest/CHA4027%20-%20RuneQuest%20Quickstart.pdf critical_value = (target.to_f / 20).round if (total <= 1) || (total <= critical_value) # 1は常に決定的成功 Result.critical("決定的成功") elsif total >= 100 # 100は常に致命的失敗 Result.fumble("致命的失敗") elsif total <= (target.to_f / 5).round Result.success("効果的成功") elsif total <= target Result.success("成功") elsif total >= 95 + critical_value Result.fumble("致命的失敗") else Result.failure("失敗") end end