From: Christian Heller Date: Tue, 10 Mar 2015 19:52:46 +0000 (+0100) Subject: Let death/killing of creatures affect God's mood and favor by type. X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/decks/%7B%7Bdeck_id%7D%7D/day?a=commitdiff_plain;h=5c20916347a0d272100fdb451e4726127742012f;p=plomrogue Let death/killing of creatures affect God's mood and favor by type. --- diff --git a/roguelike-server b/roguelike-server index 98a92df..7eaf5a3 100755 --- a/roguelike-server +++ b/roguelike-server @@ -587,7 +587,8 @@ def decrement_lifepoints(t): t["T_LIFEPOINTS"] -= 1 world_db["GOD_MOOD"] -= 1 # # if 0 == t["T_LIFEPOINTS"]: - world_db["GOD_MOOD"] -= 9 # # + sadness = world_db["ThingTypes"][t["T_TYPE"]]["TT_LIFEPOINTS"] # # + world_db["GOD_MOOD"] -= sadness # # t["T_TYPE"] = world_db["ThingTypes"][t["T_TYPE"]]["TT_CORPSE_ID"] if world_db["Things"][0] == t: t["fovmap"] = bytearray(b' ' * (world_db["MAP_LENGTH"] ** 2)) @@ -597,7 +598,7 @@ def decrement_lifepoints(t): t["T_MEMMAP"] = False t["T_MEMDEPTHMAP"] = False t["T_MEMTHING"] = [] - return 1 # # + return sadness # # return 0 # # @@ -644,7 +645,7 @@ def actor_move(t): " wounds you.\n") test = decrement_lifepoints(world_db["Things"][hit_id]) # # if test and t == world_db["Things"][0]: # # - world_db["GOD_FAVOR"] -= 10 # # + world_db["GOD_FAVOR"] -= test # # return dir = [dir for dir in directions_db if directions_db[dir] == chr(t["T_ARGUMENT"])][0] diff --git a/testing/ref_end b/testing/ref_end index 1c45446..5b81aa6 100644 --- a/testing/ref_end +++ b/testing/ref_end @@ -1,7 +1,7 @@ MAP_LENGTH 64 PLAYER_TYPE 0 GOD_FAVOR 0 -GOD_MOOD -86 +GOD_MOOD -74 TURN 151 SEED_MAP 1426014220 TA_ID 1