drpedia_lite 0.0.18 → 0.0.19

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: 757fcff45e291f7385507b8dd2386ef06997478f
4
- data.tar.gz: e3992d4c346db722ca46587d6acb2450b2603690
3
+ metadata.gz: b632299414054fb00c632cf088fce88b923e7126
4
+ data.tar.gz: c400b2f425de68c99495012f6b4dc52bdac7878a
5
5
  SHA512:
6
- metadata.gz: 1fa6e4a81bfc515128da8e258bb8a04fc62b289615e57d9087464807f1eee474af829a1e3548ff47c1afa4e678f8a86a78ff80b84933859d9b78e5da44087904
7
- data.tar.gz: 17b0f00c15f8ddb04a36195ddf61e01b9abbe61af7e39db82e6f7af0f8ef8620664bce9904662a4502de457ed026623168bffa13c2b402605c430ffc6b186885
6
+ metadata.gz: 5534e42cef51577195e09b5af718379eb600d9938e9b9c5a9cde9b729136e22b1180f9471c47aed9409bba596b135fc663990aad91d786588af0f6f78fca3cf8
7
+ data.tar.gz: accb78d939877cf2ca8c0e2d9a761149a9b0af4eefb48b72aa973aa0f5a27377f6cb066726e96a1d90570cfe4c4b5866a4d2185097bbde44013c582447aeb542
data/lib/Builder.rb CHANGED
@@ -10,6 +10,7 @@ class Builder
10
10
  skill_group: raw_reader.skill_group,
11
11
  skill_cat: raw_reader.skill_cat,
12
12
  advanced_cat: raw_reader.advanced_cat,
13
+ concentration_cat: raw_reader.concentration_cat,
13
14
  strains: raw_reader.strains,
14
15
  professions: raw_reader.professions,
15
16
  strain_stats: raw_reader.strain_stats,
@@ -22,6 +23,7 @@ class Builder
22
23
  File.open(File.join(base_output_path, 'strain_restriction.json'), 'w') { |f| f.write raw_reader.strain_restrictions.to_json }
23
24
  File.open(File.join(base_output_path, 'skill_cat.json'), 'w') { |f| f.write raw_reader.skill_cat.to_json }
24
25
  File.open(File.join(base_output_path, 'advanced_cat.json'), 'w') { |f| f.write raw_reader.advanced_cat.to_json }
26
+ File.open(File.join(base_output_path, 'concentration_cat.json'), 'w') { |f| f.write raw_reader.concentration_cat.to_json }
25
27
  File.open(File.join(base_output_path, 'skill_group.json'), 'w') { |f| f.write raw_reader.skill_group.to_json }
26
28
  File.open(File.join(base_output_path, 'skill_list.json'), 'w') { |f| f.write raw_reader.skill_list.to_json }
27
29
  File.open(File.join(base_output_path, 'strain_stats.json'), 'w') { |f| f.write raw_reader.strain_stats.to_json }
data/lib/RawReader.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'set'
2
2
 
3
3
  class RawReader
4
- attr_reader :skill_list, :skill_cat, :skill_group, :advanced_cat,
4
+ attr_reader :skill_list, :skill_cat, :skill_group, :advanced_cat, :concentration_cat,
5
5
  :strains, :strain_restrictions, :strain_stats, :strain_specs,
6
6
  :professions, :profession_concentrations, :profession_advanced
7
7
 
@@ -10,7 +10,8 @@ class RawReader
10
10
  :innate => { pattern: /== Disadvantage Skill ==/, next: :strain_disadv },
11
11
  :strain_disadv => { pattern: /== Innate Skill Prerequisite ==/, next: :innate_preq },
12
12
  :innate_preq => { pattern: /== Profession Concentration ==/, next: :prof_concent },
13
- :prof_concent => { pattern: /== Advanced Profession ==/, next: :adv_prof },
13
+ :prof_concent => { pattern: /== Profession Concentration Skills ==/, next: :conc_skills },
14
+ :conc_skills => { pattern: /== Advanced Profession ==/, next: :adv_prof },
14
15
  :adv_prof => { pattern: /== Advanced Profession Skills ==/, next: :adv_skills },
