Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⬆️ Update BCDice to 3.13.0 #65

Merged
merged 1 commit into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion BCDice
Submodule BCDice updated 58 files
+1 −1 .github/workflows/lint.yaml
+2 −2 .github/workflows/test.yml
+1 −1 .rubocop.yml
+27 −0 CHANGELOG.md
+6 −7 Gemfile
+2 −1 bcdice.gemspec
+1 −1 lib/bcdice/base.rb
+8 −0 lib/bcdice/game_system.rb
+1 −1 lib/bcdice/game_system/Airgetlamh.rb
+2 −2 lib/bcdice/game_system/Alsetto.rb
+221 −0 lib/bcdice/game_system/AniMalus.rb
+182 −0 lib/bcdice/game_system/ArknightsFan.rb
+1 −1 lib/bcdice/game_system/Avandner.rb
+1 −1 lib/bcdice/game_system/BBN.rb
+3 −3 lib/bcdice/game_system/BadLife.rb
+1 −1 lib/bcdice/game_system/BarnaKronika.rb
+6 −6 lib/bcdice/game_system/Chill3.rb
+1 −1 lib/bcdice/game_system/DarkSouls.rb
+1 −1 lib/bcdice/game_system/Elric.rb
+92 −0 lib/bcdice/game_system/FullFace.rb
+4 −1 lib/bcdice/game_system/InfiniteFantasia.rb
+1 −1 lib/bcdice/game_system/Irisbane.rb
+1 −1 lib/bcdice/game_system/KillDeathBusiness.rb
+158 −0 lib/bcdice/game_system/KyokoShinshoku.rb
+136 −0 lib/bcdice/game_system/Liminal.rb
+1 −1 lib/bcdice/game_system/MetalHead.rb
+1 −1 lib/bcdice/game_system/MetalHeadExtream.rb
+122 −0 lib/bcdice/game_system/NRR.rb
+1 −1 lib/bcdice/game_system/NSSQ.rb
+1 −1 lib/bcdice/game_system/NightWizard.rb
+15 −2 lib/bcdice/game_system/NightWizard3rd.rb
+1 −1 lib/bcdice/game_system/OneWayHeroics.rb
+1,238 −0 lib/bcdice/game_system/PastFutureParadox.rb
+3 −3 lib/bcdice/game_system/Postman.rb
+1 −1 lib/bcdice/game_system/RecordOfSteam.rb
+1 −1 lib/bcdice/game_system/RuneQuestRoleplayingInGlorantha.rb
+4 −4 lib/bcdice/game_system/Ryutama.rb
+97 −0 lib/bcdice/game_system/Siren.rb
+1 −1 lib/bcdice/game_system/Skynauts.rb
+1 −1 lib/bcdice/game_system/Strave.rb
+1 −1 lib/bcdice/game_system/TherapieSein.rb
+1 −1 lib/bcdice/game_system/TrinitySeven.rb
+12 −6 lib/bcdice/game_system/VampireTheMasquerade5th.rb
+12 −6 lib/bcdice/game_system/WerewolfTheApocalypse5th.rb
+1 −1 lib/bcdice/game_system/cthulhu7th/full_auto.rb
+1 −1 lib/bcdice/loader.rb
+1 −1 lib/bcdice/version.rb
+191 −0 test/data/AniMalus.toml
+431 −0 test/data/ArknightsFan.toml
+12 −12 test/data/Chill3.toml
+113 −0 test/data/FullFace.toml
+352 −0 test/data/KyokoShinshoku.toml
+94 −0 test/data/Liminal.toml
+119 −0 test/data/NRR.toml
+1,344 −0 test/data/PastFutureParadox.toml
+170 −0 test/data/Siren.toml
+125 −1 test/data/VampireTheMasquerade5th.toml
+110 −4 test/data/WerewolfTheApocalypse5th.toml
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
eval_gemfile File.join(__dir__, 'BCDice/Gemfile')

gem 'opal', ">= 1.7.1"
gem 'opal', "~> 1.7.4"
59 changes: 30 additions & 29 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,43 +1,47 @@
PATH
remote: BCDice
specs:
bcdice (3.12.0)
bcdice (3.13.0)
i18n (~> 1.8.5)
racc (~> 1.7.3)

GEM
remote: https://rubygems.org/
specs:
ast (2.4.2)
concurrent-ruby (1.2.2)
concurrent-ruby (1.2.3)
docile (1.4.0)
i18n (1.8.11)
concurrent-ruby (~> 1.0)
json (2.6.3)
opal (1.7.1)
json (2.7.1)
language_server-protocol (3.17.0.3)
opal (1.7.4)
ast (>= 2.3.0)
parser (~> 3.0, >= 3.0.3.2)
parallel (1.22.1)
parser (3.1.3.0)
parallel (1.24.0)
parser (3.3.0.5)
ast (~> 2.4.1)
power_assert (2.0.1)
racc (1.6.2)
racc
power_assert (2.0.3)
racc (1.7.3)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.7.0)
rexml (3.2.5)
rubocop (1.39.0)
rake (13.1.0)
regexp_parser (2.9.0)
rexml (3.2.6)
rubocop (1.59.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.1.2.1)
parser (>= 3.2.2.4)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.23.0, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.24.1)
parser (>= 3.1.1.0)
ruby-progressbar (1.11.0)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
ruby-progressbar (1.13.0)
simplecov (0.21.2)
docile (~> 1.1)
simplecov-html (~> 0.11)
Expand All @@ -47,29 +51,26 @@ GEM
simplecov (~> 0.19)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
test-unit (3.3.9)
test-unit (3.6.1)
power_assert
tomlrb (2.0.3)
unicode-display_width (2.4.2)
webrick (1.7.0)
yard (0.9.27)
webrick (~> 1.7.0)
unicode-display_width (2.5.0)
yard (0.9.34)

