Class: BCDice::GameSystem::Arianrhod
- Defined in:
- lib/bcdice/game_system/Arianrhod.rb
Direct Known Subclasses
Constant Summary collapse
- ID =
ゲームシステムの識別子
'Arianrhod'
- NAME =
ゲームシステム名
'アリアンロッドRPG'
- SORT_KEY =
ゲームシステム名の読みがな
'ありあんろつとRPG'
- HELP_MESSAGE =
ダイスボットの使い方
<<~INFO_MESSAGE_TEXT ・クリティカル、ファンブルの自動判定を行います。(クリティカル時の追加ダメージも表示されます) ・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
-
#initialize(command) ⇒ Arianrhod
constructor
A new instance of Arianrhod.
- #result_nd6(total, _dice_total, dice_list, cmp_op, target) ⇒ Object
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) ⇒ Arianrhod
Returns a new instance of Arianrhod.
21 22 23 24 25 26 |
# File 'lib/bcdice/game_system/Arianrhod.rb', line 21 def initialize(command) super(command) @sort_add_dice = true @d66_sort_type = D66SortType::NO_SORT end |
Instance Method Details
#result_nd6(total, _dice_total, dice_list, cmp_op, target) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/bcdice/game_system/Arianrhod.rb', line 28 def result_nd6(total, _dice_total, dice_list, cmp_op, target) n_max = dice_list.count(6) if dice_list.count(1) == dice_list.size # 全部1の目ならファンブル Result.fumble(translate("fumble")) elsif n_max >= 2 # 2個以上6の目があったらクリティカル Result.critical(translate("Arianrhod.critical", dice: n_max)) elsif cmp_op != :>= || target == '?' nil elsif total >= target Result.success(translate("success")) else Result.failure(translate("failure")) end end |