Class: BCDice::GameSystem::ShadowRun4

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

Direct Known Subclasses

ShadowRun5

Constant Summary collapse

ID =

ゲームシステムの識別子

'ShadowRun4'
NAME =

ゲームシステム名

'シャドウラン 4th Edition'
SORT_KEY =

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

'しやとうらん4'
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\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

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

#translate

Constructor Details

#initialize(command) ⇒ ShadowRun4

Returns a new instance of ShadowRun4.



21
22
23
24
25
26
27
28
29
# File 'lib/bcdice/game_system/ShadowRun4.rb', line 21

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

Instance Method Details

#grich_text(numberSpot1, dice_cnt_total, successCount) ⇒ Object

シャドウラン4版用グリッチ判定



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/bcdice/game_system/ShadowRun4.rb', line 32

def grich_text(numberSpot1, dice_cnt_total, successCount)
  dice_cnt_total_half = (1.0 * dice_cnt_total / 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