gemwarrior 0.9.15 → 0.9.16

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
  SHA1:
3
- metadata.gz: 88c3d3747f9e71c879c9a889c2db0fb90f87993c
4
- data.tar.gz: 1199dc2eef209dfcbdebee5d62b538be222f1624
3
+ metadata.gz: 7f15ef7178e1ba920af4c6a4b55e3bfd4ec456a1
4
+ data.tar.gz: 5e533c6e248818015471b9d26f559eeb35b9d83a
5
5
  SHA512:
6
- metadata.gz: 3e90899c3aa09af280d7950d535deb1d050e9691ee5c7a885aaba685e7623e29677c0909983dcd9269ce2083fe12d1ff185bdf5a4d1b35748354945fa3f87ac3
7
- data.tar.gz: 774da2943ac2a4a788253f9eb43d6813c051590a48bbb343ae861eafd4fda7acad319a9205e1c9945ca096fe421386fcf1f264ceeef3313d9dd578b093352c32
6
+ metadata.gz: c5e88f32f6af852e0a2dd514d333d0adede046d26861073bc00de99b1bab73db4a3e1f6dc9034b137092479cb603ff3486a61e6564f287d4462311343160129e
7
+ data.tar.gz: 34b1ed6da0c662c20df89666cc97f7eef156e727659df86c5ddd8bc0b800bc6d7d1b0e6028043bdb2f31a508733d3547035711773d31c9ba595c37bc0ab888b1
data/bin/gemwarrior CHANGED
File without changes
@@ -19,6 +19,7 @@ module Gemwarrior
19
19
  ## ERRORS
20
20
  ERROR_COMMAND_INVALID = 'That is not something the game yet understands.'
21
21
 
22
+ ERROR_LOOK_AT_PARAM_MISSING = 'You cannot just "look at". You gotta choose something to look at.'
22
23
  ERROR_GO_PARAM_MISSING = 'Just wander aimlessly? A direction would be nice.'
23
24
  ERROR_GO_PARAM_INVALID = 'The place in that direction is far, far, FAR too dangerous. You should try a different way.'
24
25
  ERROR_ATTACK_PARAM_MISSING = 'You cannot just "attack". You gotta choose something to attack.'
@@ -305,6 +306,13 @@ module Gemwarrior
305
306
  end
306
307
  when 'look', 'l'
307
308
  if param1
309
+ if param1.eql?('at')
310
+ if param2
311
+ param1 = param2
312
+ else
313
+ return ERROR_LOOK_AT_PARAM_MISSING
314
+ end
315
+ end
308
316
  world.describe_entity(world.location_by_coords(world.player.cur_coords), param1)
309
317
  else
310
318
  world.describe(world.location_by_coords(world.player.cur_coords))
@@ -71,7 +71,7 @@ module Gemwarrior
71
71
  self.weapon = nil
72
72
  return "The #{i.name} has been demoted to unequipped."
73
73
  else
74
- ERROR_ITEM_UNEQUIP_NONWEAPON
74
+ return ERROR_ITEM_UNEQUIP_NONWEAPON
75
75
  end
76
76
  end
77
77
  end
@@ -158,18 +158,21 @@ module Gemwarrior
158
158
  run_main_menu(show_choices = false)
159
159
  end
160
160
  end
161
-
161
+
162
162
  def get_log_file_path
163
163
  "#{Dir.home}/.gemwarrior"
164
164
  end
165
165
 
166
166
  def display_log
167
- File.open(get_log_file_path).readlines.each do |line|
168
- puts line
167
+ if File.exists?(get_log_file_path)
168
+ File.open(get_log_file_path).readlines.each do |line|
169
+ puts line
170
+ end
171
+ else
172
+ puts 'No attempts made yet!'
169
173
  end
170
174
  end
171
-
172
-
175
+
173
176
  def log_stats(duration, pl)
174
177
  puts '######################################################################'
175
178
  print 'Gem Warrior'.colorize(:color => :white, :background => :black)
@@ -2,5 +2,5 @@
2
2
  # Version of Gem Warrior
3
3
 
4
4
  module Gemwarrior
5
- VERSION = '0.9.15'
5
+ VERSION = '0.9.16'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemwarrior
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.15
4
+ version: 0.9.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Chadwick
@@ -294,6 +294,4 @@ rubygems_version: 2.4.8
294
294
  signing_key:
295
295
  specification_version: 4
296
296
  summary: RubyGem text adventure
297
- test_files:
298
- - spec/rubywarrior_spec.rb
299
- - spec/spec_helper.rb
297
+ test_files: []