class BCDice::GameSystem::ShadowRun5
Constants
- HELP_MESSAGE
ダイスボットの使い方
- ID
ゲームシステムの識別子
- NAME
ゲームシステム名
- SORT_KEY
ゲームシステム名の読みがな
Public Class Methods
new(command)
click to toggle source
Calls superclass method
BCDice::GameSystem::ShadowRun4::new
# File lib/bcdice/game_system/ShadowRun5.rb, line 26 def initialize(command) super(command) @sort_add_dice = true @sort_barabara_dice = true @reroll_dice_reroll_threshold = 6 # RerollDiceで振り足しをする出目の閾値 @default_cmp_op = :>= @default_target_number = 5 end
Public Instance Methods
eval_game_system_specific_command(command)
click to toggle source
シャドウラン5版 リミット時のテスト
# 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::BarabaraDice.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)
click to toggle source
シャドウラン5版用グリッチ判定
# 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