rumble_tools 0.2.0
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 +7 -0
- data/LICENSE +21 -0
- data/README.md +118 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/rumble_tools/leader.rb +9 -0
- data/lib/rumble_tools/loadout.proto +13 -0
- data/lib/rumble_tools/loadout.rb +69 -0
- data/lib/rumble_tools/loadout_pb.rb +20 -0
- data/lib/rumble_tools/mini.rb +107 -0
- data/lib/rumble_tools/mini_base.rb +51 -0
- data/lib/rumble_tools/mini_talent.rb +88 -0
- data/lib/rumble_tools/troop.rb +9 -0
- data/lib/rumble_tools/version.rb +3 -0
- data/lib/rumble_tools.rb +13 -0
- metadata +120 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a3057da0b59b1b0b65d3d49ef6c8de52a912c442a4ae84f7297a881904b9add6
|
4
|
+
data.tar.gz: cc3b5422d088758b3dca1cd99b5afc570af6d58822db8eef39378938125d8b00
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 0ad4ed00ca823f8ed361dee39b92f3639ff668f720a4db821761cdf39ad683d45a73c565d15b7cac86f5e0e4b4875d628a8a9b9fbbca4ac67b0115331f87cc9f
|
7
|
+
data.tar.gz: 24be930542e13a0048379ced89ad41a7dc18701628db80bbe1308fe9e9ac93b0e643edf4fa9cec3a76651b7615594b7e2ebd00fab6b993ebaca012830c8cf21b
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2025 Derek Neighbors
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,118 @@
|
|
1
|
+
# RumbleTools
|
2
|
+
|
3
|
+
A lightweight Ruby toolkit for parsing and managing Warcraft Rumble loadouts.
|
4
|
+
|
5
|
+
This gem is a Ruby port of [WarcraftRumbleLoadoutTools](https://github.com/Joobalee/WarcraftRumbleLoadoutTools), a C# library for decoding and encoding Warcraft Rumble deck strings.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'rumble_tools'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
```bash
|
18
|
+
$ bundle install
|
19
|
+
```
|
20
|
+
|
21
|
+
Or install it yourself as:
|
22
|
+
|
23
|
+
```bash
|
24
|
+
$ gem install rumble_tools
|
25
|
+
```
|
26
|
+
|
27
|
+
## Usage
|
28
|
+
|
29
|
+
### Importing a loadout from a code
|
30
|
+
|
31
|
+
```ruby
|
32
|
+
require 'rumble_tools'
|
33
|
+
|
34
|
+
# Parse a loadout code
|
35
|
+
loadout = RumbleTools::Loadout.from_code("rumblo:CEMQABoECCYQAhoECBUQABoECF0QARoECAkQABoECB4QABoECFYQAQ==")
|
36
|
+
|
37
|
+
# Access leader information
|
38
|
+
puts "Leader: #{loadout.leader.mini_name}"
|
39
|
+
puts "Leader talent: #{loadout.leader.talent_name}"
|
40
|
+
|
41
|
+
# List troops
|
42
|
+
puts "Troops:"
|
43
|
+
loadout.troops.each do |troop|
|
44
|
+
puts "- #{troop.mini_name} with talent #{troop.talent_name}"
|
45
|
+
end
|
46
|
+
|
47
|
+
# Convert to JSON
|
48
|
+
require 'json'
|
49
|
+
puts JSON.pretty_generate(loadout.to_h)
|
50
|
+
```
|
51
|
+
|
52
|
+
### Creating a loadout from scratch
|
53
|
+
|
54
|
+
```ruby
|
55
|
+
require 'rumble_tools'
|
56
|
+
include RumbleTools
|
57
|
+
|
58
|
+
# Create a loadout with Sylvanas as leader and the "WAIL_OF_THE_BANSHEE" talent
|
59
|
+
leader = Leader.new(Mini::SYLVANAS, 2)
|
60
|
+
loadout = Loadout.new(leader)
|
61
|
+
|
62
|
+
# Add troops to the loadout
|
63
|
+
loadout.troops = [
|
64
|
+
Troop.new(Mini::DIRE_BATLINGS, 0), # Using talent index 0
|
65
|
+
Troop.new(Mini::ANGRY_CHICKENS, 1), # Using talent index 1
|
66
|
+
Troop.new(Mini::GHOUL, 0), # Using talent index 0
|
67
|
+
Troop.new(Mini::DEEP_BREATH, 1), # Using talent index 1
|
68
|
+
Troop.new(Mini::CHAIN_LIGHTNING, 2), # Using talent index 2
|
69
|
+
Troop.new(Mini::NECROMANCER, 0) # Using talent index 0
|
70
|
+
]
|
71
|
+
|
72
|
+
# Generate a loadout code
|
73
|
+
loadout_code = loadout.to_code
|
74
|
+
puts "Loadout code: #{loadout_code}"
|
75
|
+
```
|
76
|
+
|
77
|
+
## Available Minis and Talents
|
78
|
+
|
79
|
+
The gem includes constants for all minis and talents available in Warcraft Rumble. You can access them through the `Mini` and `MiniTalent` modules.
|
80
|
+
|
81
|
+
Examples:
|
82
|
+
```ruby
|
83
|
+
RumbleTools::Mini::SYLVANAS # => 0x52
|
84
|
+
RumbleTools::Mini::DIRE_BATLINGS # => 0x1E
|
85
|
+
RumbleTools::Mini::ANGRY_CHICKENS # => 0x01
|
86
|
+
```
|
87
|
+
|
88
|
+
Talents can be referenced by their index (0, 1, or 2) or by their full talent ID:
|
89
|
+
```ruby
|
90
|
+
# Get talent ID for Dire Batlings' first talent (GUANO_HAPPENS)
|
91
|
+
talent_id = RumbleTools::MiniTalent.talent_id_for(RumbleTools::Mini::DIRE_BATLINGS, 0)
|
92
|
+
```
|
93
|
+
|
94
|
+
## Implementation Details
|
95
|
+
|
96
|
+
The loadout codes in Warcraft Rumble are Protocol Buffer messages encoded in Base64. This gem uses the `google-protobuf` library to handle the encoding and decoding of these messages, ensuring compatibility with the game's format.
|
97
|
+
|
98
|
+
## Examples
|
99
|
+
|
100
|
+
Check the examples directory for more usage patterns:
|
101
|
+
|
102
|
+
```bash
|
103
|
+
ruby -I lib examples/basic_usage.rb
|
104
|
+
```
|
105
|
+
|
106
|
+
## Development
|
107
|
+
|
108
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
109
|
+
|
110
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
111
|
+
|
112
|
+
## Contributing
|
113
|
+
|
114
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/dneighbors/rumble_tools.
|
115
|
+
|
116
|
+
## License
|
117
|
+
|
118
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "rumble_tools"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
require 'base64'
|
2
|
+
require 'json'
|
3
|
+
require 'stringio'
|
4
|
+
require_relative 'loadout_pb'
|
5
|
+
|
6
|
+
module RumbleTools
|
7
|
+
class Loadout
|
8
|
+
attr_accessor :leader, :troops
|
9
|
+
|
10
|
+
def initialize(leader = nil, troops = [])
|
11
|
+
@leader = leader || Leader.new
|
12
|
+
@troops = troops || []
|
13
|
+
end
|
14
|
+
|
15
|
+
# Parse a loadout code and return a loadout object
|
16
|
+
def self.from_code(code)
|
17
|
+
# Remove rumblo: prefix if present
|
18
|
+
code = code.sub(/^rumblo:/, '')
|
19
|
+
|
20
|
+
# Decode the base64 string
|
21
|
+
bytes = Base64.strict_decode64(code)
|
22
|
+
|
23
|
+
# Parse the protocol buffer message
|
24
|
+
proto = LoadoutProto.decode(bytes)
|
25
|
+
|
26
|
+
# Create a new loadout
|
27
|
+
loadout = Loadout.new
|
28
|
+
|
29
|
+
# Create the leader
|
30
|
+
loadout.leader = Leader.new(proto.leader_id, proto.leader_talent_id)
|
31
|
+
|
32
|
+
# Create the troops
|
33
|
+
proto.troops.each do |troop_proto|
|
34
|
+
loadout.troops << Troop.new(troop_proto.mini_id, troop_proto.talent_id)
|
35
|
+
end
|
36
|
+
|
37
|
+
loadout
|
38
|
+
end
|
39
|
+
|
40
|
+
# Generate a loadout code
|
41
|
+
def to_code
|
42
|
+
# Create a protocol buffer message
|
43
|
+
proto = LoadoutProto.new(
|
44
|
+
leader_id: @leader.mini,
|
45
|
+
leader_talent_id: @leader.talent_id,
|
46
|
+
troops: @troops.map { |troop| TroopProto.new(mini_id: troop.mini, talent_id: troop.talent_id) }
|
47
|
+
)
|
48
|
+
|
49
|
+
# Encode the message to binary
|
50
|
+
bytes = LoadoutProto.encode(proto)
|
51
|
+
|
52
|
+
# Return the base64 encoded string with rumblo: prefix
|
53
|
+
"rumblo:" + Base64.strict_encode64(bytes)
|
54
|
+
end
|
55
|
+
|
56
|
+
# Convert to hash for serialization
|
57
|
+
def to_h
|
58
|
+
{
|
59
|
+
leader: @leader.to_h,
|
60
|
+
troops: @troops.map(&:to_h)
|
61
|
+
}
|
62
|
+
end
|
63
|
+
|
64
|
+
# Convert to JSON
|
65
|
+
def to_json(*args)
|
66
|
+
to_h.to_json(*args)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'google/protobuf'
|
2
|
+
|
3
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
4
|
+
add_file("lib/rumble_tools/loadout.proto", :syntax => :proto3) do
|
5
|
+
add_message "rumble_tools.LoadoutProto" do
|
6
|
+
optional :leader_id, :int32, 1
|
7
|
+
optional :leader_talent_id, :int32, 2
|
8
|
+
repeated :troops, :message, 3, "rumble_tools.TroopProto"
|
9
|
+
end
|
10
|
+
add_message "rumble_tools.TroopProto" do
|
11
|
+
optional :mini_id, :int32, 1
|
12
|
+
optional :talent_id, :int32, 2
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
module RumbleTools
|
18
|
+
LoadoutProto = Google::Protobuf::DescriptorPool.generated_pool.lookup("rumble_tools.LoadoutProto").msgclass
|
19
|
+
TroopProto = Google::Protobuf::DescriptorPool.generated_pool.lookup("rumble_tools.TroopProto").msgclass
|
20
|
+
end
|
@@ -0,0 +1,107 @@
|
|
1
|
+
module RumbleTools
|
2
|
+
module Mini
|
3
|
+
# All mini deck code values in hex
|
4
|
+
ANGRY_CHICKENS = 0x01
|
5
|
+
ARCANE_BLAST = 0x02
|
6
|
+
BLIZZARD = 0x03
|
7
|
+
CHAIN_LIGHTNING = 0x04
|
8
|
+
CHEAT_DEATH = 0x05
|
9
|
+
DEEP_BREATH = 0x06
|
10
|
+
EARTH_AND_MOON = 0x07
|
11
|
+
ECLIPSE = 0x08
|
12
|
+
EXECUTE = 0x09
|
13
|
+
HOLY_NOVA = 0x0a
|
14
|
+
LIVING_BOMB = 0x0b
|
15
|
+
POLYMORPH = 0x0c
|
16
|
+
SMOKE_BOMB = 0x0d
|
17
|
+
ABOMINATION = 0x0e
|
18
|
+
ANCIENT_OF_WAR = 0x0f
|
19
|
+
ANUB_ARAK = 0x10
|
20
|
+
BANSHEE = 0x11
|
21
|
+
BARON_RIVENDARE = 0x12
|
22
|
+
BAT_RIDER = 0x13
|
23
|
+
BLOODMAGE_THALNOS = 0x14
|
24
|
+
BOG_BEAST = 0x15
|
25
|
+
CAIRNE_BLOODHOOF = 0x16
|
26
|
+
CENARIUS = 0x17
|
27
|
+
CHARLGA = 0x18
|
28
|
+
CHIMAERA = 0x19
|
29
|
+
CORE_HOUNDS = 0x1a
|
30
|
+
DARK_IRON_MINER = 0x1b
|
31
|
+
DARKSPEAR_TROLL = 0x1c
|
32
|
+
DEFIAS_BANDITS = 0x1d
|
33
|
+
DIRE_BATLINGS = 0x1e
|
34
|
+
ORGRIM_DOOMHAMMER = 0x1f
|
35
|
+
DRAKE = 0x20
|
36
|
+
GENERAL_DRAKKISATH = 0x21
|
37
|
+
DRUID_OF_THE_CLAW = 0x22
|
38
|
+
DRYAD = 0x23
|
39
|
+
EARTH_ELEMENTAL = 0x24
|
40
|
+
EMPEROR_THAURISSAN = 0x25
|
41
|
+
FAERIE_DRAGON = 0x26
|
42
|
+
FIRE_ELEMENTAL = 0x27
|
43
|
+
FIREHAMMER = 0x28
|
44
|
+
FLAMEWAKER = 0x29
|
45
|
+
GNOLL_BRUTE = 0x2d
|
46
|
+
GROMMASH = 0x30
|
47
|
+
HARPIES = 0x32
|
48
|
+
FOOTMEN = 0x2a
|
49
|
+
GARGOYLE = 0x2b
|
50
|
+
GHOUL = 0x2c
|
51
|
+
SAFE_PILOT = 0x2e
|
52
|
+
GOBLIN_SAPPERS = 0x2f
|
53
|
+
GRYPHON_RIDER = 0x31
|
54
|
+
HARVEST_GOLEM = 0x33
|
55
|
+
HEADLESS_HORSEMAN = 0x34
|
56
|
+
HOGGER = 0x35
|
57
|
+
HUNTRESS = 0x36
|
58
|
+
JAINA = 0x37
|
59
|
+
MAIEV = 0x38
|
60
|
+
MALFURION = 0x39
|
61
|
+
MEATWAGON = 0x3a
|
62
|
+
MOLTEN_GIANT = 0x3b
|
63
|
+
MOONKIN = 0x3c
|
64
|
+
MOUNTAINEER = 0x3d
|
65
|
+
MURLOC_TIDEHUNTERS = 0x3f
|
66
|
+
NECROMANCER = 0x40
|
67
|
+
OGRE_MAGE = 0x41
|
68
|
+
OLD_MURKEYE = 0x42
|
69
|
+
ONU = 0x43
|
70
|
+
PLAGUE_FARMER = 0x44
|
71
|
+
PROWLER = 0x45
|
72
|
+
PYROMANCER = 0x46
|
73
|
+
QUILLBOAR = 0x47
|
74
|
+
RAGNAROS = 0x48
|
75
|
+
RAPTORS = 0x49
|
76
|
+
REND_BLACKHAND = 0x4a
|
77
|
+
SHAMAN = 0x4b
|
78
|
+
SKELETON_PARTY = 0x4c
|
79
|
+
SKELETONS = 0x4d
|
80
|
+
SNEED = 0x4e
|
81
|
+
SPIDERLINGS = 0x4f
|
82
|
+
STONEHOOF_TAUREN = 0x50
|
83
|
+
SWOLE_TROLL = 0x51
|
84
|
+
SYLVANAS = 0x52
|
85
|
+
TIRION = 0x53
|
86
|
+
TREANTS = 0x54
|
87
|
+
VULTURES = 0x55
|
88
|
+
WARSONG_GRUNTS = 0x56
|
89
|
+
WARSONG_RAIDER = 0x57
|
90
|
+
WHELPS = 0x58
|
91
|
+
WITCH_DOCTOR = 0x59
|
92
|
+
WORGEN = 0x5a
|
93
|
+
YSERA = 0x5b
|
94
|
+
PRIESTESS = 0x5d
|
95
|
+
|
96
|
+
# Helper methods
|
97
|
+
def self.name_for(id)
|
98
|
+
constants.find { |const| const_get(const) == id }
|
99
|
+
end
|
100
|
+
|
101
|
+
def self.id_for(name)
|
102
|
+
const_get(name.to_s.upcase)
|
103
|
+
rescue NameError
|
104
|
+
nil
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
module RumbleTools
|
2
|
+
class MiniBase
|
3
|
+
attr_accessor :mini, :talent_id
|
4
|
+
|
5
|
+
def initialize(mini = nil, talent = nil)
|
6
|
+
@mini = mini
|
7
|
+
|
8
|
+
if talent.is_a?(Integer) && talent <= 2
|
9
|
+
@talent_id = MiniTalent.talent_id_for(mini, talent)
|
10
|
+
else
|
11
|
+
@talent_id = talent
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def mini_name
|
16
|
+
Mini.name_for(@mini)
|
17
|
+
end
|
18
|
+
|
19
|
+
def talent_name
|
20
|
+
MiniTalent.name_for(@talent_id) if @talent_id
|
21
|
+
end
|
22
|
+
|
23
|
+
def talent
|
24
|
+
@talent_id ? MiniTalent.talent_index_from_talent(@talent_id) : nil
|
25
|
+
end
|
26
|
+
|
27
|
+
def talent=(value)
|
28
|
+
if value.nil?
|
29
|
+
@talent_id = nil
|
30
|
+
elsif value.is_a?(Integer) && value <= 2
|
31
|
+
@talent_id = MiniTalent.talent_id_for(@mini, value)
|
32
|
+
else
|
33
|
+
@talent_id = value
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def to_h
|
38
|
+
{
|
39
|
+
mini: @mini,
|
40
|
+
mini_name: mini_name,
|
41
|
+
talent: talent,
|
42
|
+
talent_name: talent_name,
|
43
|
+
talent_id: @talent_id
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
def to_json(*args)
|
48
|
+
to_h.to_json(*args)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,88 @@
|
|
1
|
+
module RumbleTools
|
2
|
+
module MiniTalent
|
3
|
+
# Talent calculations
|
4
|
+
def self.talent_id_for(mini_id, talent_index)
|
5
|
+
(mini_id << 2) + talent_index
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.mini_id_from_talent(talent_id)
|
9
|
+
talent_id >> 2
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.talent_index_from_talent(talent_id)
|
13
|
+
talent_id & 0x3
|
14
|
+
end
|
15
|
+
|
16
|
+
# Talent name mappings
|
17
|
+
TALENT_NAMES = {
|
18
|
+
# Angry Chickens
|
19
|
+
talent_id_for(Mini::ANGRY_CHICKENS, 0) => :SNACKRIFICE,
|
20
|
+
talent_id_for(Mini::ANGRY_CHICKENS, 1) => :WALKING_CRATE,
|
21
|
+
talent_id_for(Mini::ANGRY_CHICKENS, 2) => :FURIOUS_FOWL,
|
22
|
+
|
23
|
+
# Arcane Blast
|
24
|
+
talent_id_for(Mini::ARCANE_BLAST, 0) => :AMPLIFICATION,
|
25
|
+
talent_id_for(Mini::ARCANE_BLAST, 1) => :ARCANE_POWER,
|
26
|
+
talent_id_for(Mini::ARCANE_BLAST, 2) => :TORRENT,
|
27
|
+
|
28
|
+
# Blizzard
|
29
|
+
talent_id_for(Mini::BLIZZARD, 0) => :COLDSNAP,
|
30
|
+
talent_id_for(Mini::BLIZZARD, 1) => :ICECROWN,
|
31
|
+
talent_id_for(Mini::BLIZZARD, 2) => :BRITTLE_ICE,
|
32
|
+
|
33
|
+
# Chain Lightning
|
34
|
+
talent_id_for(Mini::CHAIN_LIGHTNING, 0) => :BRILLIANT_FLASH,
|
35
|
+
talent_id_for(Mini::CHAIN_LIGHTNING, 1) => :STORMS_REACH,
|
36
|
+
talent_id_for(Mini::CHAIN_LIGHTNING, 2) => :REVERBERATION,
|
37
|
+
|
38
|
+
# Cheat Death
|
39
|
+
talent_id_for(Mini::CHEAT_DEATH, 0) => :SEAL_FATE,
|
40
|
+
talent_id_for(Mini::CHEAT_DEATH, 1) => :VAMPIRISM,
|
41
|
+
talent_id_for(Mini::CHEAT_DEATH, 2) => :APOCALYPSE,
|
42
|
+
|
43
|
+
# Deep Breath
|
44
|
+
talent_id_for(Mini::DEEP_BREATH, 0) => :ATTUNEMENT,
|
45
|
+
talent_id_for(Mini::DEEP_BREATH, 1) => :MELTING_POINT,
|
46
|
+
talent_id_for(Mini::DEEP_BREATH, 2) => :DOUBLE_DRAGON,
|
47
|
+
|
48
|
+
# Earth And Moon
|
49
|
+
talent_id_for(Mini::EARTH_AND_MOON, 0) => :MOONFURY,
|
50
|
+
talent_id_for(Mini::EARTH_AND_MOON, 1) => :NATURES_GRACE,
|
51
|
+
talent_id_for(Mini::EARTH_AND_MOON, 2) => :BALANCE,
|
52
|
+
|
53
|
+
# Eclipse
|
54
|
+
talent_id_for(Mini::ECLIPSE, 0) => :SOLAR_FLARE,
|
55
|
+
talent_id_for(Mini::ECLIPSE, 1) => :UMBRAL_FORCE,
|
56
|
+
talent_id_for(Mini::ECLIPSE, 2) => :CELESTIAL_FOCUS,
|
57
|
+
|
58
|
+
# Dire Batlings
|
59
|
+
talent_id_for(Mini::DIRE_BATLINGS, 0) => :GUANO_HAPPENS,
|
60
|
+
talent_id_for(Mini::DIRE_BATLINGS, 1) => :SOUND_WAVE,
|
61
|
+
talent_id_for(Mini::DIRE_BATLINGS, 2) => :VAMPIRE_BATS,
|
62
|
+
|
63
|
+
# Ghoul
|
64
|
+
talent_id_for(Mini::GHOUL, 0) => :TASTE_FOR_BLOOD,
|
65
|
+
talent_id_for(Mini::GHOUL, 1) => :FEEDING_FRENZY,
|
66
|
+
talent_id_for(Mini::GHOUL, 2) => :UNHOLY_FRENZY,
|
67
|
+
|
68
|
+
# Necromancer
|
69
|
+
talent_id_for(Mini::NECROMANCER, 0) => :MASTER_OF_DEATH,
|
70
|
+
talent_id_for(Mini::NECROMANCER, 1) => :SKELETAL_SWARM,
|
71
|
+
talent_id_for(Mini::NECROMANCER, 2) => :SKELETAL_LEGION,
|
72
|
+
|
73
|
+
# Sylvanas
|
74
|
+
talent_id_for(Mini::SYLVANAS, 0) => :BLACK_ARROW,
|
75
|
+
talent_id_for(Mini::SYLVANAS, 1) => :MIND_CONTROL,
|
76
|
+
talent_id_for(Mini::SYLVANAS, 2) => :WAIL_OF_THE_BANSHEE
|
77
|
+
}
|
78
|
+
|
79
|
+
# Helper methods
|
80
|
+
def self.name_for(talent_id)
|
81
|
+
TALENT_NAMES[talent_id]
|
82
|
+
end
|
83
|
+
|
84
|
+
def self.talent_id_for_name(name)
|
85
|
+
TALENT_NAMES.key(name.to_sym)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
data/lib/rumble_tools.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
require "rumble_tools/version"
|
2
|
+
require "rumble_tools/mini"
|
3
|
+
require "rumble_tools/mini_talent"
|
4
|
+
require "rumble_tools/mini_base"
|
5
|
+
require "rumble_tools/leader"
|
6
|
+
require "rumble_tools/troop"
|
7
|
+
require "rumble_tools/loadout_pb"
|
8
|
+
require "rumble_tools/loadout"
|
9
|
+
|
10
|
+
module RumbleTools
|
11
|
+
class Error < StandardError; end
|
12
|
+
# Your code goes here...
|
13
|
+
end
|
metadata
ADDED
@@ -0,0 +1,120 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rumble_tools
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Derek Neighbors
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2025-03-23 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: base64
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.1'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.1'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: google-protobuf
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.22'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.22'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '13.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '13.0'
|
69
|
+
description: A Ruby gem for creating, parsing, and managing Warcraft Rumble loadouts
|
70
|
+
email:
|
71
|
+
- dneighbo@gmail.com
|
72
|
+
executables:
|
73
|
+
- console
|
74
|
+
- setup
|
75
|
+
extensions: []
|
76
|
+
extra_rdoc_files: []
|
77
|
+
files:
|
78
|
+
- LICENSE
|
79
|
+
- README.md
|
80
|
+
- bin/console
|
81
|
+
- bin/setup
|
82
|
+
- lib/rumble_tools.rb
|
83
|
+
- lib/rumble_tools/leader.rb
|
84
|
+
- lib/rumble_tools/loadout.proto
|
85
|
+
- lib/rumble_tools/loadout.rb
|
86
|
+
- lib/rumble_tools/loadout_pb.rb
|
87
|
+
- lib/rumble_tools/mini.rb
|
88
|
+
- lib/rumble_tools/mini_base.rb
|
89
|
+
- lib/rumble_tools/mini_talent.rb
|
90
|
+
- lib/rumble_tools/troop.rb
|
91
|
+
- lib/rumble_tools/version.rb
|
92
|
+
homepage: https://github.com/dneighbors/rumble_tools
|
93
|
+
licenses:
|
94
|
+
- MIT
|
95
|
+
metadata:
|
96
|
+
homepage_uri: https://github.com/dneighbors/rumble_tools
|
97
|
+
source_code_uri: https://github.com/dneighbors/rumble_tools
|
98
|
+
post_install_message:
|
99
|
+
rdoc_options: []
|
100
|
+
require_paths:
|
101
|
+
- lib
|
102
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
103
|
+
requirements:
|
104
|
+
- - ">="
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: 2.6.0
|
107
|
+
- - "<"
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '4.0'
|
110
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
111
|
+
requirements:
|
112
|
+
- - ">="
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: '0'
|
115
|
+
requirements: []
|
116
|
+
rubygems_version: 3.4.19
|
117
|
+
signing_key:
|
118
|
+
specification_version: 4
|
119
|
+
summary: A lightweight toolkit for parsing and managing Warcraft Rumble loadouts
|
120
|
+
test_files: []
|