Page 1 of 1

How does Lethality work???

Posted: Thu Jul 17, 2014 9:15 pm
by Sradac
Im a bit confused here.

Code: Select all

newTalent{
	name = "Lethality",
	type = {"cunning/lethality", 1},
	mode = "passive",
	points = 5,
	require = cuns_req1,
	critpower = function(self, t) return self:combatTalentScale(t, 7.5, 25, 0.75) end,
	-- called by _M:combatCrit in mod.class.interface.Combat.lua
	getCriticalChance = function(self, t) return self:combatTalentScale(t, 2.3, 7.5, 0.75) end,
	passives = function(self, t, p)
		self:talentTemporaryValue(p, "combat_critical_power", t.critpower(self, t))
	end,
	info = function(self, t)
		local critchance = t.getCriticalChance(self, t)
		local power = t.critpower(self, t)
		return ([[You have learned to find and hit weak spots. All your strikes have a %0.2f%% greater chance to be critical hits, and your critical hits do %0.1f%% more damage.
		Also, when using knives, you now use your Cunning instead of your Strength for bonus damage.]]):
		format(critchance, power)
	end,
}
All i'm seeing is critical chance / power modifiers. Where is it defined to say "if dagger & knows lethality, use cunning for physical power"??

I dont see any references to external files here, and I'm not pulling anything up in my quick searches checking for the lethality talent.

I ask, because I want to make one that does something similar but for a different weapon type.

Re: How does Lethality work???

Posted: Thu Jul 17, 2014 9:21 pm
by Sradac
nevermind, found it in combat.lua

So my next question is, do I have to superload combat.lua if I want to do this, or can I put this function in any file I want and load it?

Re: How does Lethality work???

Posted: Fri Jul 18, 2014 2:10 am
by HousePet
You have to superload the relevant part of combat.lua