Skip to content

Commit 71fa5c8

Browse files
committed
⬆️ Update BCDice to 3.13.0
1 parent d2bfcd5 commit 71fa5c8

File tree

4 files changed

+66
-44
lines changed

4 files changed

+66
-44
lines changed

BCDice

Submodule BCDice updated 58 files

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
eval_gemfile File.join(__dir__, 'BCDice/Gemfile')
22

3-
gem 'opal', ">= 1.7.1"
3+
gem 'opal', "~> 1.7.4"

Gemfile.lock

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,47 @@
11
PATH
22
remote: BCDice
33
specs:
4-
bcdice (3.12.0)
4+
bcdice (3.13.0)
55
i18n (~> 1.8.5)
6+
racc (~> 1.7.3)
67

78
GEM
89
remote: https://rubygems.org/
910
specs:
1011
ast (2.4.2)
11-
concurrent-ruby (1.2.2)
12+
concurrent-ruby (1.2.3)
1213
docile (1.4.0)
1314
i18n (1.8.11)
1415
concurrent-ruby (~> 1.0)
15-
json (2.6.3)
16-
opal (1.7.1)
16+
json (2.7.1)
17+
language_server-protocol (3.17.0.3)
18+
opal (1.7.4)
1719
ast (>= 2.3.0)
1820
parser (~> 3.0, >= 3.0.3.2)
19-
parallel (1.22.1)
20-
parser (3.1.3.0)
21+
parallel (1.24.0)
22+
parser (3.3.0.5)
2123
ast (~> 2.4.1)
22-
power_assert (2.0.1)
23-
racc (1.6.2)
24+
racc
25+
power_assert (2.0.3)
26+
racc (1.7.3)
2427
rainbow (3.1.1)
25-
rake (13.0.6)
26-
regexp_parser (2.7.0)
27-
rexml (3.2.5)
28-
rubocop (1.39.0)
28+
rake (13.1.0)
29+
regexp_parser (2.9.0)
30+
rexml (3.2.6)
31+
rubocop (1.59.0)
2932
json (~> 2.3)
33+
language_server-protocol (>= 3.17.0)
3034
parallel (~> 1.10)
31-
parser (>= 3.1.2.1)
35+
parser (>= 3.2.2.4)
3236
rainbow (>= 2.2.2, < 4.0)
3337
regexp_parser (>= 1.8, < 3.0)
3438
rexml (>= 3.2.5, < 4.0)
35-
rubocop-ast (>= 1.23.0, < 2.0)
39+
rubocop-ast (>= 1.30.0, < 2.0)
3640
ruby-progressbar (~> 1.7)
37-
unicode-display_width (>= 1.4.0, < 3.0)
38-
rubocop-ast (1.24.1)
39-
parser (>= 3.1.1.0)
40-
ruby-progressbar (1.11.0)
41+
unicode-display_width (>= 2.4.0, < 3.0)
42+
rubocop-ast (1.30.0)
43+
parser (>= 3.2.1.0)
44+
ruby-progressbar (1.13.0)
4145
simplecov (0.21.2)
4246
docile (~> 1.1)
4347
simplecov-html (~> 0.11)
@@ -47,29 +51,26 @@ GEM
4751
simplecov (~> 0.19)
4852
simplecov-html (0.12.3)
4953
simplecov_json_formatter (0.1.4)
50-
test-unit (3.3.9)
54+
test-unit (3.6.1)
5155
power_assert
5256
tomlrb (2.0.3)
53-
unicode-display_width (2.4.2)
54-
webrick (1.7.0)
55-
yard (0.9.27)
56-
webrick (~> 1.7.0)
57+
unicode-display_width (2.5.0)
58+
yard (0.9.34)
5759

5860
PLATFORMS
5961
ruby
6062
x64-mingw32
6163

6264
DEPENDENCIES
6365
bcdice!
64-
opal (>= 1.7.1)
65-
racc (~> 1.6.2)
66-
rake (~> 13.0.3)
67-
rubocop (~> 1.39.0)
66+
opal (~> 1.7.4)
67+
rake (~> 13.1.0)
68+
rubocop (~> 1.59.0)
6869
simplecov (~> 0.21.2)
6970
simplecov-cobertura (~> 2.1.0)
70-
test-unit (~> 3.3.7)
71+
test-unit (~> 3.6.1)
7172
tomlrb (~> 2.0.3)
72-
yard
73+
yard (~> 0.9.34)
7374

