Ignore Direct Crits is confusing

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

Ignore Direct Crits is confusing

#1 Post by edge2054 »

object.lua

Code: Select all

		compare_fields(w, compare_with, field, "ignore_direct_crits", "%-.2f%%", "Reduces incoming crit damage: ")
talents.ooze.lua

Code: Select all

All direct critical hits (physical, mental, spells) against you have a %d%% lower Critical multiplier (but always do at least normal damage).
talents.frost-alchemy.lua

Code: Select all

All direct critical hits (physical, mental, spells) against you have a %d%% lower Critical multiplier (but always do at least normal damage).
timed-effects.physical.lua

Code: Select all

long_desc = function(self, eff) return ("Reduces physical damage received by %d%% and provides %d%% chances to ignore critial hits."):format(eff.power, eff.crits) end,
superiority.lua

Code: Select all

Improves physical damage reduction by %d%% and provides %d%% chances to shrug off critical damage for 20 turns.]]):
CharacterSheet.lua (this one's pretty vague)

Code: Select all

text = compare_fields(player, actor_to_compare, function(actor, ...) return actor:attr("ignore_direct_crits") or 0 end, "%d%%", "%+.0f%%")
		self:mouseTooltip(self.TOOLTIP_CRIT_SHRUG,s:drawColorStringBlended(self.font,           ("Crit. Shrug Off : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h
Finally.. the actual code.

damage_types.lua

Code: Select all

		if src.turn_procs and src.turn_procs.is_crit and target:attr("ignore_direct_crits") and rng.percent(target:attr("ignore_direct_crits")) then
			dam = dam / src.turn_procs.crit_power
			print("[PROJECTOR] crit power reduce dam", dam)
			game.logSeen(target, "%s shrugs off the critical damage!", target.name:capitalize())
		elseif src.turn_procs and src.turn_procs.is_crit and src.turn_procs.shadowstrike_crit and src.x then
			local d = core.fov.distance(src.x, src.y, x, y)
			if d > 3 then
				local reduc = math.scale(d, 3, 10, 0, 1)
				dam = dam * (src.turn_procs.crit_power - reduc * src.turn_procs.shadowstrike_crit) / src.turn_procs.crit_power
				print("[PROJECTOR] shadowstrike crit power reduce dam on range", dam, d, reduc, "::", src.turn_procs.crit_power, "=>", src.turn_procs.crit_power - reduc * src.turn_procs.shadowstrike_crit)
			end
		end
So the correct description is chance to avoid critical damage outright. I kinda don't like this though as it's really similar to just reducing crits all together (-X% chance to not be crit vs. rng chance to not be crit).

Post Reply