From: Christian Heller Date: Tue, 23 Feb 2016 23:39:19 +0000 (+0100) Subject: Server: Inform player about his inability to swim on move towards water. X-Git-Tag: tce~168 X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/%7B%7Bdb.prefix%7D%7D/%7B%7B%20web_path%20%7D%7D/task?a=commitdiff_plain;h=3a9b266ee5f6bdecab5b1c895923c3373cca7dca;p=plomrogue Server: Inform player about his inability to swim on move towards water. --- diff --git a/server/commands.py b/server/commands.py index f20297d..3717202 100644 --- a/server/commands.py +++ b/server/commands.py @@ -499,6 +499,9 @@ def play_move(str_arg): move_result = mv_yx_in_dir_legal(chr(dir), t["T_POSY"], t["T_POSX"]) if 1 == move_result[0]: pos = (move_result[1] * world_db["MAP_LENGTH"]) + move_result[2] + if ord("~") == world_db["MAP"][pos]: + log("You can't SWIM.") + return if chr(world_db["MAP"][pos]) in symbols_passable: world_db["Things"][0]["T_ARGUMENT"] = dir set_command("move")