home · contact · privacy
Let death/killing of creatures affect God's mood and favor by type.
authorChristian Heller <c.heller@plomlompom.de>
Tue, 10 Mar 2015 19:52:46 +0000 (20:52 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Tue, 10 Mar 2015 19:52:46 +0000 (20:52 +0100)
roguelike-server
testing/ref_end

index 98a92dff04653ac5cc6063a704d14bc98f63f88e..7eaf5a347b4e938a82b20022571ee33ec32c9a30 100755 (executable)
@@ -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]
index 1c4544678a1ebbae42827ff4cc157c829e926ac2..5b81aa6c5f9bfb7c84ac3f1b5ea8e4cd43f021d9 100644 (file)
@@ -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