15
16
  :adv_skills => { pattern: /== Strain Profession Restriction ==/, next: :strain_rtrs },
16
17
  :strain_rtrs => { pattern: /== Strain Stats ==/, next: :strain_stats },
@@ -27,6 +28,7 @@ class RawReader
27
28
  @skill_list = Hash.new
28
29
  @skill_cat = Hash.new
29
30
  @advanced_cat = Hash.new
31
+ @concentration_cat = Hash.new
30
32
  @strains = Set.new
31
33
  @strain_restrictions = Hash.new
32
34
  @skill_group = Hash.new
@@ -51,6 +53,8 @@ class RawReader
51
53
 
52
54
  #ap @skill_cat
53
55
  #ap @advanced_cat
56
+ #ap @profession_concentrations
57
+ #ap @concentration_cat
54
58
  end
55
59
 
56
60
  private
@@ -100,6 +104,7 @@ private
100
104
  when :strain_disadv then process_innate_skills line: line, disadvantage: true
101
105
  when :innate_preq then process_innate_preqs line: line
102
106
  when :prof_concent then process_profession_concentration line: line
107
+ when :conc_skills then process_profession_concentration_skills line: line
103
108
  when :adv_prof then process_advanced_professions line: line
104
109
  when :adv_skills then process_profession_skills line: line, profession: profession, type: :advanced
105
110
  when :strain_rtrs then process_strain_restrictions line: line
@@ -148,9 +153,25 @@ private
148
153
  clusters = line.split(/:/)
149
154
  right_cluster = clusters[1].split(/\,/)
150
155
 
151
- @profession_concentrations[clusters[0].strip.to_sym] = right_cluster.collect{ |x| x.strip.to_sym }
156
+ right_cluster.each do |prof|
157
+ @profession_concentrations[prof.strip.to_sym] = clusters[0].split(/\,/).collect{ |x| x.strip.to_sym }
158
+ end
152
159
  end
153
160
 
161
+ def process_profession_concentration_skills line:
162
+ clusters = line.split(/:/)
163
+
164
+ # @concentration_cat[clusters[0].strip.to_sym] = clusters[1].split(/\,/).collect{ |x| x.strip.to_sym }
165
+
166
+ clusters[1].split(/\,/).each do |skill|
167
+ smart_insert profession_skills: { skill: skill.strip.to_sym,
168
+ profession: clusters[0].strip.to_sym,
169
+ cost: 0 },
170
+ type: :concentration
171
+ end
172
+ end
173
+
174
+
154
175
  def process_advanced_professions line:
155
176
  if line.strip.length == 0
156
177
  @multiline_state = nil
@@ -296,6 +317,12 @@ private
296
317
  cost: cost,
297
318
  preq: preq
298
319
  }
320
+ when :concentration
321
+ @concentration_cat[skill] ||= Hash.new
322
+ @concentration_cat[skill][profession] = {
323
+ cost: cost,
324
+ preq: preq
325
+ }
299
326
  end
300
327
 
301
328
  end
data/lib/Validator.rb CHANGED
@@ -6,6 +6,7 @@ class Validator
6
6
  skill_group:,
7
7
  skill_cat:,
8
8
  advanced_cat:,
9
+ concentration_cat:,
9
10
  strains:,
10
11
  professions:,
11
12
  strain_stats:,
@@ -16,6 +17,7 @@ class Validator
16
17
  @skill_group = skill_group
17
18
  @skill_cat = skill_cat
18
19
  @advanced_cat = advanced_cat
20
+ @concentration_cat = concentration_cat
19
21
  @strains = strains
20
22
  @professions = professions
21
23
  @strain_stats = strain_stats
@@ -23,9 +25,17 @@ class Validator
23
25
  @profession_concentrations = profession_concentrations
24
26
  @profession_advanced = profession_advanced
