home · contact · privacy
Server/py: Fix thing proliferation bug in turn_over().
authorChristian Heller <c.heller@plomlompom.de>
Sun, 8 Mar 2015 01:19:58 +0000 (02:19 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Sun, 8 Mar 2015 01:19:58 +0000 (02:19 +0100)
plomrogue-server.py

index b22701f8405c3e0e9959dda6781d96f2cb1722c1..5223e4bf0438945036378543b88e31926e7ed80d 100755 (executable)
@@ -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"]: