X-Git-Url: https://plomlompom.com/repos/test.html?a=blobdiff_plain;f=roguelike-server;h=516c232632ea56c9a0a47ab5d4cef37c4cbb1ece;hb=9edd3f635924470b81896820956d14a4b6fafaf2;hp=a26ff25091f77518271a3c9f4d975bc7b625a658;hpb=e6d205f81bcd3e815ecb4694a0a81e1de5258862;p=plomrogue
diff --git a/roguelike-server b/roguelike-server
index a26ff25..516c232 100755
--- a/roguelike-server
+++ b/roguelike-server
@@ -626,14 +626,14 @@ def actor_move(t):
if world_db["Things"][id]["T_POSX"] == move_result[2]]
if len(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
- hitted_type = world_db["Things"][hit_id]["T_TYPE"]
- hitted_name = world_db["ThingTypes"][hitted_type]["TT_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")
+ if t == world_db["Things"][0]:
+ hitted_name = world_db["ThingTypes"][hitted_type]["TT_NAME"]
+ strong_write(io_db["file_out"], "LOG You wound " + hitted +
+ ".\n")
+ elif 0 == hit_id:
+ hitter_name = world_db["ThingTypes"][t["T_TYPE"]]["TT_NAME"]
+ strong_write(io_db["file_out"], "LOG " + hitter +
+ " wounds you.\n")
decrement_lifepoints(world_db["Things"][hit_id])
return
dir = [dir for dir in directions_db
@@ -756,9 +756,6 @@ def try_healing(t):
t["T_SATIATION"] -= 32
if t == world_db["Things"][0]:
strong_write(io_db["file_out"], "LOG You heal.\n")
- else:
- name = world_db["ThingTypes"][t["T_TYPE"]]["TT_NAME"]
- strong_write(io_db["file_out"], "LOG " + name + "heals.\n")
def hunger(t):
@@ -772,10 +769,6 @@ def hunger(t):
if int(int(testbase / stomach) / ((rand.next() % stomach) + 1)):
if t == world_db["Things"][0]:
strong_write(io_db["file_out"], "LOG You suffer from hunger.\n")
- else:
- name = world_db["ThingTypes"][t["T_TYPE"]]["TT_NAME"]
- strong_write(io_db["file_out"], "LOG " + name +
- " suffers from hunger.\n")
decrement_lifepoints(t)