gemwarrior 0.9.19 → 0.9.20

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: 6fa970470b56b3fca1a179770c50bad1f38a1f57
4
- data.tar.gz: 96e1f509bf41a79603c9347503bf7241b32f78e0
3
+ metadata.gz: 4bbc1cea21340d6f201df93b5bedcec926abf6ba
4
+ data.tar.gz: 805f497d5ea72852d423db7ceb2d40fff0bc61f3
5
5
  SHA512:
6
- metadata.gz: 682e6ea04e48e876382c1a6c20853dbc6aa574aa8c06129b27f9fff075507f11e062e60a4cce06a0ee896cc6d0b055572d1c8842c5dcc69abc6f85acd61c3d77
7
- data.tar.gz: 6ff0815d861be3ad5fee9e1671e9906956637564ebc8ed8b7215f967ac3a68ae886e8069f4da561c87cf04920bd6729864bdf3f6f3523582241c41533a98bbb8
6
+ metadata.gz: 0bcd871ce8cbd6ecec2f4e125b7d722df99f658484d507b28f125c6b167f51abce918250abdd9ce88e70d1c585150e6e0c9bc9853eaaec2b5474d1f6559a42ef
7
+ data.tar.gz: 3fbb5bb7ce1e33788a99d7a746618f65374d05351fbaf1deea3c0fd35cfdd0d60c8009c4f04792292cbfe69688677bca85c2e421715f23ed01c8ba6916f405e6
data/README.md CHANGED
@@ -19,21 +19,19 @@ As you travel you will discover sights and sounds of the land, all of which are
19
19
 
