class BCDice::GameSystem::NjslyrBattle
Constants
- HELP_MESSAGE
ダイスボットの使い方
- ID
ゲームシステムの識別子
- NAME
ゲームシステム名
- SORT_KEY
ゲームシステム名の読みがな
Public Instance Methods
result_2d6(total, _dice_total, dice_list, cmp_op, target)
click to toggle source
ゲーム別成功度判定(2D6)
# File lib/bcdice/game_system/NjslyrBattle.rb, line 24 def result_2d6(total, _dice_total, dice_list, cmp_op, target) return Result.nothing if target == "?" return nil if cmp_op != :<= result = (total <= target ? Result.success("成功") : Result.failure("失敗")) result.text += juuten(dice_list) return result end
Private Instance Methods
juuten(dice_list)
click to toggle source
# File lib/bcdice/game_system/NjslyrBattle.rb, line 36 def juuten(dice_list) juuten = dice_list.count(1) + dice_list.count(6) if dice_list[0] == dice_list[1] juuten += 1 end if juuten > 0 " 重点 #{juuten} 溜まる" else "" end end