Class: BCDice::GameSystem::GURPS
- Defined in:
- lib/bcdice/game_system/GURPS.rb
Defined Under Namespace
Classes: Tuple
Constant Summary collapse
- ID =
ゲームシステムの識別子
'GURPS'- NAME =
ゲームシステム名
'ガープス'- SORT_KEY =
ゲームシステム名の読みがな
'かあふす'- HELP_MESSAGE =
ダイスボットの使い方
<<~INFO_MESSAGE_TEXT ・判定においてクリティカル・ファンブルの自動判別、成功度の自動計算。(3d6<=目標値/目標値-3d6) ・祝福等のダイス目にかかる修正は「3d6-1<=目標値」といった記述で計算されます。(ダイス目の修正値はクリティカル・ファンブルに影響を与えません) ・クリティカル値・ファンブル値への修正については現在対応していません。 ・クリティカル表 (CRT) ・頭部打撃クリティカル表 (HCRT) ・ファンブル表 (FMB) ・呪文ファンブル表 (MFMB) ・妖魔夜行スペシャルクリティカル表 (YSCRT) ・妖魔夜行スペシャルファンブル表 (YSFMB) ・妖術ファンブル表 (YFMB) ・命中部位表 (HIT) ・恐怖表 (FEAR+n) nには恐怖判定の失敗度を入れてください。 ・反応判定表 (REACT, REACT±n) nには反応修正を入れてください。 ・D66ダイスあり INFO_MESSAGE_TEXT
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
-
#check_nD6(total, dice_total, dice_list, cmp_op, target) ⇒ Object
ゲーム別成功度判定(nD6).
- #eval_game_system_specific_command(command) ⇒ Object
-
#initialize(command) ⇒ GURPS
constructor
A new instance of GURPS.
Methods inherited from Base
#change_text, #check_result, command_pattern, #enable_debug, #enabled_d9?, #eval, eval, #grich_text, prefixes_pattern, register_prefix, register_prefix_from_super_class, #sort_add_dice?, #sort_barabara_dice?
Methods included from Translate
Constructor Details
#initialize(command) ⇒ GURPS
Returns a new instance of GURPS.
37 38 39 40 41 |
# File 'lib/bcdice/game_system/GURPS.rb', line 37 def initialize(command) super(command) @d66_sort_type = D66SortType::NO_SORT end |
Instance Method Details
#check_nD6(total, dice_total, dice_list, cmp_op, target) ⇒ Object
ゲーム別成功度判定(nD6)
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/bcdice/game_system/GURPS.rb', line 44 def check_nD6(total, dice_total, dice_list, cmp_op, target) return '' if target == '?' return '' unless dice_list.size == 3 && cmp_op == :<= success = target - total # 成功度 result = if critical?(dice_total, target) "クリティカル(成功度:#{success})" elsif fumble?(dice_total, target) "ファンブル(失敗度:#{success})" elsif dice_total >= 17 "自動失敗(失敗度:#{success})" elsif total <= target "成功(成功度:#{success})" else "失敗(失敗度:#{success})" end " > #{result}" end |
#eval_game_system_specific_command(command) ⇒ Object
66 67 68 |
# File 'lib/bcdice/game_system/GURPS.rb', line 66 def eval_game_system_specific_command(command) roll_3d6(command) || roll_fear(command) || roll_react(command) || roll_tables(command, TABLES) end |