Class: BCDice::GameSystem::SteamPunkers::SPTable

Inherits:
DiceTable::D66RangeTable show all
Defined in:
lib/bcdice/game_system/SteamPunkers.rb

Overview

スチームパンカーズ用のテーブル

Constant Summary collapse

RANGE =

23..32 と 61..66 が6パターン分 その他が4パターン分

[11..14, 15..22, 23..32, 33..36, 41..44, 45..52, 53..56, 61..66].freeze

Instance Method Summary collapse

Methods inherited from DiceTable::D66RangeTable

#roll

Constructor Details

#initialize(name, items) ⇒ SPTable

Returns a new instance of SPTable.

Parameters:

  • name (String)
  • items (Array<String>)


79
80
81
82
83
84
85
86
87
# File 'lib/bcdice/game_system/SteamPunkers.rb', line 79

def initialize(name, items)
  if items.size != RANGE.size
    raise UnexpectedTableSize.new(name, items.size)
  end

  items_with_range = RANGE.zip(items)

  super(name, items_with_range)
end