Class: BCDice::GameSystem::StratoShout

Inherits:
Base
  • Object
show all
Defined in:
lib/bcdice/game_system/StratoShout.rb

Direct Known Subclasses

StratoShout_Korean

Constant Summary collapse

ID =

ゲームシステムの識別子

'StratoShout'
NAME =

ゲームシステム名

'ストラトシャウト'
SORT_KEY =

ゲームシステム名の読みがな

'すとらとしやうと'
HELP_MESSAGE =

ダイスボットの使い方

"\nVOT, GUT, BAT, KEYT, DRT: (\u30DC\u30FC\u30AB\u30EB\u3001\u30AE\u30BF\u30FC\u3001\u30D9\u30FC\u30B9\u3001\u30AD\u30FC\u30DC\u30FC\u30C9\u3001\u30C9\u30E9\u30E0)\u30C8\u30E9\u30D6\u30EB\u8868\nEMO: \u611F\u60C5\u8868\nATn, RTTn: \u7279\u6280\u8868(n\uFF1D\u5206\u91CE\u3002\u7A7A:\u30E9\u30F3\u30C0\u30E0 1:\u4E3B\u7FA9 2:\u8EAB\u4F53 3:\u30E2\u30C1\u30FC\u30D5 4:\u30A8\u30E2\u30FC\u30B7\u30E7\u30F3 5:\u884C\u52D5 6:\u9006\u5883)\nRCT: \u5206\u91CE\u30E9\u30F3\u30C0\u30E0\u8868\nSCENE, MACHI, GAKKO, BAND: (\u6C4E\u7528\u3001\u8857\u89D2\u3001\u5B66\u6821\u3001\u30D0\u30F3\u30C9)\u30B7\u30FC\u30F3\u8868 \u63A5\u8FD1\u30B7\u30FC\u30F3\u3067\u4F7F\u7528\nTENKAI: \u30B7\u30FC\u30F3\u5C55\u958B\u8868 \u5954\u8D70\u30B7\u30FC\u30F3 \u7DF4\u7FD2\u30B7\u30FC\u30F3\u3067\u4F7F\u7528\n\nD66\u5165\u308C\u66FF\u3048\u3042\u308A\n"
TABLES =
translate_tables(:ja_jp)
RTT =
translate_rtt(:ja_jp)

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, prefixes_pattern, register_prefix, register_prefix_from_super_class, #sort_add_dice?, #sort_barabara_dice?

Methods included from Translate

#translate

Constructor Details

#initialize(command) ⇒ StratoShout

Returns a new instance of StratoShout.



28
29
30
31
32
33
# File 'lib/bcdice/game_system/StratoShout.rb', line 28

def initialize(command)
  super(command)

  @sort_add_dice = true
  @d66_sort_type = D66SortType::ASC
end

Instance Method Details

#eval_game_system_specific_command(command) ⇒ Object



45
46
47
# File 'lib/bcdice/game_system/StratoShout.rb', line 45

def eval_game_system_specific_command(command)
  roll_tables(command, self.class::TABLES) || self.class::RTT.roll_command(@randomizer, command)
end

#result_2d6(_total, dice_total, _dice_list, cmp_op, _target) ⇒ Object



35
36
37
38
39
40
41
42
43
# File 'lib/bcdice/game_system/StratoShout.rb', line 35

def result_2d6(_total, dice_total, _dice_list, cmp_op, _target)
  return nil unless cmp_op == :>=

  if dice_total <= 2
    Result.fumble(translate("StratoShout.fumble"))
  elsif dice_total >= 12
    Result.critical(translate("StratoShout.critical"))
  end
end