Anonymous

Module:Monsters: Difference between revisions

From Melvor Idle
Added getMonsterAttackSpeed
(Slight change to formatting)
(Added getMonsterAttackSpeed)
Line 30: Line 30:
   if monster ~= nil then
   if monster ~= nil then
     return monster.hitpoints * 10
     return monster.hitpoints * 10
  else
    return "ERROR: No monster with that name found"
  end
end
function p.getMonsterAttackSpeed(frame)
  local MonsterName = frame.args ~= nil and frame.args[1] or frame
  local monster = p.getMonster(MonsterName)
  if monster ~= nil then
    return monster.attackSpeed / 1000
   else
   else
     return "ERROR: No monster with that name found"
     return "ERROR: No monster with that name found"