Class: BCDice::GameSystem::OneWayHeroics::MoveToTableWithDay

Inherits:
Object
  • Object
show all
Defined in:
lib/bcdice/game_system/one_way_heroics/random_event_table.rb

Instance Method Summary collapse

Constructor Details

#initialize(text, table) ⇒ MoveToTableWithDay

Returns a new instance of MoveToTableWithDay.



104
105
106
107
# File 'lib/bcdice/game_system/one_way_heroics/random_event_table.rb', line 104

def initialize(text, table)
  @text = text
  @table = table
end

Instance Method Details

#roll_with_day(day, randomizer) ⇒ Object



109
110
111
112
113
114
# File 'lib/bcdice/game_system/one_way_heroics/random_event_table.rb', line 109

def roll_with_day(day, randomizer)
  <<~RESULT.chomp
    #{@text}     #{@table.key}#{day}#{@table.roll_with_day(day, randomizer)}
  RESULT
end