home · contact · privacy
Don't punish the player for moving towards an ocean tile.
authorChristian Heller <c.heller@plomlompom.de>
Sun, 15 Mar 2015 20:35:22 +0000 (21:35 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Sun, 15 Mar 2015 20:35:22 +0000 (21:35 +0100)
roguelike-server

index 33545c8440434c66b9bccb95c4d0ef2eefcfa8bc..87a68b39ccf5783e7e0ba8ad8a3e87e551f7ed4d 100755 (executable)
@@ -1580,6 +1580,9 @@ def play_commander(action, args=False):
                                              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 (ord("X") == world_db["MAP"][pos]  # #
                     or ord("|") == world_db["MAP"][pos]):  # #
                     carries_axe = False  # #