teyvatdb 0.1.18 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -0
  3. data/Gemfile.lock +4 -1
  4. data/lib/genshin_data/artifact_sets/artifact_data.rb +946 -295
  5. data/lib/genshin_data/artifact_sets.rb +2 -2
  6. data/lib/genshin_data/characters/character_data.rb +1143 -1126
  7. data/lib/genshin_data/characters.rb +4 -2
  8. data/lib/genshin_data/materials/development/elite_monster_drops_data.rb +605 -598
  9. data/lib/genshin_data/materials/development/gems_data.rb +331 -324
  10. data/lib/genshin_data/materials/development/general_data.rb +103 -96
  11. data/lib/genshin_data/materials/development/local_specialty_data.rb +506 -499
  12. data/lib/genshin_data/materials/development/monster_loot_drops_data.rb +441 -434
  13. data/lib/genshin_data/materials/development/talent_books_data.rb +506 -500
  14. data/lib/genshin_data/materials/development/weapon_material_data.rb +672 -665
  15. data/lib/genshin_data/materials/development/weapon_refinement_material_data.rb +129 -122
  16. data/lib/genshin_data/materials/development/weekly_boss_drops_data.rb +283 -276
  17. data/lib/genshin_data/materials/development/world_boss_drops_data.rb +330 -327
  18. data/lib/genshin_data/materials/development.rb +61 -56
  19. data/lib/genshin_data/materials/standard/cooking_material_data.rb +561 -554
  20. data/lib/genshin_data/materials/standard/crafting_material_data.rb +130 -123
  21. data/lib/genshin_data/materials/standard/fishing_material_data.rb +452 -445
  22. data/lib/genshin_data/materials/standard/forging_material_data.rb +191 -184
  23. data/lib/genshin_data/materials/standard/furniture_material_data.rb +251 -244
  24. data/lib/genshin_data/materials/standard.rb +37 -32
  25. data/lib/genshin_data/materials.rb +13 -7
  26. data/lib/genshin_data/nations/nation_data.rb +55 -52
  27. data/lib/genshin_data/talent_books/talent_book_data.rb +147 -0
  28. data/lib/genshin_data/talent_books.rb +14 -0
  29. data/lib/genshin_data/weapon_materials.rb +14 -0
  30. data/lib/genshin_data/weapons/weapon_data/bows.rb +369 -364
  31. data/lib/genshin_data/weapons/weapon_data/catalysts.rb +359 -354
  32. data/lib/genshin_data/weapons/weapon_data/claymores.rb +359 -354
  33. data/lib/genshin_data/weapons/weapon_data/polearms.rb +262 -257
  34. data/lib/genshin_data/weapons/weapon_data/swords.rb +399 -395
  35. data/lib/genshin_data/weapons/weapon_data.rb +10 -7
  36. data/lib/genshin_data/weapons.rb +2 -1
  37. data/lib/genshin_data/weekly_bosses/weekly_boss_data.rb +75 -0
  38. data/lib/genshin_data/weekly_bosses.rb +14 -0
  39. data/lib/genshin_data/world_bosses/world_boss_data.rb +186 -0
  40. data/lib/genshin_data/world_bosses.rb +14 -0
  41. data/lib/genshin_data.rb +23 -5
  42. data/lib/genshin_object/artifact_set.rb +2 -2
  43. data/lib/genshin_object/boss.rb +13 -0
  44. data/lib/genshin_object/material_family.rb +15 -0
  45. data/lib/genshin_object/schedule.rb +42 -0
  46. data/lib/genshin_object/talent_book.rb +6 -0
  47. data/lib/genshin_object/weapon_material_family.rb +6 -0
  48. data/lib/genshin_object/weekly_boss.rb +15 -0
  49. data/lib/genshin_object/world_boss.rb +14 -0
  50. data/lib/genshin_object.rb +11 -5
  51. data/lib/teyvatdb/version.rb +1 -1
  52. data/lib/teyvatdb.rb +3 -3
  53. metadata +16 -2
