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.
- checksums.yaml +4 -4
- data/lib/CoC-Calc.rb +9 -37
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 175bc8345930b4e6a9f07f4e24f54cf6ab348df8
|
4
|
+
data.tar.gz: de6110fcccd14168d1d14678c800405c520647c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7c9fd7eff8623a39da94316abf6bd5f6299db3ef3a2e53d24dbaf5db4a2d655a1e64ab930f8c0ae9118b032007e817d3bbd81ee2b5afb50124d4e62f0e932fa
|
7
|
+
data.tar.gz: 941ccf29afda98ea532b9ae7496281a922e31c4cd1b7532119c2790e8b4d16edc261f7662fa7cabc6b32a32097961383d930ccd92f75e980445fbcaa6a221a8f
|
data/lib/CoC-Calc.rb
CHANGED
@@ -99,18 +99,9 @@ def get_troop_cost
|
|
99
99
|
end
|
100
100
|
|
101
101
|
#giants
|
102
|
-
|
103
|
-
|
104
|
-
|
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
|
-
|
139
|
-
|
140
|
-
|
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 =
|
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.
|
260
|
+
puts "CoC-Calc up and running, Sir! Version: 1.2.3"
|
289
261
|
end
|