Class: BCDice::GameSystem::SRS
- Defined in:
 - lib/bcdice/game_system/SRS.rb
 
Direct Known Subclasses
Alshard, EtrianOdysseySRS, FullMetalPanic, MetallicGuardian, TenkaRyouran
Defined Under Namespace
Modules: ClassMethods Classes: SRSRollNode
Constant Summary collapse
- ID =
          
ゲームシステムの識別子
 'SRS'- NAME =
          
ゲームシステム名
 'スタンダードRPGシステム'- SORT_KEY =
          
ゲームシステム名の読みがな
 'すたんたあとRPGしすてむ'- HELP_MESSAGE_1 =
 <<~HELP_MESSAGE ・判定 ・通常判定:2D6+m@c#f>=t または 2D6+m>=t[c,f] 修正値m、目標値t、クリティカル値c、ファンブル値fで判定ロールを行います。 修正値、クリティカル値、ファンブル値は省略可能です([]ごと省略可、@c・#fの指定は順不同)。 クリティカル値、ファンブル値の既定値は、それぞれ12、2です。 自動成功、自動失敗、成功、失敗を自動表示します。 例) 2d6>=10 修正値0、目標値10で判定 例) 2d6+2>=10 修正値+2、目標値10で判定 例) 2d6+2>=10[11] ↑をクリティカル値11で判定 例) 2d6+2@11>=10 ↑をクリティカル値11で判定 例) 2d6+2>=10[12,4] ↑をクリティカル値12、ファンブル値4で判定 例) 2d6+2@12#4>=10 ↑をクリティカル値12、ファンブル値4で判定 例) 2d6+2>=10[,4] ↑をクリティカル値12、ファンブル値4で判定(クリティカル値の省略) 例) 2d6+2#4>=10 ↑をクリティカル値12、ファンブル値4で判定(クリティカル値の省略) HELP_MESSAGE
- HELP_MESSAGE_2 =
 <<~HELP_MESSAGE ・クリティカルおよびファンブルのみの判定:2D6+m@c#f または 2D6+m[c,f] 目標値を指定せず、修正値m、クリティカル値c、ファンブル値fで判定ロールを行います。 修正値、クリティカル値、ファンブル値は省略可能です([]は省略不可、@c・#fの指定は順不同)。 自動成功、自動失敗を自動表示します。 例) 2d6[] 修正値0、クリティカル値12、ファンブル値2で判定 例) 2d6+2[11] 修正値+2、クリティカル値11、ファンブル値2で判定 例) 2d6+2@11 修正値+2、クリティカル値11、ファンブル値2で判定 例) 2d6+2[12,4] 修正値+2、クリティカル値12、ファンブル値4で判定 例) 2d6+2@12#4 修正値+2、クリティカル値12、ファンブル値4で判定 HELP_MESSAGE
- HELP_MESSAGE_3 =
 <<~HELP_MESSAGE ・D66ダイスあり(入れ替えなし) HELP_MESSAGE
- DEFAULT_HELP_MESSAGE =
          
既定のダイスボット説明文
 "#{HELP_MESSAGE_1}\n#{HELP_MESSAGE_2}\n#{HELP_MESSAGE_3}"- HELP_MESSAGE =
 DEFAULT_HELP_MESSAGE- DEFAULT_CRITICAL_VALUE =
          
既定のクリティカル値
 12- DEFAULT_FUMBLE_VALUE =
          
既定のファンブル値
 2
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
Class Method Summary collapse
- 
  
    
      .aliases  ⇒ Array<String> 
    
    
  
  
  
  
  
  
  
  
  
    
成功判定のエイリアスコマンドの一覧.
 - 
  
    
      .help_message  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    
ダイスボットの説明文を返す.
 - 
  
    
      .inherited(subclass)  ⇒ void 
    
    
  
  
  
  
  
  
  
  
  
    
クラスが継承されたときに行う処理.
 
Instance Method Summary collapse
- 
  
    
      #aliases  ⇒ Array<String> 
    
    
  
  
  
  
  
  
  
  
  
    
成功判定のエイリアスコマンドの一覧.
 - 
  
    
      #eval_game_system_specific_command(command)  ⇒ Result? 
    
    
  
  
  
  
  
  
  
  
  
    
固有のダイスロールコマンドを実行する.
 - 
  
    
      #help_message  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    
ダイスボットの説明文を返す.
 - 
  
    
      #initialize(command)  ⇒ SRS 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
ダイスボットを初期化する.
 
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
Constructor Details
#initialize(command) ⇒ SRS
ダイスボットを初期化する
      146 147 148 149 150 151 152 153 154 155  | 
    
      # File 'lib/bcdice/game_system/SRS.rb', line 146 def initialize(command) super(command) # 式、出目ともに送信する # バラバラロール(Bコマンド)でソートする @sort_add_dice = true # D66ダイスあり(出目をソートしない) @d66_sort_type = D66SortType::NO_SORT end  | 
  
Class Method Details
.aliases ⇒ Array<String>
成功判定のエイリアスコマンドの一覧
      137 138 139  | 
    
      # File 'lib/bcdice/game_system/SRS.rb', line 137 def aliases [] end  | 
  
.help_message ⇒ String
ダイスボットの説明文を返す
      131 132 133  | 
    
      # File 'lib/bcdice/game_system/SRS.rb', line 131 def DEFAULT_HELP_MESSAGE end  | 
  
.inherited(subclass) ⇒ void
This method returns an undefined value.
クラスが継承されたときに行う処理
      123 124 125 126 127  | 
    
      # File 'lib/bcdice/game_system/SRS.rb', line 123 def inherited(subclass) subclass .extend(ClassMethods) .clear_aliases_for_srs_roll end  | 
  
Instance Method Details
#aliases ⇒ Array<String>
成功判定のエイリアスコマンドの一覧
      165 166 167  | 
    
      # File 'lib/bcdice/game_system/SRS.rb', line 165 def aliases self.class.aliases end  | 
  
#eval_game_system_specific_command(command) ⇒ Result?
固有のダイスロールコマンドを実行する
      191 192 193 194 195 196 197 198 199 200 201 202 203 204 205  | 
    
      # File 'lib/bcdice/game_system/SRS.rb', line 191 def eval_game_system_specific_command(command) legacy_c_f_match = /(.+)\[(.*)\]\z/.match(command) node = if legacy_c_f_match parse_legacy(legacy_c_f_match[1], legacy_c_f_match[2]) else parse(command) end if node return execute_srs_roll(node) end return nil end  | 
  
#help_message ⇒ String
ダイスボットの説明文を返す
      159 160 161  | 
    
      # File 'lib/bcdice/game_system/SRS.rb', line 159 def self.class. end  |