Skip to content
Snippets Groups Projects
Commit 8d94a8d6 authored by DarkGod's avatar DarkGod
Browse files

Merge branch 'ArmorDefense' into 'master'

Armor defense

Defense:  A year ago or so Combat Accuracy was updated to use a standard scaling function instead of TL*10, which was resulting in highly scaled NPCs getting 200-400+ accuracy from one talent, thus completely destroying the defense stat.  As it turns out, combatBaseAttack was not calling getAttack at all and just multiplying the talent level by 10. The tooltip showed the update but it never actually happened.

This formula matches TL*10 decently well for most of the early/mid game scaling up to TL7 or so, but at higher levels of scaling it is a *massive* nerf.  Which is needed because as it turns accuracy regularly passing 90-120 on higher difficulties is kind of dumb.  I suspect this formula is still hitting the very high end cases a bit too hard, but we can revisit that if needed.

Defense should be much, MUCH more viable now.

Heavy Armor Training:  Updated to use a scaling function instead of TL*1.4*Armor type mod.  The new values closely match the old ones for TL1-5 but are nerfed slightly, mostly in the crit avoidance part.

The main impact of this is avoiding randbosses being generated with insane armor, and general mechanical consistency.  The vast majority of NPC armor as is comes from this talent and Shield Wall.

See merge request !389
parents 26c0468c 8040cde1
No related branches found
No related tags found
1 merge request!389Armor defense
Pipeline #
......@@ -1331,7 +1331,8 @@ end
--- Gets the attack
function _M:combatAttackBase(weapon, ammo)
weapon = weapon or self.combat or {}
local atk = 4 + self.combat_atk + self:getTalentLevel(Talents.T_WEAPON_COMBAT) * 10 + (weapon.atk or 0) + (ammo and ammo.atk or 0) + (self:getLck() - 50) * 0.4
local talent = self:callTalent(self.T_WEAPON_COMBAT, "getAttack")
local atk = 4 + self.combat_atk + talent + (weapon.atk or 0) + (ammo and ammo.atk or 0) + (self:getLck() - 50) * 0.4
if self:knowTalent(self["T_RESHAPE_WEAPON/ARMOUR"]) then atk = atk + self:callTalent(self["T_RESHAPE_WEAPON/ARMOUR"], "getDamBoost", weapon) end
......@@ -2423,6 +2424,7 @@ function _M:combatShieldBlock()
local block = combat1.block or 0
if combat2 then block = block + (combat2.block or 0) end
if self:attr("block_bonus") then block = block + self:attr("block_bonus") end
return block
end
......
......@@ -56,13 +56,13 @@ newTalent{
return 0
end,
-- Called by _M:combatArmor in mod.class.interface.Combat.lua
getArmor = function(self, t) return self:getTalentLevel(t) * t.ArmorEffect(self, t) * 1.4 end,
getArmor = function(self, t) return self:combatTalentScale(t, 1, 7) * t.ArmorEffect(self, t) end,
-- Called by _M:combatArmorHardiness in mod.class.interface.Combat.lua
getArmorHardiness = function(self, t) -- Matches previous progression for "heavy" armor
return math.max(0, self:combatLimit(self:getTalentLevel(t) * 5 * t.ArmorEffect(self, t), 100, 5, 3.75, 50, 37.5))
end,
getCriticalChanceReduction = function(self, t) -- Matches previous progression for "heavy" armor
return math.max(0, self:combatScale(self:getTalentLevel(t) * 3.8 * (t.ArmorEffect(self, t)/2)^0.5, 3.8, 3.3, 19, 16.45, 0.75))
getCriticalChanceReduction = function(self, t)
return self:combatTalentScale(t, 1, 9) * t.ArmorEffect(self, t)
end,
on_unlearn = function(self, t)
for inven_id, inven in pairs(self.inven) do if inven.worn then
......@@ -155,7 +155,6 @@ newTalent{
points = 5,
require = { level=function(level) return (level - 1) * 4 end },
mode = "passive",
--getAttack = function(self, t) return self:getTalentLevel(t) * 10 end,
getAttack = function(self, t) return self:combatTalentScale(t, 10, 50) end, -- match values at 1 and 5 for old formula
info = function(self, t)
local attack = t.getAttack(self, t)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment