Class: BCDice::GameSystem::OneWayHeroics::BranchByElapsedDays

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

Instance Method Summary collapse

Methods inherited from BranchByDay

#initialize, #roll_with_day

Constructor Details

This class inherits a constructor from BCDice::GameSystem::OneWayHeroics::BranchByDay

Instance Method Details

#branch_result(value, day) ⇒ Object



80
81
82
83
84
85
86
# File 'lib/bcdice/game_system/one_way_heroics/random_event_table.rb', line 80

def branch_result(value, day)
  if value > day
    "日数[#{day}]を超えている"
  else
    "日数[#{day}]以下"
  end
end

#choice(value, day) ⇒ Object



76
77
78
# File 'lib/bcdice/game_system/one_way_heroics/random_event_table.rb', line 76

def choice(value, day)
  value > day ? @greater : @less_than_equal
end