Class: BCDice::GameSystem::NjslyrBattle
- Defined in:
- lib/bcdice/game_system/NjslyrBattle.rb
Constant Summary collapse
- ID =
ゲームシステムの識別子
'NjslyrBattle'- NAME =
ゲームシステム名
'NJSLYRBATTLE'- SORT_KEY =
ゲームシステム名の読みがな
'にんしやすれいやあはとる'- HELP_MESSAGE =
ダイスボットの使い方
"\u30FB\u30AB\u30E9\u30C6\u30ED\u30FC\u30EB\n2d6<=(\u30AB\u30E9\u30C6\u70B9)\n\u4F8B\uFF092d6<=5\n(2D6<=5) \uFF1E 2[1,1] \uFF1E 2 \uFF1E \u6210\u529F \u91CD\u70B9 3 \u6E9C\u307E\u308B\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_2D6(total, _dice_total, dice_list, cmp_op, target) ⇒ Object
ゲーム別成功度判定(2D6).
- #juuten(dice_list) ⇒ Object
- #success_text(total, target) ⇒ Object
Methods inherited from Base
#change_text, #check_result, command_pattern, #enable_debug, #enabled_d9?, #eval, eval, #grich_text, #initialize, prefixes_pattern, register_prefix, register_prefix_from_super_class, #sort_add_dice?, #sort_barabara_dice?
Methods included from Translate
Constructor Details
This class inherits a constructor from BCDice::Base
Instance Method Details
#check_2D6(total, _dice_total, dice_list, cmp_op, target) ⇒ Object
ゲーム別成功度判定(2D6)
24 25 26 27 28 29 |
# File 'lib/bcdice/game_system/NjslyrBattle.rb', line 24 def check_2D6(total, _dice_total, dice_list, cmp_op, target) return '' if target == '?' return '' if cmp_op != :<= return success_text(total, target) + juuten(dice_list) end |
#juuten(dice_list) ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/bcdice/game_system/NjslyrBattle.rb', line 39 def juuten(dice_list) juuten = dice_list.count(1) + dice_list.count(6) if dice_list[0] == dice_list[1] juuten += 1 end if juuten > 0 " 重点 #{juuten} 溜まる" else "" end end |
#success_text(total, target) ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/bcdice/game_system/NjslyrBattle.rb', line 31 def success_text(total, target) if total <= target " > 成功" else " > 失敗" end end |