Page 1 of 1

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

Posted: Tue Jun 07, 2011 10:38 pm
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.

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

Posted: Wed Jul 20, 2011 9:46 pm
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,
 }