Class: BCDice::GameSystem::ShuumatsuKikou::FiveItemsTable

Inherits:
DiceTable::RangeTable show all
Defined in:
lib/bcdice/game_system/ShuumatsuKikou.rb

Overview

5要素のテーブル. 1D6 を [1..2, 3, 4, 5, 6] の5通りに割り振る.

Constant Summary

Constants inherited from DiceTable::RangeTable

DiceTable::RangeTable::DEFAULT_FORMATTER, DiceTable::RangeTable::DICE_ROLL_METHOD_RE

Instance Attribute Summary

Attributes inherited from DiceTable::RangeTable

#name, #num_of_dice, #num_of_sides

Instance Method Summary collapse

Methods inherited from DiceTable::RangeTable

conv_string_range, #fetch, from_i18n, #roll

Constructor Details

#initialize(name, item1, item2, item3, item4, item5) ⇒ FiveItemsTable

Returns a new instance of FiveItemsTable.



61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/bcdice/game_system/ShuumatsuKikou.rb', line 61

def initialize(name, item1, item2, item3, item4, item5)
  super(
    name,
    "1D6",
    [
      [1..2, item1],
      [3, item2],
      [4, item3],
      [5, item4],
      [6, item5],
    ]
  )
end