Anonymous

Module:Monsters: Difference between revisions

From Melvor Idle
fixed getMonsterEffectiveBarrier, i think
(added p.getMonsterEffectiveBarrier i hope this doesnt break anything)
(fixed getMonsterEffectiveBarrier, i think)
Line 147: Line 147:
local monster = p.getMonster(MonsterName)
local monster = p.getMonster(MonsterName)
if monster ~= nil then
if monster ~= nil then
return math.floor((p.getMonsterBarrier(monster)/(1 - p._getMonsterStat(monster, 'damageReduction')/100)) + 0.5)
return math.floor((p._getMonsterBarrier(monster)/(1 - p._getMonsterStat(monster, 'damageReduction')/100)) + 0.5)
else
else
return Shared.printError('No monster with that name found')
return Shared.printError('No monster with that name found')