Skip to content

Commit

Permalink
BattleTech: CDx: Randomizer#roll_barabaraを使う
Browse files Browse the repository at this point in the history
Repeatコマンドで同じRandomizerインスタンスが使いまわされるので、
`Randomizer#rand_results` から出目の情報を取得すると意図しない状況に
なるかもしれない。
  • Loading branch information
ochaochaocha3 committed May 4, 2021
1 parent ca0f818 commit 35579e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/bcdice/game_system/BattleTech.rb
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ def consciousness_roll(damage)
target = consciousness_table[damage]
expr = "(2D6>=#{target})"

sum = @randomizer.roll_sum(2, 6)
values = @randomizer.roll_barabara(2, 6)
sum = values.sum
values_str = @randomizer.rand_results.map(&:first).join(",")
sum_and_values = "#{sum}[#{values_str}]"

Expand Down

0 comments on commit 35579e3

Please sign in to comment.