gemwarrior 0.6.0 → 0.6.1

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: 3f015fb6369a72803beae935f2698172c35ec720
4
- data.tar.gz: cc7a8aaae582b41fd1e27dd955e44452077e7290
3
+ metadata.gz: 50941ec227940e27af92ca653ea154417e295516
4
+ data.tar.gz: e2bbb7864d50c2023b2bcf3a85dc09ef1edd8133
5
5
  SHA512:
6
- metadata.gz: e6c57f60b4b3b7a56b2a88bf4f22fac3aaa9225208e78c323b95d448c08df99b4792e81546f64c03079173a4bebcc4c163884daf0088a4864a793e8636e5a696
7
- data.tar.gz: 715ee8977a5f75bd20285fd5e54b7884d62acc7b66aefcb2c4ea08d55ca34d43742e21da427ed4f4b218c648383900b69e059377997d5c7520352aad24133938
6
+ metadata.gz: 3f1b1294d281883bb62d17efc7f2a3cb657b4dfe34c6d6a58fc596729a4d4bc48efee0b87cbf01602c08130fd8a8268ae92a8fa6847f0b91c5fabb71f5385b80
7
+ data.tar.gz: 1698f8d55b4a9ab5d53be2baf225c05d9f230ea1845026b350d6414a8fdba0dae007a5e692666b22f8e939df33833efcce63994a5f20cc53a684e477c5d800f1
@@ -37,8 +37,8 @@ module Gemwarrior
37
37
 
38
38
  puts
39
39
  puts "[Fight/Attack][Look][Run]".colorize(:color => :white, :background => :green)
40
- puts "P :: #{player.hp_cur.to_s.rjust(3)} HP\n"
41
- puts "M :: #{monster.hp_cur.to_s.rjust(3)} HP\n"
40
+ puts "PLAYER :: #{player.hp_cur.to_s.rjust(3)} HP\n"
41
+ puts "MONSTER :: #{monster.hp_cur.to_s.rjust(3)} HP\n"
42
42
 
43
43
  if player_near_death?
44
44
  puts "You are almost dead!\n".colorize(:yellow)
@@ -62,17 +62,17 @@ module Gemwarrior
62
62
  self.atk_hi = inventory.weapon.atk_hi
63
63
  end
64
64
 
65
- self_text = "NAME : #{name}\n"
66
- self_text = "XY : #{cur_coords.values.to_a}\n"
67
- self_text << "WPN : #{cur_weapon_name}\n"
68
- self_text << "LVL : #{level}\n"
69
- self_text << "XP : #{xp}\n"
70
- self_text << "HP : #{hp_cur}/#{hp_max}\n"
71
- self_text << "ATK : #{atk_lo}-#{atk_hi}\n"
72
- self_text << "DEX : #{dexterity}\n"
73
- self_text << "DEF : #{defense}\n"
74
- self_text << "GOD : #{god_mode}\n"
75
- self_text << "BEAST: #{beast_mode}\n\n"
65
+ self_text = "NAME : #{name}\n"
66
+ self_text = "POSITION : #{cur_coords.values.to_a}\n"
67
+ self_text << "WEAPON : #{cur_weapon_name}\n"
68
+ self_text << "LEVEL : #{level}\n"
69
+ self_text << "EXPERIENCE: #{xp}\n"
70
+ self_text << "HIT POINTS: #{hp_cur}/#{hp_max}\n"
71
+ self_text << "ATTACK : #{atk_lo}-#{atk_hi}\n"
72
+ self_text << "DEXTERITY : #{dexterity}\n"
73
+ self_text << "DEFENSE : #{defense}\n"
74
+ self_text << "GOD_MODE : #{god_mode}\n"
75
+ self_text << "BEAST_MODE: #{beast_mode}\n\n"
76
76
 
77
77
  self_text << "#{description}\n\n"
78
78
 
@@ -11,6 +11,8 @@ module Gemwarrior
11
11
  QUIT_MESSAGE = 'Thanks for playing the game. Until next time...'.colorize(:yellow)
12
12
  RESUME_MESSAGE = 'Back to adventuring!'.colorize(:green)
