zombie_battleground-api 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d879da9c1d58532b447140afab76f0ec9cb942d0c37d9521ebbc2092e06549e
4
- data.tar.gz: 2d2702e9607a76814e1db007efb2f0599ca9c3f30a20c62424ab0ad71884c5ac
3
+ metadata.gz: 61fa4788a9a18c5b357099bffb1adebb95d9b9369592496f029117bbb29b9eb9
4
+ data.tar.gz: 679e14c63f4b1f59bc0cf9c21bbe7dae3248a090b4bd914e5f6db760c817e166
5
5
  SHA512:
6
- metadata.gz: 9f29636bb98ff7611d717f0408d2379961634aede5f901adef1ee446af838210c5a3d693a0e6e547dc0dee8caa35e89a9a01dae5f7516ddd0c2f6cc4b77b5e1d
7
- data.tar.gz: 41a7208818c1208ac8a22a1f5e05f588171774422368c44a64641ebba095347d7cc6a90dfac4abff28633a82f23adb8aacdf8a80418f082983d9d768c394b80c
6
+ metadata.gz: 439b92ff692eaaec9f3d1cd89f96788942ef87af81a443565e7f3419a150a42ae866c316a1b2dddf82d6b82410409ba48ebd6094d24c6d93836ef667d6dbf5cd
7
+ data.tar.gz: 47a991a46b7cfdcccfd0b55d1d0cf3413cd85a4ce186ac1e7710d7f488243725c33ab8989a356ae46c3fed1486a9093faa5e73ae7df80ab1a52e7ae2ea7a9185
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zombie_battleground-api (0.6.0)
4
+ zombie_battleground-api (0.6.1)
5
5
  activerecord
6
6
  faraday
7
7
  json
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.0).
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'
@@ -6,6 +6,6 @@ module ZombieBattleground
6
6
  class Api
7
7
  ##
8
8
  # Verion of the Gem
9
- VERSION = '0.6.0'
9
+ VERSION = '0.6.1'
10
10
  end
11
11
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zombie_battleground-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Shields