zombie_battleground-api 0.6.0 → 0.6.1
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61fa4788a9a18c5b357099bffb1adebb95d9b9369592496f029117bbb29b9eb9
|
4
|
+
data.tar.gz: 679e14c63f4b1f59bc0cf9c21bbe7dae3248a090b4bd914e5f6db760c817e166
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 439b92ff692eaaec9f3d1cd89f96788942ef87af81a443565e7f3419a150a42ae866c316a1b2dddf82d6b82410409ba48ebd6094d24c6d93836ef667d6dbf5cd
|
7
|
+
data.tar.gz: 47a991a46b7cfdcccfd0b55d1d0cf3413cd85a4ce186ac1e7710d7f488243725c33ab8989a356ae46c3fed1486a9093faa5e73ae7df80ab1a52e7ae2ea7a9185
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -26,7 +26,7 @@ Or install it yourself as:
|
|
26
26
|
|
27
27
|
## Usage
|
28
28
|
|
29
|
-
See the [API documentation](https://www.rubydoc.info/gems/zombie_battleground-api/0.6.
|
29
|
+
See the [API documentation](https://www.rubydoc.info/gems/zombie_battleground-api/0.6.1).
|
30
30
|
Every API call returns a response object that contains a complete modeled Ruby object of the response.
|
31
31
|
|
32
32
|
Use the singleton class `ZombieBattleground::Api`. The singleton has additional extentions, the client implements the public API as is.
|
@@ -66,6 +66,36 @@ module ZombieBattleground
|
|
66
66
|
load_decks_data['overlord_types'][type]
|
67
67
|
end
|
68
68
|
|
69
|
+
##
|
70
|
+
# Return's the deck overlord (hero) faction weakness
|
71
|
+
#
|
72
|
+
# @param type [Integer]
|
73
|
+
#
|
74
|
+
# @return [String}
|
75
|
+
#
|
76
|
+
# @example
|
77
|
+
# deck_weak_against(0) # => "FIRE"
|
78
|
+
#
|
79
|
+
# @api public
|
80
|
+
def deck_weak_against(type)
|
81
|
+
load_decks_data['weak_against'][load_decks_data['overlord_types'][type]]
|
82
|
+
end
|
83
|
+
|
84
|
+
##
|
85
|
+
# Return's the deck overlord (hero) faction weakness
|
86
|
+
#
|
87
|
+
# @param type [Integer]
|
88
|
+
#
|
89
|
+
# @return [String}
|
90
|
+
#
|
91
|
+
# @example
|
92
|
+
# deck_strong_against(0) # => "AIR"
|
93
|
+
#
|
94
|
+
# @api public
|
95
|
+
def deck_strong_against(type)
|
96
|
+
load_decks_data['strong_against'][load_decks_data['overlord_types'][type]]
|
97
|
+
end
|
98
|
+
|
69
99
|
private
|
70
100
|
|
71
101
|
##
|
@@ -25,3 +25,19 @@ overlord_types:
|
|
25
25
|
- 'AIR' # 3
|
26
26
|
- 'TOXIC' # 4
|
27
27
|
- 'LIFE' # 5
|
28
|
+
|
29
|
+
weak_against:
|
30
|
+
'FIRE': 'WATER'
|
31
|
+
'TOXIC': 'FIRE'
|
32
|
+
'LIFE': 'TOXIC'
|
33
|
+
'EARTH': 'LIFE'
|
34
|
+
'AIR': 'EARTH'
|
35
|
+
'WATER': 'AIR'
|
36
|
+
|
37
|
+
strong_against:
|
38
|
+
'FIRE': 'TOXIC'
|
39
|
+
'TOXIC': 'LIFE'
|
40
|
+
'LIFE': 'EARTH'
|
41
|
+
'EARTH': 'AIR'
|
42
|
+
'AIR': 'WATER'
|
43
|
+
'WATER': 'FIRE'
|