Dismissal Bug

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
edge2054
Retired Ninja
Posts: 3756
Joined: Fri May 28, 2010 4:38 pm

Dismissal Bug

#1 Post by edge2054 »

Code: Select all

	doDismissalOnHit = function(self, value, src, t)
		local saving_throw = self:combatMentalResist() * t.getSavePercentage(self, t)
		print("[Dismissal] ", self.name:capitalize(), " attempting to ignore ", value, "damage from ", src.name:capitalize(), "using", saving_throw,  "mental save.")
		if self:checkHit(saving_throw, value) then
			local dismissed = value * 1/self:mindCrit(2) -- Diminishing returns on high crits
			game:delayedLogMessage(self, nil, "Dismissal", "#TAN##Source# mentally dismisses some damage!")
			game:delayedLogDamage(src, self, 0, ("#TAN#(%d dismissed)#LAST#"):format(dismissed))
			return value - dismissed
		else
			return value
		end
	end,
This code reduces damage by less with crits. The effect should give a bigger reduction on crits not less.

It used to cap at 100% reduction with 200% crit rate. I'm not sure why it was changed (the commit was for infinite scaling).

Here's the old code.

Code: Select all

	doDismissalOnHit = function(self, value, src, t)
		local saving_throw = self:combatMentalResist() * t.getSavePercentage(self, t)
		print("[Dismissal] ", self.name:capitalize(), " attempting to ignore ", value, "damage from ", src.name:capitalize(), "using", saving_throw,  "mental save.")
		if self:checkHit(saving_throw, value) then
			game.logSeen(self, "%s dismisses %s's damage!", self.name:capitalize(), src.name:capitalize())
			return value * math.max(0, 1 - self:mindCrit(0.5))
		else
			return value
		end
	end,

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Dismissal Bug

#2 Post by darkgod »

fixed
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Post Reply