@@ -1,247 +1,254 @@
1
- module GenshinData::Materials::Standard
2
- module FurnitureMaterialData
3
- def self.all
4
- self.constants.map { |x| "GenshinData::Materials::Standard::FurnitureMaterialData::#{x}".constantize }
1
+ # frozen_string_literal: true
2
+
3
+ module GenshinData
4
+ module Materials
5
+ module Standard
6
+ # Definitons for all furniture related Materials
7
+ module FurnitureMaterialData
8
+ def self.all
9
+ constants.map { |x| GenshinData::Materials::Standard::FurnitureMaterialData.const_get(x) }
10
+ end
11
+
12
+ ADHIGAMA_WOOD = GenshinObject::Material.new(
13
+ kamera_key: "AdhigamaWood",
14
+ name: "Adhigama Wood",
15
+ rarity: 1,
16
+ family: nil,
17
+ inventory_type: :standard_material,
18
+ source_category: :gathering,
19
+ source_sub_category: :furniture_material
20
+ ).freeze
21
+
22
+ ARALIA_WOOD = GenshinObject::Material.new(
23
+ kamera_key: "AraliaWood",
24
+ name: "Aralia Wood",
25
+ rarity: 1,
26
+ family: nil,
27
+ inventory_type: :standard_material,
28
+ source_category: :gathering,
29
+ source_sub_category: :furniture_material
30
+ ).freeze
31
+
32
+ ASH_WOOD = GenshinObject::Material.new(
33
+ kamera_key: "AshWood",
34
+ name: "Ash Wood",
35
+ rarity: 1,
36
+ family: nil,
37
+ inventory_type: :standard_material,
38
+ source_category: :gathering,
39
+ source_sub_category: :furniture_material
40
+ ).freeze
41
+
42
+ ATHEL_WOOD = GenshinObject::Material.new(
43
+ kamera_key: "AthelWood",
44
+ name: "Athel Wood",
45
+ rarity: 1,
46
+ family: nil,
47
+ inventory_type: :standard_material,
48
+ source_category: :gathering,
49
+ source_sub_category: :furniture_material
50
+ ).freeze
51
+
52
+ BAMBOO_SEGMENT = GenshinObject::Material.new(
53
+ kamera_key: "BambooSegment",
54
+ name: "Bamboo Segment",
55
+ rarity: 1,
56
+ family: nil,
57
+ inventory_type: :standard_material,
58
+ source_category: :gathering,
59
+ source_sub_category: :furniture_material
60
+ ).freeze
61
+
62
+ BLUE_DYE = GenshinObject::Material.new(
63
+ kamera_key: "BlueDye",
64
+ name: "Blue Dye",
65
+ rarity: 1,
66
+ family: nil,
67
+ inventory_type: :standard_material,
68
+ source_category: :gathering,
69
+ source_sub_category: :furniture_material
70
+ ).freeze
71
+
72
+ BIRCH_WOOD = GenshinObject::Material.new(
73
+ kamera_key: "BirchWood",
74
+ name: "Birch Wood",
75
+ rarity: 1,
76
+ family: nil,
77
+ inventory_type: :standard_material,
78
+ source_category: :gathering,
79
+ source_sub_category: :furniture_material
80
+ ).freeze
81
+
82
+ BRIGHTWOOD = GenshinObject::Material.new(
83
+ kamera_key: "Brightwood",
84
+ name: "Brightwood",
85
+ rarity: 1,
86
+ family: nil,
87
+ inventory_type: :standard_material,
88
+ source_category: :gathering,
89
+ source_sub_category: :furniture_material
90
+ ).freeze
91
+
92
+ CUIHUA_WOOD = GenshinObject::Material.new(
93
+ kamera_key: "CuihuaWood",
94
+ name: "Cuihua Wood",
95
+ rarity: 1,
96
+ family: nil,
97
+ inventory_type: :standard_material,
98
+ source_category: :gathering,
99
+ source_sub_category: :furniture_material
100
+ ).freeze
101
+
102
+ CYPRESS_WOOD = GenshinObject::Material.new(
103
+ kamera_key: "CypressWood",
104
+ name: "Cypress Wood",
105
+ rarity: 1,
106
+ family: nil,
107
+ inventory_type: :standard_material,
108
+ source_category: :gathering,
109
+ source_sub_category: :furniture_material
110
+ ).freeze
111
+
112
+ FABRIC = GenshinObject::Material.new(
113
+ kamera_key: "Fabric",
114
+ name: "Fabric",
115
+ rarity: 1,
116
+ family: nil,
117
+ inventory_type: :standard_material,
118
+ source_category: :gathering,
119
+ source_sub_category: :furniture_material
120
+ ).freeze
121
+
122
+ FIR_WOOD = GenshinObject::Material.new(
123
+ kamera_key: "FirWood",
124
+ name: "Fir Wood",
125
+ rarity: 1,
126
+ family: nil,
127
+ inventory_type: :standard_material,
128
+ source_category: :gathering,
129
+ source_sub_category: :furniture_material
130
+ ).freeze
131
+
132
+ FRAGRANT_CEDAR_WOOD = GenshinObject::Material.new(
133
+ kamera_key: "FragrantCedarWood",
134
+ name: "Fragrant Cedar Wood",
135
+ rarity: 1,
136
+ family: nil,
137
+ inventory_type: :standard_material,
138
+ source_category: :gathering,
139
+ source_sub_category: :furniture_material
140
+ ).freeze
141
+
142
+ KARMAPHALA_WOOD = GenshinObject::Material.new(
143
+ kamera_key: "KarmaphalaWood",
144
+ name: "Karmaphala Wood",
145
+ rarity: 1,
146
+ family: nil,
147
+ inventory_type: :standard_material,
148
+ source_category: :gathering,
149
+ source_sub_category: :furniture_material
150
+ ).freeze
151
+
152
+ LINDEN_WOOD = GenshinObject::Material.new(
153
+ kamera_key: "LindenWood",
154
+ name: "Linden Wood",
155
+ rarity: 1,
156
+ family: nil,
157
+ inventory_type: :standard_material,
158
+ source_category: :gathering,
159
+ source_sub_category: :furniture_material
160
+ ).freeze
161
+
162
+ MALLOW_WOOD = GenshinObject::Material.new(
163
+ kamera_key: "MallowWood",
164
+ name: "Mallow Wood",
165
+ rarity: 1,
166
+ family: nil,
167
+ inventory_type: :standard_material,
168
+ source_category: :gathering,
169
+ source_sub_category: :furniture_material
170
+ ).freeze
171
+
172
+ MAPLE_WOOD = GenshinObject::Material.new(
173
+ kamera_key: "MapleWood",
174
+ name: "Maple Wood",
175
+ rarity: 1,
176
+ family: nil,
177
+ inventory_type: :standard_material,
178
+ source_category: :gathering,
179
+ source_sub_category: :furniture_material
180
+ ).freeze
181
+
182
+ MOUNTAIN_DATE_WOOD = GenshinObject::Material.new(
183
+ kamera_key: "MountainDateWood",
184
+ name: "Mountain Date Wood",
185
+ rarity: 1,
186
+ family: nil,
187
+ inventory_type: :standard_material,
188
+ source_category: :gathering,
189
+ source_sub_category: :furniture_material
190
+ ).freeze
191
+
192
+ OTOGI_WOOD = GenshinObject::Material.new(
193
+ kamera_key: "OtogiWood",
194
+ name: "Otogi Wood",
195
+ rarity: 1,
196
+ family: nil,
197
+ inventory_type: :standard_material,
198
+ source_category: :gathering,
199
+ source_sub_category: :furniture_material
200
+ ).freeze
201
+
202
+ PINE_WOOD = GenshinObject::Material.new(
203
+ kamera_key: "PineWood",
204
+ name: "Pine Wood",
205
+ rarity: 1,
206
+ family: nil,
207
+ inventory_type: :standard_material,
208
+ source_category: :gathering,
209
+ source_sub_category: :furniture_material
210
+ ).freeze
211
+
212
+ RED_DYE = GenshinObject::Material.new(
213
+ kamera_key: "RedDye",
214
+ name: "Red Dye",
215
+ rarity: 2,
216
+ family: nil,
217
+ inventory_type: :standard_material,
218
+ source_category: :gathering,
219
+ source_sub_category: :furniture_material
220
+ ).freeze
221
+
222
+ SANDBEARER_WOOD = GenshinObject::Material.new(
223
+ kamera_key: "SandbearerWood",
224
+ name: "Sandbearer Wood",
225
+ rarity: 1,
226
+ family: nil,
227
+ inventory_type: :standard_material,
228
+ source_category: :gathering,
229
+ source_sub_category: :furniture_material
230
+ ).freeze
231
+
232
+ YELLOW_DYE = GenshinObject::Material.new(
233
+ kamera_key: "YellowDye",
234
+ name: "Yellow Dye",
235
+ rarity: 1,
236
+ family: nil,
237
+ inventory_type: :standard_material,
238
+ source_category: :gathering,
239
+ source_sub_category: :furniture_material
240
+ ).freeze
241
+
242
+ YUMEMIRU_WOOD = GenshinObject::Material.new(
243
+ kamera_key: "YumemiruWood",
244
+ name: "Yumemiru Wood",
245
+ rarity: 1,
246
+ family: nil,
247
+ inventory_type: :standard_material,
248
+ source_category: :gathering,
249
+ source_sub_category: :furniture_material
250
+ ).freeze
251
+ end
5
252
  end
