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 +4 -4
- data/bin/gemwarrior +0 -0
- data/lib/gemwarrior/evaluator.rb +8 -0
- data/lib/gemwarrior/inventory.rb +1 -1
- data/lib/gemwarrior/repl.rb +8 -5
- data/lib/gemwarrior/version.rb +1 -1
- metadata +2 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f15ef7178e1ba920af4c6a4b55e3bfd4ec456a1
|
4
|
+
data.tar.gz: 5e533c6e248818015471b9d26f559eeb35b9d83a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5e88f32f6af852e0a2dd514d333d0adede046d26861073bc00de99b1bab73db4a3e1f6dc9034b137092479cb603ff3486a61e6564f287d4462311343160129e
|
7
|
+
data.tar.gz: 34b1ed6da0c662c20df89666cc97f7eef156e727659df86c5ddd8bc0b800bc6d7d1b0e6028043bdb2f31a508733d3547035711773d31c9ba595c37bc0ab888b1
|
data/bin/gemwarrior
CHANGED
File without changes
|
data/lib/gemwarrior/evaluator.rb
CHANGED
@@ -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))
|
data/lib/gemwarrior/inventory.rb
CHANGED
data/lib/gemwarrior/repl.rb
CHANGED
@@ -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.
|
168
|
-
|
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)
|
data/lib/gemwarrior/version.rb
CHANGED
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.
|
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: []
|