How does Lethality work???

A place to post your add ons and ideas for them

Moderator: Moderator

Post Reply
Message
Author
Sradac
Sher'Tul
Posts: 1081
Joined: Fri Sep 21, 2007 3:18 am
Location: Angolwen

How does Lethality work???

#1 Post 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.

Sradac
Sher'Tul
Posts: 1081
Joined: Fri Sep 21, 2007 3:18 am
Location: Angolwen

Re: How does Lethality work???

#2 Post 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?

HousePet
Perspiring Physicist
Posts: 6215
Joined: Sun Sep 09, 2012 7:43 am

Re: How does Lethality work???

#3 Post by HousePet »

You have to superload the relevant part of combat.lua
My feedback meter decays into coding. Give me feedback and I make mods.

Post Reply