4,951
edits
Falterfire (talk | contribs) (Added nolink option to getMonsterStyleIcon) |
Falterfire (talk | contribs) (Fixed some minor issues affecting Magic monster max hits) |
||
Line 271: | Line 271: | ||
elseif monster.attackType == Constants.attackType.Magic then | elseif monster.attackType == Constants.attackType.Magic then | ||
local mSpell = nil | local mSpell = nil | ||
if monster.selectedSpell ~= nil then Magic.getSpellByID(monster.selectedSpell) end | if monster.selectedSpell ~= nil then mSpell = Magic.getSpellByID(monster.selectedSpell) end | ||
if mSpell == nil then | if mSpell == nil then | ||
return math.floor(10 * monster.setMaxHit + (monster.setMaxHit * monster.damageBonusMagic / 100)) | return math.floor(10 * (monster.setMaxHit + (monster.setMaxHit * monster.damageBonusMagic / 100))) | ||
else | else | ||
return math.floor(10 * (mSpell.maxHit + (mSpell.maxHit * monster.damageBonusMagic / 100))) | |||
return math.floor(10 * mSpell.maxHit + (mSpell.maxHit * monster.damageBonusMagic / 100)) | |||
end | end | ||
else | else |