diff --git a/src/Data/ModCache.lua b/src/Data/ModCache.lua index a3a2108cc7..81cb75c646 100755 --- a/src/Data/ModCache.lua +++ b/src/Data/ModCache.lua @@ -4752,7 +4752,7 @@ c["You have a Smoke Cloud around you while stationary"]={nil,"a Smoke Cloud arou c["You have no Accuracy Penalty at Distance"]={{[1]={flags=0,keywordFlags=0,name="NoAccuracyDistancePenalty",type="FLAG",value=true}},nil} c["You have no Elemental Resistances"]={{[1]={flags=0,keywordFlags=0,name="FireResist",type="OVERRIDE",value=0},[2]={flags=0,keywordFlags=0,name="ColdResist",type="OVERRIDE",value=0},[3]={flags=0,keywordFlags=0,name="LightningResist",type="OVERRIDE",value=0}},nil} c["You have no Life Regeneration"]={{[1]={flags=0,keywordFlags=0,name="NoLifeRegen",type="FLAG",value=true}},nil} -c["You have no Mana"]={{[1]={flags=0,keywordFlags=0,name="Mana",type="MORE",value=-100}},nil} +c["You have no Mana"]={{[1]={flags=0,keywordFlags=0,name="Mana",type="OVERRIDE",value=0}},nil} c["You have no Spirit"]={{[1]={flags=0,keywordFlags=0,name="Spirit",type="OVERRIDE",value=0}},nil} c["You lose 5% of maximum Energy Shield per second"]={{[1]={flags=0,keywordFlags=0,name="EnergyShieldDegenPercent",type="BASE",value=5}},nil} c["You take 10% of damage from Blocked Hits"]={{[1]={flags=0,keywordFlags=0,name="BlockEffect",type="BASE",value=10}},nil} diff --git a/src/Modules/CalcDefence.lua b/src/Modules/CalcDefence.lua index d3f07bab77..7ded792ebb 100644 --- a/src/Modules/CalcDefence.lua +++ b/src/Modules/CalcDefence.lua @@ -1263,6 +1263,10 @@ function calcs.defence(env, actor) end for _, source in ipairs(resourceList) do local globalBase = modDB:Sum("BASE", nil, unpack(source.mods)) + source.globalBase + local globalOverride = modDB:Override(nil, unpack(source.mods)) + if globalOverride then + globalBase = globalOverride + end for _, target in ipairs(resourceList) do if source.name ~= target.name then if source.defence then @@ -1293,7 +1297,7 @@ function calcs.defence(env, actor) local gainRate = modDB:Sum("BASE", nil, source.name .. "GainAs" .. target.name) local rate = source.conversionRate[target.name] + gainRate if rate > 0 then - local targetBase = globalBase * rate / 100 + local targetBase = math.ceil(globalBase * rate / 100) target.globalBase = target.globalBase + targetBase if breakdown then breakdown.slot("Conversion", source.name .. " to " .. target.name, nil, targetBase, nil, unpack(target.mods)) diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index 58f752d8da..aed29de07e 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -2191,11 +2191,11 @@ local specialModList = { mod("LightningDamageConvertToChaos", "BASE", 100), }, ["all damage is taken from mana before life"] = { mod("DamageTakenFromManaBeforeLife", "BASE", 100) }, - ["removes all mana%. spend life instead of mana for skills"] = { mod("Mana", "MORE", -100), flag("CostLifeInsteadOfMana") }, - ["removes all mana"] = { mod("Mana", "MORE", -100) }, - ["you have no mana"] = { mod("Mana", "MORE", -100) }, + ["removes all mana%. spend life instead of mana for skills"] = { mod("Mana", "OVERRIDE", 0 ), flag("CostLifeInsteadOfMana") }, + ["removes all mana"] = { mod("Mana", "OVERRIDE", 0 ) }, + ["you have no mana"] = { mod("Mana", "OVERRIDE", 0 ) }, ["doubles mana costs"] = { mod("ManaCost", "MORE", 100) }, - ["removes all energy shield"] = { mod("EnergyShield", "MORE", -100) }, + ["removes all energy shield"] = { mod("EnergyShield", "OVERRIDE", 0 ) }, ["converts all energy shield to mana"] = { mod("EnergyShieldConvertToMana", "BASE", 100) }, ["skills cost life instead of mana"] = { flag("CostLifeInsteadOfMana") }, ["skills reserve life instead of mana"] = { flag("BloodMagicReserved") }, @@ -4554,21 +4554,21 @@ local specialModList = { ["cannot gain spirit from equipment"] = { flag("CannotGainSpiritFromEquipment")}, ["life that would be lost by taking damage is instead reserved"] = { flag("DamageInsteadReservesLife") }, ["you have no armour or energy shield"] = { - mod("Armour", "MORE", -100), - mod("EnergyShield", "MORE", -100), + mod("Armour", "OVERRIDE", 0 ), + mod("EnergyShield", "OVERRIDE", 0 ), }, ["you have no armour or maximum energy shield"] = { - mod("Armour", "MORE", -100), - mod("EnergyShield", "MORE", -100), + mod("Armour", "OVERRIDE", 0 ), + mod("EnergyShield", "OVERRIDE", 0 ), }, ["defences are zero"] = { - mod("Armour", "MORE", -100), - mod("EnergyShield", "MORE", -100), - mod("Evasion", "MORE", -100), - mod("Ward", "MORE", -100), + mod("Armour", "OVERRIDE", 0 ), + mod("EnergyShield", "OVERRIDE", 0 ), + mod("Evasion", "OVERRIDE", 0 ), + mod("Ward", "OVERRIDE", 0 ), }, ["you have no intelligence"] = { - mod("Int", "MORE", -100), + mod("Int", "OVERRIDE", 0 ), }, ["elemental resistances are zero"] = { mod("FireResist", "OVERRIDE", 0),