6
-
7
- ADHIGAMA_WOOD = GenshinObject::Material.new(
8
- kamera_key: "AdhigamaWood",
9
- name: "Adhigama Wood",
10
- rarity: 1,
11
- family: nil,
12
- inventory_type: :standard_material,
13
- source_category: :gathering,
14
- source_sub_category: :furniture_material,
15
- ).freeze
16
-
17
- ARALIA_WOOD = GenshinObject::Material.new(
18
- kamera_key: "AraliaWood",
19
- name: "Aralia Wood",
20
- rarity: 1,
21
- family: nil,
22
- inventory_type: :standard_material,
23
- source_category: :gathering,
24
- source_sub_category: :furniture_material,
25
- ).freeze
26
-
27
- ASH_WOOD = GenshinObject::Material.new(
28
- kamera_key: "AshWood",
29
- name: "Ash Wood",
30
- rarity: 1,
31
- family: nil,
32
- inventory_type: :standard_material,
33
- source_category: :gathering,
34
- source_sub_category: :furniture_material,
35
- ).freeze
36
-
37
- ATHEL_WOOD = GenshinObject::Material.new(
38
- kamera_key: "AthelWood",
39
- name: "Athel Wood",
40
- rarity: 1,
41
- family: nil,
42
- inventory_type: :standard_material,
43
- source_category: :gathering,
44
- source_sub_category: :furniture_material,
45
- ).freeze
46
-
47
- BAMBOO_SEGMENT = GenshinObject::Material.new(
48
- kamera_key: "BambooSegment",
49
- name: "Bamboo Segment",
50
- rarity: 1,
51
- family: nil,
52
- inventory_type: :standard_material,
53
- source_category: :gathering,
54
- source_sub_category: :furniture_material,
55
- ).freeze
56
-
57
- BLUE_DYE = GenshinObject::Material.new(
58
- kamera_key: "BlueDye",
59
- name: "Blue Dye",
60
- rarity: 1,
61
- family: nil,
62
- inventory_type: :standard_material,
63
- source_category: :gathering,
64
- source_sub_category: :furniture_material,
65
- ).freeze
66
-
67
- BIRCH_WOOD = GenshinObject::Material.new(
68
- kamera_key: "BirchWood",
69
- name: "Birch Wood",
70
- rarity: 1,
71
- family: nil,
72
- inventory_type: :standard_material,
73
- source_category: :gathering,
74
- source_sub_category: :furniture_material,
75
- ).freeze
76
-
77
- BRIGHTWOOD = GenshinObject::Material.new(
78
- kamera_key: "Brightwood",
79
- name: "Brightwood",
80
- rarity: 1,
81
- family: nil,
82
- inventory_type: :standard_material,
83
- source_category: :gathering,
84
- source_sub_category: :furniture_material,
85
- ).freeze
86
-
87
- CUIHUA_WOOD = GenshinObject::Material.new(
88
- kamera_key: "CuihuaWood",
89
- name: "Cuihua Wood",
90
- rarity: 1,
91
- family: nil,
92
- inventory_type: :standard_material,
93
- source_category: :gathering,
94
- source_sub_category: :furniture_material,
95
- ).freeze
96
-
97
- CYPRESS_WOOD = GenshinObject::Material.new(
98
- kamera_key: "CypressWood",
99
- name: "Cypress Wood",
100
- rarity: 1,
101
- family: nil,
102
- inventory_type: :standard_material,
103
- source_category: :gathering,
104
- source_sub_category: :furniture_material,
105
- ).freeze
106
-
107
- FABRIC = GenshinObject::Material.new(
108
- kamera_key: "Fabric",
109
- name: "Fabric",
110
- rarity: 1,
111
- family: nil,
112
- inventory_type: :standard_material,
113
- source_category: :gathering,
114
- source_sub_category: :furniture_material,
115
- ).freeze
116
-
117
- FIR_WOOD = GenshinObject::Material.new(
118
- kamera_key: "FirWood",
119
- name: "Fir Wood",
120
- rarity: 1,
121
- family: nil,
122
- inventory_type: :standard_material,
123
- source_category: :gathering,
124
- source_sub_category: :furniture_material,
125
- ).freeze
126
-
127
- FRAGRANT_CEDAR_WOOD = GenshinObject::Material.new(
128
- kamera_key: "FragrantCedarWood",
129
- name: "Fragrant Cedar Wood",
130
- rarity: 1,
131
- family: nil,
132
- inventory_type: :standard_material,
133
- source_category: :gathering,
134
- source_sub_category: :furniture_material,
135
- ).freeze
136
-
137
- KARMAPHALA_WOOD = GenshinObject::Material.new(
138
- kamera_key: "KarmaphalaWood",
139
- name: "Karmaphala Wood",
140
- rarity: 1,
141
- family: nil,
142
- inventory_type: :standard_material,
143
- source_category: :gathering,
144
- source_sub_category: :furniture_material,
145
- ).freeze
146
-
147
- LINDEN_WOOD = GenshinObject::Material.new(
148
- kamera_key: "LindenWood",
149
- name: "Linden Wood",
150
- rarity: 1,
151
- family: nil,
152
- inventory_type: :standard_material,
153
- source_category: :gathering,
154
- source_sub_category: :furniture_material,
155
- ).freeze
156
-
157
- MALLOW_WOOD = GenshinObject::Material.new(
158
- kamera_key: "MallowWood",
159
- name: "Mallow Wood",
160
- rarity: 1,
161
- family: nil,
162
- inventory_type: :standard_material,
163
- source_category: :gathering,
164
- source_sub_category: :furniture_material,
165
- ).freeze
166
-
167
- MAPLE_WOOD = GenshinObject::Material.new(
168
- kamera_key: "MapleWood",
169
- name: "Maple Wood",
170
- rarity: 1,
171
- family: nil,
172
- inventory_type: :standard_material,
173
- source_category: :gathering,
174
- source_sub_category: :furniture_material,
175
- ).freeze
176
-
177
- MOUNTAIN_DATE_WOOD = GenshinObject::Material.new(
178
- kamera_key: "MountainDateWood",
179
- name: "Mountain Date Wood",
180
- rarity: 1,
181
- family: nil,
182
- inventory_type: :standard_material,
183
- source_category: :gathering,
184
- source_sub_category: :furniture_material,
185
- ).freeze
186
-
187
- OTOGI_WOOD = GenshinObject::Material.new(
188
- kamera_key: "OtogiWood",
189
- name: "Otogi Wood",
190
- rarity: 1,
191
- family: nil,
192
- inventory_type: :standard_material,
193
- source_category: :gathering,
194
- source_sub_category: :furniture_material,
195
- ).freeze
196
-
197
- PINE_WOOD = GenshinObject::Material.new(
198
- kamera_key: "PineWood",
199
- name: "Pine Wood",
200
- rarity: 1,
201
- family: nil,
202
- inventory_type: :standard_material,
203
- source_category: :gathering,
204
- source_sub_category: :furniture_material,
205
- ).freeze
206
-
207
- RED_DYE = GenshinObject::Material.new(
208
- kamera_key: "RedDye",
209
- name: "Red Dye",
210
- rarity: 2,
211
- family: nil,
212
- inventory_type: :standard_material,
213
- source_category: :gathering,
214
- source_sub_category: :furniture_material,
215
- ).freeze
216
-
217
- SANDBEARER_WOOD = GenshinObject::Material.new(
218
- kamera_key: "SandbearerWood",
219
- name: "Sandbearer Wood",
220
- rarity: 1,
221
- family: nil,
222
- inventory_type: :standard_material,
223
- source_category: :gathering,
224
- source_sub_category: :furniture_material,
225
- ).freeze
226
-
227
- YELLOW_DYE = GenshinObject::Material.new(
228
- kamera_key: "YellowDye",
229
- name: "Yellow Dye",
230
- rarity: 1,
231
- family: nil,
232
- inventory_type: :standard_material,
233
- source_category: :gathering,
234
- source_sub_category: :furniture_material,
235
- ).freeze
236
-
237
- YUMEMIRU_WOOD = GenshinObject::Material.new(
238
- kamera_key: "YumemiruWood",
239
- name: "Yumemiru Wood",
240
- rarity: 1,
241
- family: nil,
242
- inventory_type: :standard_material,
243
- source_category: :gathering,
244
- source_sub_category: :furniture_material,
245
- ).freeze
246
253
  end
