"""If passable, move/collide(=attack) thing into T_ARGUMENT's direction."""
from server.world import build_fov_map, decrement_lifepoints
from server.utils import mv_yx_in_dir_legal
"""If passable, move/collide(=attack) thing into T_ARGUMENT's direction."""
from server.world import build_fov_map, decrement_lifepoints
from server.utils import mv_yx_in_dir_legal
passable = False
move_result = mv_yx_in_dir_legal(chr(t["T_ARGUMENT"]),
t["T_POSY"], t["T_POSX"])
passable = False
move_result = mv_yx_in_dir_legal(chr(t["T_ARGUMENT"]),
t["T_POSY"], t["T_POSX"])
if t == world_db["Things"][0]:
hitted_type = world_db["Things"][hit_id]["T_TYPE"]
hitted_name = world_db["ThingTypes"][hitted_type]["TT_NAME"]
if t == world_db["Things"][0]:
hitted_type = world_db["Things"][hit_id]["T_TYPE"]
hitted_name = world_db["ThingTypes"][hitted_type]["TT_NAME"]
elif 0 == hit_id:
hitter_name = world_db["ThingTypes"][t["T_TYPE"]]["TT_NAME"]
log(hitter_name +" WOUNDS you.")
decrement_lifepoints(world_db["Things"][hit_id])
return
elif 0 == hit_id:
hitter_name = world_db["ThingTypes"][t["T_TYPE"]]["TT_NAME"]
log(hitter_name +" WOUNDS you.")
decrement_lifepoints(world_db["Things"][hit_id])
return