gemwarrior 0.11.4 → 0.11.5

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: c1d8b0e0468432814442734f5427456f1f1058be
4
- data.tar.gz: a6e7a346e625aa1a8f9c9b02569b6d62e7f1be47
3
+ metadata.gz: e9d23f8af0559e0e1e4e9c10e8efe4633b93a656
4
+ data.tar.gz: cf8fd7b6329334e50775ac624c876aa153497c22
5
5
  SHA512:
6
- metadata.gz: e3f32bd67c8d92de25fc511ccbed637d40e225fc479c3112074dd082bc3a293df34f3b763027d42c2d6d177800ed9a657c9521e5060ef330e2df178899510616
7
- data.tar.gz: 4c78ca59660e3decfa219a408b946026842b490dbee6cd91bc3d09cf6f1d2b83d351c2bc58f2c57a62e7a26311dcb59ba2256700fc9592bb944d99a5eb915bf9
6
+ metadata.gz: 4eff96e788a696225658496179f81ce76667283e1aa2f7acf205030dec885ebd273a0a720db045b5bb880e644316f7e8ca2e83ed8011fd4ca9645fbd7296dbe1
7
+ data.tar.gz: bc0a5e110535abded6e6336692fc015f02c303e8c99a44da63e83e34650fe8896326ccbe25057ef88eb034167d6e124024ac8a571a161d258bd8f9b49c9d68ea
data/bin/gemwarrior CHANGED
File without changes
@@ -6,7 +6,7 @@ require_relative '../items/herb'
6
6
  require_relative '../weapons/dagger'
7
7
 
8
8
  module Gemwarrior
9
- class Rockney < Item
9
+ class Rockney < Person
10
10
  # CONSTANTS
11
11
  PRICE_HERB = 10
12
12
  PRICE_DAGGER = 150
@@ -29,13 +29,13 @@ module Gemwarrior
29
29
  puts
30
30
  end
31
31
 
32
- rat_shop(player)
32
+ rat_shop(world)
33
33
  end
34
34
 
35
35
  private
36
36
 
37
- def rat_shop(player)
38
- player_rox_remaining = player.rox
37
+ def rat_shop(world)
38
+ player_rox_remaining = world.player.rox
39
39
  amount_spent = 0
40
40
  items_purchased = []
41
41
 
@@ -52,7 +52,7 @@ module Gemwarrior
52
52
  puts " #{herb.description}"
53
53
  puts "(2) #{'Dagger'.colorize(:yellow)} - #{PRICE_DAGGER} rox"
54
54
  puts " #{dagger.description}"
55
- puts " Attack: +#{dagger.atk_lo}-#{dagger.atk_hi} (current: #{player.atk_lo}-#{player.atk_hi})"
55
+ puts " Attack: +#{dagger.atk_lo}-#{dagger.atk_hi} (current: #{world.player.atk_lo}-#{world.player.atk_hi})"
56
56
  puts
57
57
  speak('What are you in need of?')
58
58
 
@@ -89,8 +89,8 @@ module Gemwarrior
89
89
  next
90
90
  end
91
91
  when '2'
92
- if player.rox >= PRICE_DAGGER
93
- player.rox -= PRICE_DAGGER
92
+ if world.player.rox >= PRICE_DAGGER
93
+ world.player.rox -= PRICE_DAGGER
94
94
  items_purchased.push(Dagger.new)
95
95
  amount_spent += PRICE_DAGGER
96
96
 
@@ -103,6 +103,7 @@ module Gemwarrior
103
103
  next
104
104
  end
105
105
  when 'x'
106
+ return_type = { type: nil, data: nil }
106
107
  if items_purchased.length > 0
107
108
  display_shopping_cart(items_purchased)
108
109
  speak('Are you certain you wish to buy these things? (y/n)')
@@ -113,7 +114,7 @@ module Gemwarrior
113
114
  return_type = nil
114
115
  case answer
115
116
  when 'y', 'yes'
116
- player.rox -= amount_spent
117
+ world.player.rox -= amount_spent
117
118
  speak('Enjoy!')
118
119
  return_type = { type: 'purchase', data: items_purchased }
119
120
  else
@@ -2,5 +2,5 @@
2
2
  # Version of Gem Warrior
3
3
 
4
4
  module Gemwarrior
5
- VERSION = '0.11.4'
5
+ VERSION = '0.11.5'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemwarrior
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.4
4
+ version: 0.11.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Chadwick
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-28 00:00:00.000000000 Z
11
+ date: 2015-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: os
@@ -386,6 +386,4 @@ rubygems_version: 2.4.8
386
386
  signing_key:
387
387
  specification_version: 4
388
388
  summary: RubyGem text adventure
389
- test_files:
390
- - spec/gemwarrior_spec.rb
391
- - spec/spec_helper.rb
389
+ test_files: []