teyvatdb 0.1.17 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) 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 +3 -3
  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/weapons/weapon_data/bows.rb +369 -364
  30. data/lib/genshin_data/weapons/weapon_data/catalysts.rb +359 -354
  31. data/lib/genshin_data/weapons/weapon_data/claymores.rb +359 -354
  32. data/lib/genshin_data/weapons/weapon_data/polearms.rb +262 -257
  33. data/lib/genshin_data/weapons/weapon_data/swords.rb +399 -395
  34. data/lib/genshin_data/weapons/weapon_data.rb +10 -7
  35. data/lib/genshin_data/weapons.rb +2 -1
  36. data/lib/genshin_data.rb +16 -5
  37. data/lib/genshin_object/artifact_set.rb +2 -2
  38. data/lib/genshin_object/material_family.rb +15 -0
  39. data/lib/genshin_object/schedule.rb +42 -0
  40. data/lib/genshin_object/talent_book.rb +6 -0
  41. data/lib/genshin_object/weapon_material_family.rb +6 -0
  42. data/lib/genshin_object.rb +8 -5
  43. data/lib/teyvatdb/version.rb +1 -1
  44. data/lib/teyvatdb.rb +3 -3
  45. metadata +8 -2
@@ -1,11 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module GenshinData::Weapons
4
- module WeaponData
5
- require_relative './weapon_data/bows'
6
- require_relative './weapon_data/catalysts'
7
- require_relative './weapon_data/claymores'
8
- require_relative './weapon_data/polearms'
9
- require_relative './weapon_data/swords'
3
+ module GenshinData
4
+ module Weapons
5
+ # Definitons for all in game Weapons
6
+ module WeaponData
7
+ require_relative "weapon_data/bows"
8
+ require_relative "weapon_data/catalysts"
9
+ require_relative "weapon_data/claymores"
10
+ require_relative "weapon_data/polearms"
11
+ require_relative "weapon_data/swords"
12
+ end
10
13
  end
11
14
  end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GenshinData
4
+ # Module for accessing weapon data
4
5
  module Weapons
5
6
  require_relative "weapons/weapon_data"
6
7
 
@@ -11,7 +12,7 @@ module GenshinData
11
12
  catalysts,
12
13
  claymores,
13
14
  polearms,
14
- swords,
15
+ swords
15
16
  ].flatten.sort { |x, y| x.kamera_key <=> y.kamera_key }
16
17
  end
17
18
 
data/lib/genshin_data.rb CHANGED
@@ -2,9 +2,20 @@
2
2
 
3
3
  # Module that handles all data
4
4
  module GenshinData
5
- require_relative "./genshin_data/artifact_sets"
6
- require_relative "./genshin_data/characters"
7
- require_relative "./genshin_data/materials"
8
- require_relative "./genshin_data/nations"
9
- require_relative "./genshin_data/weapons"
5
+ require_relative "genshin_data/artifact_sets"
6
+ require_relative "genshin_data/characters"
7
+ require_relative "genshin_data/materials"
8
+ require_relative "genshin_data/nations"
9
+ require_relative "genshin_data/talent_books"
10
+ require_relative "genshin_data/weapons"
11
+
12
+ class << self
13
+ def elements
14
+ %i[anemo geo electro dendro hydro pyro cryo]
15
+ end
16
+
17
+ def weapon_types
18
+ %i[sword claymore polearm catalyst bow]
19
+ end
20
+ end
10
21
  end
@@ -1,18 +1,18 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GenshinObject
4
-
5
4
  # Base class to represent various Genshin Artifact Sets
6
5
  class ArtifactSet
7
6
  attr_accessor :kamera_key, :name, :max_rarity, :slots
8
7
 
9
8
  ALL_SLOTS = %i[flower plume sands goblet circlet].freeze
10
9
 
11
- def initialize(kamera_key:, name:, max_rarity:, slots: ALL_SLOTS)
10
+ def initialize(kamera_key:, name:, max_rarity:, bonuses:, slots: ALL_SLOTS)
12
11
  @kamera_key = kamera_key
13
12
  @name = name
14
13
  @max_rarity = max_rarity
15
14
  @slots = slots
15
+ @bonuses = bonuses
16
16
  end
17
17
  end
18
18
  end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GenshinObject
