Class: BCDice::GameSystem::OneWayHeroics::StatusDown
- Inherits:
-
Object
- Object
- BCDice::GameSystem::OneWayHeroics::StatusDown
- Defined in:
- lib/bcdice/game_system/one_way_heroics/tables.rb
Instance Method Summary collapse
-
#initialize(status, times) ⇒ StatusDown
constructor
A new instance of StatusDown.
- #roll(randomizer) ⇒ Object
Constructor Details
#initialize(status, times) ⇒ StatusDown
Returns a new instance of StatusDown.
28 29 30 31 |
# File 'lib/bcdice/game_system/one_way_heroics/tables.rb', line 28 def initialize(status, times) @status = status @times = times end |
Instance Method Details
#roll(randomizer) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/bcdice/game_system/one_way_heroics/tables.rb', line 33 def roll(randomizer) dice_list = randomizer.(@times, 6) total = dice_list.sum() sequence = [ "#{@status}が#{@times}D6減少する", "#{@times}D6[#{dice_list.join(',')}]", "#{@status}が #{total} 減少する" ] return sequence.join(" > ") end |