From: Christian Heller Date: Sun, 8 Mar 2015 01:19:58 +0000 (+0100) Subject: Server/py: Fix thing proliferation bug in turn_over(). X-Git-Tag: tce~378 X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/%7B%7B%20web_path%20%7D%7D/static/git-logo.png?a=commitdiff_plain;h=8a394c0ef05885ed07212822e7d9aa8329790310;p=plomrogue Server/py: Fix thing proliferation bug in turn_over(). --- diff --git a/plomrogue-server.py b/plomrogue-server.py index b22701f..5223e4b 100755 --- a/plomrogue-server.py +++ b/plomrogue-server.py @@ -820,9 +820,10 @@ def turn_over(): id = 0 whilebreaker = False while world_db["Things"][0]["T_LIFEPOINTS"]: - for id in [id for id in world_db["Things"]]: - if not id in world_db["Things"]: # Thing may have been consumed - continue # during turn … + for id in [id for id in world_db["Things"]]: # Only what is from start! + if not id in world_db["Things"] or \ + world_db["Things"][id]["carried"]:# Thing may have been consumed + continue # or picked up during turn … Thing = world_db["Things"][id] if Thing["T_LIFEPOINTS"]: if not Thing["T_COMMAND"]: