From 8a394c0ef05885ed07212822e7d9aa8329790310 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Sun, 8 Mar 2015 02:19:58 +0100 Subject: [PATCH] Server/py: Fix thing proliferation bug in turn_over(). --- plomrogue-server.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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"]: -- 2.30.2