Grim Resolve not curing disease/poisons

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

Grim Resolve not curing disease/poisons

#1 Post by Hachem_Muche »

This is an old bug (see http://forums.te4.org/viewtopic.php?f=4 ... ve#p135752 and http://forums.te4.org/viewtopic.php?f=4 ... im+resolve)

Grim Resolve does not cure disease and poisons like it's supposed to. Fix:

Code: Select all

 game/modules/tome/data/timed_effects/other.lua | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/game/modules/tome/data/timed_effects/other.lua b/game/modules/tome/data/timed_effects/other.lua
index dc58dd0..66a3fe3 100644
--- a/game/modules/tome/data/timed_effects/other.lua
+++ b/game/modules/tome/data/timed_effects/other.lua
@@ -1493,6 +1493,15 @@ newEffect{
 				self.tempeffect_def[self.EFF_CURSED_FORM].updateEffect(self, eff)
 			end
 		end
+		if (eff.statChange or 0)>0 and eff.neutralizeChance then -- Remove poisons/disease (w/Grim Resolve)
+			local efdef
+			for efid, ef in pairs(self.tmp) do
+				efdef = self.tempeffect_def[efid]
+				if efdef.subtype and (efdef.subtype.poison or efdef.subtype.disease) and rng.percent(eff.neutralizeChance) then
+					self:removeEffect(efid)
+				end
+			end
+		end
 	end,
 }
 
Author of the Infinite 500 and PlenumTooltip addons, and the joys of Scaling in ToME.

Post Reply