bcdice 3.10.0 → 3.12.0
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 +40 -0
- data/i18n/FutariSousa/ko_kr.yml +1625 -529
- data/i18n/Insane/ko_kr.yml +393 -258
- data/i18n/NinjaSlayer2/ja_jp.yml +34 -0
- data/lib/bcdice/game_system/DemonSpike.rb +89 -0
- data/lib/bcdice/game_system/Emoklore.rb +4 -6
- data/lib/bcdice/game_system/FutariSousa_Korean.rb +44 -19
- data/lib/bcdice/game_system/GundamSentinel.rb +377 -0
- data/lib/bcdice/game_system/HunterTheReckoning5th.rb +10 -3
- data/lib/bcdice/game_system/Insane_Korean.rb +11 -11
- data/lib/bcdice/game_system/KamitsubakiCityUnderConstructionNarrative.rb +251 -0
- data/lib/bcdice/game_system/MamonoScramble.rb +98 -0
- data/lib/bcdice/game_system/NinjaSlayer.rb +3 -1
- data/lib/bcdice/game_system/NinjaSlayer2.rb +299 -0
- data/lib/bcdice/game_system/RuneQuestRoleplayingInGlorantha.rb +170 -0
- data/lib/bcdice/game_system/SajinsenkiAGuS.rb +5 -1
- data/lib/bcdice/game_system/SajinsenkiAGuS2E.rb +285 -0
- data/lib/bcdice/game_system/SkynautsBouken.rb +1 -1
- data/lib/bcdice/game_system/SwordWorld.rb +16 -0
- data/lib/bcdice/game_system/SwordWorld2_5.rb +8 -1
- data/lib/bcdice/game_system/VampireTheMasquerade5th.rb +10 -4
- data/lib/bcdice/game_system/WerewolfTheApocalypse5th.rb +173 -0
- data/lib/bcdice/game_system/ZombiLine.rb +115 -0
- data/lib/bcdice/game_system/sword_world/rating_options.rb +3 -0
- data/lib/bcdice/game_system/sword_world/rating_parsed.rb +9 -0
- data/lib/bcdice/game_system/sword_world/rating_parser.rb +173 -128
- data/lib/bcdice/game_system/sword_world/transcendent_test.rb +1 -1
- data/lib/bcdice/game_system.rb +9 -0
- data/lib/bcdice/version.rb +1 -1
- metadata +13 -3
@@ -0,0 +1,115 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BCDice
|
4
|
+
module GameSystem
|
5
|
+
class ZombiLine < Base
|
6
|
+
# ゲームシステムの識別子
|
7
|
+
ID = "ZombiLine"
|
8
|
+
|
9
|
+
# ゲームシステム名
|
10
|
+
NAME = "ゾンビライン"
|
11
|
+
|
12
|
+
# ゲームシステム名の読みがな
|
13
|
+
SORT_KEY = "そんひらいん"
|
14
|
+
|
15
|
+
HELP_MESSAGE = <<~TEXT
|
16
|
+
■ 判定 (xZL<=y)
|
17
|
+
x:ダイス数(省略時は1)
|
18
|
+
y:成功率
|
19
|
+
|
20
|
+
■ 各種表
|
21
|
+
ストレス症状表 SST
|
22
|
+
食材表 IT
|
23
|
+
TEXT
|
24
|
+
|
25
|
+
def initialize(command)
|
26
|
+
super(command)
|
27
|
+
@sides_implicit_d = 10
|
28
|
+
end
|
29
|
+
|
30
|
+
def eval_game_system_specific_command(command)
|
31
|
+
return check_action(command) || roll_tables(command, TABLES)
|
32
|
+
end
|
33
|
+
|
34
|
+
def check_action(command)
|
35
|
+
parser = Command::Parser.new("ZL", round_type: @round_type)
|
36
|
+
.enable_prefix_number
|
37
|
+
.disable_modifier
|
38
|
+
.restrict_cmp_op_to(:<=)
|
39
|
+
parsed = parser.parse(command)
|
40
|
+
unless parsed
|
41
|
+
return nil
|
42
|
+
end
|
43
|
+
|
44
|
+
dice_count = parsed.prefix_number || 1
|
45
|
+
target_num = parsed.target_number
|
46
|
+
|
47
|
+
debug(dice_count)
|
48
|
+
|
49
|
+
dice_list = @randomizer.roll_barabara(dice_count, 100).sort
|
50
|
+
is_success = dice_list.any? { |i| i <= target_num }
|
51
|
+
is_critical = dice_list.any? { |i| i <= 5 }
|
52
|
+
is_fumble = dice_list.any? { |i| i >= 96 && i > target_num }
|
53
|
+
if is_critical && is_fumble
|
54
|
+
is_critical = false
|
55
|
+
is_fumble = false
|
56
|
+
end
|
57
|
+
|
58
|
+
success_message =
|
59
|
+
if is_success && is_critical
|
60
|
+
"成功(クリティカル)"
|
61
|
+
elsif is_success && is_fumble
|
62
|
+
"成功(ファンブル)"
|
63
|
+
elsif is_success
|
64
|
+
"成功"
|
65
|
+
elsif is_fumble
|
66
|
+
"失敗(ファンブル)"
|
67
|
+
else
|
68
|
+
"失敗"
|
69
|
+
end
|
70
|
+
sequence = [
|
71
|
+
"(#{parsed})",
|
72
|
+
"[#{dice_list.join(',')}]",
|
73
|
+
success_message
|
74
|
+
]
|
75
|
+
|
76
|
+
Result.new.tap do |r|
|
77
|
+
r.text = sequence.join(" > ")
|
78
|
+
r.condition = is_success
|
79
|
+
r.critical = is_critical
|
80
|
+
r.fumble = is_fumble
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
TABLES = {
|
85
|
+
'SST' => DiceTable::Table.new(
|
86
|
+
'ストレス症状表',
|
87
|
+
'1D10',
|
88
|
+
[
|
89
|
+
'憤怒:一番近い敵を攻撃(成功率+20%)しにいきます。近くに敵がいない場合、誰かのストレスを+1させます。 頭に血が上り、誰かに怒りをぶつけます。',
|
90
|
+
'逃避:落下してでも敵から逃げるように移動します。周囲に敵が居ない場合、現実逃避します。 耐えられなくなり、逃げ出します。',
|
91
|
+
'幻覚:戦闘中は、「行動放棄(全AP)」します。戦闘以外なら、幻覚を見て笑います。 自分が望む幻覚が見えます。',
|
92
|
+
'絶叫:戦闘中は、「注目を集める(2AP)」をします。戦闘以外なら、無意味に叫びます。 思わず叫んでしまいます。',
|
93
|
+
'自傷:自ら【怪我】を負います。戦闘中は「自傷行為(1AP)」をして自分が【怪我】します。 思わず自分を傷つけます。',
|
94
|
+
'不安:誰かのストレスを1上げます。近くに誰も居ない場合、泣き出します。 不安にかられて余計なことを言います。',
|
95
|
+
'忌避:その場から一番近い対象に「石(1AP)」を投げます。それができない場合、【転倒】してうずくまります。 嫌悪感から全てを拒みます。',
|
96
|
+
'暴走:一番近い敵を攻撃しにいきます。近くに敵がいない場合、周りの意見も聞かずに安直な行動をします。 冷静でいられなくなり、直情的になります。',
|
97
|
+
'混乱:近くにいるランダムな対象に格闘で攻撃しにいきます。それができない場合、「行動放棄(全 AP)」します。 世界全てが敵に見えて攻撃します。',
|
98
|
+
'開眼:ストレスは0まで下がります。あなたは教祖となって教義をひとつつくって「布教」できます。次の症状が出るまで効果は続きます。 ゾンビだらけの世界の真理を見つけます。',
|
99
|
+
]
|
100
|
+
),
|
101
|
+
'IT' => DiceTable::RangeTable.new(
|
102
|
+
'食材表',
|
103
|
+
'1d100',
|
104
|
+
[
|
105
|
+
[1..50, '生モノ食材'],
|
106
|
+
[51..80, '怪しい食材'],
|
107
|
+
[81..100, '危ない食材']
|
108
|
+
]
|
109
|
+
)
|
110
|
+
}.freeze
|
111
|
+
|
112
|
+
register_prefix('\d*ZL', TABLES.keys)
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
@@ -37,6 +37,9 @@ module BCDice
|
|
37
37
|
# @return [Integer, nil]
|
38
38
|
attr_accessor :modifier_after_half
|
39
39
|
|
40
|
+
# @return [Integer, nil]
|
41
|
+
attr_accessor :modifier_after_one_and_a_half
|
42
|
+
|
40
43
|
def initialize(rate, modifier)
|
41
44
|
@rate = rate
|
42
45
|
@modifier = modifier
|
@@ -49,6 +52,7 @@ module BCDice
|
|
49
52
|
@semi_fixed_val = 0
|
50
53
|
@tmp_fixed_val = 0
|
51
54
|
@modifier_after_half = nil
|
55
|
+
@modifier_after_one_and_a_half = nil
|
52
56
|
end
|
53
57
|
|
54
58
|
# @return [Boolean]
|
@@ -56,6 +60,11 @@ module BCDice
|
|
56
60
|
return !@modifier_after_half.nil?
|
57
61
|
end
|
58
62
|
|
63
|
+
# @return [Boolean]
|
64
|
+
def one_and_a_half
|
65
|
+
return !@modifier_after_one_and_a_half.nil?
|
66
|
+
end
|
67
|
+
|
59
68
|
# @return [Integer]
|
60
69
|
def min_critical
|
61
70
|
if @semi_fixed_val <= 1
|
@@ -54,7 +54,8 @@ def parsed(rate, modifier, option)
|
|
54
54
|
p.semi_fixed_val = option.semi_fixed_val&.clamp(1, 6) || 0
|
55
55
|
p.tmp_fixed_val = option.tmp_fixed_val&.clamp(1, 6) || 0
|
56
56
|
p.modifier_after_half = option.modifier_after_half&.eval(@round_type)
|
57
|
-
p.
|
57
|
+
p.modifier_after_one_and_a_half = option.modifier_after_one_and_a_half&.eval(@round_type)
|
58
|
+
p.critical = option.critical&.eval(@round_type)&.clamp(0, 13) || (p.half || p.one_and_a_half ? 13 : 10)
|
58
59
|
end
|
59
60
|
end
|
60
61
|
|
@@ -65,111 +66,122 @@ end
|
|
65
66
|
##### State transition tables begin ###
|
66
67
|
|
67
68
|
racc_action_table = [
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
30,
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
69
|
+
18, 16, 17, 19, 6, 20, 21, 23, 24, 64,
|
70
|
+
65, 27, 28, 13, 66, 14, 22, 15, 18, 16,
|
71
|
+
17, 19, 5, 20, 21, 23, 24, 5, 9, 3,
|
72
|
+
4, 13, 10, 14, 22, 15, 18, 16, 17, 19,
|
73
|
+
11, 20, 21, 23, 24, 34, 5, 34, 40, 13,
|
74
|
+
42, 14, 22, 15, 30, 31, 30, 31, 33, 34,
|
75
|
+
33, 34, 62, 63, 62, 63, 34, 43, 30, 31,
|
76
|
+
30, 31, 33, 34, 33, 30, 31, 44, 34, 33,
|
77
|
+
34, 52, 30, 31, 57, 34, 33, 30, 31, 30,
|
78
|
+
31, 33, 34, 33, 30, 31, 58, 34, 33, 34,
|
79
|
+
60, 30, 31, 61, 34, 33, 30, 31, 30, 31,
|
80
|
+
33, 34, 33, 30, 31, nil, 34, 33, 34, nil,
|
81
|
+
30, 31, nil, 34, 33, 30, 31, 30, 31, 33,
|
82
|
+
36, 33, 30, 31, 62, 63, 33, 62, 63, 37,
|
83
|
+
38, 62, 63, 62, 63, 62, 63 ]
|
81
84
|
|
82
85
|
racc_action_check = [
|
83
|
-
|
84
|
-
|
85
|
-
3,
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
86
|
+
7, 7, 7, 7, 1, 7, 7, 7, 7, 55,
|
87
|
+
55, 12, 12, 7, 55, 7, 7, 7, 25, 25,
|
88
|
+
25, 25, 3, 25, 25, 25, 25, 0, 4, 0,
|
89
|
+
0, 25, 5, 25, 25, 25, 49, 49, 49, 49,
|
90
|
+
6, 49, 49, 49, 49, 13, 9, 14, 17, 49,
|
91
|
+
19, 49, 49, 49, 13, 13, 14, 14, 13, 16,
|
92
|
+
14, 18, 46, 46, 48, 48, 22, 20, 16, 16,
|
93
|
+
18, 18, 16, 23, 18, 22, 22, 21, 24, 22,
|
94
|
+
27, 29, 23, 23, 37, 28, 23, 24, 24, 27,
|
95
|
+
27, 24, 30, 27, 28, 28, 38, 31, 28, 33,
|
96
|
+
43, 30, 30, 44, 40, 30, 31, 31, 33, 33,
|
97
|
+
31, 62, 33, 40, 40, nil, 63, 40, 64, nil,
|
98
|
+
62, 62, nil, 65, 62, 63, 63, 64, 64, 63,
|
99
|
+
15, 64, 65, 65, 50, 50, 65, 51, 51, 15,
|
100
|
+
15, 56, 56, 69, 69, 70, 70 ]
|
96
101
|
|
97
102
|
racc_action_pointer = [
|
98
|
-
|
99
|
-
0,
|
100
|
-
|
101
|
-
|
102
|
-
nil,
|
103
|
-
|
104
|
-
nil, nil,
|
103
|
+
24, 4, nil, 19, 23, 30, 40, -4, nil, 43,
|
104
|
+
nil, nil, 0, 43, 45, 128, 57, 43, 59, 42,
|
105
|
+
59, 69, 64, 71, 76, 14, nil, 78, 83, 63,
|
106
|
+
90, 95, nil, 97, nil, nil, nil, 82, 94, nil,
|
107
|
+
102, nil, nil, 98, 101, nil, 49, nil, 51, 32,
|
108
|
+
121, 124, nil, nil, nil, -2, 128, nil, nil, nil,
|
109
|
+
nil, nil, 109, 114, 116, 121, nil, nil, nil, 130,
|
110
|
+
132 ]
|
105
111
|
|
106
112
|
racc_action_default = [
|
107
|
-
-
|
108
|
-
-
|
109
|
-
-
|
110
|
-
-
|
111
|
-
-
|
112
|
-
-24, -
|
113
|
-
-
|
113
|
+
-36, -36, -5, -36, -36, -36, -36, -1, -5, -36,
|
114
|
+
-4, 71, -6, -36, -36, -36, -12, -36, -36, -36,
|
115
|
+
-36, -36, -36, -36, -36, -2, -5, -36, -36, -36,
|
116
|
+
-36, -36, -33, -36, -35, -8, -9, -36, -36, -13,
|
117
|
+
-14, -16, -17, -36, -36, -20, -21, -30, -22, -3,
|
118
|
+
-23, -24, -7, -31, -32, -36, -27, -10, -11, -15,
|
119
|
+
-18, -19, -36, -36, -36, -36, -34, -28, -29, -25,
|
120
|
+
-26 ]
|
114
121
|
|
115
122
|
racc_goto_table = [
|
116
|
-
|
117
|
-
|
123
|
+
29, 35, 7, 39, 1, 41, 46, 48, 25, 45,
|
124
|
+
50, 51, 2, 55, nil, 8, 56, 53, 54, nil,
|
125
|
+
nil, 26, nil, nil, nil, nil, 49, 59, nil, nil,
|
118
126
|
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
119
|
-
nil, nil, nil, nil, nil, nil, nil,
|
120
|
-
|
127
|
+
nil, nil, nil, nil, nil, nil, nil, 69, 70, 67,
|
128
|
+
68 ]
|
121
129
|
|
122
130
|
racc_goto_check = [
|
123
|
-
5, 5, 3, 5, 5,
|
124
|
-
6,
|
125
|
-
nil,
|
131
|
+
5, 5, 3, 5, 1, 5, 6, 6, 3, 5,
|
132
|
+
6, 6, 2, 7, nil, 2, 6, 5, 5, nil,
|
133
|
+
nil, 2, nil, nil, nil, nil, 3, 5, nil, nil,
|
126
134
|
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
127
|
-
nil, nil, nil, nil,
|
135
|
+
nil, nil, nil, nil, nil, nil, nil, 6, 6, 5,
|
136
|
+
5 ]
|
128
137
|
|
129
138
|
racc_goto_pointer = [
|
130
|
-
nil,
|
139
|
+
nil, 4, 12, 0, nil, -13, -17, -20, nil ]
|
131
140
|
|
132
141
|
racc_goto_default = [
|
133
|
-
nil, nil, nil, nil,
|
142
|
+
nil, nil, nil, nil, 12, 47, nil, nil, 32 ]
|
134
143
|
|
135
144
|
racc_reduce_table = [
|
136
145
|
0, 0, :racc_error,
|
137
|
-
2,
|
138
|
-
3,
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
3,
|
145
|
-
|
146
|
-
4,
|
147
|
-
|
148
|
-
|
149
|
-
3,
|
150
|
-
3,
|
151
|
-
4,
|
152
|
-
|
153
|
-
3,
|
154
|
-
|
155
|
-
|
146
|
+
2, 23, :_reduce_1,
|
147
|
+
3, 23, :_reduce_2,
|
148
|
+
4, 23, :_reduce_3,
|
149
|
+
2, 24, :_reduce_4,
|
150
|
+
0, 25, :_reduce_5,
|
151
|
+
2, 25, :_reduce_6,
|
152
|
+
4, 25, :_reduce_7,
|
153
|
+
3, 25, :_reduce_8,
|
154
|
+
3, 25, :_reduce_9,
|
155
|
+
4, 25, :_reduce_10,
|
156
|
+
4, 25, :_reduce_11,
|
157
|
+
2, 25, :_reduce_12,
|
158
|
+
3, 25, :_reduce_13,
|
159
|
+
3, 25, :_reduce_14,
|
160
|
+
4, 25, :_reduce_15,
|
161
|
+
3, 25, :_reduce_16,
|
162
|
+
3, 25, :_reduce_17,
|
163
|
+
4, 25, :_reduce_18,
|
164
|
+
4, 25, :_reduce_19,
|
156
165
|
3, 25, :_reduce_20,
|
157
|
-
|
158
|
-
|
159
|
-
3,
|
166
|
+
2, 26, :_reduce_21,
|
167
|
+
2, 26, :_reduce_22,
|
168
|
+
3, 26, :_reduce_23,
|
169
|
+
3, 26, :_reduce_24,
|
170
|
+
3, 29, :_reduce_25,
|
171
|
+
3, 29, :_reduce_26,
|
172
|
+
1, 29, :_reduce_none,
|
173
|
+
3, 28, :_reduce_28,
|
174
|
+
3, 28, :_reduce_29,
|
160
175
|
1, 28, :_reduce_none,
|
161
|
-
|
162
|
-
|
176
|
+
2, 27, :_reduce_31,
|
177
|
+
2, 27, :_reduce_32,
|
163
178
|
1, 27, :_reduce_none,
|
164
|
-
|
165
|
-
|
166
|
-
1, 26, :_reduce_none,
|
167
|
-
3, 29, :_reduce_31,
|
168
|
-
1, 29, :_reduce_32 ]
|
179
|
+
3, 30, :_reduce_34,
|
180
|
+
1, 30, :_reduce_35 ]
|
169
181
|
|
170
|
-
racc_reduce_n =
|
182
|
+
racc_reduce_n = 36
|
171
183
|
|
172
|
-
racc_shift_n =
|
184
|
+
racc_shift_n = 71
|
173
185
|
|
174
186
|
racc_token_table = {
|
175
187
|
false => 0,
|
@@ -178,23 +190,24 @@ racc_token_table = {
|
|
178
190
|
:K => 3,
|
179
191
|
:R => 4,
|
180
192
|
:H => 5,
|
181
|
-
:
|
182
|
-
:
|
183
|
-
:
|
184
|
-
:
|
185
|
-
:
|
186
|
-
:
|
187
|
-
:
|
188
|
-
:
|
189
|
-
:
|
190
|
-
:
|
191
|
-
:
|
192
|
-
:
|
193
|
-
:
|
194
|
-
:
|
195
|
-
:
|
196
|
-
|
197
|
-
|
193
|
+
:O => 6,
|
194
|
+
:G => 7,
|
195
|
+
:F => 8,
|
196
|
+
:S => 9,
|
197
|
+
:T => 10,
|
198
|
+
:PLUS => 11,
|
199
|
+
:MINUS => 12,
|
200
|
+
:ASTERISK => 13,
|
201
|
+
:SLASH => 14,
|
202
|
+
:PARENL => 15,
|
203
|
+
:PARENR => 16,
|
204
|
+
:BRACKETL => 17,
|
205
|
+
:BRACKETR => 18,
|
206
|
+
:AT => 19,
|
207
|
+
:SHARP => 20,
|
208
|
+
:DOLLAR => 21 }
|
209
|
+
|
210
|
+
racc_nt_base = 22
|
198
211
|
|
199
212
|
racc_use_result_var = true
|
200
213
|
|
@@ -221,6 +234,7 @@ Racc_token_to_s_table = [
|
|
221
234
|
"K",
|
222
235
|
"R",
|
223
236
|
"H",
|
237
|
+
"O",
|
224
238
|
"G",
|
225
239
|
"F",
|
226
240
|
"S",
|
@@ -262,6 +276,7 @@ end
|
|
262
276
|
|
263
277
|
def _reduce_2(val, _values, result)
|
264
278
|
_, rate, option = val
|
279
|
+
raise ParseError if option.modifier_after_one_and_a_half
|
265
280
|
option.modifier_after_half ||= Arithmetic::Node::Number.new(0)
|
266
281
|
modifier = option.modifier || Arithmetic::Node::Number.new(0)
|
267
282
|
result = parsed(rate, modifier.eval(@round_type), option)
|
@@ -270,17 +285,27 @@ def _reduce_2(val, _values, result)
|
|
270
285
|
end
|
271
286
|
|
272
287
|
def _reduce_3(val, _values, result)
|
273
|
-
|
288
|
+
_, _, rate, option = val
|
289
|
+
raise ParseError if option.modifier_after_half
|
290
|
+
option.modifier_after_one_and_a_half ||= Arithmetic::Node::Number.new(0)
|
291
|
+
modifier = option.modifier || Arithmetic::Node::Number.new(0)
|
292
|
+
result = parsed(rate, modifier.eval(@round_type), option)
|
293
|
+
|
274
294
|
result
|
275
295
|
end
|
276
296
|
|
277
297
|
def _reduce_4(val, _values, result)
|
298
|
+
result = val[1].to_i
|
299
|
+
result
|
300
|
+
end
|
301
|
+
|
302
|
+
def _reduce_5(val, _values, result)
|
278
303
|
result = RatingOptions.new
|
279
304
|
|
280
305
|
result
|
281
306
|
end
|
282
307
|
|
283
|
-
def
|
308
|
+
def _reduce_6(val, _values, result)
|
284
309
|
option, term = val
|
285
310
|
raise ParseError unless option.modifier.nil?
|
286
311
|
|
@@ -290,7 +315,7 @@ def _reduce_5(val, _values, result)
|
|
290
315
|
result
|
291
316
|
end
|
292
317
|
|
293
|
-
def
|
318
|
+
def _reduce_7(val, _values, result)
|
294
319
|
option, _, term, _ = val
|
295
320
|
raise ParseError unless option.critical.nil?
|
296
321
|
|
@@ -300,7 +325,7 @@ def _reduce_6(val, _values, result)
|
|
300
325
|
result
|
301
326
|
end
|
302
327
|
|
303
|
-
def
|
328
|
+
def _reduce_8(val, _values, result)
|
304
329
|
option, _, term = val
|
305
330
|
raise ParseError unless option.critical.nil?
|
306
331
|
|
@@ -310,7 +335,7 @@ def _reduce_7(val, _values, result)
|
|
310
335
|
result
|
311
336
|
end
|
312
337
|
|
313
|
-
def
|
338
|
+
def _reduce_9(val, _values, result)
|
314
339
|
option, _, term = val
|
315
340
|
raise ParseError unless option.settable_first_roll_adjust_option?
|
316
341
|
|
@@ -320,7 +345,7 @@ def _reduce_8(val, _values, result)
|
|
320
345
|
result
|
321
346
|
end
|
322
347
|
|
323
|
-
def
|
348
|
+
def _reduce_10(val, _values, result)
|
324
349
|
option, _, _, term = val
|
325
350
|
raise ParseError unless option.settable_first_roll_adjust_option?
|
326
351
|
|
@@ -330,7 +355,7 @@ def _reduce_9(val, _values, result)
|
|
330
355
|
result
|
331
356
|
end
|
332
357
|
|
333
|
-
def
|
358
|
+
def _reduce_11(val, _values, result)
|
334
359
|
option, _, _, term = val
|
335
360
|
raise ParseError unless option.settable_first_roll_adjust_option?
|
336
361
|
|
@@ -340,7 +365,7 @@ def _reduce_10(val, _values, result)
|
|
340
365
|
result
|
341
366
|
end
|
342
367
|
|
343
|
-
def
|
368
|
+
def _reduce_12(val, _values, result)
|
344
369
|
option, _ = val
|
345
370
|
raise ParseError unless option.modifier_after_half.nil?
|
346
371
|
|
@@ -350,7 +375,7 @@ def _reduce_11(val, _values, result)
|
|
350
375
|
result
|
351
376
|
end
|
352
377
|
|
353
|
-
def
|
378
|
+
def _reduce_13(val, _values, result)
|
354
379
|
option, _, term = val
|
355
380
|
raise ParseError unless option.modifier_after_half.nil?
|
356
381
|
|
@@ -360,7 +385,27 @@ def _reduce_12(val, _values, result)
|
|
360
385
|
result
|
361
386
|
end
|
362
387
|
|
363
|
-
def
|
388
|
+
def _reduce_14(val, _values, result)
|
389
|
+
option, _, _ = val
|
390
|
+
raise ParseError if option.modifier_after_one_and_a_half
|
391
|
+
|
392
|
+
option.modifier_after_one_and_a_half = Arithmetic::Node::Number.new(0)
|
393
|
+
result = option
|
394
|
+
|
395
|
+
result
|
396
|
+
end
|
397
|
+
|
398
|
+
def _reduce_15(val, _values, result)
|
399
|
+
option, _, _, term = val
|
400
|
+
raise ParseError if option.modifier_after_one_and_a_half
|
401
|
+
|
402
|
+
option.modifier_after_one_and_a_half = term
|
403
|
+
result = option
|
404
|
+
|
405
|
+
result
|
406
|
+
end
|
407
|
+
|
408
|
+
def _reduce_16(val, _values, result)
|
364
409
|
option, _, term = val
|
365
410
|
raise ParseError unless [:v2_5, :v2_0].include?(@version) && option.rateup.nil?
|
366
411
|
|
@@ -370,7 +415,7 @@ def _reduce_13(val, _values, result)
|
|
370
415
|
result
|
371
416
|
end
|
372
417
|
|
373
|
-
def
|
418
|
+
def _reduce_17(val, _values, result)
|
374
419
|
option, _, _ = val
|
375
420
|
raise ParseError unless [:v2_5, :v2_0].include?(@version) && option.settable_non_2d_roll_option?
|
376
421
|
|
@@ -380,7 +425,7 @@ def _reduce_14(val, _values, result)
|
|
380
425
|
result
|
381
426
|
end
|
382
427
|
|
383
|
-
def
|
428
|
+
def _reduce_18(val, _values, result)
|
384
429
|
option, _, _, term = val
|
385
430
|
raise ParseError unless [:v2_5, :v2_0].include?(@version) && option.settable_non_2d_roll_option?
|
386
431
|
|
@@ -390,7 +435,7 @@ def _reduce_15(val, _values, result)
|
|
390
435
|
result
|
391
436
|
end
|
392
437
|
|
393
|
-
def
|
438
|
+
def _reduce_19(val, _values, result)
|
394
439
|
option, _, _, term = val
|
395
440
|
raise ParseError unless [:v2_5, :v2_0].include?(@version) && option.settable_non_2d_roll_option?
|
396
441
|
|
@@ -400,7 +445,7 @@ def _reduce_16(val, _values, result)
|
|
400
445
|
result
|
401
446
|
end
|
402
447
|
|
403
|
-
def
|
448
|
+
def _reduce_20(val, _values, result)
|
404
449
|
option, _, term = val
|
405
450
|
raise ParseError unless @version == :v2_5 && option.kept_modify.nil?
|
406
451
|
|
@@ -410,69 +455,69 @@ def _reduce_17(val, _values, result)
|
|
410
455
|
result
|
411
456
|
end
|
412
457
|
|
413
|
-
def
|
458
|
+
def _reduce_21(val, _values, result)
|
414
459
|
result = val[1]
|
415
460
|
result
|
416
461
|
end
|
417
462
|
|
418
|
-
def
|
463
|
+
def _reduce_22(val, _values, result)
|
419
464
|
result = Arithmetic::Node::Negative.new(val[1])
|
420
465
|
result
|
421
466
|
end
|
422
467
|
|
423
|
-
def
|
468
|
+
def _reduce_23(val, _values, result)
|
424
469
|
result = Arithmetic::Node::BinaryOp.new(val[0], :+, val[2])
|
425
470
|
result
|
426
471
|
end
|
427
472
|
|
428
|
-
def
|
473
|
+
def _reduce_24(val, _values, result)
|
429
474
|
result = Arithmetic::Node::BinaryOp.new(val[0], :-, val[2])
|
430
475
|
result
|
431
476
|
end
|
432
477
|
|
433
|
-
def
|
478
|
+
def _reduce_25(val, _values, result)
|
434
479
|
result = Arithmetic::Node::BinaryOp.new(val[0], :+, val[2])
|
435
480
|
result
|
436
481
|
end
|
437
482
|
|
438
|
-
def
|
483
|
+
def _reduce_26(val, _values, result)
|
439
484
|
result = Arithmetic::Node::BinaryOp.new(val[0], :-, val[2])
|
440
485
|
result
|
441
486
|
end
|
442
487
|
|
443
|
-
# reduce
|
488
|
+
# reduce 27 omitted
|
444
489
|
|
445
|
-
def
|
490
|
+
def _reduce_28(val, _values, result)
|
446
491
|
result = Arithmetic::Node::BinaryOp.new(val[0], :*, val[2])
|
447
492
|
result
|
448
493
|
end
|
449
494
|
|
450
|
-
def
|
495
|
+
def _reduce_29(val, _values, result)
|
451
496
|
result = Arithmetic::Node::DivideWithGameSystemDefault.new(val[0], val[2])
|
452
497
|
|
453
498
|
result
|
454
499
|
end
|
455
500
|
|
456
|
-
# reduce
|
501
|
+
# reduce 30 omitted
|
457
502
|
|
458
|
-
def
|
503
|
+
def _reduce_31(val, _values, result)
|
459
504
|
result = val[1]
|
460
505
|
result
|
461
506
|
end
|
462
507
|
|
463
|
-
def
|
508
|
+
def _reduce_32(val, _values, result)
|
464
509
|
result = Arithmetic::Node::Negative.new(val[1])
|
465
510
|
result
|
466
511
|
end
|
467
512
|
|
468
|
-
# reduce
|
513
|
+
# reduce 33 omitted
|
469
514
|
|
470
|
-
def
|
515
|
+
def _reduce_34(val, _values, result)
|
471
516
|
result = val[1]
|
472
517
|
result
|
473
518
|
end
|
474
519
|
|
475
|
-
def
|
520
|
+
def _reduce_35(val, _values, result)
|
476
521
|
result = Arithmetic::Node::Number.new(val[0])
|
477
522
|
result
|
478
523
|
end
|