Skip to content

Commit

Permalink
Merge pull request #644 from FredGreenfield/v5_main_diceroll_num_fix
Browse files Browse the repository at this point in the history
[VampireTheMasquerade5th]判定ダイスが10個以上指定できないバグ修正
  • Loading branch information
ysakasin authored Sep 26, 2023
2 parents 0a44d54 + 6fadcb4 commit ad55636
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bcdice/game_system/VampireTheMasquerade5th.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class VampireTheMasquerade5th < Base
register_prefix('\d*(VMF|(VMI\d*(H\d?)?))')

def eval_game_system_specific_command(command)
m = /\A(\d+)?(((VMF)(\d)(\+(\d+))?)|((VMI)(\d)(H(\d+))?))$/.match(command)
m = /\A(\d+)?(((VMF)(\d+)(\+(\d+))?)|((VMI)(\d+)(H(\d+))?))$/.match(command)
unless m
return ''
end
Expand Down
41 changes: 41 additions & 0 deletions test/data/VampireTheMasquerade5th.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1997,4 +1997,45 @@ rands = [
{ sides = 10, value = 10 },
{ sides = 10, value = 3 },
{ sides = 10, value = 10 },
]

# 10ダイス以上の判定確認
[[ test ]]
game_system = "VampireTheMasquerade5th"
input = "3VMF10+2"
output = "(10D10+2D10) > [4,6,8,10,3,9,6,9,1,6]+[7,5] 成功数=8 難易度=3 差分=5:判定成功!"
success = true
rands = [
{ sides = 10, value = 4 },
{ sides = 10, value = 6 },
{ sides = 10, value = 8 },
{ sides = 10, value = 10 },
{ sides = 10, value = 3 },
{ sides = 10, value = 9 },
{ sides = 10, value = 6 },
{ sides = 10, value = 9 },
{ sides = 10, value = 1 },
{ sides = 10, value = 6 },
{ sides = 10, value = 7 },
{ sides = 10, value = 5 },
]

[[ test ]]
game_system = "VampireTheMasquerade5th"
input = "3VMI12H2"
output = "(10D10+2D10) > [4,6,8,10,3,9,6,9,1,6]+[7,5] 成功数=8 難易度=3 差分=5:判定成功!"
success = true
rands = [
{ sides = 10, value = 4 },
{ sides = 10, value = 6 },
{ sides = 10, value = 8 },
{ sides = 10, value = 10 },
{ sides = 10, value = 3 },
{ sides = 10, value = 9 },
{ sides = 10, value = 6 },
{ sides = 10, value = 9 },
{ sides = 10, value = 1 },
{ sides = 10, value = 6 },
{ sides = 10, value = 7 },
{ sides = 10, value = 5 },
]

0 comments on commit ad55636

Please sign in to comment.