247
254
  end
@@ -1,41 +1,46 @@
1
- module GenshinData::Materials
2
- module Standard
3
- require_relative "standard/cooking_material_data"
4
- require_relative "standard/crafting_material_data"
5
- require_relative "standard/fishing_material_data"
6
- require_relative "standard/forging_material_data"
7
- require_relative "standard/furniture_material_data"
1
+ # frozen_string_literal: true
8
2
 
9
- class << self
10
- def all
11
- [
12
- crafting_materials,
13
- cooking_materials,
14
- fishing_materials,
15
- forging_materials,
16
- furniture_materials,
17
- ].flatten.sort { |x, y| x.name <=> y.name }
18
- end
3
+ module GenshinData
4
+ module Materials
5
+ # Top level access class for all non development materials
6
+ module Standard
7
+ require_relative "standard/cooking_material_data"
8
+ require_relative "standard/crafting_material_data"
9
+ require_relative "standard/fishing_material_data"
10
+ require_relative "standard/forging_material_data"
11
+ require_relative "standard/furniture_material_data"
19
12
 
20
- def crafting_materials
21
- CraftingMaterialData.all
22
- end
13
+ class << self
14
+ def all
15
+ [
16
+ crafting_materials,
17
+ cooking_materials,
18
+ fishing_materials,
19
+ forging_materials,
20
+ furniture_materials
21
+ ].flatten.sort { |x, y| x.name <=> y.name }
22
+ end
23
23
 