25
27
 
28
+ @profession_concentration_inverted = Hash.new
29
+ @profession_concentrations.each do |basic, data|
30
+ data.each do |conc|
31
+ @profession_concentration_inverted[conc] = true
32
+ end
33
+ end
34
+
26
35
  validate_non_empty
27
36
  validate_skill_name_matches cat: @skill_cat
28
37
  validate_skill_name_matches cat: @advanced_cat
38
+ validate_skill_name_matches cat: @concentration_cat
29
39
  validate_stats
30
40
  validate_strain_specs
31
41
  validate_profession_concentrations
@@ -73,6 +83,7 @@ private
73
83
 
74
84
  def validate_skill_name_matches cat:
75
85
  mismatches = Array.new
86
+
76
87
  cat.each do |skill_name, sdata|
77
88
  if !is_in_list?(skill_name)
78
89
  # puts "mismatch: #{skill_name}"
@@ -131,7 +142,9 @@ private
131
142
  end
132
143
 
133
144
  def is_in_profession? _x
134
- if !@professions.include?(_x) && !@profession_advanced.keys.include?(_x)
145
+ if !@professions.include?(_x) &&
146
+ !@profession_advanced.keys.include?(_x) &&
147
+ !@profession_concentration_inverted.keys.include?(_x)
135
148
  puts "mismatched profession: #{_x}"
136
149
  return false
137
150
  end
data/lib/input/input.txt CHANGED
@@ -1,7 +1,7 @@
1
1
  == Advantage Skill ==
2
2
  Baywalkers: Analyze Creature, Double-Tap, First Aide, Instruct, Literacy, Parry
3
3
  Diesel Jocks: Balance, Bolt Action, Forging the Future, Patch Job, Trade Ties, Melee Weapon - Standard
4
- Full Dead: Big Dig, Check Quality, Income I, Income II, Income III, Income IV, Income V, Lie, Literacy, Torture
4
+ Full Dead: Big Dig I, Big Dig II, Big Dig III, Big Dig IV, Big Dig V, Check Quality, Income I, Income II, Income III, Income IV, Income V, Lie, Literacy, Torture
5
5
  Genjian: Analyze Creature, Bow, Brawling, Lore - Mon Histories, Melee Weapon - Standard, Sailing, Throwing
6
6
  Iron Slaves: Brawling, Carry, Escape Bonds, Iron Fists, Refuse, Rescue, Scrounge
7
7
  Lascarians: Alert, Blind Fighting, Chase, Chop, Force Barricade, Melee Weapon - Small, Scrounge, Take Down
@@ -30,6 +30,10 @@ Full Dead: Income II: Income I
30
30
  Full Dead: Income III: Income II
31
31
  Full Dead: Income IV: Income III
32
32
  Full Dead: Income V: Income IV
33
+ Full Dead: Big Dig II: Big Dig I
34
+ Full Dead: Big Dig III: Big Dig II
35
+ Full Dead: Big Dig IV: Big Dig III
36
+ Full Dead: Big Dig V: Big Dig IV
33
37
  Pure Blood: Income II: Income I
34
38
  Pure Blood: Income III: Income II
35
39
  Pure Blood: Income IV: Income III
@@ -40,9 +44,20 @@ Solestros: Income IV: Income III
40
44
  Solestros: Income V: Income IV
41
45
 
42
46
  == Profession Concentration ==
