Skip to content

Commit

Permalink
目標成功度に達した場合はsuccessと断定できるのでsuccessを付与する
Browse files Browse the repository at this point in the history
  • Loading branch information
h-mikisato committed Apr 30, 2021
1 parent e176a5d commit 5082379
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/bcdice/game_system/Satasupe.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ def checkRoll(string)

return Result.new.tap do |r|
r.text = result
r.success = !is_fumble && min_suc > 0 && total_suc >= min_suc
r.failure = is_fumble
r.critical = is_critical
r.fumble = is_fumble
Expand Down
15 changes: 15 additions & 0 deletions test/data/Satasupe.toml
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ rands = [
game_system = "Satasupe"
input = "8R>=7[3,3]"
output = "【難易度7、ファンブル率3、必殺なし】 > 1[1,6]+1[6,6]+0[3,1]+1[4,4] > 成功度3"
success = true
rands = [
{ sides = 6, value = 1 },
{ sides = 6, value = 6 },
Expand All @@ -287,6 +288,7 @@ rands = [
game_system = "Satasupe"
input = "8R>=7[3,3]"
output = "【難易度7、ファンブル率3、必殺なし】 > 0[2,4]+0[5,1]+1[6,6]+1[5,2]+0[1,3]+0[2,3]+1[6,3] > 成功度3"
success = true
rands = [
{ sides = 6, value = 2 },
{ sides = 6, value = 4 },
Expand Down Expand Up @@ -332,6 +334,7 @@ rands = [
game_system = "Satasupe"
input = "8R>=7[3,3]"
output = "【難易度7、ファンブル率3、必殺なし】 > 1[4,6]+1[3,4]+1[3,5] > 成功度3"
success = true
rands = [
{ sides = 6, value = 4 },
{ sides = 6, value = 6 },
Expand All @@ -345,6 +348,7 @@ rands = [
game_system = "Satasupe"
input = "8R>=7[3,3]"
output = "【難易度7、ファンブル率3、必殺なし】 > 1[5,2]+1[3,4]+1[6,5] > 成功度3"
success = true
rands = [
{ sides = 6, value = 5 },
{ sides = 6, value = 2 },
Expand All @@ -358,6 +362,7 @@ rands = [
game_system = "Satasupe"
input = "8R>=7[3,3]"
output = "【難易度7、ファンブル率3、必殺なし】 > 1[6,2]+0[1,4]+1[4,4]+1[5,2] > 成功度3"
success = true
rands = [
{ sides = 6, value = 6 },
{ sides = 6, value = 2 },
Expand All @@ -373,6 +378,7 @@ rands = [
game_system = "Satasupe"
input = "8R>=7[3,3]"
output = "【難易度7、ファンブル率3、必殺なし】 > 1[5,2]+1[2,6]+1[4,4] > 成功度3"
success = true
rands = [
{ sides = 6, value = 5 },
{ sides = 6, value = 2 },
Expand Down Expand Up @@ -422,6 +428,7 @@ rands = [
game_system = "Satasupe"
input = "10r>=5[5]"
output = "【難易度5、ファンブル率1、必殺なし】 > 1[4,5]+1[6,6]+0[2,2]+1[3,5]+0[1,2]+1[3,3]+1[5,3] > 成功度5"
success = true
rands = [
{ sides = 6, value = 4 },
{ sides = 6, value = 5 },
Expand All @@ -443,6 +450,7 @@ rands = [
game_system = "Satasupe"
input = "10r>=5[5]"
output = "【難易度5、ファンブル率1、必殺なし】 > 1[6,6]+1[2,3]+1[4,5]+1[5,5]+0[1,3]+1[5,2] > 成功度5"
success = true
rands = [
{ sides = 6, value = 6 },
{ sides = 6, value = 6 },
Expand All @@ -462,6 +470,7 @@ rands = [
game_system = "Satasupe"
input = "10r>=5[5]"
output = "【難易度5、ファンブル率1、必殺なし】 > 0[3,1]+1[1,6]+1[6,1]+1[5,6]+1[5,3]+1[5,4] > 成功度5"
success = true
rands = [
{ sides = 6, value = 3 },
{ sides = 6, value = 1 },
Expand All @@ -481,6 +490,7 @@ rands = [
game_system = "Satasupe"
input = "10r>=5[5]"
output = "【難易度5、ファンブル率1、必殺なし】 > 1[4,5]+1[3,4]+1[5,1]+1[6,2]+1[4,2] > 成功度5"
success = true
rands = [
{ sides = 6, value = 4 },
{ sides = 6, value = 5 },
Expand Down Expand Up @@ -519,6 +529,7 @@ rands = [
game_system = "Satasupe"
input = "10r>=5[5]"
output = "【難易度5、ファンブル率1、必殺なし】 > 1[2,4]+1[4,1]+1[5,5]+1[4,5]+1[4,6] > 成功度5"
success = true
rands = [
{ sides = 6, value = 2 },
{ sides = 6, value = 4 },
Expand All @@ -536,6 +547,7 @@ rands = [
game_system = "Satasupe"
input = "10r>=5[5]"
output = "【難易度5、ファンブル率1、必殺なし】 > 1[2,5]+1[6,2]+1[5,4]+1[5,3]+1[1,5] > 成功度5"
success = true
rands = [
{ sides = 6, value = 2 },
{ sides = 6, value = 5 },
Expand All @@ -553,6 +565,7 @@ rands = [
game_system = "Satasupe"
input = "10r>=5[5]"
output = "【難易度5、ファンブル率1、必殺なし】 > 1[2,6]+1[4,2]+1[6,2]+1[2,6]+1[6,5] > 成功度5"
success = true
rands = [
{ sides = 6, value = 2 },
{ sides = 6, value = 6 },
Expand All @@ -570,6 +583,7 @@ rands = [
game_system = "Satasupe"
input = "10r>=5[5]"
output = "【難易度5、ファンブル率1、必殺なし】 > 1[6,4]+1[6,5]+0[2,1]+1[1,6]+1[5,4]+1[4,1] > 成功度5"
success = true
rands = [
{ sides = 6, value = 6 },
{ sides = 6, value = 4 },
Expand All @@ -589,6 +603,7 @@ rands = [
game_system = "Satasupe"
input = "10r>=5[5]"
output = "【難易度5、ファンブル率1、必殺なし】 > 1[5,5]+1[6,6]+1[1,6]+1[2,3]+1[5,4] > 成功度5"
success = true
rands = [
{ sides = 6, value = 5 },
{ sides = 6, value = 5 },
Expand Down

0 comments on commit 5082379

Please sign in to comment.