7475
BUNDLED WITH
7576
2.1.4

patch.diff

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -307,14 +307,14 @@ diff --git a/lib/bcdice/game_system/Chill3.rb b/lib/bcdice/game_system/Chill3.rb
307307

308308
if tens == ones
309309
@@ -38,7 +38,7 @@ module BCDice
310-
return Result.critical("C成功")
310+
return Result.critical("Colossal Success")
311311
end
312312
elsif (total <= target) || (dice_total == 1) # 01は必ず成功
313313
- if total <= (target / 2)
314314
+ if total <= (target / 2).to_i
315-
return Result.success("H成功")
315+
return Result.success("High Success")
316316
else
317-
return Result.success("L成功")
317+
return Result.success("Low Success")
318318
diff --git a/lib/bcdice/game_system/ColossalHunter.rb b/lib/bcdice/game_system/ColossalHunter.rb
319319
--- a/lib/bcdice/game_system/ColossalHunter.rb
320320
+++ b/lib/bcdice/game_system/ColossalHunter.rb
@@ -820,7 +820,7 @@ diff --git a/lib/bcdice/game_system/NightmareHunterDeep.rb b/lib/bcdice/game_sys
820820
diff --git a/lib/bcdice/game_system/NinjaSlayer.rb b/lib/bcdice/game_system/NinjaSlayer.rb
821821
--- a/lib/bcdice/game_system/NinjaSlayer.rb
822822
+++ b/lib/bcdice/game_system/NinjaSlayer.rb
823-
@@ -48,18 +48,18 @@ module BCDice
823+
@@ -50,18 +50,18 @@ module BCDice
824824
end
825825

826826
# 難易度の値の正規表現
@@ -845,7 +845,7 @@ diff --git a/lib/bcdice/game_system/NinjaSlayer.rb b/lib/bcdice/game_system/Ninj
845845

846846
# 回避判定のノード
847847
EV = Struct.new(:num, :difficulty, :targetValue)
848-
@@ -81,7 +81,7 @@ module BCDice
848+
@@ -83,7 +83,7 @@ module BCDice
849849
m = NJ_RE.match(str)
850850
return str unless m
851851

@@ -854,7 +854,7 @@ diff --git a/lib/bcdice/game_system/NinjaSlayer.rb b/lib/bcdice/game_system/Ninj
854854
return "#{m[1]}#{b_roll}"
855855
end
856856

857-
@@ -127,8 +127,8 @@ module BCDice
857+
@@ -129,8 +129,8 @@ module BCDice
858858
# @return [EV]
859859
def parseEV(m)
860860
num = m[1].to_i
@@ -865,7 +865,7 @@ diff --git a/lib/bcdice/game_system/NinjaSlayer.rb b/lib/bcdice/game_system/Ninj
865865

866866
return EV.new(num, difficulty, targetValue)
867867
end
868-
@@ -138,7 +138,7 @@ module BCDice
868+
@@ -140,7 +140,7 @@ module BCDice
869869
# @return [AT]
870870
def parseAT(m)
871871
num = m[1].to_i
@@ -874,7 +874,7 @@ diff --git a/lib/bcdice/game_system/NinjaSlayer.rb b/lib/bcdice/game_system/Ninj
874874

875875
return AT.new(num, difficulty)
876876
end
877-
@@ -148,7 +148,7 @@ module BCDice
877+
@@ -150,7 +150,7 @@ module BCDice
878878
# @return [EL]
879879
def parseEL(m)
880880
num = m[1].to_i
@@ -883,7 +883,7 @@ diff --git a/lib/bcdice/game_system/NinjaSlayer.rb b/lib/bcdice/game_system/Ninj
883883

884884
return EL.new(num, difficulty)
885885
end
886-
@@ -218,7 +218,7 @@ module BCDice
886+
@@ -220,7 +220,7 @@ module BCDice
887887
def integerValueOfDifficulty(s)
888888
return 4 unless s
889889

