Code: Select all
compare_fields(w, compare_with, field, "ignore_direct_crits", "%-.2f%%", "Reduces incoming crit damage: ")
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).
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).
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,
Code: Select all
Improves physical damage reduction by %d%% and provides %d%% chances to shrug off critical damage for 20 turns.]]):
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
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