Class: BCDice::GameSystem::EclipsePhase
- Defined in:
- lib/bcdice/game_system/EclipsePhase.rb
Constant Summary collapse
- ID =
ゲームシステムの識別子
'EclipsePhase'
- NAME =
ゲームシステム名
'エクリプス・フェイズ'
- SORT_KEY =
ゲームシステム名の読みがな
'えくりふすふえいす'
- HELP_MESSAGE =
ダイスボットの使い方
'1D100<=m 方式の判定で成否、クリティカル・ファンブルを自動判定'
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
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
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 46 47 48 |
# File 'lib/bcdice/game_system/EclipsePhase.rb', line 19 def check_1D100(total, _dice_total, cmp_op, target) return '' if target == '?' return '' unless cmp_op == :<= diceValue = total % 100 # 出目00は100ではなく00とする dice_ten_place = diceValue / 10 dice_one_place = diceValue % 10 if dice_ten_place == dice_one_place return ' > 決定的失敗' if diceValue == 99 return ' > 00 > 決定的成功' if diceValue == 0 return ' > 決定的成功' if total <= target return ' > 決定的失敗' end diff_threshold = 30 if total <= target if total >= diff_threshold ' > エクセレント' else ' > 成功' end elsif (total - target) >= diff_threshold ' > シビア' else ' > 失敗' end end |