@@ -950,6 +950,27 @@ diff --git a/lib/bcdice/game_system/ShinMegamiTenseiKakuseihen.rb b/lib/bcdice/g
950950
tens = value % 10
951951

952952
return [ones, tens]
953+
diff --git a/lib/bcdice/game_system/Siren.rb b/lib/bcdice/game_system/Siren.rb
954+
--- a/lib/bcdice/game_system/Siren.rb
955+
+++ b/lib/bcdice/game_system/Siren.rb
956+
@@ -50,7 +50,7 @@ module BCDice
957+
return Result.failure("(1D100<=#{target}) > #{dice} > 失敗")
958+
end
959+
960+
- dig10 = dice / 10
961+
+ dig10 = (dice / 10).floor
962+
dig1 = dice % 10
963+
if dig10 == 0
964+
dig10 = 10
965+
@@ -74,7 +74,7 @@ module BCDice
966+
967+
dice = @randomizer.roll_once(100)
968+
969+
- dig10 = dice / 10
970+
+ dig10 = (dice / 10).floor
971+
dig1 = dice % 10
972+
if dig10 == 0
973+
dig10 = 10
953974
diff --git a/lib/bcdice/game_system/Skynauts.rb b/lib/bcdice/game_system/Skynauts.rb
954975
--- a/lib/bcdice/game_system/Skynauts.rb
955976
+++ b/lib/bcdice/game_system/Skynauts.rb
@@ -989,7 +1010,7 @@ diff --git a/lib/bcdice/game_system/TunnelsAndTrolls.rb b/lib/bcdice/game_system
9891010
diff --git a/lib/bcdice/game_system/VampireTheMasquerade5th.rb b/lib/bcdice/game_system/VampireTheMasquerade5th.rb
9901011
--- a/lib/bcdice/game_system/VampireTheMasquerade5th.rb
9911012
+++ b/lib/bcdice/game_system/VampireTheMasquerade5th.rb
992-
@@ -163,7 +163,7 @@ module BCDice
1013+
@@ -169,7 +169,7 @@ module BCDice
9931014

9941015
def get_critical_success(ten_dice)
9951016
# 10の目が2個毎に追加2成功
@@ -1063,15 +1084,15 @@ diff --git a/lib/bcdice/game_system/WerewolfTheApocalypse5th.rb b/lib/bcdice/gam
10631084
--- a/lib/bcdice/game_system/WerewolfTheApocalypse5th.rb
10641085
+++ b/lib/bcdice/game_system/WerewolfTheApocalypse5th.rb
10651086
@@ -76,7 +76,7 @@ module BCDice
1066-
if rage_dice_pool
1087+
if rage_dice_pool >= 0
10671088
rage_dice_text, rage_success_dice, rage_ten_dice, brutal_result_dice = make_dice_roll(rage_dice_pool)
10681089

10691090
- brutal_outcome = brutal_result_dice / 2
10701091
+ brutal_outcome = (brutal_result_dice / 2).floor
10711092
ten_dice += rage_ten_dice
10721093
success_dice += rage_success_dice
10731094

1074-
@@ -155,7 +155,7 @@ module BCDice
1095+
@@ -161,7 +161,7 @@ module BCDice
10751096

10761097
def get_critical_success(ten_dice)
10771098
# 10の目が2個毎に追加2成功
@@ -1163,7 +1184,7 @@ diff --git a/lib/bcdice/game_system/cthulhu7th/full_auto.rb b/lib/bcdice/game_sy
11631184
+++ b/lib/bcdice/game_system/cthulhu7th/full_auto.rb
11641185
@@ -43,7 +43,7 @@ module BCDice
11651186
broken_number = m[3].to_i
1166-
bonus_dice_count = m[4]&.to_i || 0
1187+
bonus_dice_count = m[4].to_i
11671188
stop_count = m[5]&.downcase || ""
11681189
- bullet_set_count_cap = m[6]&.to_i || diff / 10
11691190
+ bullet_set_count_cap = m[6]&.to_i || (diff / 10).to_i

0 commit comments

Comments
 (0)