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:
aec8de0
)
In actor_move(), don't test target cell passability earlier than needed.
author
Christian Heller
<c.heller@plomlompom.de>
Tue, 1 Sep 2015 02:14:55 +0000
(
04:14
+0200)
committer
Christian Heller
<c.heller@plomlompom.de>
Tue, 1 Sep 2015 02:14:55 +0000
(
04:14
+0200)
roguelike-server
patch
|
blob
|
history
diff --git
a/roguelike-server
b/roguelike-server
index ff799fb74a36d86eedaf6cb51b5cebaa2e0c8444..8ae2ba7b4ed43db3eb3733703222476f223d36fb 100755
(executable)
--- a/
roguelike-server
+++ b/
roguelike-server
@@
-632,7
+632,6
@@
def actor_move(t):
t["T_POSY"], t["T_POSX"])
if 1 == move_result[0]:
pos = (move_result[1] * world_db["MAP_LENGTH"]) + move_result[2]
t["T_POSY"], t["T_POSX"])
if 1 == move_result[0]:
pos = (move_result[1] * world_db["MAP_LENGTH"]) + move_result[2]
- passable = "." == chr(world_db["MAP"][pos])
hitted = [id for id in world_db["Things"]
if world_db["Things"][id] != t
if world_db["Things"][id]["T_LIFEPOINTS"]
hitted = [id for id in world_db["Things"]
if world_db["Things"][id] != t
if world_db["Things"][id]["T_LIFEPOINTS"]
@@
-651,6
+650,7
@@
def actor_move(t):
" wounds you.\n")
decrement_lifepoints(world_db["Things"][hit_id])
return
" wounds you.\n")
decrement_lifepoints(world_db["Things"][hit_id])
return
+ passable = "." == chr(world_db["MAP"][pos])
dir = [dir for dir in directions_db
if directions_db[dir] == chr(t["T_ARGUMENT"])][0]
if passable:
dir = [dir for dir in directions_db
if directions_db[dir] == chr(t["T_ARGUMENT"])][0]
if passable: