Skip to content
Snippets Groups Projects
Commit 63356fb5 authored by DarkGod's avatar DarkGod
Browse files

Merge branch 'melee-damage' into 'master'

Adjust melee damage

The current combatDamage formula adds total weapon stat bonuses to weapon damage, leading to the percent damage on weapon tooltips not being accurate and there being relatively little difference in damage between tiers of weapons. Weapons such as psiblades also deal more damage than would be expected for their low base damage, often having an individual psiblade more powerful than a two handed weapon lategame.  

This merge request would remove this total weapon stat bonuses contribution to combatDamagePower. Doing so in a vacuum would lead to melee damage being too low, so this also changes the totstat contribution to physical power; presently, totstat is added to combatPhysicalpower during its calculation, effectively acting as raw physical power. I propose instead individually rescaling totstat and adding this rescaled statmod to combatPhysicalpower as effective physical power. This is an intermediary between the combatDamage formula used in 1.5, where totstat was added as effective physical power without any alterations, and the present calculation in 1.6.4.  

These changes would lead to approximately the same damage as 1.6.4 early game and midgame, and about 60-70% the damage of 1.5.10 lategame. The purpose of these changes is not necessarily to change melee damage numbers from 1.6.4 (though there is a small increase on average) but rather to reduce the current overwhelming dominance of total weapon stat bonuses on weapon damage and re-emphasize other aspects of the combatDamage calculation. In doing so, base damage will be made more relevant   

See merge request !599
parents d35532f1 0316b96c
No related branches found
No related tags found
No related merge requests found
......@@ -1433,20 +1433,24 @@ function _M:rescaleDamage(dam)
end
--Diminishing-returns method of scaling combat stats, observing this rule: the first twenty ranks cost 1 point each, the second twenty cost two each, and so on. This is much, much better for players than some logarithmic mess, since they always know exactly what's going on, and there are nice breakpoints to strive for.
function _M:rescaleCombatStats(raw_combat_stat_value, interval)
-- raw_combat_stat_value = the value being rescaled
-- interval = ranks until cost of each effective stat value increases (default 20)
-- step = increase in cost of raw_combat_stat_value to give 1 effective stat value each interval (default 1)
function _M:rescaleCombatStats(raw_combat_stat_value, interval, step)
local x = raw_combat_stat_value
-- the rescaling plot is a convex hull of functions x, 20 + (x - 20) / 2, 40 + (x - 60) / 3, ...
-- we find the value just by applying minimum over and over
local result = x
interval = interval or 20
local shift, tier, base = 2, interval, interval
step = step or 1
local shift, tier, base = 1 + step, interval, interval
while true do
local nextresult = tier + (x - base) / shift
if nextresult < result then
result = nextresult
base = base + interval * shift
tier = tier + interval
shift = shift + 1
shift = shift + step
else
return math.floor(result)
end
......@@ -1662,11 +1666,12 @@ function _M:combatDamage(weapon, adddammod, damage)
totstat = totstat + self:getStat(stat) * mod
end
end
if self:knowTalent(self["T_FORM_AND_FUNCTION"]) then totstat = totstat + self:callTalent(self["T_FORM_AND_FUNCTION"], "getDamBoost", weapon) end
local talented_mod = 1 + self:combatTrainingPercentInc(weapon)
local power = self:combatDamagePower(damage or weapon, totstat)
local phys = self:combatPhysicalpower(nil, weapon, totstat)
return self:rescaleDamage(0.3 * phys * power * talented_mod)
local power = self:combatDamagePower(damage or weapon)
local phys = self:combatPhysicalpower(nil, weapon)
local statmod = self:rescaleCombatStats(totstat, 45, 1/3) -- totstat tends to be lower than values of powers and saves so default interval and step size is too harsh; instead use wider intervals and 1/3 step size
return self:rescaleDamage(0.3 * (phys + statmod) * power * talented_mod)
end
--- Gets the 'power' portion of the damage
......@@ -1674,6 +1679,8 @@ function _M:combatDamagePower(weapon_combat, add)
if not weapon_combat then return 1 end
local power = math.max((weapon_combat.dam or 1) + (add or 0), 1)
if self:knowTalent(self["T_FORM_AND_FUNCTION"]) then power = power + self:callTalent(self["T_FORM_AND_FUNCTION"], "getDamBoost", weapon) end
return (math.sqrt(power / 10) - 1) * 0.5 + 1
end
......
......@@ -115,7 +115,7 @@ newTalent{
local arm = t.armorBoost(self, t)
local fat = t.fatigueBoost(self, t)
return ([[Manipulate forces on the molecular level to realign, rebalance, and synergize equipment you wear to your form and function.
Any weapon you wield will gain a boost of %d to both accuracy and power. (The power is treated like an increase to your stats. Mindstars cannot be manipulated in this way because they are already in an ideal natural state.)
The accuracy and damage of any weapon will act as if it were %d higher. (Mindstars cannot be manipulated in this way because they are already in an ideal natural state.)
Your total armour will increase by %d and your fatigue will decrease by %d for each body armour and shield worn.
The effects increase with your Mindpower.]]):
format(weapon_boost, arm, fat)
......
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