home
·
contact
·
privacy
projects
/
plomrogue
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
488f001
)
Server/py: Fix thing proliferation bug in turn_over().
author
Christian Heller
<c.heller@plomlompom.de>
Sun, 8 Mar 2015 01:19:58 +0000
(
02:19
+0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Sun, 8 Mar 2015 01:19:58 +0000
(
02:19
+0100)
plomrogue-server.py
patch
|
blob
|
history
diff --git
a/plomrogue-server.py
b/plomrogue-server.py
index b22701f8405c3e0e9959dda6781d96f2cb1722c1..5223e4bf0438945036378543b88e31926e7ed80d 100755
(executable)
--- 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"]:
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"]:
Thing = world_db["Things"][id]
if Thing["T_LIFEPOINTS"]:
if not Thing["T_COMMAND"]: