Module:Monsters: Difference between revisions

Fixed some minor issues affecting Magic monster max hits
(Added nolink option to getMonsterStyleIcon)
(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
      mw.logObject(mSpell)
       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