player dies in orc ambush if "Enrage" is in effect

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
tiger_eye
Perspiring Physicist
Posts: 889
Joined: Thu Feb 17, 2011 5:20 am

player dies in orc ambush if "Enrage" is in effect

#1 Post by tiger_eye »

"cursed/cursed-form - Enrage" adds hitpoints to the player. When the effect ends, it reduces the max HP as well as current HP by the same amount. Hence, if the player loses against the orc ambush when Enrage is in effect, the effect gets removed and the player is killed.

tiger_eye
Perspiring Physicist
Posts: 889
Joined: Thu Feb 17, 2011 5:20 am

Re: player dies in orc ambush if "Enrage" is in effect

#2 Post by tiger_eye »

This is still an issue as far as I'm aware.

So, how about instead of dying when "Enrage" deactivates, how about having 1 hitpoint and being stunned for 3 turns. Still harsh, but anything is better than dying ;-). Patch attached:

Code: Select all

Index: game/modules/tome/data/timed_effects.lua
===================================================================
--- game/modules/tome/data/timed_effects.lua	(revision 3922)
+++ game/modules/tome/data/timed_effects.lua	(working copy)
@@ -2003,8 +2003,9 @@
 		self.life = self.life - eff.life
 		self.changed = true
 		if self.life <= 0 then
-			game.logSeen(self, "%s died when the effects of increased life wore off.", self.name:capitalize())
-			self:die(self)
+			self.life = 1
+			self:setEffect(target.EFF_STUNNED, 3, {})
+			game.logSeen(self, "%s's increased life wears off and is stunned by the change.", self.name:capitalize())
 		end
 	end,
 }
Attachments
kinder_enrage.txt
(657 Bytes) Downloaded 110 times

Post Reply