PLATFORMS
ruby
x64-mingw32

DEPENDENCIES
bcdice!
opal (>= 1.7.1)
racc (~> 1.6.2)
rake (~> 13.0.3)
rubocop (~> 1.39.0)
opal (~> 1.7.4)
rake (~> 13.1.0)
rubocop (~> 1.59.0)
simplecov (~> 0.21.2)
simplecov-cobertura (~> 2.1.0)
test-unit (~> 3.3.7)
test-unit (~> 3.6.1)
tomlrb (~> 2.0.3)
yard
yard (~> 0.9.34)

BUNDLED WITH
2.1.4
47 changes: 34 additions & 13 deletions patch.diff
Original file line number Diff line number Diff line change
Expand Up @@ -307,14 +307,14 @@ diff --git a/lib/bcdice/game_system/Chill3.rb b/lib/bcdice/game_system/Chill3.rb

if tens == ones
@@ -38,7 +38,7 @@ module BCDice
return Result.critical("C成功")
return Result.critical("Colossal Success")
end
elsif (total <= target) || (dice_total == 1) # 01は必ず成功
- if total <= (target / 2)
+ if total <= (target / 2).to_i
return Result.success("H成功")
return Result.success("High Success")
else
return Result.success("L成功")
return Result.success("Low Success")
diff --git a/lib/bcdice/game_system/ColossalHunter.rb b/lib/bcdice/game_system/ColossalHunter.rb
--- a/lib/bcdice/game_system/ColossalHunter.rb
+++ b/lib/bcdice/game_system/ColossalHunter.rb
Expand Down Expand Up @@ -820,7 +820,7 @@ diff --git a/lib/bcdice/game_system/NightmareHunterDeep.rb b/lib/bcdice/game_sys
diff --git a/lib/bcdice/game_system/NinjaSlayer.rb b/lib/bcdice/game_system/NinjaSlayer.rb
--- a/lib/bcdice/game_system/NinjaSlayer.rb
+++ b/lib/bcdice/game_system/NinjaSlayer.rb
@@ -48,18 +48,18 @@ module BCDice
@@ -50,18 +50,18 @@ module BCDice
end

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

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

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

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

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

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

return EL.new(num, difficulty)
end
@@ -218,7 +218,7 @@ module BCDice
@@ -220,7 +220,7 @@ module BCDice
def integerValueOfDifficulty(s)
return 4 unless s

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

return [ones, tens]
diff --git a/lib/bcdice/game_system/Siren.rb b/lib/bcdice/game_system/Siren.rb
--- a/lib/bcdice/game_system/Siren.rb
+++ b/lib/bcdice/game_system/Siren.rb
@@ -50,7 +50,7 @@ module BCDice
return Result.failure("(1D100<=#{target}) > #{dice} > 失敗")
end

- dig10 = dice / 10
+ dig10 = (dice / 10).floor
dig1 = dice % 10
if dig10 == 0
dig10 = 10
@@ -74,7 +74,7 @@ module BCDice

dice = @randomizer.roll_once(100)

- dig10 = dice / 10
+ dig10 = (dice / 10).floor
dig1 = dice % 10
if dig10 == 0
dig10 = 10
diff --git a/lib/bcdice/game_system/Skynauts.rb b/lib/bcdice/game_system/Skynauts.rb
--- a/lib/bcdice/game_system/Skynauts.rb
+++ b/lib/bcdice/game_system/Skynauts.rb
Expand Down Expand Up @@ -989,7 +1010,7 @@ diff --git a/lib/bcdice/game_system/TunnelsAndTrolls.rb b/lib/bcdice/game_system
diff --git a/lib/bcdice/game_system/VampireTheMasquerade5th.rb b/lib/bcdice/game_system/VampireTheMasquerade5th.rb
--- a/lib/bcdice/game_system/VampireTheMasquerade5th.rb
+++ b/lib/bcdice/game_system/VampireTheMasquerade5th.rb
@@ -163,7 +163,7 @@ module BCDice
@@ -169,7 +169,7 @@ module BCDice

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

- brutal_outcome = brutal_result_dice / 2
+ brutal_outcome = (brutal_result_dice / 2).floor
ten_dice += rage_ten_dice
success_dice += rage_success_dice

@@ -155,7 +155,7 @@ module BCDice
@@ -161,7 +161,7 @@ module BCDice

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