dota 0.0.12 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Guardfile +1 -1
- data/README.md +145 -112
- data/data/heroes.yml +327 -0
- data/data/items.yml +714 -0
- data/lib/dota.rb +8 -1
- data/lib/dota/api/basic_match.rb +52 -0
- data/lib/dota/api/basic_player.rb +61 -0
- data/lib/dota/api/client.rb +12 -2
- data/lib/dota/api/cosmetic/rarity.rb +1 -9
- data/lib/dota/api/entity.rb +13 -0
- data/lib/dota/api/friend.rb +1 -9
- data/lib/dota/api/hero.rb +2 -111
- data/lib/dota/api/item.rb +1 -240
- data/lib/dota/api/league.rb +6 -8
- data/lib/dota/api/live_match.rb +29 -35
- data/lib/dota/api/live_match/player.rb +29 -22
- data/lib/dota/api/live_match/side.rb +25 -11
- data/lib/dota/api/match.rb +30 -117
- data/lib/dota/api/match/draft.rb +1 -9
- data/lib/dota/api/match/player.rb +7 -59
- data/lib/dota/api/match/side.rb +41 -0
- data/lib/dota/api/scheduled_match.rb +32 -0
- data/lib/dota/api/team.rb +1 -9
- data/lib/dota/version.rb +1 -1
- data/spec/dota/api/cosmetic/rarity_spec.rb +2 -2
- data/spec/dota/api/hero_spec.rb +2 -6
- data/spec/dota/api/item_spec.rb +1 -5
- data/spec/dota/api/live_match/player_spec.rb +76 -8
- data/spec/dota/api/live_match/side_spec.rb +42 -8
- data/spec/dota/api/live_match_spec.rb +5 -16
- data/spec/dota/api/match/draft_spec.rb +4 -1
- data/spec/dota/api/match/player_spec.rb +7 -3
- data/spec/dota/api/match/side_spec.rb +54 -0
- data/spec/dota/api/match_spec.rb +0 -62
- data/spec/dota/api/scheduled_match_spec.rb +36 -0
- data/spec/dota_spec.rb +56 -7
- data/spec/fixtures/vcr_cassettes/GetScheduledLeagueGames.yml +112 -0
- metadata +15 -5
- data/lib/dota/api/live_match/scoreboard.rb +0 -31
- data/spec/dota/api/live_match/scoreboard_spec.rb +0 -25
data/lib/dota.rb
CHANGED
@@ -1,8 +1,14 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
|
1
3
|
require 'dota/configuration'
|
2
4
|
require 'dota/version'
|
3
5
|
|
4
6
|
require 'dota/utils/inspect'
|
5
7
|
|
8
|
+
require 'dota/api/entity'
|
9
|
+
|
10
|
+
require 'dota/api/basic_match'
|
11
|
+
require 'dota/api/basic_player'
|
6
12
|
require 'dota/api/client'
|
7
13
|
require 'dota/api/cosmetic/rarity'
|
8
14
|
require 'dota/api/friend'
|
@@ -12,10 +18,11 @@ require 'dota/api/league'
|
|
12
18
|
require 'dota/api/live_match'
|
13
19
|
require 'dota/api/live_match/player'
|
14
20
|
require 'dota/api/live_match/side'
|
15
|
-
require 'dota/api/live_match/scoreboard'
|
16
21
|
require 'dota/api/match'
|
17
22
|
require 'dota/api/match/draft'
|
18
23
|
require 'dota/api/match/player'
|
24
|
+
require 'dota/api/match/side'
|
25
|
+
require 'dota/api/scheduled_match'
|
19
26
|
require 'dota/api/team'
|
20
27
|
|
21
28
|
module Dota
|
@@ -0,0 +1,52 @@
|
|
1
|
+
module Dota
|
2
|
+
module API
|
3
|
+
class BasicMatch < Entity
|
4
|
+
include Utilities::Inspectable
|
5
|
+
|
6
|
+
TYPES = {
|
7
|
+
-1 => "Invalid",
|
8
|
+
0 => "Public Matchmaking",
|
9
|
+
1 => "Practice",
|
10
|
+
2 => "Tournament",
|
11
|
+
3 => "Tutorial",
|
12
|
+
4 => "Co-op with Bots",
|
13
|
+
5 => "Team Match",
|
14
|
+
6 => "Solo Queue",
|
15
|
+
7 => "Ranked"
|
16
|
+
}.freeze
|
17
|
+
|
18
|
+
MODES = {
|
19
|
+
0 => "None",
|
20
|
+
1 => "All Pick",
|
21
|
+
2 => "Captain's Mode",
|
22
|
+
3 => "Random Draft",
|
23
|
+
4 => "Single Draft",
|
24
|
+
5 => "All Random",
|
25
|
+
6 => "Intro",
|
26
|
+
7 => "Diretide",
|
27
|
+
8 => "Reverse Captain's Mode",
|
28
|
+
9 => "The Greeviling",
|
29
|
+
10 => "Tutorial",
|
30
|
+
11 => "Mid Only",
|
31
|
+
12 => "Least Played",
|
32
|
+
13 => "New Player Pool",
|
33
|
+
14 => "Compendium Matchmaking",
|
34
|
+
15 => "Custom",
|
35
|
+
16 => "Captain's Draft",
|
36
|
+
17 => "Balanced Draft",
|
37
|
+
18 => "Ability Draft"
|
38
|
+
}.freeze
|
39
|
+
|
40
|
+
SKILL_LEVELS = {
|
41
|
+
0 => "Any",
|
42
|
+
1 => "Normal",
|
43
|
+
2 => "High",
|
44
|
+
3 => "Very High"
|
45
|
+
}.freeze
|
46
|
+
|
47
|
+
def id
|
48
|
+
raw["match_id"]
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
module Dota
|
2
|
+
module API
|
3
|
+
class BasicPlayer < Entity
|
4
|
+
include Utilities::Inspectable
|
5
|
+
|
6
|
+
TYPES = {
|
7
|
+
0 => :radiant,
|
8
|
+
1 => :dire,
|
9
|
+
2 => :broadcaster,
|
10
|
+
4 => :unassigned
|
11
|
+
}
|
12
|
+
|
13
|
+
STATUS = {
|
14
|
+
0 => :played,
|
15
|
+
1 => :left_safe,
|
16
|
+
2 => :abandoned,
|
17
|
+
4 => :bot
|
18
|
+
}
|
19
|
+
|
20
|
+
def id
|
21
|
+
raw["account_id"]
|
22
|
+
end
|
23
|
+
|
24
|
+
def hero
|
25
|
+
Hero.new(raw["hero_id"])
|
26
|
+
end
|
27
|
+
|
28
|
+
def level
|
29
|
+
raw["level"]
|
30
|
+
end
|
31
|
+
|
32
|
+
def assists
|
33
|
+
raw["assists"]
|
34
|
+
end
|
35
|
+
|
36
|
+
def last_hits
|
37
|
+
raw["last_hits"]
|
38
|
+
end
|
39
|
+
|
40
|
+
def denies
|
41
|
+
raw["denies"]
|
42
|
+
end
|
43
|
+
|
44
|
+
def gold
|
45
|
+
raw["gold"]
|
46
|
+
end
|
47
|
+
|
48
|
+
def kills
|
49
|
+
raw["kills"]
|
50
|
+
end
|
51
|
+
|
52
|
+
def gpm
|
53
|
+
raw["gold_per_min"]
|
54
|
+
end
|
55
|
+
|
56
|
+
def xpm
|
57
|
+
raw["xp_per_min"]
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
data/lib/dota/api/client.rb
CHANGED
@@ -65,13 +65,23 @@ module Dota
|
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
68
|
-
def live_matches
|
69
|
-
response = get("IDOTA2Match_570", "GetLiveLeagueGames")["result"]
|
68
|
+
def live_matches(options = {})
|
69
|
+
response = get("IDOTA2Match_570", "GetLiveLeagueGames", options)["result"]
|
70
70
|
if response && (live_matches = response["games"])
|
71
71
|
live_matches.map { |game| LiveMatch.new(game) }
|
72
72
|
end
|
73
73
|
end
|
74
74
|
|
75
|
+
def scheduled_matches(options = {})
|
76
|
+
options[:date_min] = options.delete(:from) if options[:from]
|
77
|
+
options[:date_max] = options.delete(:to) if options[:to]
|
78
|
+
|
79
|
+
response = get("IDOTA2Match_570", "GetScheduledLeagueGames", options)["result"]
|
80
|
+
if response && (scheduled_matches = response["games"])
|
81
|
+
scheduled_matches.map { |game| ScheduledMatch.new(game) }
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
75
85
|
def cosmetic_rarities
|
76
86
|
response = get("IEconDOTA2_570", "GetRarities", language: "en")["result"]
|
77
87
|
if response && (rarities = response["rarities"])
|
data/lib/dota/api/friend.rb
CHANGED
data/lib/dota/api/hero.rb
CHANGED
@@ -1,121 +1,12 @@
|
|
1
1
|
module Dota
|
2
2
|
module API
|
3
3
|
class Hero
|
4
|
-
MAPPING =
|
5
|
-
1 => ["antimage", "Anti-Mage"],
|
6
|
-
2 => ["axe", "Axe"],
|
7
|
-
3 => ["bane", "Bane"],
|
8
|
-
4 => ["bloodseeker", "Bloodseeker"],
|
9
|
-
5 => ["crystal_maiden", "Crystal Maiden"],
|
10
|
-
6 => ["drow_ranger", "Drow Ranger"],
|
11
|
-
7 => ["earthshaker", "Earthshaker"],
|
12
|
-
8 => ["juggernaut", "Juggernaut"],
|
13
|
-
9 => ["mirana", "Mirana"],
|
14
|
-
10 => ["morphling", "Morphling"],
|
15
|
-
11 => ["nevermore", "Shadow Fiend"],
|
16
|
-
12 => ["phantom_lancer", "Phantom Lancer"],
|
17
|
-
13 => ["puck", "Puck"],
|
18
|
-
14 => ["pudge", "Pudge"],
|
19
|
-
15 => ["razor", "Razor"],
|
20
|
-
16 => ["sand_king", "Sand King"],
|
21
|
-
17 => ["storm_spirit", "Storm Spirit"],
|
22
|
-
18 => ["sven", "Sven"],
|
23
|
-
19 => ["tiny", "Tiny"],
|
24
|
-
20 => ["vengefulspirit", "Vengeful Spirit"],
|
25
|
-
21 => ["windrunner", "Windranger"],
|
26
|
-
22 => ["zuus", "Zeus"],
|
27
|
-
23 => ["kunkka", "Kunkka"],
|
28
|
-
25 => ["lina", "Lina"],
|
29
|
-
26 => ["lion", "Lion"],
|
30
|
-
27 => ["shadow_shaman", "Shadow Shaman"],
|
31
|
-
28 => ["slardar", "Slardar"],
|
32
|
-
29 => ["tidehunter", "Tidehunter"],
|
33
|
-
30 => ["witch_doctor", "Witch Doctor"],
|
34
|
-
31 => ["lich", "Lich"],
|
35
|
-
32 => ["riki", "Riki"],
|
36
|
-
33 => ["enigma", "Enigma"],
|
37
|
-
34 => ["tinker", "Tinker"],
|
38
|
-
35 => ["sniper", "Sniper"],
|
39
|
-
36 => ["necrolyte", "Necrophos"],
|
40
|
-
37 => ["warlock", "Warlock"],
|
41
|
-
38 => ["beastmaster", "Beastmaster"],
|
42
|
-
39 => ["queenofpain", "Queen of Pain"],
|
43
|
-
40 => ["venomancer", "Venomancer"],
|
44
|
-
41 => ["faceless_void", "Faceless Void"],
|
45
|
-
42 => ["skeleton_king", "Wraith King"],
|
46
|
-
43 => ["death_prophet", "Death Prophet"],
|
47
|
-
44 => ["phantom_assassin", "Phantom Assassin"],
|
48
|
-
45 => ["pugna", "Pugna"],
|
49
|
-
46 => ["templar_assassin", "Templar Assassin"],
|
50
|
-
47 => ["viper", "Viper"],
|
51
|
-
48 => ["luna", "Luna"],
|
52
|
-
49 => ["dragon_knight", "Dragon Knight"],
|
53
|
-
50 => ["dazzle", "Dazzle"],
|
54
|
-
51 => ["rattletrap", "Clockwerk"],
|
55
|
-
52 => ["leshrac", "Leshrac"],
|
56
|
-
53 => ["furion", "Nature's Prophet"],
|
57
|
-
54 => ["life_stealer", "Lifestealer"],
|
58
|
-
55 => ["dark_seer", "Dark Seer"],
|
59
|
-
56 => ["clinkz", "Clinkz"],
|
60
|
-
57 => ["omniknight", "Omniknight"],
|
61
|
-
58 => ["enchantress", "Enchantress"],
|
62
|
-
59 => ["huskar", "Huskar"],
|
63
|
-
60 => ["night_stalker", "Night Stalker"],
|
64
|
-
61 => ["broodmother", "Broodmother"],
|
65
|
-
62 => ["bounty_hunter", "Bounty Hunter"],
|
66
|
-
63 => ["weaver", "Weaver"],
|
67
|
-
64 => ["jakiro", "Jakiro"],
|
68
|
-
65 => ["batrider", "Batrider"],
|
69
|
-
66 => ["chen", "Chen"],
|
70
|
-
67 => ["spectre", "Spectre"],
|
71
|
-
68 => ["ancient_apparition", "Ancient Apparition"],
|
72
|
-
69 => ["doom_bringer", "Doom"],
|
73
|
-
70 => ["ursa", "Ursa"],
|
74
|
-
71 => ["spirit_breaker", "Spirit Breaker"],
|
75
|
-
72 => ["gyrocopter", "Gyrocopter"],
|
76
|
-
73 => ["alchemist", "Alchemist"],
|
77
|
-
74 => ["invoker", "Invoker"],
|
78
|
-
75 => ["silencer", "Silencer"],
|
79
|
-
76 => ["obsidian_destroyer", "Outworld Devourer"],
|
80
|
-
77 => ["lycan", "Lycan"],
|
81
|
-
78 => ["brewmaster", "Brewmaster"],
|
82
|
-
79 => ["shadow_demon", "Shadow Demon"],
|
83
|
-
80 => ["lone_druid", "Lone Druid"],
|
84
|
-
81 => ["chaos_knight", "Chaos Knight"],
|
85
|
-
82 => ["meepo", "Meepo"],
|
86
|
-
83 => ["treant", "Treant Protector"],
|
87
|
-
84 => ["ogre_magi", "Ogre Magi"],
|
88
|
-
85 => ["undying", "Undying"],
|
89
|
-
86 => ["rubick", "Rubick"],
|
90
|
-
87 => ["disruptor", "Disruptor"],
|
91
|
-
88 => ["nyx_assassin", "Nyx Assassin"],
|
92
|
-
89 => ["naga_siren", "Naga Siren"],
|
93
|
-
90 => ["keeper_of_the_light", "Keeper of the Light"],
|
94
|
-
91 => ["wisp", "Io"],
|
95
|
-
92 => ["visage", "Visage"],
|
96
|
-
93 => ["slark", "Slark"],
|
97
|
-
94 => ["medusa", "Medusa"],
|
98
|
-
95 => ["troll_warlord", "Troll Warlord"],
|
99
|
-
96 => ["centaur", "Centaur Warrunner"],
|
100
|
-
97 => ["magnataur", "Magnus"],
|
101
|
-
98 => ["shredder", "Timbersaw"],
|
102
|
-
99 => ["bristleback", "Bristleback"],
|
103
|
-
100 => ["tusk", "Tusk"],
|
104
|
-
101 => ["skywrath_mage", "Skywrath Mage"],
|
105
|
-
102 => ["abaddon", "Abaddon"],
|
106
|
-
103 => ["elder_titan", "Elder Titan"],
|
107
|
-
104 => ["legion_commander", "Legion Commander"],
|
108
|
-
105 => ["techies", "Techies"],
|
109
|
-
106 => ["ember_spirit", "Ember Spirit"],
|
110
|
-
107 => ["earth_spirit", "Earth Spirit"],
|
111
|
-
109 => ["terrorblade", "Terrorblade"],
|
112
|
-
110 => ["phoenix", "Phoenix"]
|
113
|
-
}.freeze
|
4
|
+
MAPPING = YAML.load_file("data/heroes.yml").freeze
|
114
5
|
|
115
6
|
attr_reader :id, :name
|
116
7
|
|
117
8
|
def self.all
|
118
|
-
MAPPING.keys.map { |id| new(id) }
|
9
|
+
@all ||= MAPPING.keys.map { |id| new(id) }
|
119
10
|
end
|
120
11
|
|
121
12
|
def initialize(id)
|
data/lib/dota/api/item.rb
CHANGED
@@ -1,246 +1,7 @@
|
|
1
1
|
module Dota
|
2
2
|
module API
|
3
3
|
class Item
|
4
|
-
MAPPING =
|
5
|
-
0 => ["empty", "Empty"],
|
6
|
-
1 => ["blink", "Blink Dagger"],
|
7
|
-
2 => ["blades_of_attack", "Blades of Attack"],
|
8
|
-
3 => ["broadsword", "Broadsword"],
|
9
|
-
4 => ["chainmail", "Chainmail"],
|
10
|
-
5 => ["claymore", "Claymore"],
|
11
|
-
6 => ["helm_of_iron_will", "Helm of Iron Will"],
|
12
|
-
7 => ["javelin", "Javelin"],
|
13
|
-
8 => ["mithril_hammer", "Mithril Hammer"],
|
14
|
-
9 => ["platemail", "Platemail"],
|
15
|
-
10 => ["quarterstaff", "Quarterstaff"],
|
16
|
-
11 => ["quelling_blade", "Quelling Blade"],
|
17
|
-
12 => ["ring_of_protection", "Ring of Protection"],
|
18
|
-
13 => ["gauntlets", "Gauntlets of Strength"],
|
19
|
-
14 => ["slippers", "Slippers of Agility"],
|
20
|
-
15 => ["mantle", "Mantle of Intelligence"],
|
21
|
-
16 => ["branches", "Iron Branch"],
|
22
|
-
17 => ["belt_of_strength", "Belt of Strength"],
|
23
|
-
18 => ["boots_of_elves", "Band of Elvenskin"],
|
24
|
-
19 => ["robe", "Robe of the Magi"],
|
25
|
-
20 => ["circlet", "Circlet"],
|
26
|
-
21 => ["ogre_axe", "Ogre Club"],
|
27
|
-
22 => ["blade_of_alacrity", "Blade of Alacrity"],
|
28
|
-
23 => ["staff_of_wizardry", "Staff of Wizardry"],
|
29
|
-
24 => ["ultimate_orb", "Ultimate Orb"],
|
30
|
-
25 => ["gloves", "Gloves of Haste"],
|
31
|
-
26 => ["lifesteal", "Morbid Mask"],
|
32
|
-
27 => ["ring_of_regen", "Ring of Regen"],
|
33
|
-
28 => ["sobi_mask", "Sage's Mask"],
|
34
|
-
29 => ["boots", "Boots of Speed"],
|
35
|
-
30 => ["gem", "Gem of True Sight"],
|
36
|
-
31 => ["cloak", "Cloak"],
|
37
|
-
32 => ["talisman_of_evasion", "Talisman of Evasion"],
|
38
|
-
33 => ["cheese", "Cheese"],
|
39
|
-
34 => ["magic_stick", "Magic Stick"],
|
40
|
-
35 => ["recipe_magic_wand", "Recipe: Magic Wand"],
|
41
|
-
36 => ["magic_wand", "Magic Wand"],
|
42
|
-
37 => ["ghost", "Ghost Scepter"],
|
43
|
-
38 => ["clarity", "Clarity"],
|
44
|
-
39 => ["flask", "Healing Salve"],
|
45
|
-
40 => ["dust", "Dust of Appearance"],
|
46
|
-
41 => ["bottle", "Bottle"],
|
47
|
-
42 => ["ward_observer", "Observer Ward"],
|
48
|
-
43 => ["ward_sentry", "Sentry Ward"],
|
49
|
-
44 => ["tango", "Tango"],
|
50
|
-
45 => ["courier", "Animal Courier"],
|
51
|
-
46 => ["tpscroll", "Town Portal Scroll"],
|
52
|
-
47 => ["recipe_travel_boots", "Recipe: Boots of Travel"],
|
53
|
-
48 => ["travel_boots", "Boots of Travel"],
|
54
|
-
49 => ["recipe_phase_boots", "Recipe: Phase Boots"],
|
55
|
-
50 => ["phase_boots", "Phase Boots"],
|
56
|
-
51 => ["demon_edge", "Demon Edge"],
|
57
|
-
52 => ["eagle", "Eaglesong"],
|
58
|
-
53 => ["reaver", "Reaver"],
|
59
|
-
54 => ["relic", "Sacred Relic"],
|
60
|
-
55 => ["hyperstone", "Hyperstone"],
|
61
|
-
56 => ["ring_of_health", "Ring of Health"],
|
62
|
-
57 => ["void_stone", "Void Stone"],
|
63
|
-
58 => ["mystic_staff", "Mystic Staff"],
|
64
|
-
59 => ["energy_booster", "Energy Booster"],
|
65
|
-
60 => ["point_booster", "Point Booster"],
|
66
|
-
61 => ["vitality_booster", "Vitality Booster"],
|
67
|
-
62 => ["recipe_power_treads", "Recipe: Power Treads"],
|
68
|
-
63 => ["power_treads", "Power Treads"],
|
69
|
-
64 => ["recipe_hand_of_midas", "Recipe: Hand of Midas"],
|
70
|
-
65 => ["hand_of_midas", "Hand of Midas"],
|
71
|
-
66 => ["recipe_oblivion_staff", "Recipe: Oblivion Staff"],
|
72
|
-
67 => ["oblivion_staff", "Oblivion Staff"],
|
73
|
-
68 => ["recipe_pers", "Recipe: Perseverance"],
|
74
|
-
69 => ["pers", "Perseverance"],
|
75
|
-
70 => ["recipe_poor_mans_shield", "Recipe: Poor Man's Shield"],
|
76
|
-
71 => ["poor_mans_shield", "Poor Man's Shield"],
|
77
|
-
72 => ["recipe_bracer", "Recipe: Bracer"],
|
78
|
-
73 => ["bracer", "Bracer"],
|
79
|
-
74 => ["recipe_wraith_band", "Recipe: Wraith Band"],
|
80
|
-
75 => ["wraith_band", "Wraith Band"],
|
81
|
-
76 => ["recipe_null_talisman", "Recipe: Null Talisman"],
|
82
|
-
77 => ["null_talisman", "Null Talisman"],
|
83
|
-
78 => ["recipe_mekansm", "Recipe: Mekansm"],
|
84
|
-
79 => ["mekansm", "Mekansm"],
|
85
|
-
80 => ["recipe_vladmir", "Recipe: Vladmir's Offering"],
|
86
|
-
81 => ["vladmir", "Vladmir's Offering"],
|
87
|
-
84 => ["flying_courier", "Flying Courier"],
|
88
|
-
85 => ["recipe_buckler", "Recipe: Buckler"],
|
89
|
-
86 => ["buckler", "Buckler"],
|
90
|
-
87 => ["recipe_ring_of_basilius", "Recipe: Ring of Basilius"],
|
91
|
-
88 => ["ring_of_basilius", "Ring of Basilius"],
|
92
|
-
89 => ["recipe_pipe", "Recipe: Pipe of Insight"],
|
93
|
-
90 => ["pipe", "Pipe of Insight"],
|
94
|
-
91 => ["recipe_urn_of_shadows", "Recipe: Urn of Shadows"],
|
95
|
-
92 => ["urn_of_shadows", "Urn of Shadows"],
|
96
|
-
93 => ["recipe_headdress", "Recipe: Headdress"],
|
97
|
-
94 => ["headdress", "Headdress"],
|
98
|
-
95 => ["recipe_sheepstick", "Recipe: Scythe of Vyse"],
|
99
|
-
96 => ["sheepstick", "Scythe of Vyse"],
|
100
|
-
97 => ["recipe_orchid", "Recipe: Orchid Malevolence"],
|
101
|
-
98 => ["orchid", "Orchid Malevolence"],
|
102
|
-
99 => ["recipe_cyclone", "Recipe: Eul's Scepter of Divinity"],
|
103
|
-
100 => ["cyclone", "Eul's Scepter of Divinity"],
|
104
|
-
101 => ["recipe_force_staff", "Recipe: Force Staff"],
|
105
|
-
102 => ["force_staff", "Force Staff"],
|
106
|
-
103 => ["recipe_dagon", "Recipe: Dagon"],
|
107
|
-
104 => ["dagon", "Dagon"],
|
108
|
-
105 => ["recipe_necronomicon", "Recipe: Necronomicon"],
|
109
|
-
106 => ["necronomicon", "Necronomicon"],
|
110
|
-
107 => ["recipe_ultimate_scepter", "Recipe: Aghanim's Scepter"],
|
111
|
-
108 => ["ultimate_scepter", "Aghanim's Scepter"],
|
112
|
-
109 => ["recipe_refresher", "Recipe: Refresher Orb"],
|
113
|
-
110 => ["refresher", "Refresher Orb"],
|
114
|
-
111 => ["recipe_assault", "Recipe: Assault Cuirass"],
|
115
|
-
112 => ["assault", "Assault Cuirass"],
|
116
|
-
113 => ["recipe_heart", "Recipe: Heart of Tarrasque"],
|
117
|
-
114 => ["heart", "Heart of Tarrasque"],
|
118
|
-
115 => ["recipe_black_king_bar", "Recipe: Black King Bar"],
|
119
|
-
116 => ["black_king_bar", "Black King Bar"],
|
120
|
-
117 => ["aegis", "Aegis of the Immortal"],
|
121
|
-
118 => ["recipe_shivas_guard", "Recipe: Shiva's Guard"],
|
122
|
-
119 => ["shivas_guard", "Shiva's Guard"],
|
123
|
-
120 => ["recipe_bloodstone", "Recipe: Bloodstone"],
|
124
|
-
121 => ["bloodstone", "Bloodstone"],
|
125
|
-
122 => ["recipe_sphere", "Recipe: Linken's Sphere"],
|
126
|
-
123 => ["sphere", "Linken's Sphere"],
|
127
|
-
124 => ["recipe_vanguard", "Recipe: Vanguard"],
|
128
|
-
125 => ["vanguard", "Vanguard"],
|
129
|
-
126 => ["recipe_blade_mail", "Recipe: Blade Mail"],
|
130
|
-
127 => ["blade_mail", "Blade Mail"],
|
131
|
-
128 => ["recipe_soul_booster", "Recipe: Soul Booster"],
|
132
|
-
129 => ["soul_booster", "Soul Booster"],
|
133
|
-
130 => ["recipe_hood_of_defiance", "Recipe: Hood of Defiance"],
|
134
|
-
131 => ["hood_of_defiance", "Hood of Defiance"],
|
135
|
-
132 => ["recipe_rapier", "Recipe: Divine Rapier"],
|
136
|
-
133 => ["rapier", "Divine Rapier"],
|
137
|
-
134 => ["recipe_monkey_king_bar", "Recipe: Monkey King Bar"],
|
138
|
-
135 => ["monkey_king_bar", "Monkey King Bar"],
|
139
|
-
136 => ["recipe_radiance", "Recipe: Radiance"],
|
140
|
-
137 => ["radiance", "Radiance"],
|
141
|
-
138 => ["recipe_butterfly", "Recipe: Butterfly"],
|
142
|
-
139 => ["butterfly", "Butterfly"],
|
143
|
-
140 => ["recipe_greater_crit", "Recipe: Daedalus"],
|
144
|
-
141 => ["greater_crit", "Daedalus"],
|
145
|
-
142 => ["recipe_basher", "Recipe: Skull Basher"],
|
146
|
-
143 => ["basher", "Skull Basher"],
|
147
|
-
144 => ["recipe_bfury", "Recipe: Battle Fury"],
|
148
|
-
145 => ["bfury", "Battle Fury"],
|
149
|
-
146 => ["recipe_manta", "Recipe: Manta Style"],
|
150
|
-
147 => ["manta", "Manta Style"],
|
151
|
-
148 => ["recipe_lesser_crit", "Recipe: Crystalys"],
|
152
|
-
149 => ["lesser_crit", "Crystalys"],
|
153
|
-
150 => ["recipe_armlet", "Recipe: Armlet of Mordiggian"],
|
154
|
-
151 => ["armlet", "Armlet of Mordiggian"],
|
155
|
-
152 => ["invis_sword", "Shadow Blade"],
|
156
|
-
153 => ["recipe_sange_and_yasha", "Recipe: Sange and Yasha"],
|
157
|
-
154 => ["sange_and_yasha", "Sange and Yasha"],
|
158
|
-
155 => ["recipe_satanic", "Recipe: Satanic"],
|
159
|
-
156 => ["satanic", "Satanic"],
|
160
|
-
157 => ["recipe_mjollnir", "Recipe: Mjollnir"],
|
161
|
-
158 => ["mjollnir", "Mjollnir"],
|
162
|
-
159 => ["recipe_skadi", "Recipe: Eye of Skadi"],
|
163
|
-
160 => ["skadi", "Eye of Skadi"],
|
164
|
-
161 => ["recipe_sange", "Recipe: Sange"],
|
165
|
-
162 => ["sange", "Sange"],
|
166
|
-
163 => ["recipe_helm_of_the_dominator", "Recipe: Helm of the Dominator"],
|
167
|
-
164 => ["helm_of_the_dominator", "Helm of the Dominator"],
|
168
|
-
165 => ["recipe_maelstrom", "Recipe: Maelstrom"],
|
169
|
-
166 => ["maelstrom", "Maelstrom"],
|
170
|
-
167 => ["recipe_desolator", "Recipe: Desolator"],
|
171
|
-
168 => ["desolator", "Desolator"],
|
172
|
-
169 => ["recipe_yasha", "Recipe: Yasha"],
|
173
|
-
170 => ["yasha", "Yasha"],
|
174
|
-
171 => ["recipe_mask_of_madness", "Recipe: Mask of Madness"],
|
175
|
-
172 => ["mask_of_madness", "Mask of Madness"],
|
176
|
-
173 => ["recipe_diffusal_blade", "Recipe: Diffusal Blade"],
|
177
|
-
174 => ["diffusal_blade", "Diffusal Blade"],
|
178
|
-
175 => ["recipe_ethereal_blade", "Recipe: Ethereal Blade"],
|
179
|
-
176 => ["ethereal_blade", "Ethereal Blade"],
|
180
|
-
177 => ["recipe_soul_ring", "Recipe: Soul Ring"],
|
181
|
-
178 => ["soul_ring", "Soul Ring"],
|
182
|
-
179 => ["recipe_arcane_boots", "Recipe: Arcane Boots"],
|
183
|
-
180 => ["arcane_boots", "Arcane Boots"],
|
184
|
-
181 => ["orb_of_venom", "Orb of Venom"],
|
185
|
-
182 => ["stout_shield", "Stout Shield"],
|
186
|
-
183 => ["recipe_invis_sword", "Recipe: Shadow Blade"],
|
187
|
-
184 => ["recipe_ancient_janggo", "Recipe: Drum of Endurance"],
|
188
|
-
185 => ["ancient_janggo", "Drum of Endurance"],
|
189
|
-
186 => ["recipe_medallion_of_courage", "Recipe: Medallion of Courage"],
|
190
|
-
187 => ["medallion_of_courage", "Medallion of Courage"],
|
191
|
-
188 => ["smoke_of_deceit", "Smoke of Deceit"],
|
192
|
-
189 => ["recipe_veil_of_discord", "Recipe: Veil of Discord"],
|
193
|
-
190 => ["veil_of_discord", "Veil of Discord"],
|
194
|
-
191 => ["recipe_necronomicon_2", "Recipe: Necronomicon"],
|
195
|
-
192 => ["recipe_necronomicon_3", "Recipe: Necronomicon"],
|
196
|
-
193 => ["necronomicon_2", "Necronomicon"],
|
197
|
-
194 => ["necronomicon_3", "Necronomicon"],
|
198
|
-
195 => ["recipe_diffusal_blade_2", "Recipe: Diffusal Blade"],
|
199
|
-
196 => ["diffusal_blade_2", "Diffusal Blade"],
|
200
|
-
197 => ["recipe_dagon_2", "Recipe: Dagon"],
|
201
|
-
198 => ["recipe_dagon_3", "Recipe: Dagon"],
|
202
|
-
199 => ["recipe_dagon_4", "Recipe: Dagon"],
|
203
|
-
200 => ["recipe_dagon_5", "Recipe: Dagon"],
|
204
|
-
201 => ["dagon_2", "Dagon"],
|
205
|
-
202 => ["dagon_3", "Dagon"],
|
206
|
-
203 => ["dagon_4", "Dagon"],
|
207
|
-
204 => ["dagon_5", "Dagon"],
|
208
|
-
205 => ["recipe_rod_of_atos", "Recipe: Rod of Atos"],
|
209
|
-
206 => ["rod_of_atos", "Rod of Atos"],
|
210
|
-
207 => ["recipe_abyssal_blade", "Recipe: Abyssal Blade"],
|
211
|
-
208 => ["abyssal_blade", "Abyssal Blade"],
|
212
|
-
209 => ["recipe_heavens_halberd", "Recipe: Heaven's Halberd"],
|
213
|
-
210 => ["heavens_halberd", "Heaven's Halberd"],
|
214
|
-
211 => ["recipe_ring_of_aquila", "Recipe: Ring of Aquila"],
|
215
|
-
212 => ["ring_of_aquila", "Ring of Aquila"],
|
216
|
-
213 => ["recipe_tranquil_boots", "Recipe: Tranquil Boots"],
|
217
|
-
214 => ["tranquil_boots", "Tranquil Boots"],
|
218
|
-
215 => ["shadow_amulet", "Shadow Amulet"],
|
219
|
-
216 => ["halloween_candy_corn", "Greevil Taffy"],
|
220
|
-
217 => ["mystery_hook", "DOTA_Tooltip_Ability_item_mystery_hook"],
|
221
|
-
218 => ["mystery_arrow", "DOTA_Tooltip_Ability_item_mystery_arrow"],
|
222
|
-
219 => ["mystery_missile", "DOTA_Tooltip_Ability_item_mystery_missile"],
|
223
|
-
220 => ["mystery_toss", "DOTA_Tooltip_Ability_item_mystery_toss"],
|
224
|
-
221 => ["mystery_vacuum", "DOTA_Tooltip_Ability_item_mystery_vacuum"],
|
225
|
-
226 => ["halloween_rapier", "DOTA_Tooltip_Ability_item_halloween_rapier"],
|
226
|
-
227 => ["present", "A Gift!"],
|
227
|
-
228 => ["greevil_whistle", "Greevil Whistle"],
|
228
|
-
229 => ["winter_stocking", "Xmas Stocking"],
|
229
|
-
230 => ["winter_skates", "Speed Skates"],
|
230
|
-
231 => ["winter_cake", "Fruit-bit Cake"],
|
231
|
-
232 => ["winter_cookie", "Wizard Cookie"],
|
232
|
-
233 => ["winter_coco", "Cocoa with Marshmallows"],
|
233
|
-
234 => ["winter_ham", "Clove Studded Ham"],
|
234
|
-
235 => ["greevil_whistle_toggle", "Greevil Whistle"],
|
235
|
-
236 => ["winter_kringle", "Kringle"],
|
236
|
-
237 => ["winter_mushroom", "Snow Mushroom"],
|
237
|
-
238 => ["winter_greevil_treat", "Greevil Treat"],
|
238
|
-
239 => ["winter_greevil_garbage", "Greevil Chow"],
|
239
|
-
240 => ["winter_greevil_chewy", "Greevil Blink Bone"],
|
240
|
-
241 => ["tango_single", "Tango (Shared)"],
|
241
|
-
242 => ["crimson_guard", "Crimson Guard"],
|
242
|
-
243 => ["recipe_crimson_guard", "Recipe: Crimson Guard"],
|
243
|
-
}.freeze
|
4
|
+
MAPPING = YAML.load_file("data/items.yml").freeze
|
244
5
|
|
245
6
|
attr_reader :id, :name
|
246
7
|
|