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 =
ダイスボットの使い方
"\u30FB\u5224\u5B9A\u306B\u304A\u3044\u3066\u30AF\u30EA\u30C6\u30A3\u30AB\u30EB\u30FB\u30D5\u30A1\u30F3\u30D6\u30EB\u306E\u81EA\u52D5\u5224\u5225\u3001\u6210\u529F\u5EA6\u306E\u81EA\u52D5\u8A08\u7B97\u3002(3d6<=\u76EE\u6A19\u5024\uFF0F\u76EE\u6A19\u5024-3d6)\n \u30FB\u795D\u798F\u7B49\u306E\u30C0\u30A4\u30B9\u76EE\u306B\u304B\u304B\u308B\u4FEE\u6B63\u306F\u300C3d6-1<=\u76EE\u6A19\u5024\u300D\u3068\u3044\u3063\u305F\u8A18\u8FF0\u3067\u8A08\u7B97\u3055\u308C\u307E\u3059\u3002(\u30C0\u30A4\u30B9\u76EE\u306E\u4FEE\u6B63\u5024\u306F\u30AF\u30EA\u30C6\u30A3\u30AB\u30EB\u30FB\u30D5\u30A1\u30F3\u30D6\u30EB\u306B\u5F71\u97FF\u3092\u4E0E\u3048\u307E\u305B\u3093)\n \u30FB\u30AF\u30EA\u30C6\u30A3\u30AB\u30EB\u5024\u30FB\u30D5\u30A1\u30F3\u30D6\u30EB\u5024\u3078\u306E\u4FEE\u6B63\u306B\u3064\u3044\u3066\u306F\u73FE\u5728\u5BFE\u5FDC\u3057\u3066\u3044\u307E\u305B\u3093\u3002\n\u30FB\u30AF\u30EA\u30C6\u30A3\u30AB\u30EB\u8868 (CRT)\n\u30FB\u982D\u90E8\u6253\u6483\u30AF\u30EA\u30C6\u30A3\u30AB\u30EB\u8868 (HCRT)\n\u30FB\u30D5\u30A1\u30F3\u30D6\u30EB\u8868 (FMB)\n\u30FB\u546A\u6587\u30D5\u30A1\u30F3\u30D6\u30EB\u8868 (MFMB)\n\u30FB\u5996\u9B54\u591C\u884C\u30B9\u30DA\u30B7\u30E3\u30EB\u30AF\u30EA\u30C6\u30A3\u30AB\u30EB\u8868 (YSCRT)\n\u30FB\u5996\u9B54\u591C\u884C\u30B9\u30DA\u30B7\u30E3\u30EB\u30D5\u30A1\u30F3\u30D6\u30EB\u8868 (YSFMB)\n\u30FB\u5996\u8853\u30D5\u30A1\u30F3\u30D6\u30EB\u8868 (YFMB)\n\u30FB\u547D\u4E2D\u90E8\u4F4D\u8868 (HIT)\n\u30FB\u6050\u6016\u8868 (FEAR+n)\n\u3000n\u306B\u306F\u6050\u6016\u5224\u5B9A\u306E\u5931\u6557\u5EA6\u3092\u5165\u308C\u3066\u304F\u3060\u3055\u3044\u3002\n\u30FB\u53CD\u5FDC\u5224\u5B9A\u8868 (REACT, REACT\u00B1n)\n\u3000n\u306B\u306F\u53CD\u5FDC\u4FEE\u6B63\u3092\u5165\u308C\u3066\u304F\u3060\u3055\u3044\u3002\n\u30FBD66\u30C0\u30A4\u30B9\u3042\u308A\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
- #eval_game_system_specific_command(command) ⇒ Object
-
#initialize(command) ⇒ GURPS
constructor
A new instance of GURPS.
-
#result_nd6(total, dice_total, dice_list, cmp_op, target) ⇒ Object
ゲーム別成功度判定(nD6).
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
#eval_game_system_specific_command(command) ⇒ Object
63 64 65 |
# File 'lib/bcdice/game_system/GURPS.rb', line 63 def eval_game_system_specific_command(command) roll_3d6(command) || roll_fear(command) || roll_react(command) || roll_tables(command, TABLES) end |
#result_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 |
# File 'lib/bcdice/game_system/GURPS.rb', line 44 def result_nd6(total, dice_total, dice_list, cmp_op, target) return nil if target == "?" return nil unless dice_list.size == 3 && cmp_op == :<= success = target - total # 成功度 if critical?(dice_total, target) Result.critical("クリティカル(成功度:#{success})") elsif fumble?(dice_total, target) Result.fumble("ファンブル(失敗度:#{success})") elsif dice_total >= 17 Result.failure("自動失敗(失敗度:#{success})") elsif total <= target Result.success("成功(成功度:#{success})") else Result.failure("失敗(失敗度:#{success})") end end |