Skip to content

Commit 214901b

Browse files
(v)ersion displays version in-game; ? is now alias for help
1 parent 3504ab8 commit 214901b

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

lib/gemwarrior/evaluator.rb

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def initialize(world)
5151
self.world = world
5252

5353
self.devcommands = %w(god beast list vars map stat teleport spawn levelbump restfight)
54-
self.devaliases = %w(gd bs ls v m st tp sp lb rf)
54+
self.devaliases = %w(gd bs ls vs m st tp sp lb rf)
5555
self.devextras = %w()
5656
self.devcmd_descriptions = [
5757
'Toggle god mode (i.e. invincible)',
@@ -66,9 +66,9 @@ def initialize(world)
6666
'Rest, but ensure battle for testing'
6767
]
6868

69-
self.commands = %w(character inventory rest look take use drop equip unequip go north east south west attack change help quit quit!)
70-
self.aliases = %w(c i r l t u d eq ue g n e s w a ch h q qq)
71-
self.extras = %w(exit exit! x xx fight f)
69+
self.commands = %w(character inventory rest look take use drop equip unequip go north east south west attack change version help quit quit!)
70+
self.aliases = %w(c i r l t u d eq ue g n e s w a ch v h q qq)
71+
self.extras = %w(exit exit! x xx fight f ? ?? ???)
7272
self.cmd_descriptions = [
7373
'Display character information',
7474
'Look in your inventory',
@@ -86,6 +86,7 @@ def initialize(world)
8686
'Go west (shortcut)',
8787
'Attack a monster',
8888
'Change something',
89+
'Display game version',
8990
'This help menu',
9091
'Quit w/ confirmation (also exit/x)',
9192
'Quit w/o confirmation (also exit!/xx)'
@@ -117,7 +118,7 @@ def evaluate(input)
117118
return GameOptions.data['god_mode'] = !GameOptions.data['god_mode']
118119
when 'beast', 'bs'
119120
return GameOptions.data['beast_mode'] = !GameOptions.data['beast_mode']
120-
when 'vars', 'v'
121+
when 'vars', 'vs'
121122
world.print_vars
122123
when 'list', 'ls'
123124
if param1.nil?
@@ -519,8 +520,10 @@ def evaluate(input)
519520
ERROR_CHANGE_PARAM_INVALID
520521
end
521522
end
522-
when 'help', 'h'
523+
when 'help', 'h', '?', '??', '???'
523524
list_commands
525+
when 'version', 'v'
526+
Gemwarrior::VERSION
524527
when 'quit', 'exit', 'q', 'x'
525528
puts 'You sure you want to quit? (y/n): '
526529
response = gets.chomp.downcase

lib/gemwarrior/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
# Version of Gem Warrior
33

44
module Gemwarrior
5-
VERSION = '0.9.35'
5+
VERSION = '0.9.36'
66
end

0 commit comments

Comments
 (0)