bcdice 3.1.2 → 3.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/bcdice/game_system/LogHorizon.rb +3 -3
- data/lib/bcdice/game_system/Paradiso.rb +3 -3
- data/lib/bcdice/game_system/SterileLife.rb +2 -3
- data/lib/bcdice/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af52626457e3a8d707ebba95dfad511c5cc8d84154ac4d141817b782be1a3f95
|
4
|
+
data.tar.gz: f567ff16168849b794537c88a6ac2568eebf3158086923c25262dc4fdee731e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a826afe976c398947e3a9e28ef7de6fa16f3b005137a4bad2c8ed98082f1b26916c4a250d0ebf374b9ff99557b542714df4edb2145fe7cec8f0b3684424c5a68
|
7
|
+
data.tar.gz: 476e0d4b6b0f7a6cfaf53c1e71fd19d0aaeea9f815e66fd1524f35e1e4f0c60e2066d0808abe7170c5e7c592f4c4fcc9d20385c28f32a8c7972eff8f7398da2c
|
data/CHANGELOG.md
CHANGED
@@ -244,7 +244,7 @@ module BCDice
|
|
244
244
|
|
245
245
|
# 財宝表ロール
|
246
246
|
def roll_treasure(command)
|
247
|
-
m = /^TRS(\d+)
|
247
|
+
m = /^TRS(\d+)?([+\-\d]+)?$/.match(command)
|
248
248
|
return nil unless m
|
249
249
|
|
250
250
|
character_rank = m[1].to_i
|
@@ -261,7 +261,7 @@ module BCDice
|
|
261
261
|
|
262
262
|
### 財宝表 ###
|
263
263
|
def roll_treasure_table(command)
|
264
|
-
m = /^([CMIHG]TRS)(\d+)
|
264
|
+
m = /^([CMIHG]TRS)(\d+)?([+\-\d]+)?(\$)?$/.match(command)
|
265
265
|
return nil unless m
|
266
266
|
|
267
267
|
type = m[1]
|
@@ -286,7 +286,7 @@ module BCDice
|
|
286
286
|
|
287
287
|
# 拡張ルール財宝表
|
288
288
|
def roll_treasure_table_b2(command)
|
289
|
-
m = /^([CMIO]TRSE)(\d+)
|
289
|
+
m = /^([CMIO]TRSE)(\d+)?([+\-\d]+)?(\$)?$/.match(command)
|
290
290
|
return nil unless m
|
291
291
|
|
292
292
|
type = m[1]
|
@@ -25,7 +25,7 @@ module BCDice
|
|
25
25
|
例)DC4:【攻撃力】4でダメージチェック DC5[20]:【攻撃力】5でダメージチェック、うち1つは20mm機銃 DC5[20,30]:【攻撃力】5でダメージチェック、うち1つは20mm機銃、うち1つは30mmガンポッド
|
26
26
|
MESSAGETEXT
|
27
27
|
|
28
|
-
register_prefix('
|
28
|
+
register_prefix('\d*D20<=', '\d*CP', 'RMT', 'TOT', 'EXT', 'SUT', 'DC(\d+)')
|
29
29
|
|
30
30
|
def eval_game_system_specific_command(command) # ダイスロールコマンド
|
31
31
|
# 通常判定部分をgetJudgeResultコマンドに切り分け
|
@@ -53,13 +53,13 @@ module BCDice
|
|
53
53
|
# 通常判定
|
54
54
|
def getJudgeResult(command)
|
55
55
|
case command
|
56
|
-
when /^(\d+)
|
56
|
+
when /^(\d+)?D20<=(\d+)?(\[(\d+)(,(\d+))?\])?(@(\d+))?$/i
|
57
57
|
number = (Regexp.last_match(1) || 1).to_i # ダイス数。省略時は1
|
58
58
|
target = (Regexp.last_match(2) || 14).to_i # 目標値。省略時は14 if 空白 then 14 else 記載の値
|
59
59
|
fumble1 = (Regexp.last_match(4) || 21).to_i # 追加ファンブル値。省略時は21
|
60
60
|
fumble2 = (Regexp.last_match(6) || 21).to_i # 追加ファンブル値。省略時は21
|
61
61
|
critical = (Regexp.last_match(8) || 21).to_i # 追加クリティカル値。省略時は21
|
62
|
-
when /^(\d+)
|
62
|
+
when /^(\d+)?CP(\d+)?(\[(\d+)(,(\d+))?\])?(@(\d+))?$/i
|
63
63
|
number = (Regexp.last_match(1) || 1).to_i
|
64
64
|
target = (Regexp.last_match(2) || 14).to_i
|
65
65
|
fumble1 = (Regexp.last_match(4) || 21).to_i
|
@@ -37,8 +37,7 @@ module BCDice
|
|
37
37
|
・超未来の宇宙船内 INT
|
38
38
|
MESSAGETEXT
|
39
39
|
|
40
|
-
register_prefix('
|
41
|
-
|
40
|
+
register_prefix('\d*DA.*\[(\d+),(\d+)(,(\d+))?\]', 'VPFT', 'VNFT', 'VNRT', 'AAFT', 'AST', 'RNST', 'RET', 'TRST', 'TRAT', 'TRMT', 'TROT', 'TET', 'ENT', 'CUT', 'NAT', 'INT')
|
42
41
|
def eval_game_system_specific_command(command) # ダイスロールコマンド
|
43
42
|
# 通常判定部分をgetJudgeResultコマンドに切り分け
|
44
43
|
output = getJudgeResult(command)
|
@@ -104,7 +103,7 @@ module BCDice
|
|
104
103
|
|
105
104
|
def getJudgeResult(command)
|
106
105
|
case command
|
107
|
-
when /(\d+)
|
106
|
+
when /(\d+)?DA([\d+*\-]*\d)?\[(\d+),(\d+)(,(\d+))?\]/i
|
108
107
|
number = (Regexp.last_match(1) || 1).to_i
|
109
108
|
correction = (Regexp.last_match(2) || 0).to_i
|
110
109
|
single = (Regexp.last_match(3) || 4).to_i
|
data/lib/bcdice/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bcdice
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SAKATA Sinji
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|