Class: BCDice::GameSystem::Pendragon

Inherits:
Base
  • Object
show all
Defined in:
lib/bcdice/game_system/Pendragon.rb

Constant Summary collapse

ID =

ゲームシステムの識別子

'Pendragon'
NAME =

ゲームシステム名

'ペンドラゴン'
SORT_KEY =

ゲームシステム名の読みがな

'へんとらこん'
HELP_MESSAGE =

ダイスボットの使い方

"\u30AF\u30EA\u30C6\u30A3\u30AB\u30EB\u3001\u6210\u529F\u3001\u5931\u6557\u3001\u30D5\u30A1\u30F3\u30D6\u30EB\u306E\u81EA\u52D5\u5224\u5B9A\u3092\u884C\u3044\u307E\u3059\u3002\n"

Instance Attribute Summary

Attributes inherited from Base

#d66_sort_type, #default_cmp_op, #default_target_number, #randomizer, #reroll_dice_reroll_threshold, #round_type, #sides_implicit_d, #upper_dice_reroll_threshold

Instance Method Summary collapse

Methods inherited from Base

#change_text, #check_result, command_pattern, #enable_debug, #enabled_d9?, #eval, eval, #grich_text, #initialize, prefixes_pattern, register_prefix, register_prefix_from_super_class, #sort_add_dice?, #sort_barabara_dice?

Methods included from Translate

#translate

Constructor Details

This class inherits a constructor from BCDice::Base

Instance Method Details

#check_1D20(total, _dice_total, cmp_op, target) ⇒ Object

ゲーム別成功度判定(1d20)



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/bcdice/game_system/Pendragon.rb', line 21

def check_1D20(total, _dice_total, cmp_op, target)
  return '' if target == '?'
  return '' unless cmp_op == :<=

  if total <= target
    if (total >= (40 - target)) || (total == target)
      " > クリティカル"
    else
      " > 成功"
    end
  elsif total == 20
    " > ファンブル"
  else
    " > 失敗"
  end
end