Battle Shout uses healing factor and itself

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
Hachem_Muche
Uruivellas
Posts: 744
Joined: Thu Nov 18, 2010 6:42 pm

Battle Shout uses healing factor and itself

#1 Post by Hachem_Muche »

When using Battle shout, the actual health gained is compounded by the increase in maximum life and is affected by the healing factor. This means that, usually, more (sometimes much more) health is gained than is needed to match the increased limit and that it is possible to actually lose life when using this talent.

Fix:

Code: Select all

Index: game/modules/tome/data/timed_effects/mental.lua
===================================================================
--- game/modules/tome/data/timed_effects/mental.lua	(revision 6307)
+++ game/modules/tome/data/timed_effects/mental.lua	(working copy)
@@ -131,9 +131,10 @@
 	status = "beneficial",
 	parameters = { power=10 },
 	activate = function(self, eff)
-		eff.life = self:addTemporaryValue("max_life", self.max_life * eff.power / 100)
+		local lifeb = self.max_life * eff.power / 100
+		eff.life = self:addTemporaryValue("max_life", lifeb)
 		eff.stamina = self:addTemporaryValue("max_stamina", self.max_stamina * eff.power / 100)
-		self:heal(self.max_life * eff.power / 100)
+		self.life = self.life + lifeb
 		self:incStamina(self.max_stamina * eff.power / 100)
 	end,
 	deactivate = function(self, eff)
Author of the Infinite 500 and PlenumTooltip addons, and the joys of Scaling in ToME.

Post Reply