20
20
  1. `ruby -v` should return `ruby 2.`something; else install [Ruby](https://www.ruby-lang.org)
21
21
  2. `gem -v` should return `2.`something; else install [RubyGems](https://rubygems.org)
22
- 2. `gem install gemwarrior`
22
+ 2. `(sudo) gem install gemwarrior`
23
23
  3. `gemwarrior`
24
24
 
25
25
  Run the commands above and you'll be whisked away to Jool, ready to start or continue your quest to defeat Emerald and take back the coveted Shiny Thing(tm) that you will bring back to Queen Ruby (or will you...?).
26
26
 
27
- ## In Progress, Yanno
28
-
29
- This is in super-hyper-turbo-edition pre-pre-pre-alpha right now, but a working console prompt, some commands (type `h` for a list), and a few locations exist already. Each time you start the game a new hero will be created with a randomized name, but you can change that with `> change name`.
27
+ ## Main Commands
30
28
 
31
29
  `> c` - character check for visual identity
32
30
  `> i [object]` - check your inventory (or an individual item within)
33
- `> ls [entity_type]` - list entities in the game (monsters, items, locations)
34
31
  `> r` - take a load off and replenish hp
35
32
  `> l [object]` - look at current location and its items and monsters
36
33
  `> t [object]` - take an item from a location
34
+ `> u [object]` - use an item from your inventory or current location
37
35
  `> d [object]` - drop an item from your inventory
38
36
  `> e [object]` - equip an item in your inventory as a weapon
39
37
  `> ue [object]` - unequip an item in your inventory
@@ -44,21 +42,10 @@ This is in super-hyper-turbo-edition pre-pre-pre-alpha right now, but a working
44
42
  `> q` - quit this nonsense w/ prompt
45
43
  `> qq` - quit this nonsense w/o prompt
46
44
 
47
- To come:
45
+ ## In Progress, Yanno
46
+
47
+ This is in beta testing right now, and if you wish to help out in an official way, please visit [the main Gem Warrior homepage](http://gw.codana.me).
48
+
49
+ ## Current Issues
48
50
 
49
- * ~~Ability to move between locations!~~
50
- * ~~Monsters!~~
51
- * ~~Ability to fight those monsters!~~
52
- * ~~Monsters to fight back!~~
53
- * ~~Items you can pick up!~~
54
- * ~~Main Boss and Win State!~~
55
- * Saving!
56
- * Loading of said saved state!
57
- * More locations to move between!
58
- * Randomized worlds!
59
- * Quests (maybe)!
60
- * Towns (maybe)!
61
- * Merchants (maybe)!
62
- * Sound FX!
63
- * Music!
64
- * Epic Length (whereby "Epic" I mean "maybe 30 minutes"?)!
51
+ My old list of issues/features has been moved to the [Github issues section](https://github.com/michaelchadwick/gemwarrior/issues). Feel free to add any bugs you find while playing, or any requests for new features, over there.
data/bin/gemwarrior CHANGED
@@ -9,42 +9,47 @@ GAME_NAME = 'Gem Warrior'
9
9
 
10
10
  def parse_options
11
11
  options = {
12
- :debug_mode => false,
13
- :god_mode => false,
14
- :beast_mode => false,
15
- :use_wordnik => false,
16
- :sound => false,
17
- :new_game => false
12
+ :beast_mode => false,
13
+ :debug_mode => false,
14
+ :god_mode => false,
15
+ :new_game => false,
16
+ :sound => false,
17
+ :use_wordnik => false,
18
+ :extra_command => nil
18
19
  }
19
20
 
20
21
  optparse = OptionParser.new do |opts|
21
- opts.on('-v', '--version', 'Display version number and exit') do
22
- puts "#{GAME_NAME} v#{Gemwarrior::VERSION}"
23
- exit
22
+ opts.on('-b', '--beast', 'Enable debug[beastmode]') do
23
+ options[:beast_mode] = true
24
24
  end
25
25
 
26
- opts.on('-d', '--debug', 'Turn debug on') do
26
+ opts.on('-d', '--debug', 'Enable debug commands in-game') do
27
27
  options[:debug_mode] = true
28
28
  end
29
29
 
30
- opts.on('-g', '--god', 'Set godmode to true on load') do
30
+ opts.on('-g', '--god', 'Enable debug[godmode]') do
31
31
  options[:god_mode] = true
32
32
  end
33
33
 
34
- opts.on('-b', '--beast', 'Set beastmode to true on load') do
35
- options[:beast_mode] = true
34
+ opts.on('-n', '--new', 'Immediately start a new game, skipping main menu') do
35
+ options[:new_game] = true
36
+ end
37
+
38
+ opts.on('-s', '--sound', 'Enable sound (experimental)') do
39
+ options[:sound] = true
36
40
  end
37
41
 
38
- opts.on('-w', '--wordnik', 'Use Wordnik to generate more diverse, dynamic descriptors of entities') do
39
- options[:use_wordnik] = true
42
+ opts.on('-v', '--version', 'Display version number and exit') do
43
+ puts "#{GAME_NAME} v#{Gemwarrior::VERSION}"
44
+ exit
40
45
  end
41
46
 
42
- opts.on('-s', '--sound', 'Turn sound on') do
43
- options[:sound] = true
47
+ opts.on('-w', '--wordnik', 'Enable Wordnik to generate more diverse, dynamic descriptors of entities') do
48
+ options[:use_wordnik] = true
44
49
  end
45
-
46
- opts.on('-n', '--new', 'Immediately start a new game, skipping main menu') do
47
- options[:new_game] = true
50
+
51
+ opts.on('-x', '--extra COMMAND', 'Run a command immediately upon beginning the game') do |xc|
52
+ options[:extra_command] = xc.to_s
48
53
  end
49
54
  end
50
55
 
@@ -65,7 +70,6 @@ end
65
70
 
66
71
  begin
67
72
  options = parse_options
68
-
69
73
  Gemwarrior::Game.new(options)
70
74
  rescue => error
71
75
  print_error(error)
@@ -75,9 +75,8 @@ module Gemwarrior
75
75
  else
76
76
  abilities = Formatting::upstyle(special_abilities.collect { |x| x.to_s }).join(', ')
77
77
  end
78
-
79
78
  self_text = "NAME : #{self.name}\n"
80
- self_text << "POSITION : #{self.cur_coords.values.to_a}\n"
79
+ self_text << "POSITION : #{self.cur_coords.values.to_a}\n" if debug_mode
81
80
  self_text << "WEAPON : #{weapon_slot}\n"
82
81
  self_text << "LEVEL : #{self.level}\n"
83
82
  self_text << "EXPERIENCE: #{self.xp}\n"
@@ -91,9 +90,15 @@ module Gemwarrior
91
90
  self_text << "BEAST_MODE: #{self.beast_mode}\n"
92
91
  end
93
92
 
94
- self_text << "\n#{self.description}\n\n"
93
+ self_text << "\n"
94
+
95
+ self_text << "[Your Story]\n#{self.description}"
95
96
 
96
- self_text << "Current status - breathing, wearing clothing, and with a few other specific characteristics: face is #{self.face}, hands are #{self.hands}, and general mood is #{self.mood}.\n"
97
+ self_text << "\n\n"
98
+
99
+ self_text << "[Current Status]\nBreathing, non-naked, with a #{self.face.colorize(:yellow)} face, #{self.hands.colorize(:yellow)} hands, and feeling, generally, #{self.mood.colorize(:yellow)}."
100
+
101
+ self_text << "\n"
97
102
  end
98
103
 
99
104
  def rest(world, tent_uses = nil, ensure_fight = false)
@@ -261,7 +261,8 @@ module Gemwarrior
261
261
  # normal commands
262
262
  case command
263
263
  when 'character', 'c'
264
- world.player.check_self(world.debug_mode)
264
+ # bypass puts so it prints out with newlines properly
265
+ print world.player.check_self(world.debug_mode)
265
266
  when 'inventory', 'i'
266
267
  if param1
267
268
  world.player.inventory.describe_item(param1)
@@ -39,6 +39,7 @@ module Gemwarrior
39
39
  world.use_wordnik = options.fetch(:use_wordnik)
40
40
  world.sound = options.fetch(:sound)
41
41
  world.new_game = options.fetch(:new_game)
42
+ world.extra_command = options.fetch(:extra_command)
42
43
 
43
44
  world.player = Player.new({
44
45
  :description => PLAYER_DESC_DEFAULT,
@@ -66,7 +67,7 @@ module Gemwarrior
66
67
  self.repl = Repl.new(world, eval)
67
68
 
68
69
  # enter Jool!
69
- repl.start('look')
70
+ repl.start('look', world.extra_command)
70
71
  end
71
72
 
72
73
  end
@@ -30,8 +30,8 @@ module Gemwarrior
30
30
  self.eval = evaluator
31
31
  end
32
32
 
33
- def start(initialCommand = nil)
34
- setup_screen(initialCommand)
33
+ def start(initial_command = nil, extra_command = nil)
34
+ setup_screen(initial_command, extra_command)
35
35
 
36
36
  clocker = Clocker.new
37
37
 
@@ -220,7 +220,7 @@ module Gemwarrior
220
220
  end
221
221
  end
222
222
 
223
- def setup_screen(initialCommand = nil)
223
+ def setup_screen(initial_command = nil, extra_command = nil)
224
224
  # welcome player to game
225
225
  clear_screen
226
226
  print_logo
@@ -235,7 +235,8 @@ module Gemwarrior
235
235
  end
236
236
 
237
237
  # hook to do something right off the bat
238
- puts eval.evaluate(initialCommand) unless initialCommand.nil?
238
+ puts eval.evaluate(initial_command) unless initial_command.nil?
239
+ puts eval.evaluate(extra_command) unless extra_command.nil?
239
240
  end
240
241
 
241
242
  def prompt
@@ -2,5 +2,5 @@
2
2
  # Version of Gem Warrior
3
3
 
4
4
  module Gemwarrior
5
- VERSION = '0.9.19'
5
+ VERSION = '0.9.20'
6
6
  end
@@ -17,7 +17,8 @@ module Gemwarrior
17
17
  ERROR_LIST_PARAM_INVALID = 'That is not something that can be listed.'
18
18
  ERROR_LOCATION_DESCRIBE_ENTITY_INVALID = 'You do not see that here.'
19
19
 
20
- attr_accessor :monsters, :locations, :player, :debug_mode, :use_wordnik, :sound, :new_game
20
+ attr_accessor :monsters, :locations, :player,
21
+ :debug_mode, :use_wordnik, :sound, :new_game, :extra_command
21
22
 
22
23
  def initialize
23
24
  self.monsters = init_monsters
@@ -145,21 +146,21 @@ module Gemwarrior
145
146
 
146
147
  def describe(point)
147
148
  desc_text = ''
148
- desc_text << "[ #{point.name} ]".colorize(:green)
149
+ desc_text << "[>>> #{point.name.upcase} <<<]".colorize(:cyan)
149
150
 
150
151
  if debug_mode
151
152
  desc_text << " DL[#{point.danger_level.to_s}] MLR[#{point.monster_level_range.to_s}]".colorize(:yellow)
152
153
  end
153
154
 
154
155
  desc_text << "\n"
155
- desc_text << point.description
156
+ desc_text << point.description.colorize(:green)
156
157
 
157
158
  point.populate_monsters(self.monsters) unless point.checked_for_monsters?
158
159
 
159
- desc_text << "\n >> Curious object(s): #{point.list_items.join(', ')}" unless point.list_items.empty?
160
- desc_text << "\n >> Monster(s) abound: #{point.list_monsters.join(', ')}" unless point.list_monsters.empty?
161
- desc_text << "\n >> Boss(es) abound: #{point.list_bosses.join(', ')}" unless point.list_bosses.empty?
162
- desc_text << "\n >> Paths: #{point.list_paths.join(', ')}"
160
+ desc_text << "\n >> Monster(s): #{point.list_monsters.join(', ')}".colorize(:yellow) unless point.list_monsters.empty?
161
+ desc_text << "\n >> Boss(es): #{point.list_bosses.join(', ')}".colorize(:red) unless point.list_bosses.empty?
162
+ desc_text << "\n >> Thing(s): #{point.list_items.join(', ')}".colorize(:white) unless point.list_items.empty?
163
+ desc_text << "\n >> Path(s): #{point.list_paths.join(', ')}".colorize(:white)
163
164
 
164
165
  if debug_mode
165
166
  desc_text << "\n >>> Actionable words: "
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.9.19
4
+ version: 0.9.20
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-08 00:00:00.000000000 Z
11
+ date: 2015-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: os
@@ -308,6 +308,4 @@ rubygems_version: 2.4.8
308
308
  signing_key:
309
309
  specification_version: 4
310
310
  summary: RubyGem text adventure
311
- test_files:
312
- - spec/rubywarrior_spec.rb
313
- - spec/spec_helper.rb
311
+ test_files: []