4
+ # Base class to represent various Genshin Materials
5
+ class MaterialFamily
6
+ attr_accessor :family, :name, :nation_name, :schedule
7
+
8
+ def initialize(family:, name:, nation_name: nil, schedule: nil)
9
+ @family = family
10
+ @name = name
11
+ @nation_name = nation_name
12
+ @schedule = schedule
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GenshinObject
4
+ # Base class to represent various Schedule data
5
+ class Schedule
6
+ attr_accessor :mon_thurs, :tues_fri, :wed_sat
7
+
8
+ def initialize(mon_thurs: false, tues_fri: false, wed_sat: false)
9
+ @mon_thurs = mon_thurs
10
+ @tues_fri = tues_fri
11
+ @wed_sat = wed_sat
12
+ end
13
+
14
+ def monday?
15
+ !!mon_thurs
16
+ end
17
+
18
+ def tuesday?
19
+ !!tues_fri
20
+ end
21
+
22
+ def wednesday?
23
+ !!wed_sat
24
+ end
25
+
26
+ def thursday?
27
+ !!mon_thurs
28
+ end
29
+
30
+ def friday?
31
+ !!tues_fri
32
+ end
33
+
34
+ def saturday?
35
+ !!wed_sat
36
+ end
37
+
38
+ def sunday?
39
+ true
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GenshinObject
4
+ # Base class to represent various Genshin Talent Books
5
+ class TalentBook < GenshinObject::MaterialFamily; end
6
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GenshinObject
4
+ # Base class to represent various Genshin Materials
5
+ class WeaponMaterialFamily < MaterialFamily; end
6
+ end
@@ -2,9 +2,12 @@
2
2
 
3
3
  # Module that handles higher constants and base classes and behavior
4
4
  module GenshinObject
5
- require_relative "./genshin_object/artifact_set"
6
- require_relative "./genshin_object/character"
7
- require_relative "./genshin_object/material"
8
- require_relative "./genshin_object/nation"
9
- require_relative "./genshin_object/weapon"
5
+ require_relative "genshin_object/artifact_set"
6
+ require_relative "genshin_object/character"
7
+ require_relative "genshin_object/material"
8
+ require_relative "genshin_object/material_family"
9
+ require_relative "genshin_object/nation"
10
+ require_relative "genshin_object/schedule"
11
+ require_relative "genshin_object/talent_book"
12
+ require_relative "genshin_object/weapon"
10
13
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TeyvatDB
4
- VERSION = "0.1.17"
4
+ VERSION = "0.2.0"
5
5
  end
data/lib/teyvatdb.rb CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  require "json"
4
4
 
5
- require_relative "./teyvatdb/version"
6
- require_relative "./genshin_object"
7
- require_relative "./genshin_data"
5
+ require_relative "teyvatdb/version"
6
+ require_relative "genshin_object"
7
+ require_relative "genshin_data"
8
8
 
9
9
  # Common helpers
10
10
  module TeyvatDB
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teyvatdb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.17
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Haberer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-12-30 00:00:00.000000000 Z
11
+ date: 2024-01-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Gem to provide basic genshin data to my other projects
14
14
  email:
@@ -50,6 +50,8 @@ files:
50
50
  - lib/genshin_data/materials/standard/furniture_material_data.rb
51
51
  - lib/genshin_data/nations.rb
52
52
  - lib/genshin_data/nations/nation_data.rb
53
+ - lib/genshin_data/talent_books.rb
54
+ - lib/genshin_data/talent_books/talent_book_data.rb
53
55
  - lib/genshin_data/weapons.rb
54
56
  - lib/genshin_data/weapons/weapon_data.rb
55
57
  - lib/genshin_data/weapons/weapon_data/bows.rb
@@ -61,8 +63,12 @@ files:
61
63
  - lib/genshin_object/artifact_set.rb
62
64
  - lib/genshin_object/character.rb
63
65
  - lib/genshin_object/material.rb
66
+ - lib/genshin_object/material_family.rb
64
67
  - lib/genshin_object/nation.rb
68
+ - lib/genshin_object/schedule.rb
69
+ - lib/genshin_object/talent_book.rb
65
70
  - lib/genshin_object/weapon.rb
71
+ - lib/genshin_object/weapon_material_family.rb
66
72
  - lib/teyvatdb.rb
67
73
  - lib/teyvatdb/version.rb
68
74
  - sig/teyvatdb.rbs