gemwarrior 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/gemwarrior/battle.rb +3 -3
- data/lib/gemwarrior/evaluator.rb +3 -2
- data/lib/gemwarrior/misc/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ced3d65d4786800951217d7551ac484b61c7fe6a
|
4
|
+
data.tar.gz: 4606dd2f869d32b9722f0b1825ea8873b7baa0b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79eb6e5bb961674f038aebcc10c3e1d82e4db8e3f6ededf54cb5689120c45de358f025c21d9427d9503a7713f7b9df23c2f2f76d3baffccee17a148a0b393321
|
7
|
+
data.tar.gz: 3e305cb3f6382ff8492083b717e4cfcfbec428aff9a36154149f696de6e97923e43e9859baeb531b5ecacc151dc97923a736aaea79518f7860e16cba14b5b8b4
|
data/lib/gemwarrior/battle.rb
CHANGED
@@ -36,9 +36,9 @@ module Gemwarrior
|
|
36
36
|
end
|
37
37
|
|
38
38
|
puts
|
39
|
-
puts "
|
40
|
-
puts "
|
41
|
-
puts "
|
39
|
+
puts "PLAYER :: #{player.hp_cur.to_s.rjust(3)} HP"
|
40
|
+
puts "MONSTER :: #{monster.hp_cur.to_s.rjust(3)} HP"
|
41
|
+
puts "[Fight/Attack][Look][Run]".colorize(:color => :yellow)
|
42
42
|
|
43
43
|
if player_near_death?
|
44
44
|
puts "You are almost dead!\n".colorize(:yellow)
|
data/lib/gemwarrior/evaluator.rb
CHANGED
@@ -38,7 +38,7 @@ module Gemwarrior
|
|
38
38
|
ERROR_DEBUG_STAT_PARAM_MISSING = 'You cannot just "change stats". You gotta choose a stat to change.'
|
39
39
|
ERROR_DEBUG_STAT_PARAM_INVALID = 'You cannot change that stat...yet.'
|
40
40
|
|
41
|
-
attr_accessor :world, :commands, :aliases, :descriptions, :devcmds, :devaliases
|
41
|
+
attr_accessor :world, :commands, :aliases, :descriptions, :devcmds, :devaliases, :extras
|
42
42
|
|
43
43
|
def initialize(world)
|
44
44
|
self.world = world
|
@@ -46,6 +46,7 @@ module Gemwarrior
|
|
46
46
|
self.devaliases = %w(db)
|
47
47
|
self.commands = %w(character inventory list rest look take drop equip unequip go attack change help quit quit!)
|
48
48
|
self.aliases = %w(c i ls r l t d e ue g a ch h q qq)
|
49
|
+
self.extras = %w(exit exit! x x)
|
49
50
|
self.descriptions = [
|
50
51
|
'Display character information',
|
51
52
|
'Look in your inventory',
|
@@ -274,7 +275,7 @@ module Gemwarrior
|
|
274
275
|
def input_valid?(input)
|
275
276
|
tokens = input.split
|
276
277
|
command = tokens[0]
|
277
|
-
commands_and_aliases = commands | aliases | devcmds | devaliases
|
278
|
+
commands_and_aliases = commands | aliases | devcmds | devaliases | extras
|
278
279
|
|
279
280
|
if commands_and_aliases.include?(command.downcase)
|
280
281
|
if tokens.size.between?(1,4)
|