CoC-Calc 1.2.2 → 1.2.3

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/CoC-Calc.rb +9 -37
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4f647591736bba3fef79fc8545d494f146c847d5
4
- data.tar.gz: 62fbfe31a6623426728afd09e246a8ab17d3740a
3
+ metadata.gz: 175bc8345930b4e6a9f07f4e24f54cf6ab348df8
4
+ data.tar.gz: de6110fcccd14168d1d14678c800405c520647c6
5
5
  SHA512:
6
- metadata.gz: 8dda9d6e39a4e708fdc5273c94eb3184b2233029983a63ae478dd21f01c7b6a8edda4a82ce87007cbb1e434cdf75b90a0978e1c717a56c23e9668ed88f1ba634
7
- data.tar.gz: a81e2c9d72bd6a5db23e8696dbffb37a10b7c417e0df1f3c58f7072170442b3947fea21b33dac90d3f5c65071f4a140f2471d05da56dc5f6cf5760bad27165a0
6
+ metadata.gz: d7c9fd7eff8623a39da94316abf6bd5f6299db3ef3a2e53d24dbaf5db4a2d655a1e64ab930f8c0ae9118b032007e817d3bbd81ee2b5afb50124d4e62f0e932fa
7
+ data.tar.gz: 941ccf29afda98ea532b9ae7496281a922e31c4cd1b7532119c2790e8b4d16edc261f7662fa7cabc6b32a32097961383d930ccd92f75e980445fbcaa6a221a8f
@@ -99,18 +99,9 @@ def get_troop_cost
99
99
  end
100
100
 
101
101
  #giants
102
- if $lvls[3].to_i == 1
103
- $cost_giants = 500
104
- elsif $lvls[3].to_i == 2
105
- $cost_giants = 1000
106
- elsif $lvls[3].to_i == 3
107
- $cost_giants = 1500
108
- elsif $lvls[3].to_i == 4
109
- $cost_giants = 2000
110
- elsif $lvls[3].to_i == 5
111
- $cost_giants = 2500
112
- elsif $lvls[3].to_i == 6
113
- $cost_giants = 3000
102
+
103
+ if $lvls[3].to_i == 1 or $lvls[3].to_i == 2 or $lvls[3].to_i == 3 or $lvls[3].to_i == 4 or $lvls[3].to_i == 5 or $lvls[3].to_i == 6
104
+ $cost_wizards = $lvls[3].to_1 * 500
114
105
  else
115
106
  puts "Your giant lvl is invalid"
116
107
  $troopLvlErr = true
@@ -135,36 +126,17 @@ def get_troop_cost
135
126
  end
136
127
 
137
128
  #ballons
138
- if $lvls[5].to_i == 1
139
- $cost_ballons = 2000
140
- elsif $lvls[5].to_i == 2
141
- $cost_ballons = 2500
142
- elsif $lvls[5].to_i == 3
143
- $cost_ballons = 3000
144
- elsif $lvls[5].to_i == 4
145
- $cost_ballons = 3500
146
- elsif $lvls[5].to_i == 5
147
- $cost_ballons = 4000
148
- elsif $lvls[5].to_i == 6
149
- $cost_ballons = 4500
129
+
130
+ if $lvls[5].to_i == 1 or $lvls[5].to_i == 2 or $lvls[5].to_i == 3 or $lvls[5].to_i == 4 or $lvls[5].to_i == 5 or $lvls[5].to_i == 6
131
+ $cost_wizards = 1500 + $lvls[5].to_1 * 500
150
132
  else
151
133
  puts "Your ballon lvl is invalid"
152
134
  $troopLvlErr = true
153
135
  end
154
136
 
155
137
  #wizards
156
- if $lvls[6].to_i == 1
157
- $cost_wizards = 1500
158
- elsif $lvls[6].to_i == 2
159
- $cost_wizards = 2000
160
- elsif $lvls[6].to_i == 3
161
- $cost_wizards = 2500
162
- elsif $lvls[6].to_i == 4
163
- $cost_wizards = 3000
164
- elsif $lvls[6].to_i == 5
165
- $cost_wizards = 3500
166
- elsif $lvls[6].to_i == 6
167
- $cost_wizards = 4000
138
+ if $lvls[6].to_i == 1 or $lvls[6].to_i == 2 or $lvls[6].to_i == 3 or $lvls[6].to_i == 4 or $lvls[6].to_i == 5 or $lvls[6].to_i == 6
139
+ $cost_wizards = 1000 + $lvls[6].to_1 * 500
168
140
  else
169
141
  puts "Your wizard lvl is invalid"
170
142
  $troopLvlErr = true
@@ -285,5 +257,5 @@ elsif ARGV[0] == 'set_troop_lvl'
285
257
  elsif ARGV[0]== 'calc'
286
258
  calc
287
259
  else
288
- puts "CoC-Calc up and running, Sir! Version: 1.2.2"
260
+ puts "CoC-Calc up and running, Sir! Version: 1.2.3"
289
261
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: CoC-Calc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Bals