Class: BCDice::GameSystem::Hieizan
- Defined in:
- lib/bcdice/game_system/Hieizan.rb
Constant Summary collapse
- ID =
ゲームシステムの識別子
'Hieizan'
- NAME =
ゲームシステム名
'比叡山炎上'
- SORT_KEY =
ゲームシステム名の読みがな
'ひえいさんえんしよう'
- HELP_MESSAGE =
ダイスボットの使い方
"大成功、自動成功、失敗、自動失敗、大失敗の自動判定を行います。\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
ゲーム別成功度判定(1d100).
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_1D100(total, _dice_total, _cmp_op, target) ⇒ Object
ゲーム別成功度判定(1d100)
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/bcdice/game_system/Hieizan.rb', line 19 def check_1D100(total, _dice_total, _cmp_op, target) return '' if target == '?' if total <= 1 # 1は自動成功 if total <= (target / 5) " > 大成功" else " > 自動成功" end elsif total >= 100 # 00は大失敗(大失敗は自動失敗でもある) " > 大失敗" elsif total >= 96 # 96-00は自動失敗 " > 自動失敗" elsif total <= target if total <= (target / 5) # 目標値の1/5以下は大成功 " > 大成功" else " > 成功" end else " > 失敗" end end |