gemwarrior 0.9.30 → 0.9.31

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: c8e9cee8573acb0083872daea6e2285fa9eafa21
4
- data.tar.gz: 62ec64e460eecf46151034bbf589e5d0f9589a97
3
+ metadata.gz: d55fe04a8f5043e88e3190a89d1769ab83303ee0
4
+ data.tar.gz: 076226766021189d922d10f5775c3ddef13dd283
5
5
  SHA512:
6
- metadata.gz: 18176880eaf8310d89e910ee8e0356239815b88a7dbb7a2a5b251c0cbc03e486b1502fe202cfdc9bc6c524a0305713bbbbbba741eb2f341ebc7fc71acd7638d4
7
- data.tar.gz: d2acbc2cfd2fa3a4b55ff2735a40c2a4981a1013c2c8e1e498c1017d1b0e0bca984366ea5616ec24e1abb9936ccd5fc84910aae6cbf814a3fdbc063eec423b13
6
+ metadata.gz: 91fa430b80846bde16f61f33997cd227c80f436c4efe17ed47398477045f199c0ce47a4e9216cf02fb36fde3a74c52955790561d79a643913c1f69d13f62a4ca
7
+ data.tar.gz: 9d71ed1c86feed2ac58a35345bb0c074c19924e1bef42752e53a98b4ecf34cb73649f033990d85fa606f15cbcadbdf7c3e34c5c0312902beeb67a2d01c3fd529
data/data/locations.yml CHANGED
@@ -1073,9 +1073,9 @@
1073
1073
  y: 8
1074
1074
  z: 1
1075
1075
  locs_connected:
1076
- north: true
1076
+ north: false
1077
1077
  east: true
1078
- south: false
1078
+ south: true
1079
1079
  west: false
1080
1080
  monster_level_range:
1081
1081
  lo: 3
@@ -18,7 +18,8 @@ module Gemwarrior
18
18
 
19
19
  def use(player = nil)
20
20
  if player.at_full_hp?
21
- puts 'You come to rest on the impossibly soft surface of the furniture, but even after a few minutes of this seemingly heavenly hedonism you don\'t feel significantly better and decide to get up again.'
21
+ puts 'You "sit" on the impossibly soft surface of the furniture, but even after a few minutes of this seemingly heavenly hedonism you don\'t feel significantly better and decide to get up again.'
22
+ { type: nil, data: nil }
22
23
  else
23
24
  puts 'Your body comes to rest somewhere below the surface of the cloudy apparatus, almost as if it were floating *amongst* the couch. The feeling is heavenly, and you actually feel somewhat better after getting back up.'
24
25
  puts '>> You regain a hit point.'
@@ -6,9 +6,12 @@ require_relative 'herb'
6
6
  require_relative 'dagger'
7
7
 
8
8
  module Gemwarrior
9
- PLAYER_ROX_INSUFFICIENT = 'You do not have enough rox to purchase that item.'
10
-
11
9
  class SmallHole < Item
10
+ # CONSTANTS
11
+ PLAYER_ROX_INSUFFICIENT = '>> "Pity. You are a bit short on funds to purchase that item."'
12
+ PLAYER_ITEMS_ADDITIONAL = '>> "Anything else?"'
13
+ PLAYER_COMMAND_INVALID = '>> "Huh?"'
14
+
12
15
  def initialize
13
16
  self.name = 'small_hole'
14
17
  self.description = 'Amongst the rubble of the alcove, a small hole, barely big enough for a rodent, exists in an absently-minded way near the bottom of the wall.'
@@ -33,7 +36,7 @@ module Gemwarrior
33
36
  def rat_shop(player)
34
37
  items_purchased = []
35
38
 
36
- puts '>>"Hello, wanderer. Welcome to my establishment, as it were. Are you in need of anything?"'
39
+ puts '>> "Hello, wanderer. Welcome to my establishment, as it were. Are you in need of anything?"'
37
40
  puts
