class BCDice::GameSystem::HuntersMoon
Constants
- HELP_MESSAGE
ダイスボットの使い方
- ID
ゲームシステムの識別子
- NAME
ゲームシステム名
- RTT
- SORT_KEY
ゲームシステム名の読みがな
- TABLES
Public Class Methods
new(command)
click to toggle source
Calls superclass method
BCDice::Base::new
# File lib/bcdice/game_system/HuntersMoon.rb, line 41 def initialize(command) super(command) @sort_add_dice = true @d66_sort_type = D66SortType::ASC @round_type = RoundType::CEIL # 端数切り上げに設定 end
Public Instance Methods
eval_game_system_specific_command(command)
click to toggle source
# File lib/bcdice/game_system/HuntersMoon.rb, line 60 def eval_game_system_specific_command(command) case command when /^SA/i roll_strange_ability_table(command) else roll_tables(command, TABLES) || RTT.roll_command(randomizer, command) end end
result_2d6(_total, dice_total, _dice_list, cmp_op, _target)
click to toggle source
ゲーム別成功度判定(2D6)
# File lib/bcdice/game_system/HuntersMoon.rb, line 50 def result_2d6(_total, dice_total, _dice_list, cmp_op, _target) return nil unless cmp_op == :>= if dice_total <= 2 Result.fumble("ファンブル(モノビースト追加行動+1)") elsif dice_total >= 12 Result.critical("スペシャル(変調1つ回復orダメージ+1D6)") end end
roll_strange_ability_table(command)
click to toggle source
# File lib/bcdice/game_system/HuntersMoon.rb, line 69 def roll_strange_ability_table(command) m = /^SA(2)?T(\d+)?$/.match(command) unless m return nil end count = m[2]&.to_i || 1 type2 = !m[1].nil? table = type2 ? StrangeAbilityTable2.new : StrangeAbilityTable1.new dice_list = [] chosen_list = [] count.times do table.roll(@randomizer) dice_list << table.dice chosen_list << table.chosen end dice = dice_list.join(",") chosen = chosen_list.join("/") return "異形アビリティー表(#{dice}) > #{chosen}" end