gemwarrior 0.11.4 → 0.11.5
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/people/rockney.rb +9 -8
- 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: e9d23f8af0559e0e1e4e9c10e8efe4633b93a656
|
4
|
+
data.tar.gz: cf8fd7b6329334e50775ac624c876aa153497c22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 <
|
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(
|
32
|
+
rat_shop(world)
|
33
33
|
end
|
34
34
|
|
35
35
|
private
|
36
36
|
|
37
|
-
def rat_shop(
|
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
|
data/lib/gemwarrior/version.rb
CHANGED
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
|
+
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-
|
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: []
|