drpedia_lite 0.0.19 → 0.0.20

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b632299414054fb00c632cf088fce88b923e7126
4
- data.tar.gz: c400b2f425de68c99495012f6b4dc52bdac7878a
3
+ metadata.gz: 2910f49c42c29769c98b213d473ef61cc3c327d4
4
+ data.tar.gz: 8dce08526ac21b282a3f3d45e107a3dd4f963aea
5
5
  SHA512:
6
- metadata.gz: 5534e42cef51577195e09b5af718379eb600d9938e9b9c5a9cde9b729136e22b1180f9471c47aed9409bba596b135fc663990aad91d786588af0f6f78fca3cf8
7
- data.tar.gz: accb78d939877cf2ca8c0e2d9a761149a9b0af4eefb48b72aa973aa0f5a27377f6cb066726e96a1d90570cfe4c4b5866a4d2185097bbde44013c582447aeb542
6
+ metadata.gz: e064d36ce7f9d6b8a69eaacdd0c752731f6c1510c96ebed17e32f787ee3d8a0c4c3b856c17f91454f9ad185651c815153b0c699cf2a704dc12b99195b53f08c0
7
+ data.tar.gz: 6ab250dc20c68749947b48c8f6bd7897f70b4452f88d3143ff1402704f1bbbcdc817d62c1ede3dcea374a0b4b8be168284e7c74071c5b5df016f5916fa211efc
data/lib/Builder.rb CHANGED
@@ -16,7 +16,9 @@ class Builder
16
16
  strain_stats: raw_reader.strain_stats,
17
17
  strain_specs: raw_reader.strain_specs,
18
18
  profession_concentrations: raw_reader.profession_concentrations,
19
- profession_advanced: raw_reader.profession_advanced
19
+ profession_advanced: raw_reader.profession_advanced,
20
+ skill_counters: raw_reader.skill_counters,
21
+ skill_countered: raw_reader.skill_countered
20
22
 
21
23
  File.open(File.join(base_output_path, 'strains.json'), 'w') { |f| f.write raw_reader.strains.to_a.to_json }
22
24
  File.open(File.join(base_output_path, 'professions.json'), 'w') { |f| f.write raw_reader.professions.to_a.to_json }
@@ -30,5 +32,7 @@ class Builder
30
32
  File.open(File.join(base_output_path, 'strain_specs.json'), 'w') { |f| f.write raw_reader.strain_specs.to_json }
31
33
  File.open(File.join(base_output_path, 'profession_concentrations.json'), 'w') { |f| f.write raw_reader.profession_concentrations.to_json }
32
34
  File.open(File.join(base_output_path, 'profession_advanced.json'), 'w') { |f| f.write raw_reader.profession_advanced.to_json }
35
+ File.open(File.join(base_output_path, 'skill_counters.json'), 'w') { |f| f.write raw_reader.skill_counters.to_json }
36
+ File.open(File.join(base_output_path, 'skill_countered.json'), 'w') { |f| f.write raw_reader.skill_countered.to_json }
33
37
  end
34
38
  end
data/lib/RawReader.rb CHANGED
@@ -3,7 +3,8 @@ require 'set'
3
3
  class RawReader
4
4
  attr_reader :skill_list, :skill_cat, :skill_group, :advanced_cat, :concentration_cat,
5
5
  :strains, :strain_restrictions, :strain_stats, :strain_specs,
6
- :professions, :profession_concentrations, :profession_advanced
6
+ :professions, :profession_concentrations, :profession_advanced,
7
+ :skill_counters, :skill_countered
7
8
 
8
9
  STATE_TRANSITION = {
9
10
  :undef => { pattern: /== Advantage Skill ==/, next: :innate },
@@ -19,7 +20,8 @@ class RawReader
19
20
  :strain_specs => { pattern: /== Open Skill ==/, next: :open },
20
21
  :open => { pattern: /==/, next: :profession },
21
22
  :profession => { pattern: /== Skill Group ==/, next: :skill_group },
22
- :skill_group => { pattern: /== Skill List ==/, next: :list },
23
+ :skill_group => { pattern: /== Skill Counters ==/, next: :skill_counter },
24
+ :skill_counter => { pattern: /== Skill List ==/, next: :list },
23
25
  :list => { pattern: /./, next: :list }
24
26
  }
25
27
 
@@ -32,6 +34,8 @@ class RawReader
32
34
  @strains = Set.new
33
35
  @strain_restrictions = Hash.new
34
36
  @skill_group = Hash.new
37
+ @skill_counters = Hash.new
38
+ @skill_countered = Hash.new
35
39
  @strain_specs = Hash.new
36
40
  @strain_stats = Hash.new
