def cmd_LOGIN_OK(game):
game.tui.switch_mode('post_login_wait')
game.tui.send('GET_GAMESTATE')
- game.tui.log_msg('@ welcome')
+ game.tui.log_msg('@ welcome!')
+ game.tui.log_msg('@ hint: see top of terminal for how to get help.')
+ game.tui.log_msg('@ hint: enter study mode to understand your environment.')
cmd_LOGIN_OK.argtypes = ''
def cmd_ADMIN_OK(game):
game.player = game.get_thing(game.player_id)
game.players_hat_chars = game.players_hat_chars_new
game.bladder_pressure = game.bladder_pressure_new
+ game.energy = game.energy_new
game.turn_complete = True
if game.tui.mode.name == 'post_login_wait':
game.tui.switch_mode('play')
game.tui.set_random_colors()
cmd_RANDOM_COLORS.argtypes = ''
-def cmd_BLADDER_PRESSURE(game, bladder_pressure):
+def cmd_STATS(game, bladder_pressure, energy):
game.bladder_pressure_new = bladder_pressure
-cmd_BLADDER_PRESSURE.argtypes = 'int:nonneg'
+ game.energy_new = energy
+cmd_STATS.argtypes = 'int:nonneg int'
class Game(GameBase):
turn_complete = False
self.register_command(cmd_FOV)
self.register_command(cmd_DEFAULT_COLORS)
self.register_command(cmd_RANDOM_COLORS)
- self.register_command(cmd_BLADDER_PRESSURE)
+ self.register_command(cmd_STATS)
self.map_content = ''
self.players_hat_chars = ''
self.player_id = -1
self.portals_new = {}
self.terrains = {}
self.player = None
- self.bladder_pressure_new = 0
- self.bladder_pressure = 0
def get_string_options(self, string_option_type):
if string_option_type == 'map_geometry':
"command_thing", "take_thing",
"drop_thing"]
self.mode_play.available_actions = ["move", "teleport", "door", "consume",
- "install", "wear", "spin"]
+ "install", "wear", "spin", "dance"]
self.mode_study.available_modes = ["chat", "play", "admin_enter", "edit"]
self.mode_study.available_actions = ["toggle_map_mode", "move_explorer"]
self.mode_admin.available_modes = ["admin_thing_protect", "control_pw_type",
'install': 'I',
'wear': 'W',
'spin': 'S',
+ 'dance': 'T',
'help': 'h',
'toggle_map_mode': 'L',
'toggle_tile_draw': 'm',
not self.game.player.carrying.commandable):
return fail('not carrying anything commandable')
if mode_name == 'name_thing' and not self.game.player.carrying:
- return fail('not carrying anything to re-name')
+ return fail('not carrying anything to re-name', 'edit')
if mode_name == 'admin_thing_protect' and not self.game.player.carrying:
return fail('not carrying anything to protect')
if mode_name == 'take_thing' and self.game.player.carrying:
y += 1
def draw_stats():
- safe_addstr(0, self.window_width, 'BLADDER: ' + str(self.game.bladder_pressure))
+ stats = 'ENERGY: %s BLADDER: %s' % (self.game.energy,
+ self.game.bladder_pressure)
+ safe_addstr(0, self.window_width, stats)
def draw_mode():
help = "hit [%s] for help" % self.keys['help']
'door': 'open/close',
'consume': 'consume',
'spin': 'spin',
+ 'dance': 'dance',
}
action_tasks = {
'command': 'COMMAND',
'consume': 'INTOXICATE',
'spin': 'SPIN',
+ 'dance': 'DANCE',
}
curses.curs_set(False) # hide cursor
self.send('TASK:WEAR')
elif key == self.keys['spin'] and task_action_on('spin'):
self.send('TASK:SPIN')
+ elif key == self.keys['dance'] and task_action_on('dance'):
+ self.send('TASK:DANCE')
elif key == self.keys['teleport']:
if self.game.player.position in self.game.portals:
self.host = self.game.portals[self.game.player.position]