Class: BCDice::GameSystem::ShadowRun5
- Inherits:
-
ShadowRun4
- Object
- Base
- ShadowRun4
- BCDice::GameSystem::ShadowRun5
- Defined in:
- lib/bcdice/game_system/ShadowRun5.rb
Constant Summary collapse
- ID =
ゲームシステムの識別子
'ShadowRun5'- NAME =
ゲームシステム名
'シャドウラン 5th Edition'- SORT_KEY =
ゲームシステム名の読みがな
'しやとうらん5'- HELP_MESSAGE =
ダイスボットの使い方
"\u500B\u6570\u632F\u308A\u8DB3\u3057\u30ED\u30FC\u30EB(xRn)\u306E\u5883\u754C\u5024\u30926\u306B\u30BB\u30C3\u30C8\u3001\u30D0\u30E9\u30D0\u30E9\u30ED\u30FC\u30EB(xBn)\u306E\u76EE\u6A19\u5024\u30925\u4EE5\u4E0A\u306B\u30BB\u30C3\u30C8\u3057\u307E\u3059\u3002\n\u30D0\u30E9\u30D0\u30E9\u30ED\u30FC\u30EB(xBn)\u306E\u307F\u3001\u30EA\u30DF\u30C3\u30C8\u3092\u30BB\u30C3\u30C8\u3067\u304D\u307E\u3059\u3002\u30EA\u30DF\u30C3\u30C8\u306E\u6307\u5B9A\u306F(xBn@l)\u306E\u3088\u3046\u306B\u6307\u5B9A\u3057\u307E\u3059\u3002(\u7701\u7565\u53EF)\nB\u30B3\u30DE\u30F3\u30C9\u3068R\u30B3\u30DE\u30F3\u30C9\u6642\u306B\u3001\u30B0\u30EA\u30C3\u30C1\u306E\u8868\u793A\u3092\u884C\u3044\u307E\u3059\u3002\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
-
#eval_game_system_specific_command(command) ⇒ Object
シャドウラン5版 リミット時のテスト.
-
#grich_text(numberSpot1, dice_cnt_total, successCount) ⇒ Object
シャドウラン5版用グリッチ判定.
-
#initialize(command) ⇒ ShadowRun5
constructor
A new instance of ShadowRun5.
Methods inherited from Base
#change_text, #check_result, command_pattern, #enable_debug, #enabled_d9?, #eval, eval, prefixes_pattern, register_prefix, register_prefix_from_super_class, #sort_add_dice?, #sort_barabara_dice?
Methods included from Translate
Constructor Details
#initialize(command) ⇒ ShadowRun5
Returns a new instance of ShadowRun5.
26 27 28 29 30 31 32 33 34 |
# File 'lib/bcdice/game_system/ShadowRun5.rb', line 26 def initialize(command) super(command) @sort_add_dice = true = true @reroll_dice_reroll_threshold = 6 # RerollDiceで振り足しをする出目の閾値 @default_cmp_op = :>= @default_target_number = 5 end |
Instance Method Details
#eval_game_system_specific_command(command) ⇒ Object
シャドウラン5版 リミット時のテスト
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/bcdice/game_system/ShadowRun5.rb', line 37 def eval_game_system_specific_command(command) debug('chatch limit prefix') m = /(\d+B6)@(\d+)/.match(command) b_dice = m[1] limit = m[2].to_i output_before_limited = BCDice::CommonCommand::.eval(b_dice, self, @randomizer).text m = /成功数(\d+)/.match(output_before_limited) output_after_limited = output_before_limited before_suc_cnt = m[1].to_i if before_suc_cnt > limit after_suc_cnt = limit over_suc_cnt = before_suc_cnt - limit output_after_limited = output_before_limited.gsub(/成功数(\d+)/, "成功数#{after_suc_cnt}") output_after_limited += "(リミット超過#{over_suc_cnt})" end output = output_after_limited output = output.gsub('B', 'B6') output = output.gsub('6>=5', "[6]Limit[#{limit}]>=5") debug(output) return output end |
#grich_text(numberSpot1, dice_cnt_total, successCount) ⇒ Object
シャドウラン5版用グリッチ判定
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/bcdice/game_system/ShadowRun5.rb', line 63 def grich_text(numberSpot1, dice_cnt_total, successCount) dice_cnt_total_half = dice_cnt_total.to_f / 2 debug("dice_cnt_total_half", dice_cnt_total_half) unless numberSpot1 > dice_cnt_total_half return nil end # グリッチ! if successCount == 0 'クリティカルグリッチ' else 'グリッチ' end end |