37
41
  @professions = Set.new
@@ -55,6 +59,8 @@ class RawReader
55
59
  #ap @advanced_cat
56
60
  #ap @profession_concentrations
57
61
  #ap @concentration_cat
62
+ # ap @skill_counters
63
+ # ap @skill_countered
58
64
  end
59
65
 
60
66
  private
@@ -113,6 +119,7 @@ private
113
119
  when :open then process_open_skills line: line
114
120
  when :profession then process_profession_skills line: line, profession: profession
115
121
  when :skill_group then process_skill_group line: line
122
+ when :skill_counter then process_skill_counters line: line
116
123
  when :list then process_list_skills line: line
117
124
  end
118
125
  end
@@ -171,6 +178,21 @@ private
171
178
  end
172
179
  end
173
180
 
181
+ def process_skill_counters line:
182
+ segments = line.split(':')
183
+ skill_name = segments[0].strip.to_sym
184
+ subsegs = segments[1].strip.split('|')
185
+
186
+ if subsegs[0].length > 0
187
+ counters = subsegs[0].strip
188
+ @skill_counters[skill_name] = counters.split(',').collect{ |x| x.strip.to_sym }
189
+ end
190
+
191
+ if subsegs[1]
192
+ countered_by = subsegs[1].strip
193
+ @skill_countered[skill_name] = countered_by.split(',').collect{ |x| x.strip.to_sym }
194
+ end
195
+ end
174
196
 
175
197
  def process_advanced_professions line:
176
198
  if line.strip.length == 0
data/lib/Validator.rb CHANGED
@@ -12,7 +12,9 @@ class Validator
12
12
  strain_stats:,
13
13
  strain_specs:,
14
14
  profession_concentrations:,
15
- profession_advanced:
15
+ profession_advanced:,
16
+ skill_counters:,
17
+ skill_countered:
16
18
  @skill_list = skill_list
17
19
  @skill_group = skill_group
18
20
  @skill_cat = skill_cat
@@ -24,6 +26,8 @@ class Validator
24
26
  @strain_specs = strain_specs
25
27
  @profession_concentrations = profession_concentrations
26
28
  @profession_advanced = profession_advanced
29
+ @skill_counters = skill_counters
30
+ @skill_countered = skill_countered
27
31
 
28
32
  @profession_concentration_inverted = Hash.new
29
33
  @profession_concentrations.each do |basic, data|
@@ -41,6 +45,9 @@ class Validator
41
45
  validate_profession_concentrations
42
46
  validate_profession_advanced
43
47
  validate_non_duplicate_skill_codes
48
+ validate_skill_counters cat: @skill_counters
49
+ validate_skill_counters cat: @skill_countered
50
+ validate_skill_counter_bidirectional
44
51
  end
45
52
 
46
53
  private
@@ -125,6 +132,49 @@ private
125
132
  end
126
133
  end
127
134
 
135
+ def validate_skill_counters cat:
136
+ cat.each do |s, ls|
137
+ if !is_in_list?(s)
138
+ puts "Mismatched skill counter: #{s}"
139
+ end
140
+
141
+ ls.each do |l|
142
+ if !is_in_list?(l)
143
+ puts "Mismatched skill counter member: #{l}"
144
+ end
145
+ end
146
+ end
147
+ end
148
+
149
+ def validate_skill_counter_bidirectional
150
+ @skill_counters.each do |skill_name, counters|
151
+ counters.each do |counter|
152
+ if !has_interaction? skill: skill_name, counter: counter, interaction: :a_counters_b
153
+ puts "Missing: skill #{skill_name} counters #{counter}, but skill #{counter} is not countered by #{skill_name}"
154
+ end
155
+ end
156
+ end
157
+
158
+ @skill_countered.each do |skill_name, countereds|
159
+ countereds.each do |countered|
160
+ if !has_interaction? skill: skill_name, counter: countered, interaction: :a_countered_by_b
161
+ puts "Missing: skill #{skill_name} is countered by #{countered}, but skill #{countered} does not counter #{skill_name}"
162
+ end
163
+ end
164
+ end
165
+ end
166
+
167
+ def has_interaction? skill:, counter:, interaction:
168
+ case interaction
169
+ when :a_counters_b
170
+ return true if @skill_countered[counter] && @skill_countered[counter].include?(skill)
171
+ when :a_countered_by_b
172
+ return true if @skill_counters[counter] && @skill_counters[counter].include?(skill)
173
+ end
174
+
175
+ return false
176
+ end
177
+
128
178
  def is_in_list? _x
129
179
  if @skill_list[_x] == nil && @skill_group[_x] == nil
130
180
  puts "mismatched skill: #{_x}"
