Module:Monsters: Difference between revisions

added p.getMonsterEffectiveBarrier i hope this doesnt break anything
m (Additional line break)
(added p.getMonsterEffectiveBarrier i hope this doesnt break anything)
Line 138: Line 138:
if monster ~= nil then
if monster ~= nil then
return math.floor((p._getMonsterHP(monster)/(1 - p._getMonsterStat(monster, 'damageReduction')/100)) + 0.5)
return math.floor((p._getMonsterHP(monster)/(1 - p._getMonsterStat(monster, 'damageReduction')/100)) + 0.5)
else
return Shared.printError('No monster with that name found')
end
end
function p.getMonsterEffectiveBarrier(frame)
local MonsterName = frame.args ~= nil and frame.args[1] or frame
local monster = p.getMonster(MonsterName)
if monster ~= nil then
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')
587

edits