class BCDice::GameSystem::Hieizan

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/Hieizan.rb, line 19
def result_1d100(total, _dice_total, cmp_op, target)
  return Result.nothing if target == '?'
  return nil unless cmp_op == :<=

  if total >= 100
    Result.fumble("大失敗")
  elsif total >= 96
    Result.failure("自動失敗")
  elsif total <= (target / 5)
    Result.critical("大成功")
  elsif total <= 1
    Result.success("自動成功")
  elsif total <= target
    Result.success("成功")
  else
    Result.failure("失敗")
  end
end