Skip to content

Commit

Permalink
Added Total Failure check
Browse files Browse the repository at this point in the history
  • Loading branch information
FredGreenfield authored and FredGreenfield committed Nov 23, 2023
1 parent aa7a35c commit 7ab0585
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
9 changes: 6 additions & 3 deletions lib/bcdice/game_system/HunterTheReckoning5th.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ class HunterTheReckoning5th < Base
・判定コマンド(nHRFx+x)
注意:難易度は必要成功数を表す
難易度指定:成功数のカウント、判定成功と失敗、Critical処理、Critical Winのチェックを行う
難易度指定:成功数のカウント、判定成功と失敗、Critical処理、Critical Win、Total Failureのチェックを行う
(Desperationダイスがある場合)OverreachとDespairの発生チェックを行う
例) (難易度)HRF(通常ダイス)+(Desperationダイス)
(難易度)HRF(通常ダイス)
難易度省略:成功数のカウント、判定失敗、Critical処理、(Desperationダイスがある場合)Despairチェックを行う
難易度省略:成功数のカウント、判定失敗、Critical処理、Total Failure、(Desperationダイスがある場合)Despairチェックを行う
判定成功、Overreachのチェックを行わない
Critical Win、(Desperationダイスがある場合)Despair、Overreachのヒントを出力
例) HRF(通常ダイス)+(Desperationダイス)
Expand Down Expand Up @@ -102,6 +102,9 @@ def get_roll_result(result_text, success_dice, ten_dice, _desperaton_ten_dice, d
if desperaton_botch_dice > 0
return Result.fumble("#{result_text}:判定失敗! [Despair]")
end
if success_dice == 0
return Result.fumble("#{result_text}:判定失敗! [Total Failure]")
end

return Result.failure("#{result_text}:判定失敗!")
end
Expand All @@ -111,7 +114,7 @@ def get_roll_result(result_text, success_dice, ten_dice, _desperaton_ten_dice, d
return Result.fumble("#{result_text}:判定失敗! [Despair]")
end

return Result.failure("#{result_text}:判定失敗!")
return Result.fumble("#{result_text}:判定失敗! [Total Failure]")
else
if desperaton_botch_dice > 0
result_text = "#{result_text}\n 判定失敗なら [Despair]"
Expand Down
18 changes: 12 additions & 6 deletions test/data/HunterTheReckoning5th.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[[ test ]]
game_system = "HunterTheReckoning5th"
input = "3HRF3"
output = "(3D10) > [1,2,5] 成功数=0 難易度=3:判定失敗!"
output = "(3D10) > [1,2,5] 成功数=0 難易度=3:判定失敗! [Total Failure]"
failure = true
fumble = true
rands = [
{ sides = 10, value = 1 },
{ sides = 10, value = 2 },
Expand Down Expand Up @@ -169,8 +170,9 @@ rands = [
[[ test ]]
game_system = "HunterTheReckoning5th"
input = "HRF3"
output = "(3D10) > [2,5,1] 成功数=0:判定失敗!"
output = "(3D10) > [2,5,1] 成功数=0:判定失敗! [Total Failure]"
failure = true
fumble = true
rands = [
{ sides = 10, value = 2 },
{ sides = 10, value = 5 },
Expand Down Expand Up @@ -212,8 +214,9 @@ rands = [
[[ test ]]
game_system = "HunterTheReckoning5th"
input = "HRF3+2"
output = "(3D10+2D10) > [2,5,1]+[4,3] 成功数=0:判定失敗!"
output = "(3D10+2D10) > [2,5,1]+[4,3] 成功数=0:判定失敗! [Total Failure]"
failure = true
fumble = true
rands = [
{ sides = 10, value = 2 },
{ sides = 10, value = 5 },
Expand Down Expand Up @@ -383,8 +386,9 @@ rands = [
[[ test ]]
game_system = "HunterTheReckoning5th"
input = "S3HRF3"
output = "(3D10) > [1,2,5] 成功数=0 難易度=3:判定失敗!"
output = "(3D10) > [1,2,5] 成功数=0 難易度=3:判定失敗! [Total Failure]"
failure = true
fumble = true
secret = true
rands = [
{ sides = 10, value = 1 },
Expand Down Expand Up @@ -564,8 +568,9 @@ rands = [
[[ test ]]
game_system = "HunterTheReckoning5th"
input = "SHRF3"
output = "(3D10) > [2,5,1] 成功数=0:判定失敗!"
output = "(3D10) > [2,5,1] 成功数=0:判定失敗! [Total Failure]"
failure = true
fumble = true
secret = true
rands = [
{ sides = 10, value = 2 },
Expand Down Expand Up @@ -598,8 +603,9 @@ rands = [
[[ test ]]
game_system = "HunterTheReckoning5th"
input = "SHRF3+2"
output = "(3D10+2D10) > [2,5,1]+[4,3] 成功数=0:判定失敗!"
output = "(3D10+2D10) > [2,5,1]+[4,3] 成功数=0:判定失敗! [Total Failure]"
failure = true
fumble = true
secret = true
rands = [
{ sides = 10, value = 2 },
Expand Down

0 comments on commit 7ab0585

Please sign in to comment.