bcdice 3.14.0 → 3.15.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 +59 -0
- data/i18n/Cthulhu/zh_hant.yml +1 -1
- data/i18n/CyberpunkRed/ko_kr.yml +389 -0
- data/i18n/DoubleCross/ja_jp.yml +53 -0
- data/i18n/DoubleCross/ko_kr.yml +52 -0
- data/i18n/FutariSousa/ja_jp.yml +138 -138
- data/i18n/KillDeathBusiness/ja_jp.yml +198 -0
- data/i18n/MagicaLogia/ko_kr.yml +2 -2
- data/i18n/MonotoneMuseum/ko_kr.yml +227 -0
- data/i18n/SkynautsBouken/ko_kr.yml +114 -0
- data/i18n/StratoShout/ko_kr.yml +102 -102
- data/i18n/zh_hant.yml +5 -0
- data/lib/bcdice/game_system/Aionia.rb +131 -0
- data/lib/bcdice/game_system/Arianrhod_Korean.rb +2 -0
- data/lib/bcdice/game_system/ArknightsFan.rb +245 -87
- data/lib/bcdice/game_system/BlackJacket_Korean.rb +244 -0
- data/lib/bcdice/game_system/CharonSanctions.rb +112 -0
- data/lib/bcdice/game_system/Cthulhu7th.rb +1 -1
- data/lib/bcdice/game_system/Cthulhu7th_ChineseTraditional/full_auto.rb +293 -0
- data/lib/bcdice/game_system/Cthulhu7th_ChineseTraditional/rollable.rb +43 -0
- data/lib/bcdice/game_system/Cthulhu7th_ChineseTraditional.rb +470 -306
- data/lib/bcdice/game_system/CyberpunkRed.rb +1 -2
- data/lib/bcdice/game_system/CyberpunkRed_Korean.rb +66 -0
- data/lib/bcdice/game_system/DoubleCross.rb +18 -1
- data/lib/bcdice/game_system/DoubleCross_Korean.rb +5 -1
- data/lib/bcdice/game_system/FullFace.rb +25 -3
- data/lib/bcdice/game_system/FutariSousa.rb +17 -5
- data/lib/bcdice/game_system/Garactier.rb +479 -0
- data/lib/bcdice/game_system/GardenOrder.rb +390 -9
- data/lib/bcdice/game_system/GundogRevised.rb +8 -8
- data/lib/bcdice/game_system/KillDeathBusiness.rb +155 -3
- data/lib/bcdice/game_system/KimitoYell.rb +568 -0
- data/lib/bcdice/game_system/Magius.rb +125 -0
- data/lib/bcdice/game_system/Magius_3rdNewTokyoCity.rb +62 -0
- data/lib/bcdice/game_system/MonotoneMuseum_Korean.rb +4 -4
- data/lib/bcdice/game_system/NSSQ.rb +17 -9
- data/lib/bcdice/game_system/NervWhitePaper.rb +129 -0
- data/lib/bcdice/game_system/RogueLikeHalf.rb +198 -0
- data/lib/bcdice/game_system/RuneQuestRoleplayingInGlorantha.rb +16 -13
- data/lib/bcdice/game_system/ShinobiGami.rb +73 -43
- data/lib/bcdice/game_system/SkynautsBouken.rb +4 -4
- data/lib/bcdice/game_system/SkynautsBouken_Korean.rb +57 -0
- data/lib/bcdice/game_system/StratoShout_Korean.rb +1 -1
- data/lib/bcdice/game_system/SwordWorld.rb +4 -0
- data/lib/bcdice/game_system/SwordWorld2_5.rb +3 -2
- data/lib/bcdice/game_system/TensaiGunshiNiNaro.rb +51 -17
- data/lib/bcdice/game_system/TheIndieHack.rb +82 -0
- data/lib/bcdice/game_system/TorgEternity.rb +35 -6
- data/lib/bcdice/game_system/WoW.rb +161 -0
- data/lib/bcdice/game_system/YankeeMustDie.rb +192 -0
- data/lib/bcdice/game_system/YearZeroEngine.rb +225 -28
- data/lib/bcdice/game_system/YuMyoKishi.rb +141 -0
- data/lib/bcdice/game_system/sword_world/rating_lexer.rb +1 -0
- data/lib/bcdice/game_system/sword_world/rating_options.rb +4 -1
- data/lib/bcdice/game_system/sword_world/rating_parsed.rb +5 -0
- data/lib/bcdice/game_system/sword_world/rating_parser.rb +129 -115
- data/lib/bcdice/game_system.rb +15 -0
- data/lib/bcdice/version.rb +1 -1
- metadata +22 -6
@@ -0,0 +1,141 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'bcdice/base'
|
4
|
+
|
5
|
+
module BCDice
|
6
|
+
module GameSystem
|
7
|
+
class YuMyoKishi < Base
|
8
|
+
# ゲームシステムの識別子
|
9
|
+
ID = 'YuMyoKishi'
|
10
|
+
|
11
|
+
# ゲームシステム名
|
12
|
+
NAME = '幽冥鬼使'
|
13
|
+
|
14
|
+
# ゲームシステム名の読みがな
|
15
|
+
#
|
16
|
+
# 「ゲームシステム名の読みがなの設定方法」(docs/dicebot_sort_key.md)を参考にして
|
17
|
+
# 設定してください
|
18
|
+
SORT_KEY = 'ゆうみようきし'
|
19
|
+
|
20
|
+
# ダイスボットの使い方
|
21
|
+
HELP_MESSAGE = <<~MESSAGETEXT
|
22
|
+
■判定 YM+a>=b a:技能値(省略可) b:目標値(省略可)
|
23
|
+
例:YM+4>=8: 技能値による修正が+4で、目標値8の克服判定を行う
|
24
|
+
YM>=8 : 技能値による修正なしで、目標値8の克服判定を行う
|
25
|
+
YM+6 : 技能値による修正が+6で、達成値を確認する
|
26
|
+
|
27
|
+
■代償表 COT
|
28
|
+
■転禍表 TRT
|
29
|
+
MESSAGETEXT
|
30
|
+
|
31
|
+
TABLES = {
|
32
|
+
"COT" => DiceTable::Table.new(
|
33
|
+
"代償表",
|
34
|
+
"2D6",
|
35
|
+
[
|
36
|
+
"不慮の出逢い",
|
37
|
+
"深淵を覗くとき",
|
38
|
+
"時間の消費",
|
39
|
+
"奇妙な情報",
|
40
|
+
"優柔不断",
|
41
|
+
"注意散漫",
|
42
|
+
"心身耗弱",
|
43
|
+
"不穏な情報",
|
44
|
+
"遺留品",
|
45
|
+
"迫りくる危機",
|
46
|
+
"正体の露見",
|
47
|
+
]
|
48
|
+
),
|
49
|
+
"TRT" => DiceTable::Table.new(
|
50
|
+
"転禍表",
|
51
|
+
"2D6",
|
52
|
+
[
|
53
|
+
"○○と瓜二つ",
|
54
|
+
"絶対絶命",
|
55
|
+
"悪癖災う",
|
56
|
+
"冷酷な指令",
|
57
|
+
"おびえる視線",
|
58
|
+
"絡みつく妖気",
|
59
|
+
"容赦ない評定",
|
60
|
+
"無力な市民",
|
61
|
+
"未練阻む",
|
62
|
+
"縁の枷",
|
63
|
+
"邪悪な刻印",
|
64
|
+
]
|
65
|
+
),
|
66
|
+
}.freeze
|
67
|
+
|
68
|
+
# ダイスボットで使用するコマンドを配列で列挙する
|
69
|
+
register_prefix("YM", TABLES.keys)
|
70
|
+
|
71
|
+
def eval_game_system_specific_command(command)
|
72
|
+
debug("eval_game_system_specific_command Begin")
|
73
|
+
|
74
|
+
return roll_command(command) || roll_tables(command, TABLES)
|
75
|
+
end
|
76
|
+
|
77
|
+
def roll_command(command)
|
78
|
+
parser = Command::Parser.new('YM', round_type: round_type)
|
79
|
+
.restrict_cmp_op_to(:>=, nil)
|
80
|
+
cmd = parser.parse(command)
|
81
|
+
|
82
|
+
unless cmd
|
83
|
+
return nil
|
84
|
+
end
|
85
|
+
|
86
|
+
dice_list = @randomizer.roll_barabara(4, 6)
|
87
|
+
value, status = sip_pat_a(dice_list)
|
88
|
+
achievement = status == :wumian ? 0 : value + cmd.modify_number
|
89
|
+
roll_text = [
|
90
|
+
cmd.to_s,
|
91
|
+
dice_list.join(','),
|
92
|
+
value,
|
93
|
+
value == achievement ? nil : achievement,
|
94
|
+
].compact.join(" > ")
|
95
|
+
|
96
|
+
if cmd.target_number.nil?
|
97
|
+
if status == :wumian
|
98
|
+
Result.failure(roll_text)
|
99
|
+
elsif status == :yise
|
100
|
+
Result.critical(roll_text)
|
101
|
+
else
|
102
|
+
Result.new(roll_text)
|
103
|
+
end
|
104
|
+
elsif status == :wumian
|
105
|
+
Result.failure([roll_text, "可"].join(" > "))
|
106
|
+
elsif status == :yise
|
107
|
+
Result.critical([roll_text, "優"].join(" > "))
|
108
|
+
elsif achievement >= cmd.target_number
|
109
|
+
Result.success([roll_text, "良"].join(" > "))
|
110
|
+
else
|
111
|
+
Result.failure([roll_text, "可"].join(" > "))
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
def sip_pat_a(dice_list) # 十八仔
|
116
|
+
result = dice_list.each_with_object(Hash.new(0)) do |cur, acc|
|
117
|
+
acc[cur] += 1
|
118
|
+
end
|
119
|
+
case result.count
|
120
|
+
when 1
|
121
|
+
# 全てゾロ目
|
122
|
+
[20, :yise] # 一色
|
123
|
+
when 2
|
124
|
+
if result.values == [2, 2]
|
125
|
+
# 同値のダイスが2つずつ
|
126
|
+
[result.keys.max * 2, :normal]
|
127
|
+
else
|
128
|
+
# 3つの同値と1つの目のダイス
|
129
|
+
[result.keys.sum, :normal]
|
130
|
+
end
|
131
|
+
when 3
|
132
|
+
# 2つの同値と1つずつの目のダイス
|
133
|
+
[result.select { |_k, v| v == 1 }.keys.sum, :normal]
|
134
|
+
else
|
135
|
+
# 全部バラバラ
|
136
|
+
[0, :wumian] # 無面
|
137
|
+
end
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
@@ -16,6 +16,9 @@ module BCDice
|
|
16
16
|
# @return [Integer, nil]
|
17
17
|
attr_accessor :first_modify
|
18
18
|
|
19
|
+
# @return [Integer, nil]
|
20
|
+
attr_accessor :first_modify_ssp
|
21
|
+
|
19
22
|
# @return [Integer, nil]
|
20
23
|
attr_accessor :rateup
|
21
24
|
|
@@ -38,7 +41,7 @@ module BCDice
|
|
38
41
|
attr_accessor :modifier_after_one_and_a_half
|
39
42
|
|
40
43
|
def settable_first_roll_adjust_option?
|
41
|
-
return first_modify.nil? && first_to.nil?
|
44
|
+
return first_modify.nil? && first_to.nil? && first_modify_ssp.nil?
|
42
45
|
end
|
43
46
|
|
44
47
|
def settable_non_2d_roll_option?
|
@@ -19,6 +19,9 @@ module BCDice
|
|
19
19
|
# @return [Integer]
|
20
20
|
attr_accessor :first_modify
|
21
21
|
|
22
|
+
# @return [Integer]
|
23
|
+
attr_accessor :first_modify_ssp
|
24
|
+
|
22
25
|
# @return [Integer]
|
23
26
|
attr_accessor :rateup
|
24
27
|
|
@@ -47,6 +50,7 @@ module BCDice
|
|
47
50
|
@kept_modify = 0
|
48
51
|
@first_to = 0
|
49
52
|
@first_modify = 0
|
53
|
+
@first_modify_ssp = 0
|
50
54
|
@greatest_fortune = false
|
51
55
|
@rateup = 0
|
52
56
|
@semi_fixed_val = 0
|
@@ -85,6 +89,7 @@ module BCDice
|
|
85
89
|
|
86
90
|
output += "c[#{critical}]" if critical < 13
|
87
91
|
output += "m[#{Format.modifier(first_modify)}]" if first_modify != 0
|
92
|
+
output += "m[~#{Format.modifier(first_modify_ssp)}]" if first_modify_ssp != 0
|
88
93
|
output += "m[#{first_to}]" if first_to != 0
|
89
94
|
output += "r[#{rateup}]" if rateup != 0
|
90
95
|
output += "gf" if @greatest_fortune
|
@@ -49,6 +49,7 @@ def parsed(rate, modifier, option)
|
|
49
49
|
p.kept_modify = option.kept_modify&.eval(@round_type) || 0
|
50
50
|
p.first_to = option.first_to || 0
|
51
51
|
p.first_modify = option.first_modify || 0
|
52
|
+
p.first_modify_ssp = option.first_modify_ssp || 0
|
52
53
|
p.rateup = option.rateup&.eval(@round_type) || 0
|
53
54
|
p.greatest_fortune = option.greatest_fortune if !option.greatest_fortune.nil?
|
54
55
|
p.semi_fixed_val = option.semi_fixed_val&.clamp(1, 6) || 0
|
@@ -66,122 +67,123 @@ end
|
|
66
67
|
##### State transition tables begin ###
|
67
68
|
|
68
69
|
racc_action_table = [
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
70
|
+
36, 66, 67, 27, 28, 5, 68, 3, 4, 37,
|
71
|
+
38, 18, 16, 17, 19, 6, 20, 21, 23, 24,
|
72
|
+
39, 64, 65, 5, 13, 9, 14, 22, 15, 18,
|
73
|
+
16, 17, 19, 10, 20, 21, 23, 24, 64, 65,
|
74
|
+
64, 65, 13, 11, 14, 22, 15, 18, 16, 17,
|
75
|
+
19, 5, 20, 21, 23, 24, 34, 41, 34, 43,
|
76
|
+
13, 44, 14, 22, 15, 30, 31, 30, 31, 33,
|
77
|
+
34, 33, 34, 64, 65, 64, 65, 34, 45, 30,
|
78
|
+
31, 30, 31, 33, 34, 33, 30, 31, 53, 34,
|
79
|
+
33, 34, 58, 30, 31, 59, 34, 33, 30, 31,
|
80
|
+
30, 31, 33, 34, 33, 30, 31, 60, 34, 33,
|
81
|
+
34, 62, 30, 31, 63, 34, 33, 30, 31, 30,
|
82
|
+
31, 33, 34, 33, 30, 31, 69, 34, 33, 34,
|
83
|
+
nil, 30, 31, nil, 34, 33, 30, 31, 30, 31,
|
84
|
+
33, nil, 33, 30, 31, 64, 65, 33, 64, 65 ]
|
84
85
|
|
85
86
|
racc_action_check = [
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
27,
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
87
|
+
15, 56, 56, 12, 12, 0, 56, 0, 0, 15,
|
88
|
+
15, 7, 7, 7, 7, 1, 7, 7, 7, 7,
|
89
|
+
15, 47, 47, 3, 7, 4, 7, 7, 7, 25,
|
90
|
+
25, 25, 25, 5, 25, 25, 25, 25, 49, 49,
|
91
|
+
51, 51, 25, 6, 25, 25, 25, 50, 50, 50,
|
92
|
+
50, 9, 50, 50, 50, 50, 13, 17, 14, 19,
|
93
|
+
50, 20, 50, 50, 50, 13, 13, 14, 14, 13,
|
94
|
+
16, 14, 18, 52, 52, 57, 57, 22, 21, 16,
|
95
|
+
16, 18, 18, 16, 23, 18, 22, 22, 29, 24,
|
96
|
+
22, 27, 37, 23, 23, 38, 28, 23, 24, 24,
|
97
|
+
27, 27, 24, 30, 27, 28, 28, 39, 31, 28,
|
98
|
+
33, 44, 30, 30, 45, 41, 30, 31, 31, 33,
|
99
|
+
33, 31, 64, 33, 41, 41, 60, 65, 41, 66,
|
100
|
+
nil, 64, 64, nil, 67, 64, 65, 65, 66, 66,
|
101
|
+
65, nil, 66, 67, 67, 72, 72, 67, 73, 73 ]
|
101
102
|
|
102
103
|
racc_action_pointer = [
|
103
|
-
|
104
|
-
nil, nil,
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
nil, nil,
|
110
|
-
132 ]
|
104
|
+
2, 15, nil, 20, 20, 31, 43, 7, nil, 48,
|
105
|
+
nil, nil, -8, 54, 56, -2, 68, 52, 70, 51,
|
106
|
+
53, 70, 75, 82, 87, 25, nil, 89, 94, 70,
|
107
|
+
101, 106, nil, 108, nil, nil, nil, 90, 93, 96,
|
108
|
+
nil, 113, nil, nil, 109, 112, nil, 8, nil, 25,
|
109
|
+
43, 27, 60, nil, nil, nil, -10, 62, nil, nil,
|
110
|
+
124, nil, nil, nil, 120, 125, 127, 132, nil, nil,
|
111
|
+
nil, nil, 132, 135 ]
|
111
112
|
|
112
113
|
racc_action_default = [
|
113
|
-
-
|
114
|
-
-4,
|
115
|
-
-
|
116
|
-
-
|
117
|
-
-14, -
|
118
|
-
|
119
|
-
-
|
120
|
-
-26 ]
|
114
|
+
-37, -37, -5, -37, -37, -37, -37, -1, -5, -37,
|
115
|
+
-4, 74, -6, -37, -37, -37, -13, -37, -37, -37,
|
116
|
+
-37, -37, -37, -37, -37, -2, -5, -37, -37, -37,
|
117
|
+
-37, -37, -34, -37, -36, -8, -9, -37, -37, -37,
|
118
|
+
-14, -15, -17, -18, -37, -37, -21, -22, -31, -23,
|
119
|
+
-3, -24, -25, -7, -32, -33, -37, -28, -10, -11,
|
120
|
+
-37, -16, -19, -20, -37, -37, -37, -37, -35, -12,
|
121
|
+
-29, -30, -26, -27 ]
|
121
122
|
|
122
123
|
racc_goto_table = [
|
123
|
-
29, 35, 7,
|
124
|
-
|
125
|
-
nil, 26, nil, nil, nil, nil,
|
124
|
+
29, 35, 7, 40, 1, 42, 47, 49, 25, 46,
|
125
|
+
51, 52, 2, 56, nil, 8, 57, 54, 55, nil,
|
126
|
+
nil, 26, nil, nil, nil, nil, 50, nil, 61, nil,
|
126
127
|
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
127
|
-
nil, nil, nil, nil, nil, nil, nil,
|
128
|
-
|
128
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, 72,
|
129
|
+
73, 70, 71 ]
|
129
130
|
|
130
131
|
racc_goto_check = [
|
131
132
|
5, 5, 3, 5, 1, 5, 6, 6, 3, 5,
|
132
133
|
6, 6, 2, 7, nil, 2, 6, 5, 5, nil,
|
133
|
-
nil, 2, nil, nil, nil, nil, 3, 5, nil,
|
134
|
+
nil, 2, nil, nil, nil, nil, 3, nil, 5, nil,
|
134
135
|
nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
135
|
-
nil, nil, nil, nil, nil, nil, nil,
|
136
|
-
5 ]
|
136
|
+
nil, nil, nil, nil, nil, nil, nil, nil, nil, 6,
|
137
|
+
6, 5, 5 ]
|
137
138
|
|
138
139
|
racc_goto_pointer = [
|
139
140
|
nil, 4, 12, 0, nil, -13, -17, -20, nil ]
|
140
141
|
|
141
142
|
racc_goto_default = [
|
142
|
-
nil, nil, nil, nil, 12,
|
143
|
+
nil, nil, nil, nil, 12, 48, nil, nil, 32 ]
|
143
144
|
|
144
145
|
racc_reduce_table = [
|
145
146
|
0, 0, :racc_error,
|
146
|
-
2,
|
147
|
-
3,
|
148
|
-
4,
|
149
|
-
2,
|
150
|
-
0,
|
151
|
-
2,
|
152
|
-
4,
|
153
|
-
3,
|
154
|
-
3,
|
155
|
-
4,
|
156
|
-
4,
|
157
|
-
|
158
|
-
|
159
|
-
3,
|
160
|
-
|
161
|
-
|
162
|
-
3,
|
163
|
-
|
164
|
-
4,
|
165
|
-
|
166
|
-
|
167
|
-
2,
|
168
|
-
|
169
|
-
3,
|
170
|
-
3,
|
171
|
-
3,
|
147
|
+
2, 24, :_reduce_1,
|
148
|
+
3, 24, :_reduce_2,
|
149
|
+
4, 24, :_reduce_3,
|
150
|
+
2, 25, :_reduce_4,
|
151
|
+
0, 26, :_reduce_5,
|
152
|
+
2, 26, :_reduce_6,
|
153
|
+
4, 26, :_reduce_7,
|
154
|
+
3, 26, :_reduce_8,
|
155
|
+
3, 26, :_reduce_9,
|
156
|
+
4, 26, :_reduce_10,
|
157
|
+
4, 26, :_reduce_11,
|
158
|
+
5, 26, :_reduce_12,
|
159
|
+
2, 26, :_reduce_13,
|
160
|
+
3, 26, :_reduce_14,
|
161
|
+
3, 26, :_reduce_15,
|
162
|
+
4, 26, :_reduce_16,
|
163
|
+
3, 26, :_reduce_17,
|
164
|
+
3, 26, :_reduce_18,
|
165
|
+
4, 26, :_reduce_19,
|
166
|
+
4, 26, :_reduce_20,
|
167
|
+
3, 26, :_reduce_21,
|
168
|
+
2, 27, :_reduce_22,
|
169
|
+
2, 27, :_reduce_23,
|
170
|
+
3, 27, :_reduce_24,
|
171
|
+
3, 27, :_reduce_25,
|
172
|
+
3, 30, :_reduce_26,
|
173
|
+
3, 30, :_reduce_27,
|
174
|
+
1, 30, :_reduce_none,
|
175
|
+
3, 29, :_reduce_29,
|
176
|
+
3, 29, :_reduce_30,
|
172
177
|
1, 29, :_reduce_none,
|
173
|
-
|
174
|
-
|
178
|
+
2, 28, :_reduce_32,
|
179
|
+
2, 28, :_reduce_33,
|
175
180
|
1, 28, :_reduce_none,
|
176
|
-
|
177
|
-
|
178
|
-
1, 27, :_reduce_none,
|
179
|
-
3, 30, :_reduce_34,
|
180
|
-
1, 30, :_reduce_35 ]
|
181
|
+
3, 31, :_reduce_35,
|
182
|
+
1, 31, :_reduce_36 ]
|
181
183
|
|
182
|
-
racc_reduce_n =
|
184
|
+
racc_reduce_n = 37
|
183
185
|
|
184
|
-
racc_shift_n =
|
186
|
+
racc_shift_n = 74
|
185
187
|
|
186
188
|
racc_token_table = {
|
187
189
|
false => 0,
|
@@ -205,9 +207,10 @@ racc_token_table = {
|
|
205
207
|
:BRACKETR => 18,
|
206
208
|
:AT => 19,
|
207
209
|
:SHARP => 20,
|
208
|
-
:DOLLAR => 21
|
210
|
+
:DOLLAR => 21,
|
211
|
+
:TILDE => 22 }
|
209
212
|
|
210
|
-
racc_nt_base =
|
213
|
+
racc_nt_base = 23
|
211
214
|
|
212
215
|
racc_use_result_var = true
|
213
216
|
|
@@ -251,6 +254,7 @@ Racc_token_to_s_table = [
|
|
251
254
|
"AT",
|
252
255
|
"SHARP",
|
253
256
|
"DOLLAR",
|
257
|
+
"TILDE",
|
254
258
|
"$start",
|
255
259
|
"expr",
|
256
260
|
"rate",
|
@@ -368,6 +372,16 @@ def _reduce_11(val, _values, result)
|
|
368
372
|
end
|
369
373
|
|
370
374
|
def _reduce_12(val, _values, result)
|
375
|
+
option, _, _, _, term = val
|
376
|
+
raise ParseError unless @version == :v2_5 && option.settable_first_roll_adjust_option?
|
377
|
+
|
378
|
+
option.first_modify_ssp = term.to_i
|
379
|
+
result = option
|
380
|
+
|
381
|
+
result
|
382
|
+
end
|
383
|
+
|
384
|
+
def _reduce_13(val, _values, result)
|
371
385
|
option, _ = val
|
372
386
|
raise ParseError unless option.modifier_after_half.nil?
|
373
387
|
|
@@ -377,7 +391,7 @@ def _reduce_12(val, _values, result)
|
|
377
391
|
result
|
378
392
|
end
|
379
393
|
|
380
|
-
def
|
394
|
+
def _reduce_14(val, _values, result)
|
381
395
|
option, _, term = val
|
382
396
|
raise ParseError unless option.modifier_after_half.nil?
|
383
397
|
|
@@ -387,7 +401,7 @@ def _reduce_13(val, _values, result)
|
|
387
401
|
result
|
388
402
|
end
|
389
403
|
|
390
|
-
def
|
404
|
+
def _reduce_15(val, _values, result)
|
391
405
|
option, _, _ = val
|
392
406
|
raise ParseError if option.modifier_after_one_and_a_half
|
393
407
|
|
@@ -397,7 +411,7 @@ def _reduce_14(val, _values, result)
|
|
397
411
|
result
|
398
412
|
end
|
399
413
|
|
400
|
-
def
|
414
|
+
def _reduce_16(val, _values, result)
|
401
415
|
option, _, _, term = val
|
402
416
|
raise ParseError if option.modifier_after_one_and_a_half
|
403
417
|
|
@@ -407,7 +421,7 @@ def _reduce_15(val, _values, result)
|
|
407
421
|
result
|
408
422
|
end
|
409
423
|
|
410
|
-
def
|
424
|
+
def _reduce_17(val, _values, result)
|
411
425
|
option, _, term = val
|
412
426
|
raise ParseError unless [:v2_5, :v2_0].include?(@version) && option.rateup.nil?
|
413
427
|
|
@@ -417,7 +431,7 @@ def _reduce_16(val, _values, result)
|
|
417
431
|
result
|
418
432
|
end
|
419
433
|
|
420
|
-
def
|
434
|
+
def _reduce_18(val, _values, result)
|
421
435
|
option, _, _ = val
|
422
436
|
raise ParseError unless [:v2_5, :v2_0].include?(@version) && option.settable_non_2d_roll_option?
|
423
437
|
|
@@ -427,7 +441,7 @@ def _reduce_17(val, _values, result)
|
|
427
441
|
result
|
428
442
|
end
|
429
443
|
|
430
|
-
def
|
444
|
+
def _reduce_19(val, _values, result)
|
431
445
|
option, _, _, term = val
|
432
446
|
raise ParseError unless [:v2_5, :v2_0].include?(@version) && option.settable_non_2d_roll_option?
|
433
447
|
|
@@ -437,7 +451,7 @@ def _reduce_18(val, _values, result)
|
|
437
451
|
result
|
438
452
|
end
|
439
453
|
|
440
|
-
def
|
454
|
+
def _reduce_20(val, _values, result)
|
441
455
|
option, _, _, term = val
|
442
456
|
raise ParseError unless [:v2_5, :v2_0].include?(@version) && option.settable_non_2d_roll_option?
|
443
457
|
|
@@ -447,7 +461,7 @@ def _reduce_19(val, _values, result)
|
|
447
461
|
result
|
448
462
|
end
|
449
463
|
|
450
|
-
def
|
464
|
+
def _reduce_21(val, _values, result)
|
451
465
|
option, _, term = val
|
452
466
|
raise ParseError unless @version == :v2_5 && option.kept_modify.nil?
|
453
467
|
|
@@ -457,69 +471,69 @@ def _reduce_20(val, _values, result)
|
|
457
471
|
result
|
458
472
|
end
|
459
473
|
|
460
|
-
def
|
474
|
+
def _reduce_22(val, _values, result)
|
461
475
|
result = val[1]
|
462
476
|
result
|
463
477
|
end
|
464
478
|
|
465
|
-
def
|
479
|
+
def _reduce_23(val, _values, result)
|
466
480
|
result = Arithmetic::Node::Negative.new(val[1])
|
467
481
|
result
|
468
482
|
end
|
469
483
|
|
470
|
-
def
|
484
|
+
def _reduce_24(val, _values, result)
|
471
485
|
result = Arithmetic::Node::BinaryOp.new(val[0], :+, val[2])
|
472
486
|
result
|
473
487
|
end
|
474
488
|
|
475
|
-
def
|
489
|
+
def _reduce_25(val, _values, result)
|
476
490
|
result = Arithmetic::Node::BinaryOp.new(val[0], :-, val[2])
|
477
491
|
result
|
478
492
|
end
|
479
493
|
|
480
|
-
def
|
494
|
+
def _reduce_26(val, _values, result)
|
481
495
|
result = Arithmetic::Node::BinaryOp.new(val[0], :+, val[2])
|
482
496
|
result
|
483
497
|
end
|
484
498
|
|
485
|
-
def
|
499
|
+
def _reduce_27(val, _values, result)
|
486
500
|
result = Arithmetic::Node::BinaryOp.new(val[0], :-, val[2])
|
487
501
|
result
|
488
502
|
end
|
489
503
|
|
490
|
-
# reduce
|
504
|
+
# reduce 28 omitted
|
491
505
|
|
492
|
-
def
|
506
|
+
def _reduce_29(val, _values, result)
|
493
507
|
result = Arithmetic::Node::BinaryOp.new(val[0], :*, val[2])
|
494
508
|
result
|
495
509
|
end
|
496
510
|
|
497
|
-
def
|
511
|
+
def _reduce_30(val, _values, result)
|
498
512
|
result = Arithmetic::Node::DivideWithGameSystemDefault.new(val[0], val[2])
|
499
513
|
|
500
514
|
result
|
501
515
|
end
|
502
516
|
|
503
|
-
# reduce
|
517
|
+
# reduce 31 omitted
|
504
518
|
|
505
|
-
def
|
519
|
+
def _reduce_32(val, _values, result)
|
506
520
|
result = val[1]
|
507
521
|
result
|
508
522
|
end
|
509
523
|
|
510
|
-
def
|
524
|
+
def _reduce_33(val, _values, result)
|
511
525
|
result = Arithmetic::Node::Negative.new(val[1])
|
512
526
|
result
|
513
527
|
end
|
514
528
|
|
515
|
-
# reduce
|
529
|
+
# reduce 34 omitted
|
516
530
|
|
517
|
-
def
|
531
|
+
def _reduce_35(val, _values, result)
|
518
532
|
result = val[1]
|
519
533
|
result
|
520
534
|
end
|
521
535
|
|
522
|
-
def
|
536
|
+
def _reduce_36(val, _values, result)
|
523
537
|
result = Arithmetic::Node::Number.new(val[0])
|
524
538
|
result
|
525
539
|
end
|