X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=plomrogue-server.py;h=a3c8f8fd27e25d0a89a04d3ed64a7938fd54b0e0;hb=14fca6c5dabaeadeef1761d5b7b6dd252784ee42;hp=78cf88c5aa0594a6475c4c96d9bbd94374d01f56;hpb=d49987db61d3456bcb623fa795b87e629b819d7f;p=plomrogue diff --git a/plomrogue-server.py b/plomrogue-server.py index 78cf88c..a3c8f8f 100755 --- a/plomrogue-server.py +++ b/plomrogue-server.py @@ -574,7 +574,7 @@ def decrement_lifepoints(t): def mv_yx_in_dir_legal(dir, y, x): """Wrapper around libpr.mv_yx_in_dir_legal to simplify its use.""" - dir_c = chr(dir).encode("ascii")[0] + dir_c = dir.encode("ascii")[0] test = libpr.mv_yx_in_dir_legal_wrap(dir_c, y, x) if -1 == test: raise RuntimeError("Too much wrapping in mv_yx_in_dir_legal_wrap()!") @@ -590,7 +590,8 @@ def actor_wait(t): def actor_move(t): """If passable, move/collide(=attack) thing into T_ARGUMENT's direction.""" passable = False - move_result = mv_yx_in_dir_legal(t["T_ARGUMENT"], t["T_POSY"], t["T_POSX"]) + move_result = mv_yx_in_dir_legal(chr(t["T_ARGUMENT"]), + t["T_POSY"], t["T_POSX"]) if 1 == move_result[0]: pos = (move_result[1] * world_db["MAP_LENGTH"]) + move_result[2] passable = "." == chr(world_db["MAP"][pos])