X-Git-Url: https://plomlompom.com/repos/unset_cookie?a=blobdiff_plain;ds=inline;f=rogue_chat.html;h=eb23d1cf3bfeb411f60079bcaf78eac35fa0aa8e;hb=249d0afc8663af2a1dbdd9d2f893582fe235cf6c;hp=f08105023e30b3d062b58e06fb9f52551647cee9;hpb=cbfca994af863c569442f2199dcec1e2b2aa42d6;p=plomrogue2
diff --git a/rogue_chat.html b/rogue_chat.html
index f081050..eb23d1c 100644
--- a/rogue_chat.html
+++ b/rogue_chat.html
@@ -54,6 +54,7 @@ terminal rows:
+
@@ -101,6 +102,7 @@ terminal rows:
flatten surroundings:
teleport:
spin:
+dance:
open/close:
consume:
install:
@@ -262,6 +264,7 @@ let key_descriptions = {
'install': '(un-)install',
'wear': '(un-)wear',
'spin': 'spin',
+ 'dance': 'dance',
'toggle_map_mode': 'toggle map view',
'toggle_tile_draw': 'toggle protection character drawing',
'hex_move_upleft': 'up-left',
@@ -491,7 +494,7 @@ let server = {
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]);
@@ -549,7 +552,7 @@ let server = {
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');
@@ -724,6 +727,7 @@ let tui = {
'command': 'COMMAND',
'consume': 'INTOXICATE',
'spin': 'SPIN',
+ 'dance': 'DANCE',
},
offset: [0,0],
map_lines: [],
@@ -735,7 +739,7 @@ let tui = {
this.mode_play.available_modes = ["chat", "study", "edit", "admin_enter",
"command_thing", "take_thing", "drop_thing"]
this.mode_play.available_actions = ["move", "teleport", "door", "consume",
- "wear", "spin"];
+ "wear", "spin", "dance"];
this.mode_study.available_modes = ["chat", "play", "admin_enter", "edit"]
this.mode_study.available_actions = ["toggle_map_mode", "move_explorer"];
this.mode_admin.available_modes = ["admin_thing_protect", "control_pw_type",
@@ -1219,7 +1223,7 @@ let tui = {
},
draw_stats_line: function(n) {
terminal.write(1, this.window_width,
- 'WEARINESS: ' + game.weariness +
+ 'ENERGY: ' + game.energy +
' BLADDER: ' + game.bladder_pressure);
},
draw_history: function() {
@@ -1686,6 +1690,8 @@ tui.inputEl.addEventListener('keydown', (event) => {
server.send(["TASK:WEAR"]);
} else if (event.key === tui.keys.spin && tui.task_action_on('spin')) {
server.send(["TASK:SPIN"]);
+ } else if (event.key === tui.keys.dance && tui.task_action_on('dance')) {
+ server.send(["TASK:DANCE"]);
} else if (event.key in tui.movement_keys && tui.task_action_on('move')) {
server.send(['TASK:MOVE', tui.movement_keys[event.key]]);
} else if (event.key === tui.keys.teleport) {
@@ -1801,6 +1807,9 @@ document.getElementById("wear").onclick = function() {
document.getElementById("spin").onclick = function() {
server.send(['TASK:SPIN']);
};
+document.getElementById("dance").onclick = function() {
+ server.send(['TASK:DANCE']);
+};
document.getElementById("teleport").onclick = function() {
game.teleport();
};