15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/bcdice/game_system/beginning_idol/random_event_table.rb', line 15
def roll(randomizer)
first_index = randomizer.roll_once(6)
d66_index = randomizer.roll_d66(D66SortType::NO_SORT)
i18n_key = first_index.even? ? "BeginningIdol.RE.on_event" : "BeginningIdol.RE.off_event"
table = I18n.t(i18n_key, locale: @locale)
name = I18n.t("BeginningIdol.RE.name", locale: @locale)
result_format = I18n.t("BeginningIdol.RE.format", locale: @locale)
chosen = table[:items][d66_index]
return "#{name} > (1D6) > #{first_index}\n#{table[:name]} > [#{d66_index}] > #{format(result_format, event: chosen[0], page: chosen[1])}"
end
|