Class: BCDice::GameSystem::StellarLife::StellarLifeD10Table

Inherits:
DiceTable::Table show all
Defined in:
lib/bcdice/game_system/StellarLife.rb

Defined Under Namespace

Classes: RollResult

Instance Method Summary collapse

Methods inherited from DiceTable::Table

from_i18n, #roll

Constructor Details

#initialize(name, items) ⇒ StellarLifeD10Table

Returns a new instance of StellarLifeD10Table.



102
103
104
# File 'lib/bcdice/game_system/StellarLife.rb', line 102

def initialize(name, items)
  super(name, '1D10', items)
end

Instance Method Details

#choice(value) ⇒ Object



106
107
108
109
# File 'lib/bcdice/game_system/StellarLife.rb', line 106

def choice(value)
  index = value - @times
  return RollResult.new(@name, value, @items[index])
end