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 (from parent 1:
c242d3a
)
Server/py: Add replica of wrongly incrementing HP through eating.
author
Christian Heller
<c.heller@plomlompom.de>
Fri, 6 Mar 2015 21:59:32 +0000
(22:59 +0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Fri, 6 Mar 2015 21:59:32 +0000
(22:59 +0100)
plomrogue-server.py
patch
|
blob
|
history
diff --git
a/plomrogue-server.py
b/plomrogue-server.py
index 06fe20819d1a3a66d293ae99b4a564131d2505a1..daff24f17310169c77de8d7c1a8767b3f95bb16d 100755
(executable)
--- a/
plomrogue-server.py
+++ b/
plomrogue-server.py
@@
-655,7
+655,6
@@
def actor_drop(t):
def actor_use(t):
"""Make t use (for now: consume) T_ARGUMENT-indexed Thing in inventory."""
def actor_use(t):
"""Make t use (for now: consume) T_ARGUMENT-indexed Thing in inventory."""
- # Original wrongly featured lifepoints increase through consumable!
# TODO: Handle case where T_ARGUMENT matches nothing.
if len(t["T_CARRIES"]):
id = t["T_CARRIES"][t["T_ARGUMENT"]]
# TODO: Handle case where T_ARGUMENT matches nothing.
if len(t["T_CARRIES"]):
id = t["T_CARRIES"][t["T_ARGUMENT"]]
@@
-664,6
+663,8
@@
def actor_use(t):
t["T_CARRIES"].remove(id)
del world_db["Things"][id]
t["T_SATIATION"] += world_db["ThingTypes"][type]["TT_CONSUMABLE"]
t["T_CARRIES"].remove(id)
del world_db["Things"][id]
t["T_SATIATION"] += world_db["ThingTypes"][type]["TT_CONSUMABLE"]
+ t["T_LIFEPOINTS"] += 1
+ # Wrongly increment HPs is a replica of the original code.
strong_write(io_db["file_out"], "LOG You consume this object.\n")
else:
strong_write(io_db["file_out"], "LOG You try to use this object," +
strong_write(io_db["file_out"], "LOG You consume this object.\n")
else:
strong_write(io_db["file_out"], "LOG You try to use this object," +