Anonymous

Module:Monsters: Difference between revisions

From Melvor Idle
Amended for gameData updates
No edit summary
(Amended for gameData updates)
Line 72: Line 72:
elseif statName == 'damageReduction' then
elseif statName == 'damageReduction' then
return p.getEquipmentStat(monster, 'damageReduction')
return p.getEquipmentStat(monster, 'damageReduction')
elseif statName == 'resistance' then
elseif statName == 'resistanceAbyssal' then
return p.getEquipmentStat(monster, 'resistance')
return p.getEquipmentStat(monster, 'resistanceAbyssal')
elseif statName == 'resistanceEternal' then
return p.getEquipmentStat(monster, 'resistanceEternal')
elseif statName == 'drReduction' then
elseif statName == 'drReduction' then
return p._getMonsterDrReduction(monster)
return p._getMonsterDrReduction(monster)
Line 362: Line 364:
function p._getMonsterResistance(monster)
function p._getMonsterResistance(monster)
local amount, text = nil, nil
local amount, text = nil, nil
if monster.damageType == 'melvorItA:Abyssal' then
-- Currently all Eternal damage monsters have Abyssal Resistance
amount = p._getMonsterStat(monster, 'resistance')
-- This may change in the future. If so, uncomment the below and delete this.
if monster.damageType == 'melvorItA:Abyssal' or monster.damageType == 'melvorItA:Eternal' then
amount = p._getMonsterStat(monster, 'resistanceAbyssal')
text = 'Abyssal Resistance'
text = 'Abyssal Resistance'
--elseif monster.damageType == 'melvorItA:Eternal' then
-- amount = p._getMonsterStat(monster, 'resistanceEternal')
-- text = 'Eternal Resistance'
else
else
amount = p._getMonsterStat(monster, 'damageReduction')
amount = p._getMonsterStat(monster, 'damageReduction')