gemwarrior 0.15.7 → 0.15.8

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
  SHA256:
3
- metadata.gz: c9cf8c36b62d8e2662f76e081ae2cc645aa216e5d11b9507dc38816cf6f9ffa3
4
- data.tar.gz: 57ab765744b3882e2e314d0e879b80e1c886541401097f690b6bb8789d28ba9b
3
+ metadata.gz: 1b28ed81896ffa1b5bbd65ea94b65896ab620d2454cfccb2b3f23b34ea722225
4
+ data.tar.gz: b11bda6cf62868a0f3ef0667f2233d4a9dd2c799aadef8891adeaf145d712618
5
5
  SHA512:
6
- metadata.gz: 870efff210d8a1a8abb9146944559df7441edb3dd7cfd655645409a4b11ec26464e2ddb59fee8c75941e769cd9f7c8a081470eaa24687d4713d4c789abc8e58b
7
- data.tar.gz: 93d8eac5c7a2861857485fc31b7264c8c0525017d8b89e363b304a9434c05a9b751ad9b52293702f1d2fb8a40f9e6ecfb10a1456030d4a8e410a77f1d8da09ed
6
+ metadata.gz: 2e87371072ecfe0505a116e7200ade73b73c9bbe45a8aa18c4b6231401940cc2bacda4422b9c9044f43746a1a68772d27108be73ec8c3d238a7070b6e169f75b
7
+ data.tar.gz: 4bee0ae7c80d7466d124d0d36761a933197ea2e18abb3b21d1e12a484a1fc58d23372dba036e4ef690a0971a41344a3be668ed1a1a36c701129df5e983a858fc
@@ -1,49 +1,49 @@
1
- # lib/gemwarrior/entities/people/arena_master.rb
2
- # Entity::Creature::Person::ArenaMaster
3
-
4
- require_relative '../person'
5
-
6
- module Gemwarrior
7
- class ArenaMaster < Person
8
- # CONSTANTS
9
- ARENA_FEE = 50
10
- ARENA_MASTER_NAME = 'Iolita'
11
-
12
- def initialize
13
- super
14
-
15
- self.name = 'arena_master'
16
- self.name_display = 'Arena Master'
17
- self.description = 'She wears simple clothing, but carries herself with an air of authority. You think she may be the person to talk with if you want to engage in battle.'
18
- end
19
-
20
- def use(world)
21
- puts "You approach #{ARENA_MASTER_NAME.colorize(color: :white, background: :black)}, the Arena Master, and ask to prove your mettle in the arena. She snickers to herself, but sees you have a good spirit about you."
22
- puts
23
-
24
- if world.player.rox >= ARENA_FEE
25
- print "She asks for the requisite payment: #{ARENA_FEE} rox. Do you pay up? (y/n) "
26
- answer = gets.chomp.downcase
27
-
28
- case answer
29
- when 'y', 'yes'
30
- world.player.rox -= ARENA_FEE
31
- puts
32
- puts 'She pockets the money and motions toward the center of the arena. She reminds you that you will be facing an ever-worsening onslaught of monsters. Each one you dispatch nets you a bonus cache of rox in addition to whatever the monster gives you. You will also become more experienced the longer you last. Finally, you can give up at any time between battles.'
33
- puts
34
- puts 'She finishes by wishing you good luck!'
35
-
36
- return { type: 'arena', data: nil }
37
- else
38
- puts
39
- puts 'She gives you a dirty look, as you have obviously wasted her time. You are told not to mess around with her anymore, and she turns away from you.'
40
- return { type: nil, data: nil }
41
- end
42
- else
43
- puts 'She can tell you seem particularly poor today and says to come back when that has changed.'
44
- puts
45
- return { type: nil, data: nil }
46
- end
47
- end
48
- end
49
- end
1
+ # lib/gemwarrior/entities/people/arena_master.rb
2
+ # Entity::Creature::Person::ArenaMaster
3
+
4
+ require_relative '../person'
5
+
6
+ module Gemwarrior
7
+ class ArenaMaster < Person
8
+ # CONSTANTS
9
+ ARENA_FEE = 50
10
+ ARENA_MASTER_NAME = 'Iolita'
11
+
12
+ def initialize
13
+ super
14
+
15
+ self.name = 'arena_master'
16
+ self.name_display = 'Arena Master'
17
+ self.description = 'She wears simple clothing, but carries herself with an air of authority. You think she may be the person to talk with if you want to engage in battle.'
18
+ end
19
+
20
+ def use(world)
21
+ puts "You approach #{ARENA_MASTER_NAME.colorize(color: :white, background: :black)}, the Arena Master, and ask to prove your mettle in the arena. She snickers to herself, but sees you have a good spirit about you."
22
+ puts
23
+
24
+ if world.player.rox >= ARENA_FEE
25
+ print "She asks for the requisite payment: #{ARENA_FEE} rox. Do you pay up? (y/n) "
26
+ answer = gets.chomp.downcase
27
+
28
+ case answer
29
+ when 'y', 'yes'
30
+ world.player.rox -= ARENA_FEE
31
+ puts
32
+ puts 'She pockets the money and motions toward the center of the arena. She reminds you that you will be facing an ever-worsening onslaught of monsters. Each one you dispatch nets you a bonus cache of rox in addition to whatever the monster gives you. You will also become more experienced the longer you last. Finally, you can give up at any time between battles.'
33
+ puts
34
+ puts 'She finishes by wishing you good luck!'
35
+
36
+ return { type: 'arena', data: nil }
37
+ else
38
+ puts
39
+ puts 'She gives you a dirty look, as you have obviously wasted her time. You are told not to mess around with her anymore, and she turns away from you.'
40
+ return { type: nil, data: nil }
41
+ end
42
+ else
43
+ puts 'She can tell you seem particularly poor today and says to come back when that has changed.'
44
+ puts
45
+ return { type: nil, data: nil }
46
+ end
47
+ end
48
+ end
49
+ end
@@ -8,8 +8,8 @@ require_relative '../weapons/dagger'
8
8
  module Gemwarrior
