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:
e09a0c1
)
Server/py: Minor fixes in actor_move().
author
Christian Heller
<c.heller@plomlompom.de>
Fri, 6 Mar 2015 12:57:36 +0000
(13:57 +0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Fri, 6 Mar 2015 12:57:36 +0000
(13:57 +0100)
plomrogue-server.py
patch
|
blob
|
history
diff --git
a/plomrogue-server.py
b/plomrogue-server.py
index c6bdd44d2832817a93e1ef549c429eb00e3205d3..5fe5c26c89009f25428e49f9f0474b6c6ed9013e 100755
(executable)
--- a/
plomrogue-server.py
+++ b/
plomrogue-server.py
@@
-582,16
+582,16
@@
def actor_move(t):
if world_db["Things"][id]["T_POSY"] == libpr.result_y()
if world_db["Things"][id]["T_POSX"] == libpr.result_x()]
if len(hitted):
if world_db["Things"][id]["T_POSY"] == libpr.result_y()
if world_db["Things"][id]["T_POSX"] == libpr.result_x()]
if len(hitted):
- hitted = hitted[0]
- decrement_lifepoints(world_db["Things"][hitted])
+ hit_id = hitted[0]
hitter_name = world_db["ThingTypes"][t["T_TYPE"]]["TT_NAME"]
hitter = "You" if t == world_db["Things"][0] else hitter_name
hitter_name = world_db["ThingTypes"][t["T_TYPE"]]["TT_NAME"]
hitter = "You" if t == world_db["Things"][0] else hitter_name
- hitted_type = world_db["Things"][hit
te
d]["T_TYPE"]
+ hitted_type = world_db["Things"][hit
_i
d]["T_TYPE"]
hitted_name = world_db["ThingTypes"][hitted_type]["TT_NAME"]
hitted_name = world_db["ThingTypes"][hitted_type]["TT_NAME"]
- hitted = "you" if hit
ted == world_db["Things"][0]
else hitted_name
+ hitted = "you" if hit
_id == 0
else hitted_name
verb = " wound " if hitter == "You" else " wounds "
strong_write(io_db["file_out"], "LOG " + hitter + verb + hitted + \
".\n")
verb = " wound " if hitter == "You" else " wounds "
strong_write(io_db["file_out"], "LOG " + hitter + verb + hitted + \
".\n")
+ decrement_lifepoints(world_db["Things"][hit_id])
return
dir = [dir for dir in directions_db
if directions_db[dir] == t["T_ARGUMENT"]][0]
return
dir = [dir for dir in directions_db
if directions_db[dir] == t["T_ARGUMENT"]][0]