24
- def cooking_materials
25
- CookingMaterialsData.all
26
- end
24
+ def crafting_materials
25
+ CraftingMaterialData.all
26
+ end
27
27
 
28
- def fishing_materials
29
- FishingMaterialData.all
30
- end
28
+ def cooking_materials
29
+ CookingMaterialsData.all
30
+ end
31
31
 
32
- def forging_materials
33
- ForgingMaterialData.all
34
- end
32
+ def fishing_materials
33
+ FishingMaterialData.all
34
+ end
35
+
36
+ def forging_materials
37
+ ForgingMaterialData.all
38
+ end
35
39
 
36
- def furniture_materials
37
- FurnitureMaterialData.all
40
+ def furniture_materials
41
+ FurnitureMaterialData.all
42
+ end
38
43
  end
39
44
  end
40
45
  end
41
- end
46
+ end
@@ -1,16 +1,22 @@
1
- module GenshinData
1
+ # frozen_string_literal: true
2
2
 
3
+ module GenshinData
3
4
  # Manager for all characters and attributes
4
5
  module Materials
5
- require_relative 'materials/development'
6
- require_relative 'materials/standard'
6
+ require_relative "materials/development"
7
+ require_relative "materials/standard"
7
8
 
8
9
  class << self
9
10
  def all
10
- [
11
- Development.all,
12
- Standard.all,
13
- ].flatten.sort { |x, y| x.name <=> y.name }
11
+ [Development.all, Standard.all].flatten.sort { |x, y| x.name <=> y.name }
12
+ end
13
+
14
+ def for_family(family)
15
+ all.select { |m| m.family == family }
16
+ end
17
+
18
+ def for_kamera_key(key)
19
+ all.select { |m| m.kamera_key == key }
14
20
  end
15
21
  end
16
22
  end