self.io.send('PLAYERS_HAT_CHARS ' + quote(player.get_cookie_chars()),
c_id)
self.io.send('STATS %s %s' % (player.need_for_toilet,
- player.weariness), c_id)
+ player.energy), c_id)
if player.id_ in player_ids_send_fov:
self.io.send('FOV %s' % quote(player.fov_stencil.terrain), c_id)
self.io.send('MAP %s %s %s' % (self.get_map_geometry_shape(),
if 'sittable' in terrain_type.tags:
self.thing.standing = False
self.thing.send_msg('CHAT "You sink into the %s. '
- 'Staying here will reduce your weariness."'
+ 'Staying here will replenish your energy."'
% terrain_type.description)
self.thing.invalidate('fov')
if self.thing.blocks_light:
class ThingAnimate(Thing):
- weariness = 0
+ energy = 0
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
task = self.next_task[0]
self.next_task = [None]
task.check()
- task.todo += self.weariness * 10
+ task.todo += max(0, -self.energy * 10)
return task
def proceed(self):
self.game.changed = True
if random.random() > 0.9999:
if self.standing:
- self.weariness += 1
+ self.energy -= 1
else:
- self.weariness -= 1
- if self.weariness > 0 and self.weariness % 5 == 0:
- self.send_msg('CHAT "All that walking or standing makes '
- 'you weary, and thereby slower. Find a place '
- 'to sit or lie down to regain energy."')
+ self.energy += 1
+ if self.energy < 0 and self.energy % 5 == 0:
+ self.send_msg('CHAT "All that walking or standing uses up '
+ 'your energy, which makes you slower. Find a'
+ ' place to sit or lie down to regain it."')
self.game.changed = True
if self.dancing and random.random() > 0.99 and not self.next_task[0]:
self.dancing -= 1
direction = random.choice(self.game.map_geometry.directions)
self.set_next_task('MOVE', [direction])
if random.random() > 0.9:
- self.weariness += 1
+ self.energy -= 1
self.game.changed = True
- if 1000000 * random.random() < -self.weariness:
+ if 1000000 * random.random() < self.energy:
self.send_msg('CHAT "Your body tries to '
'dance off its energy surplus."')
self.dancing = 50
game.things_new = [];
} else if (tokens[0] === 'STATS') {
game.bladder_pressure_new = parseInt(tokens[1])
- game.weariness_new = parseInt(tokens[2])
+ game.energy_new = parseInt(tokens[2])
} else if (tokens[0] === 'THING') {
let t = game.get_thing_temp(tokens[4], true);
t.position = parser.parse_yx(tokens[1]);
game.player = game.things[game.player_id];
game.players_hat_chars = game.players_hat_chars_new;
game.bladder_pressure = game.bladder_pressure_new
- game.weariness = game.weariness_new
+ game.energy = game.energy_new
game.turn_complete = true;
if (tui.mode.name == 'post_login_wait') {
tui.switch_mode('play');
},
draw_stats_line: function(n) {
terminal.write(1, this.window_width,
- 'WEARINESS: ' + game.weariness +
+ 'ENERGY: ' + game.energy +
' BLADDER: ' + game.bladder_pressure);
},
draw_history: function() {
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.weariness = game.weariness_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_STATS(game, bladder_pressure, weariness):
+def cmd_STATS(game, bladder_pressure, energy):
game.bladder_pressure_new = bladder_pressure
- game.weariness_new = weariness
+ game.energy_new = energy
cmd_STATS.argtypes = 'int:nonneg int'
class Game(GameBase):
y += 1
def draw_stats():
- stats = 'WEARY: %s BLADDER: %s' % (self.game.weariness,
- 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():