gemwarrior 0.9.2 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/gemwarrior +0 -0
- data/lib/gemwarrior/entities/player.rb +1 -1
- data/lib/gemwarrior/evaluator.rb +1 -7
- data/lib/gemwarrior/game.rb +5 -2
- data/lib/gemwarrior/version.rb +1 -1
- metadata +3 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3fd4f2829fa36f0e9733feaeb0af9a3736b4e01c
|
4
|
+
data.tar.gz: 4fef9b71b92f45d5922a6af56cd01733221eac6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c334208a7d95f2d6ff4f838b07b46f3de2793c6f3d050c4a0923f16d84fa035564b76a969699e67b7d91b194fc6284e84a165054f84e3718d565c48878ddca9
|
7
|
+
data.tar.gz: 484df509d4ea830a7f0bd538ad98e8980b5de3bbf37dbcd623f0bf5087e2bc640b715cf0e5cbd293f9bead938c12cd1819191ea32ecf048e21123917e1095d17
|
data/bin/gemwarrior
CHANGED
File without changes
|
@@ -34,7 +34,7 @@ module Gemwarrior
|
|
34
34
|
self.defense = options.fetch(:defense)
|
35
35
|
self.dexterity = options.fetch(:dexterity)
|
36
36
|
|
37
|
-
self.inventory =
|
37
|
+
self.inventory = options.fetch(:inventory)
|
38
38
|
self.rox = options.fetch(:rox)
|
39
39
|
|
40
40
|
self.stam_cur = options.fetch(:stam_cur)
|
data/lib/gemwarrior/evaluator.rb
CHANGED
@@ -290,9 +290,6 @@ module Gemwarrior
|
|
290
290
|
result = i.use(world.player)
|
291
291
|
if i.consumable
|
292
292
|
world.player.inventory.remove_item(i.name)
|
293
|
-
return
|
294
|
-
else
|
295
|
-
return
|
296
293
|
end
|
297
294
|
else
|
298
295
|
return ERROR_USE_PARAM_UNUSEABLE
|
@@ -306,9 +303,6 @@ module Gemwarrior
|
|
306
303
|
result = i.use(world.player)
|
307
304
|
if i.consumable
|
308
305
|
world.location_by_coords(world.player.cur_coords).remove_item(i)
|
309
|
-
return
|
310
|
-
else
|
311
|
-
return
|
312
306
|
end
|
313
307
|
else
|
314
308
|
return ERROR_USE_PARAM_UNUSEABLE
|
@@ -316,7 +310,7 @@ module Gemwarrior
|
|
316
310
|
end
|
317
311
|
end
|
318
312
|
end
|
319
|
-
|
313
|
+
binding.pry
|
320
314
|
if result.nil?
|
321
315
|
ERROR_USE_PARAM_INVALID
|
322
316
|
else
|
data/lib/gemwarrior/game.rb
CHANGED
@@ -6,6 +6,7 @@ require 'matrext'
|
|
6
6
|
require 'feep'
|
7
7
|
|
8
8
|
require_relative 'entities/player'
|
9
|
+
require_relative 'entities/items/herb'
|
9
10
|
require_relative 'misc/player_levels'
|
10
11
|
require_relative 'misc/animation'
|
11
12
|
require_relative 'misc/music'
|
@@ -22,7 +23,9 @@ module Gemwarrior
|
|
22
23
|
## PLAYER DEFAULTS
|
23
24
|
PLAYER_DESC_DEFAULT = 'Picked to do battle against a wizened madman for a shiny something or other for world-saving purposes.'
|
24
25
|
PLAYER_INVENTORY_DEFAULT = Inventory.new
|
26
|
+
PLAYER_INVENTORY_DEBUG = Inventory.new([Herb.new])
|
25
27
|
PLAYER_ROX_DEFAULT = 0
|
28
|
+
PLAYER_ROX_DEBUG = 300
|
26
29
|
|
27
30
|
attr_accessor :world, :eval, :repl
|
28
31
|
|
@@ -48,8 +51,8 @@ module Gemwarrior
|
|
48
51
|
:atk_hi => start_stats[:atk_hi],
|
49
52
|
:defense => start_stats[:defense],
|
50
53
|
:dexterity => start_stats[:dexterity],
|
51
|
-
:inventory => PLAYER_INVENTORY_DEFAULT,
|
52
|
-
:rox => world.debug_mode ?
|
54
|
+
:inventory => world.debug_mode ? PLAYER_INVENTORY_DEBUG : PLAYER_INVENTORY_DEFAULT,
|
55
|
+
:rox => world.debug_mode ? PLAYER_ROX_DEBUG : PLAYER_ROX_DEFAULT,
|
53
56
|
:cur_coords => world.location_coords_by_name('Home'),
|
54
57
|
|
55
58
|
:god_mode => options.fetch(:god_mode),
|
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.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Chadwick
|
@@ -288,10 +288,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
288
288
|
version: '0'
|
289
289
|
requirements: []
|
290
290
|
rubyforge_project:
|
291
|
-
rubygems_version: 2.4.
|
291
|
+
rubygems_version: 2.4.6
|
292
292
|
signing_key:
|
293
293
|
specification_version: 4
|
294
294
|
summary: RPG as RubyGem
|
295
|
-
test_files:
|
296
|
-
- spec/rubywarrior_spec.rb
|
297
|
-
- spec/spec_helper.rb
|
295
|
+
test_files: []
|