13
13
  SEPARATOR = '=========================================================================='
14
+
15
+ GO_PARAMS = 'Options: north, east, south, west'
14
16
  CHANGE_PARAMS = 'Options: name'
15
17
  LIST_PARAMS = 'Options: monsters, items, locations'
16
18
  DEBUG_PARAMS = 'Options: vars, map, stat'
@@ -48,7 +50,7 @@ module Gemwarrior
48
50
  'Display character information',
49
51
  'Look in your inventory',
50
52
  'List all the objects of a type that exist in the world',
51
- 'Take a load off and regain stamina',
53
+ 'Take a load off and regain HP',
52
54
  'Look around your current location',
53
55
  'Take item',
54
56
  'Drop item',
@@ -86,7 +88,7 @@ module Gemwarrior
86
88
  when 'debug', 'db'
87
89
  if param1.nil?
88
90
  puts ERROR_DEBUG_PARAM_MISSING
89
- puts DEBUG_PARAMS
91
+ DEBUG_PARAMS
90
92
  else
91
93
  case param1
92
94
  when 'vars', 'v'
@@ -100,7 +102,7 @@ module Gemwarrior
100
102
  when 'stat'
101
103
  if param2.nil?
102
104
  puts ERROR_DEBUG_STAT_PARAM_MISSING
103
- puts DEBUG_STAT_PARAMS
105
+ DEBUG_STAT_PARAMS
104
106
  else
105
107
  case param2
106
108
  when 'atk_lo'
@@ -160,7 +162,7 @@ module Gemwarrior
160
162
  when 'list', 'ls'
161
163
  if param1.nil?
162
164
  puts ERROR_LIST_PARAM_MISSING
163
- puts LIST_PARAMS
165
+ LIST_PARAMS
164
166
  else
165
167
  world.list(param1)
166
168
  end
@@ -198,7 +200,8 @@ module Gemwarrior
198
200
  end
199
201
  when 'go', 'g'
200
202
  if param1.nil?
201
- ERROR_GO_PARAM_MISSING
203
+ puts ERROR_GO_PARAM_MISSING
204
+ GO_PARAMS
202
205
  else
203
206
  direction = param1
204
207
  if world.can_move?(direction)
@@ -224,7 +227,7 @@ module Gemwarrior
224
227
  when 'change', 'ch'
225
228
  if param1.nil?
226
229
  puts ERROR_CHANGE_PARAM_MISSING
227
- puts CHANGE_PARAMS
230
+ CHANGE_PARAMS
228
231
  else
229
232
  case param1
230
233
  when 'name'
@@ -2,5 +2,5 @@
2
2
  # Version of Gem Warrior
3
3
 
4
4
  module Gemwarrior
5
- VERSION = "0.6.0"
5
+ VERSION = "0.6.1"
6
6
  end
@@ -67,12 +67,20 @@ module Gemwarrior
67
67
 
68
68
  puts "* Remember: #{noun1_values.get_random_value} and #{noun2_values.get_random_value} are the key to #{noun3_values.get_random_value} *\n\n"
69
69
  end
70
+
71
+ def print_help
72
+ puts '* Basic functions: look, go, character, inventory, attack *'
73
+ puts '* Type \'help\' for complete command list'
74
+ puts '* Most commands can be abbreviated to their first letter *'
75
+ puts
76
+ end
70
77
 
71
78
  def setup_screen(initialCommand = nil)
72
79
  # welcome player to game
73
80
  clear_screen
74
81
  print_splash_message
75
- print_fortune
82
+ print_fortune
83
+ print_help
76
84
 
77
85
  # hook to do something right off the bat
78
86
  puts eval.evaluate(initialCommand) unless initialCommand.nil?
@@ -91,7 +99,7 @@ module Gemwarrior
91
99
  world.player.name,
92
100
  world.location_by_coords(world.player.cur_coords).name
93
101
  ]
94
- puts (prompt_template % prompt_vars_arr).colorize(:color => :white, :background => :green)
102
+ puts (prompt_template % prompt_vars_arr).colorize(:yellow)
95
103
  end
96
104
 
97
105
  def read_line
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.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Chadwick