38
41
  puts 'The creature gently shoves a small slip of paper out of his hole and towards you. You take a peek and notice it has a list of things with prices on it.'
39
42
  puts
@@ -42,7 +45,7 @@ module Gemwarrior
42
45
  puts '(1) Herb - 10 rox'
43
46
  puts '(2) Dagger - 150 rox'
44
47
  puts
45
- puts '>>"What are you in need of?"'
48
+ puts '>> "What are you in need of?"'
46
49
 
47
50
  loop do
48
51
  puts ' 1 - Herb'
@@ -56,8 +59,8 @@ module Gemwarrior
56
59
  if player.rox >= 10
57
60
  player.rox -= 10
58
61
  items_purchased.push(Herb.new)
59
- puts '>>"Excellent choice."'
60
- puts '>>"Anything else?"'
62
+ puts '>> "Excellent choice."'
63
+ puts PLAYER_ITEMS_ADDITIONAL
61
64
  next
62
65
  else
63
66
  puts PLAYER_ROX_INSUFFICIENT
@@ -67,18 +70,18 @@ module Gemwarrior
67
70
  if player.rox >= 150
68
71
  player.rox -= 150
69
72
  items_purchased.push(Dagger.new)
70
- puts '>>"A fine blade, indeed."'
71
- puts '>>"Anything else?"'
73
+ puts '>> "A fine blade, indeed."'
74
+ puts PLAYER_ITEMS_ADDITIONAL
72
75
  next
73
76
  else
74
77
  puts PLAYER_ROX_INSUFFICIENT
75
78
  next
76
79
  end
77
80
  when 'x'
78
- puts '>>"If you need anything further, I\'m always in this hole..."'
81
+ puts '>> "If you need anything further, I\'m always in this hole..."'
79
82
  return { type: 'purchase', data: items_purchased }
80
83
  else
81
- puts '>>"Huh?"'
84
+ puts PLAYER_COMMAND_INVALID
82
85
  next
83
86
  end
84
87
  end
@@ -141,22 +141,29 @@ module Gemwarrior
141
141
 
142
142
  if tent_uses > 0
143
143
  if self.at_full_hp?
144
- puts 'Despite feeling just fine, health-wise, you decide to set up camp for the ni--well, actually, after a few minutes you realize you don\'t need to sleep and pack things up again, ready to go.'
144
+ return 'Despite feeling just fine, health-wise, you decide to set up camp for the ni--well, actually, after a few minutes you realize you don\'t need to sleep and pack things up again, ready to go.'
145
145
  else
146
146
  Animation::run(phrase: REST_NOT_FULL_TEXT)
147
- puts "You brandish the trusty magical canvas and, with a flick of the wrist, your home for the evening is set up. Approximately #{hours} #{hours_text}, #{minutes} #{mins_text}, and #{seconds} #{secs_text} later, you wake up, fully rested, ready for adventure."
148
147
  self.hp_cur = self.hp_max
148
+
149
+ status_text = "You brandish the trusty magical canvas and, with a flick of the wrist, your home for the evening is set up. Approximately #{hours} #{hours_text}, #{minutes} #{mins_text}, and #{seconds} #{secs_text} later, you wake up, fully rested, ready for adventure."
150
+ status_text << "\n>> You regain all of your hit points."
151
+
152
+ return status_text
149
153
  end
150
154
  else
151
155
  if self.at_full_hp?
152
156
  Animation::run(phrase: REST_FULL_TEXT)
153
- puts 'You sit down on the ground, make some notes on the back of your hand, test the air, and then return to standing, back at it all again.'
157
+ return 'You sit down on the ground, make some notes on the back of your hand, test the air, and then return to standing, back at it all again.'
154
158
  else
155
159
  Animation::run(phrase: REST_NOT_FULL_TEXT)