data/lib/input/input.txt CHANGED
@@ -22,7 +22,7 @@ Vegasians: Backstab, Black Market Connections, Cheat, Entertain, Lie, Literacy
22
22
  Yorker: Barricade, Bomb Awareness, Chase, Entertain, Interfere, Melee Weapon - Standard
23
23
 
24
24
  == Disadvantage Skill ==
25
- Natural Ones: Bolt Action
25
+ Natural Ones: Bolt Action, Scatter Shot, Gun Aficionado
26
26
 
27
27
  == Innate Skill Prerequisite ==
28
28
  Iron Slaves: Iron Fists: Brawling
@@ -186,7 +186,7 @@ Shepherd of the Land:
186
186
 
187
187
  Survivor:
188
188
  (and ((xp_sum 200)
189
- (stat_sum hp_and_mp 100)))
189
+ (stat_sum hp_or_mp 100)))
190
190
 
191
191
  Techno Savant:
192
192
  (and ((xp_sum 100)
@@ -1186,6 +1186,105 @@ Psionic Skill - Intermediate
1186
1186
  Psionic Skill - Advanced
1187
1187
  Income
1188
1188
 
1189
+ == Skill Counters ==
1190
+ Alert: Vanish, Fade In A Crowd, Whisper Walk, Cover of Night
1191
+ Analyze Compound: Disguise Contents
1192
+ Analyze Creature: | Disguise
1193
+ Attach: | Bomb Awareness
1194
+ Avoid: Concentrated Fire, Destroy Shield, Destroy Weapon, Destroy Armor, Disarming Shot, Scatter Shot, Sniped Shot, Knockout, Pray for Justice, Gun Aficionado, Knock Down, Nail, Agony, Blood Scent
1195
+ Balance: Knock Down, Take Down
1196
+ Barricade: | Force Barricade
1197
+ Beg For Life: Killing Blows | Refuse
1198
+ Blind Fighting: Blinding
1199
+ Blinding: | Blind Fighting, Parry
1200
+ Bomb Awareness: Attach
1201
+ Bounce: Concentrated Fire, Destroy Shield, Destroy Weapon, Destroy Armor, Sniped Shot, Scatter Shot, Disarming Shot, Gun Aficionado, Nail
1202
+ Break Armor: | Parry
1203
+ Break Shield: | Parry
1204
+ Break Weapon: | Parry
1205
+ Challenge: | Refuse, Choking Blow
1206
+ Charge: | Parry
1207
+ Charisma: | Refuse, Choking Blow
1208
+ Chase: Escape, Rescue
1209
+ Cheat: | Check Your Sleeves
1210
+ Check Status: Feign Death
1211
+ Check Your Sleeves: Cheat
1212
+ Choking Blow: Challenge, Charisma
1213
+ Concentrated Fire: | Avoid, Bounce
1214
+ Cover of Night: | Alert
1215
+ Disguise: Analyze Creature
1216
+ Destroy Armor: | Avoid, Bounce
1217
+ Destroy Shield: | Avoid, Bounce
1218
+ Destroy Weapon: | Avoid, Bounce
1219
+ Disarming Blow: | Parry
1220
+ Disarming Shot: | Avoid, Bounce
1221
+ Disguise: Analyze Creature
1222
+ Disguise Contents: | Analyze Compound
1223
+ Entertain: | Refuse
1224
+ Escape: | Chase
1225
+ Escape Bonds: Tie Binds
1226
+ Fade In A Crowd: | Alert
1227
+ Fearful Glare: | Refuse
1228
+ Feign Death: | Check Status
1229
+ First Aide: Knockout
1230
+ Force Barricade: Barricade
1231
+ Frightening Force: | Parry
1232
+ Gun Aficionado: | Avoid, Bounce
1233
+ Interrogate: | Lie
1234
+ Knock Down: | Balance, Avoid
1235
+ Knockout: | Avoid, First Aide
1236
+ Lie: Interrogate
1237
+ Mangle Limb: | Parry
1238
+ Mind Resistance: Toys in the Attic, Pyro, Enslavement, Body Puppet, Torture, Jolt, Limited Telekinesis, Memory Lapse, Mind Push, Nightmare, Paralysis, Seeing Double, Slowed Steps, Tranquility, Trickster's Mind, Berserker Mind, Body Lock, Body of Mind, Engulf, Living Death, Major Telekinesis, Propulsion, Psionic Surgeon, Sense of Sins, Maelstrom, Psychic Cleanse, Sundered Mind
1239
+ Nail: | Avoid, Bounce
1240
+ Nerve Punch: | Parry
1241
+ Parry: Break Armor, Break Weapon, Break Shield, Blinding, Charge, Disarming Blow, Frightening Force, Mangle Limb, Nerve Punch, Sever, Slaughter, Take Down, Wide Strike, Agony, Impale, Sunder Limb
1242
+ Pray for Justice: | Avoid
1243
+ Refuse: Beg For Life, Challenge, Charisma, Entertain, Fear, Fearful Glare, Agony
1244
+ Rescue: | Chase
1245
+ Scatter Shot: | Avoid, Bounce
1246
+ Sever: | Parry
1247
+ Sniped Shot: | Avoid, Bounce
1248
+ Take Down: | Balance, Parry
1249
+ Tie Binds: | Escape Bonds
1250
+ Torture: | Mind Resistance
1251
+ Vanish: | Alert
1252
+ Wide Strike: | Parry
1253
+ Jolt: | Mind Resistance
1254
+ Limited Telekinesis: | Mind Resistance
1255
+ Memory Lapse: | Mind Resistance
1256
+ Mind Push: | Mind Resistance
1257
+ Nightmare: | Mind Resistance
1258
+ Paralysis: | Mind Resistance
1259
+ Pyro: | Mind Resistance
1260
+ Seeing Double: | Mind Resistance
1261
+ Slowed Steps: | Mind Resistance
1262
+ Toys in the Attic: | Mind Resistance
1263
+ Tranquility: | Mind Resistance
1264
+ Trickster's Mind: | Mind Resistance
1265
+ Berserker Mind: | Mind Resistance
1266
+ Body Lock: | Mind Resistance
1267
+ Body of Mind: | Mind Resistance
1268
+ Body Puppet: | Mind Resistance
1269
+ Engulf: | Mind Resistance
1270
+ Living Death: | Mind Resistance
1271
+ Major Telekinesis: | Mind Resistance
1272
+ Propulsion: | Mind Resistance
1273
+ Psionic Surgeon: | Mind Resistance
1274
+ Sense of Sins: | Mind Resistance
1275
+ Whisper Walk: | Alert
1276
+ Maelstrom: | Mind Resistance
1277
+ Psychic Cleanse: | Mind Resistance
1278
+ Sundered Mind: | Mind Resistance
1279
+ Agony: | Parry, Avoid, Refuse
1280
+ Blood Scent: | Avoid
1281
+ Fear: | Refuse
1282
+ Impale: | Parry
1283
+ Sunder Limb: | Parry
1284
+ Killing Blows: | Beg For Life
1285
+ Enslavement: | Mind Resistance
1286
+ Slaughter: | Parry
1287
+
1189
1288
  == Skill List ==
1190
1289
  AA Alert
1191
1290
  AB Analyze Compound
@@ -1366,7 +1465,7 @@ PL Seeing Double, Psionic Skill - Basic
1366
1465
  PM Slowed Steps, Psionic Skill - Basic
1367
1466
  PN Toys in the Attic, Psionic Skill - Basic
1368
1467
  PO Tranquility, Psionic Skill - Basic
1369
- PQ Tricksters Mind, Psionic Skill - Basic
1468
+ PQ Trickster's Mind, Psionic Skill - Basic
1370
1469
  PR Berserker Mind, Psionic Skill - Intermediate
1371
1470
  PS Body Lock, Psionic Skill - Intermediate
1372
1471
  PT Body of Mind, Psionic Skill - Intermediate
@@ -1583,4 +1682,29 @@ XW Custom Modification
1583
1682
  XX Rushed Job
1584
1683
  XY Thousand Arms Crafter
1585
1684
  XZ A Stitch in Time
1586
- WI Tchotchkes for Miles
1685
+ WI Tchotchkes for Miles
1686
+ YA Killing Blows
1687
+ YB Absorb
1688
+ YC Animate
1689
+ YD Blood Scent
1690
+ YE Burrow
1691
+ YF Cleave
1692
+ YG Confuse
1693
+ YH Daze
1694
+ YI Devour
1695
+ YJ Diseased
1696
+ YK Enslavement
1697
+ YL Fear
1698
+ YM Flight
1699
+ YN Frenzy
1700
+ YO Gnaw
1701
+ YP Gnaw
1702
+ YQ Impale
1703
+ YR Melt
1704
+ YS Rip Through
1705
+ YT Shatter
1706
+ YU Slaughter
1707
+ YV Snare
1708
+ YW Sunder Limb
1709
+ YX Terror
1710
+ YY Agony
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: drpedia_lite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.19
4
+ version: 0.0.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gloria Budiman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-29 00:00:00.000000000 Z
11
+ date: 2017-01-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Extracts skills, strains, profession, and requirement trees into JSON
14
14
  email: wahyu.g@gmail.com