teyvatdb 0.1.18 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/Gemfile.lock +4 -1
- data/lib/genshin_data/artifact_sets/artifact_data.rb +946 -295
- data/lib/genshin_data/artifact_sets.rb +2 -2
- data/lib/genshin_data/characters/character_data.rb +1143 -1126
- data/lib/genshin_data/characters.rb +4 -2
- data/lib/genshin_data/materials/development/elite_monster_drops_data.rb +605 -598
- data/lib/genshin_data/materials/development/gems_data.rb +331 -324
- data/lib/genshin_data/materials/development/general_data.rb +103 -96
- data/lib/genshin_data/materials/development/local_specialty_data.rb +506 -499
- data/lib/genshin_data/materials/development/monster_loot_drops_data.rb +441 -434
- data/lib/genshin_data/materials/development/talent_books_data.rb +506 -500
- data/lib/genshin_data/materials/development/weapon_material_data.rb +672 -665
- data/lib/genshin_data/materials/development/weapon_refinement_material_data.rb +129 -122
- data/lib/genshin_data/materials/development/weekly_boss_drops_data.rb +283 -276
- data/lib/genshin_data/materials/development/world_boss_drops_data.rb +330 -327
- data/lib/genshin_data/materials/development.rb +61 -56
- data/lib/genshin_data/materials/standard/cooking_material_data.rb +561 -554
- data/lib/genshin_data/materials/standard/crafting_material_data.rb +130 -123
- data/lib/genshin_data/materials/standard/fishing_material_data.rb +452 -445
- data/lib/genshin_data/materials/standard/forging_material_data.rb +191 -184
- data/lib/genshin_data/materials/standard/furniture_material_data.rb +251 -244
- data/lib/genshin_data/materials/standard.rb +37 -32
- data/lib/genshin_data/materials.rb +13 -7
- data/lib/genshin_data/nations/nation_data.rb +55 -52
- data/lib/genshin_data/talent_books/talent_book_data.rb +147 -0
- data/lib/genshin_data/talent_books.rb +14 -0
- data/lib/genshin_data/weapons/weapon_data/bows.rb +369 -364
- data/lib/genshin_data/weapons/weapon_data/catalysts.rb +359 -354
- data/lib/genshin_data/weapons/weapon_data/claymores.rb +359 -354
- data/lib/genshin_data/weapons/weapon_data/polearms.rb +262 -257
- data/lib/genshin_data/weapons/weapon_data/swords.rb +399 -395
- data/lib/genshin_data/weapons/weapon_data.rb +10 -7
- data/lib/genshin_data/weapons.rb +2 -1
- data/lib/genshin_data.rb +16 -5
- data/lib/genshin_object/artifact_set.rb +2 -2
- data/lib/genshin_object/material_family.rb +15 -0
- data/lib/genshin_object/schedule.rb +42 -0
- data/lib/genshin_object/talent_book.rb +6 -0
- data/lib/genshin_object/weapon_material_family.rb +6 -0
- data/lib/genshin_object.rb +8 -5
- data/lib/teyvatdb/version.rb +1 -1
- data/lib/teyvatdb.rb +3 -3
- metadata +8 -2
@@ -1,11 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
module GenshinData
|
4
|
-
module
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
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
|
data/lib/genshin_data/weapons.rb
CHANGED
@@ -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 "
|
6
|
-
require_relative "
|
7
|
-
require_relative "
|
8
|
-
require_relative "
|
9
|
-
require_relative "
|
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
|
data/lib/genshin_object.rb
CHANGED
@@ -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 "
|
6
|
-
require_relative "
|
7
|
-
require_relative "
|
8
|
-
require_relative "
|
9
|
-
require_relative "
|
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
|
data/lib/teyvatdb/version.rb
CHANGED
data/lib/teyvatdb.rb
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
require "json"
|
4
4
|
|
5
|
-
require_relative "
|
6
|
-
require_relative "
|
7
|
-
require_relative "
|
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.
|
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:
|
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
|