Class: BCDice::GameSystem::Warhammer4
- Defined in:
- lib/bcdice/game_system/Warhammer4.rb
Defined Under Namespace
Classes: CriticalTable
Constant Summary collapse
- ID =
ゲームシステムの識別子
'Warhammer4'- NAME =
ゲームシステム名
'ウォーハンマーRPG第4版'- SORT_KEY =
ゲームシステム名の読みがな
'うおおはんまあ4'- HELP_MESSAGE =
ダイスボットの使い方
"\u25A0 \u30AF\u30EA\u30C6\u30A3\u30AB\u30EB\u8868 (whctH, whctA, whctB, whctL, whctHU, whctAU, whctBU, whctLU)\n \"WH\u90E8\u4F4D \u9811\u5065\u30DC\u30FC\u30CA\u30B9\u4EE5\u4E0B\u30D5\u30E9\u30B0\"\u306E\u5F62\u3067\u6307\u5B9A\u3057\u307E\u3059\u3002\n \u90E8\u4F4D\u306F\u300CH(\u982D\u90E8)\u300D\u300CA(\u8155)\u300D\u300CB(\u80F4\u4F53)\u300D\u300CL(\u8DB3)\u300D\u306E\uFF14\u30AB\u6240\u3067\u3059\u3002\n \u9811\u5065\u30DC\u30FC\u30CA\u30B9\u30D5\u30E9\u30B0\u306F\u9811\u5065\u30DC\u30FC\u30CA\u30B9\u4EE5\u4E0B\u306E\u30C0\u30E1\u30FC\u30B8\u306E\u6642\u306BU\u3092\u3064\u3051\u307E\u3059\u3002\n \u4F8B\uFF09whctH whctAU WHCTL\n\n\u25A0 \u547D\u4E2D\u90E8\u4F4D\u8868 (WHLT)\n \u547D\u4E2D\u90E8\u4F4D\u3092\u30E9\u30F3\u30C0\u30E0\u306B\u6C7A\u5B9A\u3057\u307E\u3059\u3002(\u30AF\u30EA\u30C6\u30A3\u30AB\u30EB\u7528)\n\n\u25A0 \u3084\u3063\u3061\u307E\u3063\u305F\uFF01\u8868 (WHFT)\n\u3000\u3084\u3063\u3061\u307E\u3063\u305F\uFF01\u8868\u3092\u30ED\u30FC\u30EB\u3057\u3066\u3001\u7D50\u679C\u3092\u8868\u793A\u3057\u307E\u3059\u3002\n\n\u25A0 \u547D\u4E2D\u5224\u5B9A (WHx)\n \"WH(\u547D\u4E2D\u5024)\"\u306E\u5F62\u3067\u6307\u5B9A\u3057\u307E\u3059\u3002\n \u547D\u4E2D\u5224\u5B9A\u3092\u884C\u3063\u3066\u3001\u547D\u4E2D\u3057\u3066\u30AF\u30EA\u30C6\u30A3\u30AB\u30EB\u3067\u306A\u3051\u308C\u3070\u90E8\u4F4D\u3082\u8868\u793A\u3057\u307E\u3059\u3002\n \u4F8B\uFF09wh60\u3000\u3000wh(43-20)\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
- #check_1D100(total, _dice_total, cmp_op, target) ⇒ Object
- #eval_game_system_specific_command(command) ⇒ Object
-
#initialize(command) ⇒ Warhammer4
constructor
A new instance of Warhammer4.
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) ⇒ Warhammer4
37 38 39 40 41 |
# File 'lib/bcdice/game_system/Warhammer4.rb', line 37 def initialize(command) super(command) @round_type = RoundType::CEIL end |
Instance Method Details
#check_1D100(total, _dice_total, cmp_op, target) ⇒ Object
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/bcdice/game_system/Warhammer4.rb', line 47 def check_1D100(total, _dice_total, cmp_op, target) return '' if target == '?' return '' unless cmp_op == :<= t10 = total / 10 d10 = target / 10 sl = d10 - t10 if total <= 5 && sl < 1 # 自動成功時のSLは最低でも1 sl = 1 elsif total >= 96 && sl > -1 # 自動失敗時のSLは最大でも-1 sl = -1 end result = if total <= 5 "自動成功" elsif total >= 96 "自動失敗" elsif total <= target "成功" else "失敗" end sl_text = format("(SL%+d)", sl) " > #{result}#{sl_text} > #{result_detail(sl, total, target)}" end |
#eval_game_system_specific_command(command) ⇒ Object
43 44 45 |
# File 'lib/bcdice/game_system/Warhammer4.rb', line 43 def eval_game_system_specific_command(command) roll_critical_table(command) || roll_attack(command) || roll_tables(command, TABLES) end |