43
- Combat: Assassin, Guard, Gun Slinger, Hunter, Martial Artist, Officer, Primitive, Pugilist, Sniper, Solider, Thug
44
- Civilized Society: Caravan Driver, Charlatan, Doctor, Entertainer, Gambler, Hookup, Merchant, Politician, Priest, Publican, Ring Leader, Sawbones, Scoundrel, Spy, Teacher, Thief
45
- Crafting and Production: Cook, Distiller, Engineer, Mad Scientist, Printer, Scavenger, Tinker
47
+ Agility Combatant, Ranged Combatant, Short Range Combatant: Assassin, Guard, Gun Slinger, Hunter, Martial Artist, Officer, Primitive, Pugilist, Sniper, Solider, Thug
48
+ Civil Servant, Socialite, Resource Manager: Caravan Driver, Charlatan, Doctor, Entertainer, Gambler, Hookup, Merchant, Politician, Priest, Publican, Ring Leader, Sawbones, Scoundrel, Spy, Teacher, Thief
49
+ Consumable Producer, Quality Producer, Quantity Producer: Cook, Distiller, Engineer, Mad Scientist, Printer, Scavenger, Tinker
50
+
51
+ == Profession Concentration Skills ==
52
+ Agility Combatant: Close The Distance, Disengage, Keen Eyes
53
+ Ranged Combatant: Heavy Ordnance, Reloading is Stupid, Improvised Thrown Weapon
54
+ Short Range Combatant: Pole-arm Weapon Mastery, Call for Phalanx, Improvised Weapon
55
+ Civil Servant: Savior of Life, Bearer of the Banner, Bread and Circuses
56
+ Socialite: Hosting the Gala Event, Life of the Party, Unwanted Guest
57
+ Resource Manager: The Dead Market, Route Management, Financial Exchange
58
+ Consumable Producer: Extra Mile, Make A Show Of It, Resourceful Mind
59
+ Quality Producer: Made to Order, Custom Modification, Rushed Job
60
+ Quantity Producer: Thousand Arms Crafter, A Stitch in Time, Tchotchkes for Miles
46
61
 
47
62
  == Advanced Profession ==
48
63
  Apocatastian Templar:
@@ -65,7 +80,7 @@ Entrepreneur:
65
80
  (and ((not (s "The Red Star"))
66
81
  (xp_sum 100)
67
82
  (stat_sum hp_or_mp 50)
68
- (p (Caravan Driver "Hook-Up" Merchant Publican))))
83
+ (p ("Caravan Driver" "Hook-Up" Merchant Publican))))
69
84
 
70
85
  Free Radical:
