Class: BCDice::GameSystem::Insane
- Defined in:
- lib/bcdice/game_system/Insane.rb
Direct Known Subclasses
Constant Summary collapse
- ID =
ゲームシステムの識別子
'Insane'- NAME =
ゲームシステム名
'インセイン'- SORT_KEY =
ゲームシステム名の読みがな
'いんせいん'- HELP_MESSAGE =
ダイスボットの使い方
"\u30FB\u5224\u5B9A\uFF08\u30B9\u30DA\u30B7\u30E3\u30EB\uFF0F\u30D5\u30A1\u30F3\u30D6\u30EB\uFF0F\u6210\u529F\uFF0F\u5931\u6557\u3092\u5224\u5B9A\uFF09\n\u30FB\u5404\u7A2E\u8868\n\u30B7\u30FC\u30F3\u8868\u3000ST\n\u3000\u672C\u5F53\u306F\u6016\u3044\u73FE\u4EE3\u65E5\u672C\u30B7\u30FC\u30F3\u8868 HJST\uFF0F\u72C2\u9A12\u306E\u4E8C\u3007\u5E74\u4EE3\u30B7\u30FC\u30F3\u8868 MTST\n\u3000\u6697\u9ED2\u306E\u30F4\u30A3\u30AF\u30C8\u30EA\u30A2\u30B7\u30FC\u30F3\u8868 DVST\n\u5F62\u5BB9\u8868 DT\uFF0F\u672C\u4F53\u8868 BT\uFF0F\u90E8\u4F4D\u8868 PT\n\u611F\u60C5\u8868\u3000\u3000\u3000\u3000\u3000\u3000FT\n\u8077\u696D\u8868\u3000\u3000\u3000\u3000\u3000\u3000JT\n\u30D0\u30C3\u30C9\u30A8\u30F3\u30C9\u8868\u3000\u3000BET\n\u30E9\u30F3\u30C0\u30E0\u5206\u91CE\u8868\u3000\u3000RCT\n\u30E9\u30F3\u30C0\u30E0\u7279\u6280\u8868\u3000\u3000RTTn(n\uFF1A\u5206\u91CE\u756A\u53F7\u3001\u7701\u7565\u53EF\u80FD)\n 1\u66B4\u529B(TVT)\u30012\u60C5\u52D5(TET)\u30013\u77E5\u899A(TPT)\n 4\u6280\u8853(TST)\u30015\u77E5\u8B58(TKT)\u30016\u602A\u7570(TMT)\n\u30DB\u30E9\u30FC\u30B9\u30B1\u30FC\u30D7\u8868\n \u4F1A\u8A71(CHT) \uFF0F\u8857\u4E2D(VHT)\u3000\u3000\uFF0F\u4E0D\u610F\u8A2A\u554F(IHT)\n \u5EC3\u589F\u906D\u9047(RHT)\uFF0F\u91CE\u5916\u906D\u9047(MHT)\uFF0F\u60C5\u5831\u6F5C\u5728(LHT)\n\u906D\u9047\u8868\u3000\u90FD\u5E02(ECT)\uFF0F\u5C71\u6797(EMT)\uFF0F\u6D77\u8FBA(EAT)\uFF0F\u53CD\u5FDC\u8868\u3000RET\n\u6B8B\u696D\u30DB\u30E9\u30FC\u30B9\u30B1\u30FC\u30D7\u8868(OHT)\u3000 \uFF0F\u6B8B\u696D\u96FB\u8A71\u8868(OPT)\uFF0F\u6B8B\u696D\u30B7\u30FC\u30F3\u8868(OWT)\n\u793E\u540D\u6C7A\u5B9A\u88681(CNT1)\uFF0F\u793E\u540D\u6C7A\u5B9A\u88682(CNT2)\uFF0F\u793E\u540D\u6C7A\u5B9A\u88683(CNT3)\n\u66AB\u5B9A\u6574\u7406\u756A\u53F7\u4F5C\u6210\u8868(IRN)\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) ⇒ Insane
constructor
A new instance of Insane.
-
#result_2d6(total, dice_total, _dice_list, cmp_op, target) ⇒ Object
ゲーム別成功度判定(2D6).
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) ⇒ Insane
40 41 42 43 44 45 46 |
# File 'lib/bcdice/game_system/Insane.rb', line 40 def initialize(command) super(command) @sort_add_dice = true = true @d66_sort_type = D66SortType::ASC end |
Instance Method Details
#eval_game_system_specific_command(command) ⇒ Object
65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/bcdice/game_system/Insane.rb', line 65 def eval_game_system_specific_command(command) case command when 'BET' type = translate("Insane.BET.name") output, total_n = get_badend_table when 'IRN' type = translate("Insane.IRN.name") output, total_n = get_interim_reference_number else return self.class::RTT.roll_command(@randomizer, command) || roll_tables(command, self.class::TABLES) end return "#{type}(#{total_n}) > #{output}" end |
#result_2d6(total, dice_total, _dice_list, cmp_op, target) ⇒ Object
ゲーム別成功度判定(2D6)
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/bcdice/game_system/Insane.rb', line 49 def result_2d6(total, dice_total, _dice_list, cmp_op, target) return nil unless cmp_op == :>= if dice_total <= 2 Result.fumble(translate("Insane.fumble")) elsif dice_total >= 12 Result.critical(translate("Insane.special")) elsif target == "?" Result.nothing elsif total >= target Result.success(translate("success")) else Result.failure(translate("failure")) end end |