Skip to content

Commit

Permalink
[AniMalus] Array#count でブロックが不要な点を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
ysakasin committed Jan 22, 2024
1 parent 101e6fe commit f40b9a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/bcdice/game_system/AniMalus.rb
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def resolute_guarding(command)

dice = @randomizer.roll_barabara(3, 6).sort
dice_text = dice.join(",")
success_num = dice.count { |val| val == num_target }
success_num = dice.count(num_target)
is_critical = (dice[0] == 1 && dice[1] == 2 && dice[2] == 3)
is_fumble = (dice[0] == 4 && dice[1] == 5 && dice[2] == 6)

Expand Down Expand Up @@ -197,7 +197,7 @@ def resolute_dodging(command)

dice = @randomizer.roll_barabara(1, 6)
dice_text = dice.join(",")
success_num = dice.count { |val| val == num_target }
success_num = dice.count(num_target)

return Result.new.tap do |result|
result.condition = (success_num > 0)
Expand Down

0 comments on commit f40b9a3

Please sign in to comment.