diff --git a/lib/bcdice/game_system/ShinobiGami.rb b/lib/bcdice/game_system/ShinobiGami.rb index 4b579c261..220015654 100644 --- a/lib/bcdice/game_system/ShinobiGami.rb +++ b/lib/bcdice/game_system/ShinobiGami.rb @@ -109,10 +109,10 @@ def action_roll(command) total = dice_total + cmd.modify_number result = - if dice_total >= cmd.critical - Result.critical(SPECIAL) - elsif dice_total <= cmd.fumble + if dice_total <= cmd.fumble Result.fumble("ファンブル") + elsif dice_total >= cmd.critical + Result.critical(SPECIAL) elsif cmd.cmp_op.nil? Result.new elsif total >= cmd.target_number diff --git a/test/data/ShinobiGami.toml b/test/data/ShinobiGami.toml index 4518faa19..0dc4c83a9 100644 --- a/test/data/ShinobiGami.toml +++ b/test/data/ShinobiGami.toml @@ -112,6 +112,17 @@ rands = [ { sides = 6, value = 5 }, ] +[[ test ]] +game_system = "ShinobiGami" +input = "SG@5#7 ファンブルが優先" +output = "(SG@5#7) > 5[1,4] > 5 > ファンブル" +failure = true +fumble = true +rands = [ + { sides = 6, value = 1 }, + { sides = 6, value = 4 }, +] + [[ test ]] game_system = "ShinobiGami" input = "SG+1 修正値がファンブルに影響しない"