home
·
contact
·
privacy
projects
/
plomrogue2
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add weariness mechanic.
[plomrogue2]
/
rogue_chat.html
diff --git
a/rogue_chat.html
b/rogue_chat.html
index 291a98c341431c6c6cedf5bce2c966c2a63c30aa..84d481c806218a35570d937cd49e485aacbff054 100644
(file)
--- a/
rogue_chat.html
+++ b/
rogue_chat.html
@@
-129,8
+129,8
@@
terminal rows: <input id="n_rows" type="number" step=4 min=24 value=24 />
</div>
<script>
"use strict";
</div>
<script>
"use strict";
-
//
let websocket_location = "wss://plomlompom.com/rogue_chat/";
-let websocket_location = "ws://localhost:8000/";
+let websocket_location = "wss://plomlompom.com/rogue_chat/";
+
//
let websocket_location = "ws://localhost:8000/";
let mode_helps = {
'play': {
let mode_helps = {
'play': {
@@
-489,8
+489,9
@@
let server = {
game.portals_new = {};
explorer.annotations_new = {};
game.things_new = [];
game.portals_new = {};
explorer.annotations_new = {};
game.things_new = [];
- } else if (tokens[0] === '
BLADDER_PRESSURE
') {
+ } else if (tokens[0] === '
STATS
') {
game.bladder_pressure_new = parseInt(tokens[1])
game.bladder_pressure_new = parseInt(tokens[1])
+ game.weariness_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]);
} else if (tokens[0] === 'THING') {
let t = game.get_thing_temp(tokens[4], true);
t.position = parser.parse_yx(tokens[1]);
@@
-548,6
+549,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.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.turn_complete = true;
if (tui.mode.name == 'post_login_wait') {
tui.switch_mode('play');
game.turn_complete = true;
if (tui.mode.name == 'post_login_wait') {
tui.switch_mode('play');
@@
-1213,7
+1215,9
@@
let tui = {
terminal.write(0, this.window_width, 'MODE: ' + this.mode.short_desc + ' – ' + help);
},
draw_stats_line: function(n) {
terminal.write(0, this.window_width, 'MODE: ' + this.mode.short_desc + ' – ' + help);
},
draw_stats_line: function(n) {
- terminal.write(1, this.window_width, 'BLADDER: ' + game.bladder_pressure);
+ terminal.write(1, this.window_width,
+ 'WEARINESS: ' + game.weariness +
+ ' BLADDER: ' + game.bladder_pressure);
},
draw_history: function() {
let log_display_lines = [];
},
draw_history: function() {
let log_display_lines = [];