CoC-Calc 1.2.0 → 1.2.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/CoC-Calc.rb +9 -5
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c7fce4dcf11a917eeb4e9d39983d5f67648c84b6
4
- data.tar.gz: 0262ce3c1bfc6a4a138caba868f2d45c6df718ea
3
+ metadata.gz: 11d20c4f1935260f813eae6e3af6501dbecadb09
4
+ data.tar.gz: 895ff9704218e2046177f2563916cf8ccb9c96ea
5
5
  SHA512:
6
- metadata.gz: 84016e2091f95419ce27e644e4a3fe17b95ac05762322af5869cf4039f22284054b2e9a94db2539792e03a42715e9d5e4bbaad3c2f397ccedf4339eac900d059
7
- data.tar.gz: d95aedab042fca20543640f47ccf325db541a831a96ecbaae9424e9b830cc8c6b80e1a311b7221dca65a3d3b7a97401204d9ad5a9b8150307766b9bb09606d06
6
+ metadata.gz: 46061cc66436bc7eeeb4dbaafdee8dba74f7d6defc880fa8133b1ac6fedbf055abd25510b701b8a7a4c0b86292f5f07bc9e9e1d3e22603b20113c292cb6fd1e7
7
+ data.tar.gz: f8eb4223868d05f0c7b6d27a39e17564b53420806ea1160cada52578798651f6bcc3cd30faa1b5f2a79090c7185ffab6985254203eef097efccd9b7bba63fb65
@@ -217,12 +217,16 @@ def get_troop_cost
217
217
  end
218
218
 
219
219
  def set_troop_lvl
220
- if ARGV[1].downcase == 'help'
221
- puts "To save the lvl of your troop enter 'CoC-Calc set_troop_lvl [lvl of barbarians] [lvl of archers] [lvl of goblins] [lvl of giants] [lvl of wallbreakers] [lvl of ballons] [lvl of wizards] [lvl of healers] [lvl of dragons] [lvl of pekkas]'"
220
+ if ARGV[1].is_a? String
221
+ if ARGV[1].downcase == 'help'
222
+ puts "To save the lvl of your troop enter 'CoC-Calc set_troop_lvl [lvl of barbarians] [lvl of archers] [lvl of goblins] [lvl of giants] [lvl of wallbreakers] [lvl of ballons] [lvl of wizards] [lvl of healers] [lvl of dragons] [lvl of pekkas]'"
223
+ else
224
+ $lvls = [ARGV[1], ARGV[2], ARGV[3], ARGV[4], ARGV[5],ARGV[6], ARGV[7], ARGV[8], ARGV[9], ARGV[10]]
225
+ $lvlSaveFile = File.new("/CoC-Calc-Saves/lvl.txt", "w")
226
+ $lvlSaveFile.puts $lvls.join('||')
227
+ end
222
228
  else
223
- $lvls = [ARGV[1], ARGV[2], ARGV[3], ARGV[4], ARGV[5],ARGV[6], ARGV[7], ARGV[8], ARGV[9], ARGV[10]]
224
- $lvlSaveFile = File.new("/CoC-Calc-Saves/lvl.txt", "w")
225
- $lvlSaveFile.puts $lvls.join('||')
229
+ puts "Run 'CoC-Calc set_troop_lvl help' for help on this command."
226
230
  end
227
231
  end
228
232
 
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.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Bals