9
9
  class Rockney < Person
10
10
  # CONSTANTS
11
- PRICE_HERB = 10
12
- PRICE_DAGGER = 150
11
+ PRICE_HERB = 5
12
+ PRICE_DAGGER = 10
13
13
  PLAYER_ROX_INSUFFICIENT = 'Pity. You are a bit short on funds to purchase that item.'
14
14
  PLAYER_ITEMS_ADDITIONAL = 'Anything else?'
15
15
  PLAYER_COMMAND_INVALID = 'Huh?'
@@ -9,9 +9,9 @@ require_relative '../armor/iron_helmet'
9
9
  module Gemwarrior
10
10
  class WareHawker < Person
11
11
  # CONSTANTS
12
- PRICE_IRON_HELMET = 100
13
- PRICE_MACE = 200
14
- PRICE_SPEAR = 250
12
+ PRICE_IRON_HELMET = 10
13
+ PRICE_MACE = 30
14
+ PRICE_SPEAR = 40
15
15
  PLAYER_ROX_INSUFFICIENT = 'You have insufficient rox to purchase that. Quit testing me, human.'
16
16
  PLAYER_ITEMS_ADDITIONAL = 'Will there be something else?'
17
17
  PLAYER_COMMAND_INVALID = 'That means nothing to me.'
@@ -7,12 +7,13 @@ module Gemwarrior
7
7
  class Person < Creature
8
8
  def initialize
9
9
  super
10
-
10
+
11
11
  self.name = 'person.'
12
12
  self.name_display = Formatting::upstyle(name)
13
13
  self.description = 'It appears to be a person of some kind.'
14
+ self.takeable = false
14
15
  end
15
-
16
+
16
17
  def use(world)
17
18
  'That person does not seem to want to talk to you right now.'
18
19
  end
@@ -80,8 +80,8 @@ module Gemwarrior
80
80
  'Rest, but ensure battle for testing'
81
81
  ]
82
82
 
83
- self.commands = %w(character look rest take talk inventory use drop equip unequip go north east south west attack breakthru change version checkupdate help quit quit!)
84
- self.aliases = %w(c l r t tk i u d eq ue g n e s w a br ch v cu h q qq)
83
+ self.commands = %w(character look rest take talk inventory use open drop equip unequip go north east south west attack breakthru change version checkupdate help quit quit!)
84
+ self.aliases = %w(c l r t tk i u o d eq ue g n e s w a br ch v cu h q qq)
85
85
  self.extras = %w(exit exit! x xx fight f ? ?? ???)