156
- puts "You lie down somewhere quasi-flat and after a few moments, due to extreme exhaustion, you fall into a deep, yet troubled, slumber. Approximately #{hours} #{hours_text}, #{minutes} #{mins_text}, and #{seconds} #{secs_text} later, you wake up with a start. Upon getting to your feet you look around, notice you feel somewhat better, and wonder why you dreamt about #{WordList.new(world.use_wordnik, 'noun-plural').get_random_value}."
157
-
158
160
  self.hp_cur = self.hp_cur.to_i + rand(10..15)
159
161
  self.hp_cur = self.hp_max if self.hp_cur > self.hp_max
162
+
163
+ status_text = "You lie down somewhere quasi-flat and after a few moments, due to extreme exhaustion, you fall into a deep, yet troubled, slumber. Approximately #{hours} #{hours_text}, #{minutes} #{mins_text}, and #{seconds} #{secs_text} later, you wake up with a start. Upon getting to your feet you look around, notice you feel somewhat better, and wonder why you dreamt about #{WordList.new(world.use_wordnik, 'noun-plural').get_random_value}."
164
+ status_text << "\n>> You regain a few hit points."
165
+
166
+ return status_text
160
167
  end
161
168
  end
162
169
  end
@@ -287,7 +287,7 @@ module Gemwarrior
287
287
  tent_uses = i.number_of_uses
288
288
  i.number_of_uses -= 1
289
289
 
290
- puts "The tent can be used when resting #{i.number_of_uses} more time(s)."
290
+ puts ">> tent can be used when resting #{i.number_of_uses} more time(s)."
291
291
  end
292
292
  end
293
293
  end
@@ -299,7 +299,7 @@ module Gemwarrior
299
299
  tent_uses = i.number_of_uses
300
300
  i.number_of_uses -= 1
301
301
 
302
- puts "The tent can be used when resting #{i.number_of_uses} more time(s)."
302
+ puts ">> tent can be used when resting #{i.number_of_uses} more time(s)."
303
303
  end
304
304
  end
305
305
  end
@@ -309,6 +309,8 @@ module Gemwarrior
309
309
 
310
310
  if result.eql?('death')
311
311
  player_death_resurrection
312
+ else
313
+ result
312
314
  end
313
315
  when 'look', 'l'
314
316
  if param1
@@ -347,9 +349,9 @@ module Gemwarrior
347
349
  if i.number_of_uses > 0
348
350
  result = i.use(world.player)
349
351
  i.number_of_uses -= 1
350
- puts "#{i.name} can be used #{i.number_of_uses} more time(s)."
352
+ puts ">> #{i.name} can be used #{i.number_of_uses} more time(s)."
351
353
  else
352
- return "#{i.name} cannot be used anymore."
354
+ return ">> #{i.name} cannot be used anymore."
353
355
  end
354
356
  elsif i.consumable
355
357
  result = i.use(world.player)
@@ -370,9 +372,9 @@ module Gemwarrior
370
372
  if i.number_of_uses > 0
371
373
  result = i.use(world.player)
372
374
  i.number_of_uses -= 1
373
- puts "#{i.name} can be used #{i.number_of_uses} more time(s)."
375
+ puts ">> #{i.name} can be used #{i.number_of_uses} more time(s)."
374
376
  else
375
- return "#{i.name} cannot be used anymore."
377
+ return ">> #{i.name} cannot be used anymore."
376
378
  end
377
379
  elsif i.consumable
378
380
  result = i.use(world.player)
@@ -430,6 +432,7 @@ module Gemwarrior
430
432
  result[:data].each do |i|
431
433
  world.player.inventory.items.push(i)
432
434
  end
435
+ return
433
436
  else
434
437
  return
435
438
  end
@@ -2,5 +2,5 @@
2
2
  # Version of Gem Warrior
3
3
 
4
4
  module Gemwarrior
5
- VERSION = '0.9.30'
5
+ VERSION = '0.9.31'
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.30
4
+ version: 0.9.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Chadwick