Skip to content

Commit

Permalink
Merge pull request #386 from bcdice/fix_BeastBindTrinity
Browse files Browse the repository at this point in the history
[BeastBindTrinity] 判定コマンドで大きい方から取る処理が抜けていた
  • Loading branch information
ysakasin authored Feb 25, 2021
2 parents d4e001c + f0f026e commit cf5e310
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bcdice/game_system/BeastBindTrinity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def roll(randomizer)
end

dice_list_filtered = dice_list_org.map { |dice| [dice, @dice_value_lower_limit].max }.sort
@dice_total = dice_list_filtered.inject(0, :+)
@dice_total = dice_list_filtered.last(2).inject(0, :+)

total = calc_total()

Expand Down
10 changes: 10 additions & 0 deletions test/data/BeastBindTrinity.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ rands = [
{ sides = 6, value = 6 },
]

[[ test ]]
game_system = "BeastBindTrinity"
input = "3BB+5>=17"
output = "(3BB+5@12#2>=17) > 11[4,5,6]+5 > 16 > 失敗"
rands = [
{ sides = 6, value = 5 },
{ sides = 6, value = 6 },
{ sides = 6, value = 4 },
]

[[ test ]]
game_system = "BeastBindTrinity"
input = "2BB+5@11#5"
Expand Down

0 comments on commit cf5e310

Please sign in to comment.