71
86
  (and ((s Retrograde)
@@ -107,7 +122,7 @@ Mercenary:
107
122
  Merican Ba-Das:
108
123
  (and ((xp_sum 100)
109
124
  (stat_sum hp 50)
110
- (s Merican)
125
+ (s Mericans)
111
126
  (p Priest)
112
127
  (p (Guard Officer "Gun Slinger" Hunter Primitive Pugilist Soldier Thug))))
113
128
 
@@ -134,8 +149,7 @@ Nephilim:
134
149
  Oni:
135
150
  (and ((xp_sum 100)
136
151
  (stat_sum hp_or_mp 50)
137
- (s "Red Star")
138
- (p Priest)
152
+ (s "The Red Star")
139
153
  (p (Guard Officer "Gun Slinger" Primitive Soldier))))
140
154
 
141
155
  Overlord:
@@ -287,7 +301,7 @@ Hundred Fist Strike 10
287
301
  Flesh of Iron 10
288
302
  Silent Introspection 10
289
303
  Shatter Strike 10 Brawling
290
- Air Strike 10 Brawling
304
+ Air Strike 0 Brawling
291
305
 
292
306
  == Mountebank ==
293
307
  Mob Mentality 10
@@ -301,14 +315,14 @@ The Change 10
301
315
  Avenging Angel 10 The Change
302
316
  Wrath 10 The Change & Brawling
303
317
  Broken Coils 10 The Change
304
- Meaning of Death 10 The Change & Wrath
318
+ Meaning of Death 0 The Change & Wrath
305
319
 
306
320
  == Oni ==
307
321
  Memories of Many 10 Memories of Many
308
322
  Guardian Spirit 10 Memories of Many
309
323
  Walking Reminder 10 Memories of Many
310
324
  Shared Strength 10 Memories of Many
311
- Red Menace 10 Memories of Many
325
+ Red Menace 0 Memories of Many
312
326
 
313
327
  == Overlord ==
314
328
  Henchman 10
@@ -329,7 +343,7 @@ House of Cards 10
329
343
  Simple Deduction 10
330
344
  Leap of Reason 10 Simple Deduction
331
345
  Strategy 10
332
- Pure Genius 10 Educated
346
+ Pure Genius 0 Educated
333
347
 
334
348
  == Saint ==
335
349
  Inner Peace 10
@@ -385,7 +399,7 @@ Protection Racket 10 Disguise
385
399
  Nimble Fingers 10 Pick Pockets
386
400
  Fence 10
387
401
  Running Numbers 10
388
- Well Shit 10
402
+ Well Shit 0
389
403
 
390
404
  == Strain Profession Restriction ==
391
405
  Baywalkers: Sawbones, Primitive, Thug
@@ -624,7 +638,11 @@ Throwing 3
624
638
  == Farmer ==
625
639
  Alert 3
626
640
  Analyze Creature 3
627
- Animal Handler 3
641
+ Animal Handler I 3
642
+ Animal Handler II 3 Animal Handler I
643
+ Animal Handler III 3 Animal Handler II
644
+ Animal Handler IV 3 Animal Handler III
645
+ Animal Handler V 3 Animal Handler IV
628
646
  Brawling 6
629
647
  Brewing 3 Crop Tending
630
648
  Carry 3
@@ -744,7 +762,11 @@ Throwing - Javelins 3
744
762
  == Jones ==
745
763
  Attach 3
746
764
  Balance 3
747
- Big Dig 3 Bomb Awareness
765
+ Big Dig I 3 Bomb Awareness
766
+ Big Dig II 3 Big Dig I
767
+ Big Dig III 3 Big Dig II
768
+ Big Dig IV 3 Big Dig III
769
+ Big Dig V 3 Big Dig IV
748
770
  Bolt Action 6
749
771
  Bomb Awareness 3
750
772
  Brawling 6
@@ -1168,7 +1190,7 @@ Income
1168
1190
  AA Alert
1169
1191
  AB Analyze Compound
1170
1192
  AC Analyze Creature
1171
- AD Animal Handler
1193
+ AD Animal Handler I
1172
1194
  AE Attach
1173
1195
  AF Avoid
1174
1196
  AG Backstab
@@ -1176,7 +1198,7 @@ AH Balance
1176
1198
  AI Bartender's Tongue
1177
1199
  AJ Barricade
1178
1200
  AK Beg For Life
1179
- AL Big Dig
1201
+ AL Big Dig I
1180
1202
  AM Black Market Connections
1181
1203
  AN Bless Weapon
1182
1204
  AO Blind Fighting
@@ -1264,6 +1286,7 @@ DO Lore - Animals - Terra Firma, Lore
1264
1286
  DP Lore - Faith - Church of Darwin, Lore
1265
1287
  DQ Lore - Faith - Cult of Fallow Hopes, Lore
1266
1288
  DR Lore - Faith - Final Knight, Lore
1289
+ QS Lore - Faith - Kings Court, Lore
1267
1290
  DS Lore - Faith - Light of Hedon, Lore
1268
1291
  DT Lore - Faith - Minor Cults and Sects, Lore
1269
1292
  DU Lore - Faith - Nuclear Family, Lore
@@ -1276,7 +1299,7 @@ EA Lore - History - Fictional Literature, Lore
1276
1299
  EB Lore - History - Music, Lore
1277
1300
  EC Lore - Medical - Diseases and Plagues, Lore
1278
1301
  ED Lore - Medical - Grave Mind Infection, Lore
1279
- EE Lore - Medical - Grave Robber Processesv
1302
+ EE Lore - Medical - Grave Robber Processes, Lore
1280
1303
  EF Lore - Metallurgy, Lore
1281
1304
  EG Lore - Mining, Lore
1282
1305
  EH Lore - Mon Histories, Lore
@@ -1286,7 +1309,7 @@ EK Lore - Pre-Fall History Ancient, Lore
1286
1309
  EL Lore - Pre-Fall History Cultural, Lore
1287
1310
  EM Lore - Pre-Fall History Modern, Lore
1288
1311
  EN Lore - Pre-Fall History Religion, Lore
1289
- EO Lore - Meditation, Lore
1312
+ QT Lore - Radiation, Lore
1290
1313
  EP Lore - Raider, Lore
1291
1314
  EQ Lore - Slaver Communities, Lore
1292
1315
  ER Lore - Strain - Nation of Accensor, Lore
@@ -1309,17 +1332,10 @@ FH Lore - Strain - Solestros, Lore
1309
1332
  FI Lore - Strain - Unborn of Teixiptla, Lore
1310
1333
  FJ Lore - Strain - Vegasians, Lore
1311
1334
  FK Lore - Strain - Yorker, Lore
1312
- FL Lore - Tech - Combustion Power
1313
- FM Lore - Tech - Natural Power
1314
- FN Lore - Tech - Nuclear Power
1315
- FO Lore - Zombie
1316
- FP Lore - Techno Savant - Complex Electronics
1317
- FQ Lore - Techno Savant - Doomsday Device
1318
- FR Lore - Techno Savant - Tesla Electronics
1319
- FS Lore - Techno Savant - Esoteric Cultural Anomalies
1320
- FT Lore - Medicine - Biological Warfare
1321
- FU Lore - Tech - Structural Anomalies
1322
- FV Lore - Tech - Gizmos
1335
+ FL Lore - Tech - Combustion Power, Lore
1336
+ FM Lore - Tech - Natural Power, Lore
1337
+ FN Lore - Tech - Nuclear Power, Lore
1338
+ FO Lore - Zombie, Lore
1323
1339
  FW Mangle Limb
1324
1340
  FX Master Craftsman
1325
1341
  FY Medical Assistance
@@ -1370,6 +1386,14 @@ QG Mind of a Killer, Psionic Skill - Advanced
1370
1386
  QH Mind Shield, Psionic Skill - Advanced
1371
1387
  QI Psychic Cleanse, Psionic Skill - Advanced
1372
1388
  QJ Sundered Mind, Psionic Skill - Advanced
1389
+ QK Animal Handler II
1390
+ QL Animal Handler III
1391
+ QM Animal Handler IV
1392
+ QN Animal Handler V
1393
+ QO Big Dig II
1394
+ QP Big Dig III
1395
+ QQ Big Dig IV
1396
+ QR Big Dig V
1373
1397
  GS Refuse
1374
1398
  GT Repair
1375
1399
  GU Rescue
@@ -1532,4 +1556,31 @@ WD Walking Reminder
1532
1556
  WE Well Shit
1533
1557
  WF Windfall
1534
1558
  WG Wrath
1535
- WH Wrath of the Just
1559
+ WH Wrath of the Just
1560
+ XA Close The Distance
1561
+ XB Disengage
1562
+ XC Keen Eyes
1563
+ XD Heavy Ordnance
1564
+ XE Reloading is Stupid
1565
+ XF Improvised Thrown Weapon
1566
+ XG Pole-arm Weapon Mastery
1567
+ XH Call for Phalanx
1568
+ XI Improvised Weapon
1569
+ XJ Savior of Life
1570
+ XK Bearer of the Banner
1571
+ XL Bread and Circuses
1572
+ XM Hosting the Gala Event
1573
+ XN Life of the Party
1574
+ XO Unwanted Guest
1575
+ XP The Dead Market
1576
+ XQ Route Management
1577
+ XR Financial Exchange
1578
+ XS Extra Mile
1579
+ XT Make A Show Of It
1580
+ XU Resourceful Mind
1581
+ XV Made to Order
1582
+ XW Custom Modification
1583
+ XX Rushed Job
1584
+ XY Thousand Arms Crafter
1585
+ XZ A Stitch in Time
1586
+ WI Tchotchkes for Miles
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.18
4
+ version: 0.0.19
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-25 00:00:00.000000000 Z
11
+ date: 2016-12-29 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