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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 877ec35a557a565c6297fd1254125da52bd0f994
4
- data.tar.gz: 3e81dde82503f12558cab8de01604342e1794512
3
+ metadata.gz: 3fd4f2829fa36f0e9733feaeb0af9a3736b4e01c
4
+ data.tar.gz: 4fef9b71b92f45d5922a6af56cd01733221eac6c
5
5
  SHA512:
6
- metadata.gz: 57f4c3245515b5af14ab08c55247340fe6aba4c1f9ec68ba7863d4c44478c4e76f6a78c8fde8bcd31daf5b2bde0cb5f87ea208871793fd88bbe21ee3b8576463
7
- data.tar.gz: b9aaa6b225669244a13d2e9405cf1961fd868b1ad150a997c33e2c9cb35024a93d4a3836bfd2233c5ba6f3a20a66f7c9ec9c34e657c941f80d3c1e2c80404e51
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 = Inventory.new([Herb.new])
37
+ self.inventory = options.fetch(:inventory)
38
38
  self.rox = options.fetch(:rox)
39
39
 
40
40
  self.stam_cur = options.fetch(:stam_cur)
@@ -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
@@ -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 ? 300 : PLAYER_ROX_DEFAULT,
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),
@@ -2,5 +2,5 @@
2
2
  # Version of Gem Warrior
3
3
 
4
4
  module Gemwarrior
5
- VERSION = "0.9.2"
5
+ VERSION = '0.9.3'
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.2
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.8
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: []