86
86
  self.cmd_descriptions = [
87
87
  'Display character information',
@@ -91,6 +91,7 @@ module Gemwarrior
91
91
  'Talk to person',
92
92
  'Look in your inventory',
93
93
  'Use item (in inventory or environment)',
94
+ 'Open item (in inventory or environment)',
94
95
  'Drop item',
95
96
  'Equip item',
96
97
  'Unequip item',
@@ -463,7 +464,7 @@ module Gemwarrior
463
464
  end
464
465
  end
465
466
  end
466
- when 'use', 'u'
467
+ when 'use', 'u', 'open', 'o'
467
468
  if param1.nil?
468
469
  ERROR_USE_PARAM_MISSING
469
470
  else
@@ -26,6 +26,14 @@ module Gemwarrior
26
26
  self.armor = armor
27
27
  end
28
28
 
29
+ def an_words
30
+ ['herb']
31
+ end
32
+
33
+ def article_chooser(word)
34
+ (VOWELS.include?(word[0]) or an_words.include?(word)) ? 'an' : 'a'
35
+ end
36
+
29
37
  def is_empty?
30
38
  self.items.nil? || self.items.empty?
31
39
  end
@@ -89,8 +97,7 @@ module Gemwarrior
89
97
  if q > 1
90
98
  return "You have #{q} #{i.to_s.colorize(:yellow)}#{'s'.colorize(:yellow)}."
91
99
  else
92
- article = VOWELS.include?(i[0]) ? 'an' : 'a'
93
- return "You have #{article} #{i.to_s.colorize(:yellow)}."
100
+ return "You have #{self.article_chooser(i)} #{i.to_s.colorize(:yellow)}."
94
101
  end
95
102
  # multiple items? return array of strings to mush together
96
103
  else
@@ -100,8 +107,7 @@ module Gemwarrior
100
107
  if q > 1
101
108
  item_arr.push("#{q} #{i.to_s.colorize(:yellow)}#{'s'.colorize(:yellow)}")
102
109
  else
103
- article = VOWELS.include?(i[0]) ? 'an' : 'a'
104
- item_arr.push("#{article} #{i.to_s.colorize(:yellow)}")
110
+ item_arr.push("#{self.article_chooser(i)} #{i.to_s.colorize(:yellow)}")
105
111
  end
106
112
  end
107
113
 
@@ -159,7 +165,7 @@ module Gemwarrior
159
165
  return "The #{i.name.colorize(:yellow)} has taken charge, and been equipped."
160
166
  elsif i.is_armor
161
167
  self.armor = i
162
- return "The #{i.name.colorize(:yellow)} has fortified, and has been equipped."
168
+ return "The #{i.name.colorize(:yellow)} has fortified you, and been equipped."
163
169
  end
164
170
  else
165
171
  return ERROR_ITEM_EQUIP_NONARMAMENT
@@ -167,6 +167,22 @@ module Gemwarrior
167
167
  sample: 'player_travel_west.wav'
168
168
  }
169
169
 
170
+ self.add :resume_game, {
171
+ synth: [
172
+ { frequencies: 'C4', duration: 75 },
173
+ { frequencies: 'D4', duration: 75 },
174
+ { frequencies: 'E4', duration: 75 },
175
+ { frequencies: 'F#4', duration: 75 },
176
+ { frequencies: 'G#4', duration: 75 },
177
+ { frequencies: 'A#4', duration: 75 },
178
+ { frequencies: 'C5', duration: 75 },
179
+ { frequencies: 'D5', duration: 75 },
180
+ { frequencies: 'E5', duration: 75 },
181
+ { frequencies: 'F#5', duration: 75 }
182
+ ],
183
+ sample: 'test.wav'
184
+ }
185
+
170
186
  self.add :test, {
171
187
  synth: [
172
188
  { frequencies: 'F4', duration: 75 },
@@ -167,6 +167,16 @@ module Gemwarrior
167
167
  sample: 'player_travel_west.wav'
168
168
  }
169
169
 
170
+ self.add :resume_game, {
171
+ synth: [
172
+ { s1: '16:C4' },
173
+ { s1: '16:D4' },
174
+ { s1: '16:E4' },
175
+ { s1: '8:F#4' }
176
+ ],
177
+ sample: 'test.wav'
178
+ }
179
+
170
180
  self.add :test, {
171
181
  synth: [
172
182
  { s1: '4:F4' },
@@ -413,6 +413,7 @@ module Gemwarrior
413
413
  run_main_menu
414
414
  else
415
415
  print_errors
416
+ play_resume_tune
416
417
  load_saved_world(result)
417
418
  return
418
419
  end
@@ -647,6 +648,10 @@ module Gemwarrior
647
648
  Audio.play_synth(:intro)
648
649
  end
649
650
 
651
+ def play_resume_tune
652
+ Audio.play_synth(:resume_game)
653
+ end
654
+
650
655
  def play_test_tune
651
656
  Audio.play_synth(:test)
652
657
  end
@@ -2,5 +2,5 @@
2
2
  # Version of Gem Warrior
3
3
 
4
4
  module Gemwarrior
5
- VERSION = '0.15.7'
5
+ VERSION = '0.15.8'
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.15.7
4
+ version: 0.15.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Chadwick
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-18 00:00:00.000000000 Z
11
+ date: 2020-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: os