Module:SummonableCreatureData: Difference between revisions

From UO Outlands Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
-- Base summons; Default and unique (non-tamable) summons
-- Unique summons, non-tameable not necro reskins
local p = {
local p = {
   ["Daemon"] = {
   ["Daemon"] = {
Line 23: Line 23:
     ["armor"] = 50,
     ["armor"] = 50,
     ["magicresist"] = 100,
     ["magicresist"] = 100,
    ["passiveability"] = "Bleed",
     ["innateability"] = "Cleave",
     ["innateability"] = "Cleave",
     ["spellname"] = "Air Elemental",
     ["spellname"] = "Air Elemental",
Line 80: Line 79:
     ["armor"] = 50,
     ["armor"] = 50,
     ["magicresist"] = 100,
     ["magicresist"] = 100,
     ["poisonresist"] = .33,
     ["poisonresist"] = 0.33,
     ["specialresist"] = .33,
     ["specialresist"] = 0.33,
     ["innateability"] = "Discharge",
     ["innateability"] = "Discharge",
     ["spellname"] = "Energy Vortex",
     ["spellname"] = "Energy Vortex",
Line 90: Line 89:
     ["combat"] = "Melee",
     ["combat"] = "Melee",
     ["hits"] = 300,
     ["hits"] = 300,
     ["mindmg"] = 20,
     ["mindmg"] = 18,
     ["maxdmg"] = 24,
     ["maxdmg"] = 22,
     ["wrestling"] = 90,
     ["wrestling"] = 90,
     ["armor"] = 50,
     ["armor"] = 50,
     ["magicresist"] = 100,
     ["magicresist"] = 50,
     ["poisonresist"] = .33,
     ["poisonresist"] = 0.33,
     ["specialresist"] = .33,
     ["specialresist"] = 0.33,
     ["innateability"] = "Diversion",
     ["innateability"] = "Diversion",
     ["spellname"] = "Blade Spirits",
     ["spellname"] = "Blade Spirits",
     ["spellicon"] = "bladespirit1",
     ["spellicon"] = "bladespirit1",
   },
   },
   ["Polar Bear"] = {
   ["Zombie"] = {
    ["slots"] = 1,
    ["combat"] = "Melee",
    ["hits"] = 175,
    ["mindmg"] = 18,
    ["maxdmg"] = 22,
    ["wrestling"] = 55,
    ["armor"] = 25,
    ["magicresist"] = 50,
    ["passiveability"] = "Enrage",
    ["spellname"] = "Summon Creature",
    ["spellicon"] = "summoncreature",
  },
  ["Sand Crab"] = {
    ["slots"] = 1,
    ["combat"] = "Melee",
    ["hits"] = 125,
    ["mindmg"] = 16,
    ["maxdmg"] = 20,
    ["wrestling"] = 60,
    ["armor"] = 75,
    ["magicresist"] = 50,
    ["cooldownability"] = "Crush",
    ["spellname"] = "Summon Creature",
    ["spellicon"] = "summoncreature",
  },
  ["Grizzly Bear"] = {
     ["slots"] = 1,
     ["slots"] = 1,
     ["combat"] = "Melee",
     ["combat"] = "Melee",
     ["hits"] = 175,
     ["hits"] = 175,
    ["mindmg"] = 18,
    ["maxdmg"] = 22,
    ["wrestling"] = 55,
    ["armor"] = 25,
    ["magicresist"] = 50,
    ["passiveability"] = "Enrage",
    ["spellname"] = "Summon Creature",
    ["spellicon"] = "summoncreature",
  },
  ["Primordial Whelp"] = {
    ["slots"] = 1,
    ["combat"] = "Melee",
    ["hits"] = 125,
    ["mindmg"] = 14,
    ["maxdmg"] = 18,
    ["wrestling"] = 65,
    ["armor"] = 25,
    ["magicresist"] = 50,
    ["passiveability"] = "Frenzy",
    ["spellname"] = "Summon Creature",
    ["spellicon"] = "summoncreature",
  },
  ["Shallow Water"] = {
    ["slots"] = 1,
    ["combat"] = "Melee",
    ["hits"] = 100,
    ["mindmg"] = 16,
    ["maxdmg"] = 20,
    ["wrestling"] = 60,
    ["armor"] = 25,
    ["magicresist"] = 100,
    ["poisonresist"] = 0.33,
    ["specialresist"] = 0.33,
    ["passiveability"] = { "Soak", "Regeneration" },
    ["innateability"] = "Elusive Form",
    ["spellname"] = "Summon Creature",
    ["spellicon"] = "summoncreature",
  },
  ["Firebat"] = {
    ["slots"] = 1,
    ["combat"] = "Melee",
    ["hits"] = 125,
     ["mindmg"] = 12,
     ["mindmg"] = 12,
     ["maxdmg"] = 16,
     ["maxdmg"] = 16,
     ["wrestling"] = 65,
     ["wrestling"] = 40,
     ["armor"] = 25,
     ["armor"] = 25,
     ["magicresist"] = 50,
     ["magicresist"] = 50,
    ["specialresist"] = 0.33,
    ["passiveability"] = { "Flamestrike", "Bleed" },
    ["spellname"] = "Summon Creature",
    ["spellicon"] = "summoncreature",
  },
  ["Monitor Hatchling"] = {
    ["slots"] = 1,
    ["combat"] = "Melee",
    ["hits"] = 125,
    ["mindmg"] = 16,
    ["maxdmg"] = 20,
    ["wrestling"] = 55,
    ["armor"] = 50,
    ["magicresist"] = 50,
    ["cooldownability"] = "Crush",
    ["spellname"] = "Summon Creature",
    ["spellicon"] = "summoncreature",
  },
  ["Corpse Eater"] = {
    ["slots"] = 1,
    ["combat"] = "Melee",
    ["hits"] = 125,
    ["mindmg"] = 18,
    ["maxdmg"] = 22,
    ["wrestling"] = 60,
    ["armor"] = 50,
    ["magicresist"] = 50,
    ["poisonresist"] = 0.33,
    ["specialresist"] = 0.33,
     ["passiveability"] = "Disease",
     ["passiveability"] = "Disease",
     ["spellname"] = "Summon Creature",
     ["spellname"] = "Summon Creature",
     ["spellicon"] = "summoncreature",
     ["spellicon"] = "summoncreature",
    ["creaturepool"] = 1,
    ["necro"] = true,
   },
   },
   ["Black Bear"] = {
   ["Skeleton"] = {
     ["slots"] = 1,
     ["slots"] = 1,
     ["combat"] = "Melee",
     ["combat"] = "Melee",
     ["hits"] = 150,
     ["hits"] = 175,
    ["mindmg"] = 18,
    ["maxdmg"] = 22,
    ["wrestling"] = 50,
    ["armor"] = 25,
    ["magicresist"] = 50,
    ["passiveability"] = "Enrage",
    ["spellname"] = "Summon Creature",
    ["spellicon"] = "summoncreature",
  },
  ["Brown Bear"] = {
    ["slots"] = 1,
    ["combat"] = "Melee",
    ["hits"] = 150,
    ["mindmg"] = 18,
    ["maxdmg"] = 22,
    ["wrestling"] = 50,
    ["armor"] = 25,
    ["magicresist"] = 50,
    ["passiveability"] = "Enrage",
    ["spellname"] = "Summon Creature",
    ["spellicon"] = "summoncreature",
  },
  ["Aegis Rat"] = {
    ["slots"] = 1,
    ["combat"] = "Melee",
    ["hits"] = 100,
    ["mindmg"] = 16,
    ["maxdmg"] = 20,
    ["wrestling"] = 65,
    ["armor"] = 25,
    ["magicresist"] = 100,
    ["poisonresist"] = 0.33,
    ["specialresist"] = 0.33,
    ["underdogscalar"] = 1.371,
    ["cooldownability"] = "Mirror",
    ["passiveability"] = "Disease",
    ["spellname"] = "Summon Creature",
    ["spellicon"] = "summoncreature",
  },
  ["Flamehound"] = {
    ["slots"] = 1,
    ["combat"] = "Melee",
    ["hits"] = 125,
     ["mindmg"] = 14,
     ["mindmg"] = 14,
     ["maxdmg"] = 18,
     ["maxdmg"] = 18,
    ["wrestling"] = 60,
    ["armor"] = 25,
    ["magicresist"] = 50,
    ["passiveability"] = { "Flamestrike", "Frenzy" },
    ["spellname"] = "Summon Creature",
    ["spellicon"] = "summoncreature",
  },
  ["Imp"] = {
    ["slots"] = 1,
    ["combat"] = "Spell",
    ["hits"] = 125,
    ["mindmg"] = 9,
    ["maxdmg"] = 12,
     ["wrestling"] = 45,
     ["wrestling"] = 45,
    ["armor"] = 25,
    ["magicresist"] = 100,
    ["spellname"] = "Summon Creature",
    ["tometier"] = 1,
    ["spellicon"] = "summoncreature",
  },
  ["Searing Lizard"] = {
    ["slots"] = 1,
    ["combat"] = "Melee",
    ["hits"] = 150,
    ["mindmg"] = 18,
    ["maxdmg"] = 22,
    ["wrestling"] = 55,
    ["armor"] = 50,
    ["magicresist"] = 50,
    ["cooldownability"] = "Crush",
    ["passiveability"] = "Flamestrike",
    ["spellname"] = "Summon Creature",
    ["tometier"] = 1,
    ["spellicon"] = "summoncreature",
  },
  ["Jaguar"] = {
    ["slots"] = 1,
    ["combat"] = "Melee",
    ["hits"] = 125,
    ["mindmg"] = 12,
    ["maxdmg"] = 16,
    ["wrestling"] = 65,
    ["armor"] = 25,
    ["magicresist"] = 50,
    ["stealth"] = "X",
    ["cooldownability"] = "Vanish",
    ["passiveability"] = "Frenzy",
    ["innateability"] = "Backstab",
    ["spellname"] = "Summon Creature",
    ["tometier"] = 1,
    ["spellicon"] = "summoncreature",
  },
  ["Cave Bear"] = {
    ["slots"] = 1,
    ["combat"] = "Melee",
    ["hits"] = 175,
    ["mindmg"] = 18,
    ["maxdmg"] = 22,
    ["wrestling"] = 55,
     ["armor"] = 25,
     ["armor"] = 25,
     ["magicresist"] = 50,
     ["magicresist"] = 50,
     ["passiveability"] = "Enrage",
     ["passiveability"] = "Enrage",
     ["spellname"] = "Summon Creature",
     ["spellname"] = "Summon Creature",
    ["tometier"] = 1,
     ["spellicon"] = "summoncreature",
     ["spellicon"] = "summoncreature",
    ["creaturepool"] = 1,
    ["necro"] = true,
   },
   },
   ["Drake Whelp"] = {
   ["Skeletal Knight"] = {
     ["slots"] = 1,
     ["slots"] = 1,
     ["combat"] = "Melee",
     ["combat"] = "Melee",
     ["hits"] = 125,
     ["hits"] = 200,
    ["mindmg"] = 16,
    ["maxdmg"] = 20,
    ["wrestling"] = 60,
    ["armor"] = 50,
    ["magicresist"] = 50,
    ["cooldownability"] = "Fire Breath",
    ["spellname"] = "Summon Creature",
    ["tometier"] = 2,
    ["spellicon"] = "summoncreature",
  },
  ["Trapdoor Spider"] = {
    ["slots"] = 1,
    ["combat"] = "Melee",
    ["hits"] = 125,
     ["mindmg"] = 14,
     ["mindmg"] = 14,
     ["maxdmg"] = 18,
     ["maxdmg"] = 18,
    ["wrestling"] = 60,
    ["armor"] = 25,
    ["magicresist"] = 50,
    ["poisonresist"] = 0.33,
    ["poisontype"] = "Greater",
    ["poisoning"] = 20,
    ["stealth"] = "X",
    ["cooldownability"] = { "Vanish", "Web" },
    ["innateability"] = "Backstab",
    ["spellname"] = "Summon Creature",
    ["tometier"] = 2,
    ["spellicon"] = "summoncreature",
  },
  ["Minion"] = {
    ["slots"] = 1,
    ["combat"] = "Spell",
    ["hits"] = 150,
    ["mindmg"] = 9,
    ["maxdmg"] = 13,
     ["wrestling"] = 50,
     ["wrestling"] = 50,
    ["armor"] = 25,
    ["magicresist"] = 75,
    ["spellname"] = "Summon Creature",
    ["tometier"] = 2,
    ["spellicon"] = "summoncreature",
  },
  ["Cave Bat"] = {
    ["slots"] = 1,
    ["combat"] = "Melee",
    ["hits"] = 125,
    ["mindmg"] = 18,
    ["maxdmg"] = 22,
    ["wrestling"] = 80,
     ["armor"] = 25,
     ["armor"] = 25,
     ["magicresist"] = 50,
     ["magicresist"] = 50,
    ["passiveability"] = "Bleed",
    ["spellname"] = "Summon Creature",
    ["tometier"] = 2,
    ["spellicon"] = "summoncreature",
  },
  ["Blood Ape"] = {
    ["slots"] = 1,
    ["combat"] = "Melee",
    ["hits"] = 175,
    ["mindmg"] = 18,
    ["maxdmg"] = 22,
    ["wrestling"] = 65,
    ["armor"] = 25,
    ["magicresist"] = 50,
    ["cooldownability"] = "Blood Frenzy",
    ["passiveability"] = "Bleed",
    ["spellname"] = "Summon Creature",
    ["tometier"] = 3,
    ["spellicon"] = "summoncreature",
  },
  ["Dragon Whelp"] = {
    ["slots"] = 1,
    ["combat"] = "Melee",
    ["hits"] = 150,
    ["mindmg"] = 18,
    ["maxdmg"] = 22,
    ["wrestling"] = 60,
    ["armor"] = 50,
    ["magicresist"] = 50,
    ["cooldownability"] = "Fire Breath",
    ["spellname"] = "Summon Creature",
    ["tometier"] = 3,
    ["spellicon"] = "summoncreature",
  },
  ["Wolfhound"] = {
    ["slots"] = 1,
    ["combat"] = "Melee",
    ["hits"] = 175,
    ["mindmg"] = 16,
    ["maxdmg"] = 20,
    ["wrestling"] = 70,
    ["armor"] = 25,
    ["magicresist"] = 50,
    ["cooldownability"] = "Charge",
    ["passiveability"] = "Frenzy",
    ["spellname"] = "Summon Creature",
    ["tometier"] = 3,
    ["spellicon"] = "summoncreature",
  },
  ["Searing Imp"] = {
    ["slots"] = 1,
    ["combat"] = "Spell",
    ["hits"] = 150,
    ["mindmg"] = 9,
    ["maxdmg"] = 12,
    ["wrestling"] = 50,
    ["armor"] = 25,
    ["magicresist"] = 100,
    ["passiveability"] = "Spellburn",
    ["spellname"] = "Summon Creature",
    ["tometier"] = 3,
    ["spellicon"] = "summoncreature",
  },
  ["Molten Mongbat"] = {
    ["slots"] = 1,
    ["combat"] = "Melee",
    ["hits"] = 175,
    ["mindmg"] = 20,
    ["maxdmg"] = 24,
    ["wrestling"] = 75,
    ["armor"] = 25,
    ["magicresist"] = 50,
    ["passiveability"] = "Flamestrike",
    ["spellname"] = "Summon Creature",
    ["tometier"] = 4,
    ["spellicon"] = "summoncreature",
  },
  ["Skulker"] = {
    ["slots"] = 1,
    ["combat"] = "Melee",
    ["hits"] = 175,
    ["mindmg"] = 16,
    ["maxdmg"] = 20,
    ["wrestling"] = 70,
    ["armor"] = 50,
    ["magicresist"] = 50,
    ["poisonresist"] = 0.33,
    ["specialresist"] = 0.33,
    ["stealth"] = "X",
    ["cooldownability"] = "Vanish",
    ["passiveability"] = "Disease",
    ["innateability"] = "Backstab",
    ["spellname"] = "Summon Creature",
    ["tometier"] = 4,
    ["spellicon"] = "summoncreature",
  },
  ["Vampire Bat"] = {
    ["slots"] = 1,
    ["combat"] = "Melee",
    ["hits"] = 150,
    ["mindmg"] = 20,
    ["maxdmg"] = 24,
    ["wrestling"] = 85,
    ["armor"] = 25,
    ["magicresist"] = 50,
    ["specialresist"] = 0.33,
    ["cooldownability"] = "Devour",
    ["passiveability"] = "Bleed",
    ["spellname"] = "Summon Creature",
    ["tometier"] = 4,
    ["spellicon"] = "summoncreature",
  },
  ["Fire Minion"] = {
    ["slots"] = 1,
    ["combat"] = "Spell",
    ["hits"] = 150,
    ["mindmg"] = 9,
    ["maxdmg"] = 13,
    ["wrestling"] = 60,
    ["armor"] = 25,
    ["magicresist"] = 75,
    ["passiveability"] = "Spellburn",
    ["spellname"] = "Summon Creature",
    ["tometier"] = 4,
    ["spellicon"] = "summoncreature",
  },
  ["Zombie"] = {
    ["slots"] = 1,
    ["combat"] = "Melee",
    ["hits"] = 175,
    ["mindmg"] = 12,
    ["maxdmg"] = 16,
    ["wrestling"] = 40,
    ["armor"] = 25,
    ["magicresist"] = 50,
    ["passiveability"] = "Disease",
     ["spellname"] = "Summon Creature",
     ["spellname"] = "Summon Creature",
    ["creaturepool"] = 2,
     ["spellicon"] = "summoncreature",
     ["spellicon"] = "summoncreature",
    ["passiveability"] = "Enrage",
     ["necro"] = true,
     ["necro"] = true,
   },
   },
Line 532: Line 156:
     ["spellname"] = "Summon Creature",
     ["spellname"] = "Summon Creature",
     ["spellicon"] = "summoncreature",
     ["spellicon"] = "summoncreature",
    ["creaturepool"] = 2,
     ["necro"] = true,
     ["necro"] = true,
   },
   },
   ["Skeleton"] = {
   ["Skeletal Mage"] = {
     ["slots"] = 1,
     ["slots"] = 1,
     ["combat"] = "Melee",
     ["combat"] = "Spell",
     ["hits"] = 175,
     ["hits"] = 150,
     ["mindmg"] = 14,
     ["mindmg"] = 7,
     ["maxdmg"] = 18,
     ["maxdmg"] = 9,
     ["wrestling"] = 45,
     ["wrestling"] = 50,
     ["armor"] = 25,
     ["armor"] = 25,
     ["magicresist"] = 50,
     ["magicresist"] = 75,
    ["passiveability"] = "Enrage",
     ["spellname"] = "Summon Creature",
     ["spellname"] = "Summon Creature",
    ["creaturepool"] = 3,
     ["spellicon"] = "summoncreature",
     ["spellicon"] = "summoncreature",
     ["necro"] = true,
     ["necro"] = true,
   },
   },
   ["Skeletal Knight"] = {
   ["Ghost"] = {
     ["slots"] = 1,
     ["slots"] = 1,
     ["combat"] = "Melee",
     ["combat"] = "Melee",
     ["hits"] = 200,
     ["hits"] = 200,
     ["mindmg"] = 14,
     ["mindmg"] = 16,
     ["maxdmg"] = 18,
     ["maxdmg"] = 20,
     ["wrestling"] = 50,
     ["wrestling"] = 80,
     ["armor"] = 25,
     ["armor"] = 25,
     ["magicresist"] = 50,
     ["magicresist"] = 50,
     ["spellname"] = "Summon Creature",
     ["spellname"] = "Summon Creature",
    ["tometier"] = 1,
    ["spellicon"] = "summoncreature",
    ["passiveability"] = "Enrage",
    ["necro"] = true,
  },
  ["Skeletal Mage"] = {
    ["slots"] = 1,
    ["combat"] = "Spell",
    ["hits"] = 150,
    ["mindmg"] = 7,
    ["maxdmg"] = 9,
    ["wrestling"] = 50,
    ["armor"] = 25,
    ["magicresist"] = 75,
    ["spellname"] = "Summon Creature",
    ["tometier"] = 2,
     ["spellicon"] = "summoncreature",
     ["spellicon"] = "summoncreature",
    ["creaturepool"] = 3,
     ["necro"] = true,
     ["necro"] = true,
   },
   },
Line 587: Line 197:
     ["magicresist"] = 50,
     ["magicresist"] = 50,
     ["spellname"] = "Summon Creature",
     ["spellname"] = "Summon Creature",
     ["tometier"] = 3,
     ["creaturepool"] = 4,
     ["spellicon"] = "summoncreature",
     ["spellicon"] = "summoncreature",
     ["necro"] = true,
     ["necro"] = true,
Line 603: Line 213:
     ["specialresist"] = 0.33,
     ["specialresist"] = 0.33,
     ["spellname"] = "Summon Creature",
     ["spellname"] = "Summon Creature",
     ["tometier"] = 4,
     ["creaturepool"] = 4,
     ["spellicon"] = "summoncreature",
     ["spellicon"] = "summoncreature",
     ["necro"] = true,
     ["necro"] = true,
Line 619: Line 229:
}
}


-- Add necro summons
function CloneTable(t)
  local new_t = {}
  local i, v = next(t, nil)
  while i do
    new_t[i] = v
    i, v = next(t, i)
  end
  return new_t
end
 
-- Copy summon data for necro varients
for necroSummon, Summon in pairs(necromancyConversions) do
for necroSummon, Summon in pairs(necromancyConversions) do
   p[necroSummon] = p[Summon]
   p[necroSummon] = CloneTable(p[Summon])
   p.necro = true
   p[necroSummon]["necro"] = true
end
end


-- Helper function to add comma's between numbers
-- Helper function to add comma's between numbers
function FormatInt(int)
function FormatInt(int)
    int = string.reverse(int)
  int = string.reverse(int)


    if string.len(int) > 3 and string.len(int) < 6 then
  if string.len(int) > 3 and string.len(int) < 6 then
        int = string.gsub(int, "(%d%d%d)", "%1,")
    int = string.gsub(int, "(%d%d%d)", "%1,")
    elseif string.len(int) == 6 then
  elseif string.len(int) == 6 then
        int = string.gsub(int, "(%d%d%d)(%d%d%d)", "%1,%2")
    int = string.gsub(int, "(%d%d%d)(%d%d%d)", "%1,%2")
    elseif string.len(int) > 6 and string.len(int) < 9 then
  elseif string.len(int) > 6 and string.len(int) < 9 then
        int = string.gsub(int, "(%d%d%d)(%d%d%d)", "%1,%2,")
    int = string.gsub(int, "(%d%d%d)(%d%d%d)", "%1,%2,")
    end
  end


    int = string.reverse(int)
  int = string.reverse(int)


    return int
  return int
end
end


for index, creature in pairs(p) do
  local defaultStatArray = {
    ["hits"] = "?",
    ["mindmg"] = "?",
    ["maxdmg"] = "?",
    ["wrestling"] = "",
    ["armor"] = "",
    ["magicresist"] = "",
    ["parry"] = "",
    ["atkspd"] = "?",
    ["magery"] = "",
    ["poisontype"] = "",
    ["poisoning"] = "",
    ["poisonresist"] = "",
    ["stealth"] = "",
    ["armormin"] = "",
    ["magicresistmin"] = "",
    ["poisonresistmin"] = "",
    ["slots"] = "?",
    ["combat"] = "?",
    ["cooldownability"] = "",
    ["innateability"] = "",
    ["passiveability"] = "",
    ["specialresist"] = "",
    ["spellname"] = "",
    ["spellicon"] = "",
    ["necro"] = false,
    ["creaturepool"] = "",
  }
  if type(creature.hits) == "number" then
    creature.unformattedhits = creature.hits
    creature.hits = FormatInt(creature.hits)
  end


  if creature.armormin then
    creature.armormin = "<br>(" .. creature.armormin .. " min)"
  end


for index, creature in pairs(p) do
  if creature.magicresistmin then
     local defaultStatArray = {
     creature.magicresistmin = "<br>(" .. creature.magicresistmin .. " min)"
        ["hits"] = "?",
  end
        ["mindmg"] = "?",
 
        ["maxdmg"] = "?",
  if creature.poisonresistmin then
        ["wrestling"] = "",
    creature.poisonresistmin = "<br>(" .. creature.poisonresistmin .. " min)"
        ["armor"] = "",
  end
        ["magicresist"] = "",
        ["parry"] = "",
        ["atkspd"] = "?",
        ["magery"] = "",
        ["poisontype"] = "",
        ["poisoning"] = "",
        ["poisonresist"] = "",
        ["stealth"] = "",
        ["armormin"] = "",
        ["magicresistmin"] = "",
        ["poisonresistmin"] = "",
        ["slots"] = "?",
        ["combat"] = "?",
        ["cooldownability"] = "",
        ["innateability"] = "",
        ["passiveability"] = "",
        ["specialresist"] = "",
        ["spellname"] = "",
        ["spellicon"] = "",
        ["necro"] = false,
        ["tometier"] = "",
    }


    if type(creature.hits) == "number" then
  if creature.poisonresist then
        creature.unformattedhits = creature.hits
    creature.poisonresist = (creature.poisonresist * 100) .. "%"
        creature.hits = FormatInt(creature.hits)
  end
    end


    if creature.armormin then
  if creature.specialresist then
        creature.armormin = "<br>(" .. creature.armormin .. " min)"
    creature.specialresist = (creature.specialresist * 100) .. "%"
    end
  end


     if creature.magicresistmin then
  if creature.creaturepool then
        creature.magicresistmin = "<br>(" .. creature.magicresistmin .. " min)"
     if creature.necro == true then
      creature.creaturepool = "<br>(Necro Pool " .. creature.creaturepool .. ")"
    else
      creature.creaturepool = "<br>(Pool " .. creature.creaturepool .. ")"
     end
     end
  end


     if creature.poisonresistmin then
  for stat, defaultValue in pairs(defaultStatArray) do
        creature.poisonresistmin = "<br>(" .. creature.poisonresistmin .. " min)"
     if creature[stat] == nil then
      creature[stat] = defaultValue
     end
     end
  end
end


    if creature.poisonresist then
-- Copy tameable data for summonable tames
        creature.poisonresist = (creature.poisonresist * 100) .. "%"
local tameableArray = require("Module:TameableCreatureData")
    end


    if creature.specialresist then
for tameableName, tameable in pairs(tameableArray) do
        creature.specialresist = (creature.specialresist * 100) .. "%"
  if tameable.slots == 1 and tameable.taming >= 45 and tameable.taming <= 100 and tameable.mount == false then
     end
     local pool


     if creature.tometier then
     if tameable.taming >= 45 and tameable.taming <= 55 then
        creature.tometier = " (Tier " .. creature.tometier .. ")"
      pool = 1
    elseif tameable.taming >= 60 and tameable.taming <= 70 then
      pool = 2
    elseif tameable.taming >= 75 and tameable.taming <= 85 then
      pool = 3
    elseif tameable.taming >= 90 and tameable.taming <= 100 then
      pool = 4
     end
     end


     for stat, defaultValue in pairs(defaultStatArray) do
     p[tameableName] = CloneTable(tameableArray[tameableName])
        if creature[stat] == nil then
    p[tameableName].spellname = "Summon Creature"
            creature[stat] = defaultValue
    p[tameableName].spellicon = "summoncreature"
        end
    p[tameableName].creaturepool = "<br>(Pool " .. pool .. ")"
    end
  end
end
end


return p
return p

Latest revision as of 05:16, 28 December 2024

Documentation for this module may be created at Module:SummonableCreatureData/doc

-- Unique summons, non-tameable not necro reskins
local p = {
  ["Daemon"] = {
    ["slots"] = 2,
    ["combat"] = "Spell",
    ["hits"] = 600,
    ["mindmg"] = 26,
    ["maxdmg"] = 32,
    ["wrestling"] = 95,
    ["armor"] = 50,
    ["magicresist"] = 100,
    ["innateability"] = "Fury",
    ["spellname"] = "Summon Daemon",
    ["spellicon"] = "summondaemon1",
  },
  ["Air Elemental"] = {
    ["slots"] = 2,
    ["combat"] = "Melee",
    ["hits"] = 500,
    ["mindmg"] = 34,
    ["maxdmg"] = 40,
    ["wrestling"] = 100,
    ["armor"] = 50,
    ["magicresist"] = 100,
    ["innateability"] = "Cleave",
    ["spellname"] = "Air Elemental",
    ["spellicon"] = "summonairele1",
  },
  ["Earth Elemental"] = {
    ["slots"] = 2,
    ["combat"] = "Melee",
    ["hits"] = 600,
    ["mindmg"] = 30,
    ["maxdmg"] = 36,
    ["wrestling"] = 95,
    ["armor"] = 75,
    ["magicresist"] = 50,
    ["specialresist"] = 0.33,
    ["innateability"] = "Rooted",
    ["spellname"] = "Earth Elemental",
    ["spellicon"] = "summonearthele1",
  },
  ["Water Elemental"] = {
    ["slots"] = 2,
    ["combat"] = "Spell",
    ["hits"] = 600,
    ["mindmg"] = 24,
    ["maxdmg"] = 30,
    ["wrestling"] = 100,
    ["armor"] = 50,
    ["magicresist"] = 150,
    ["poisonresist"] = 0.66,
    ["specialresist"] = 0.33,
    ["cooldownability"] = "Mirror",
    ["innateability"] = "Elusive Form",
    ["spellname"] = "Water Elemental",
    ["spellicon"] = "summonwaterele1",
  },
  ["Fire Elemental"] = {
    ["slots"] = 2,
    ["combat"] = "Spell",
    ["hits"] = 400,
    ["mindmg"] = 28,
    ["maxdmg"] = 34,
    ["wrestling"] = 85,
    ["armor"] = 25,
    ["magicresist"] = 100,
    ["cooldownability"] = "Epic Barrage",
    ["spellname"] = "Fire Elemental",
    ["spellicon"] = "summonfireele1",
  },
  ["Energy Vortex"] = {
    ["slots"] = 2,
    ["combat"] = "Melee",
    ["hits"] = 600,
    ["mindmg"] = 38,
    ["maxdmg"] = 46,
    ["wrestling"] = 105,
    ["armor"] = 50,
    ["magicresist"] = 100,
    ["poisonresist"] = 0.33,
    ["specialresist"] = 0.33,
    ["innateability"] = "Discharge",
    ["spellname"] = "Energy Vortex",
    ["spellicon"] = "summonev1",
  },
  ["Blade Spirit"] = {
    ["slots"] = 1,
    ["combat"] = "Melee",
    ["hits"] = 300,
    ["mindmg"] = 18,
    ["maxdmg"] = 22,
    ["wrestling"] = 90,
    ["armor"] = 50,
    ["magicresist"] = 50,
    ["poisonresist"] = 0.33,
    ["specialresist"] = 0.33,
    ["innateability"] = "Diversion",
    ["spellname"] = "Blade Spirits",
    ["spellicon"] = "bladespirit1",
  },
  ["Zombie"] = {
    ["slots"] = 1,
    ["combat"] = "Melee",
    ["hits"] = 175,
    ["mindmg"] = 12,
    ["maxdmg"] = 16,
    ["wrestling"] = 40,
    ["armor"] = 25,
    ["magicresist"] = 50,
    ["passiveability"] = "Disease",
    ["spellname"] = "Summon Creature",
    ["spellicon"] = "summoncreature",
    ["creaturepool"] = 1,
    ["necro"] = true,
  },
  ["Skeleton"] = {
    ["slots"] = 1,
    ["combat"] = "Melee",
    ["hits"] = 175,
    ["mindmg"] = 14,
    ["maxdmg"] = 18,
    ["wrestling"] = 45,
    ["armor"] = 25,
    ["magicresist"] = 50,
    ["passiveability"] = "Enrage",
    ["spellname"] = "Summon Creature",
    ["spellicon"] = "summoncreature",
    ["creaturepool"] = 1,
    ["necro"] = true,
  },
  ["Skeletal Knight"] = {
    ["slots"] = 1,
    ["combat"] = "Melee",
    ["hits"] = 200,
    ["mindmg"] = 14,
    ["maxdmg"] = 18,
    ["wrestling"] = 50,
    ["armor"] = 25,
    ["magicresist"] = 50,
    ["spellname"] = "Summon Creature",
    ["creaturepool"] = 2,
    ["spellicon"] = "summoncreature",
    ["passiveability"] = "Enrage",
    ["necro"] = true,
  },
  ["Ghoul"] = {
    ["slots"] = 1,
    ["combat"] = "Spell",
    ["hits"] = 100,
    ["mindmg"] = 5,
    ["maxdmg"] = 7,
    ["wrestling"] = 40,
    ["armor"] = 25,
    ["magicresist"] = 75,
    ["spellname"] = "Summon Creature",
    ["spellicon"] = "summoncreature",
    ["creaturepool"] = 2,
    ["necro"] = true,
  },
  ["Skeletal Mage"] = {
    ["slots"] = 1,
    ["combat"] = "Spell",
    ["hits"] = 150,
    ["mindmg"] = 7,
    ["maxdmg"] = 9,
    ["wrestling"] = 50,
    ["armor"] = 25,
    ["magicresist"] = 75,
    ["spellname"] = "Summon Creature",
    ["creaturepool"] = 3,
    ["spellicon"] = "summoncreature",
    ["necro"] = true,
  },
  ["Ghost"] = {
    ["slots"] = 1,
    ["combat"] = "Melee",
    ["hits"] = 200,
    ["mindmg"] = 16,
    ["maxdmg"] = 20,
    ["wrestling"] = 80,
    ["armor"] = 25,
    ["magicresist"] = 50,
    ["spellname"] = "Summon Creature",
    ["spellicon"] = "summoncreature",
    ["creaturepool"] = 3,
    ["necro"] = true,
  },
  ["Skeletal Marksman"] = {
    ["slots"] = 1,
    ["combat"] = "Melee",
    ["hits"] = 175,
    ["mindmg"] = 12,
    ["maxdmg"] = 16,
    ["wrestling"] = 70,
    ["armor"] = 25,
    ["magicresist"] = 50,
    ["spellname"] = "Summon Creature",
    ["creaturepool"] = 4,
    ["spellicon"] = "summoncreature",
    ["necro"] = true,
  },
  ["Rotting Flesh"] = {
    ["slots"] = 1,
    ["combat"] = "Melee",
    ["hits"] = 225,
    ["mindmg"] = 14,
    ["maxdmg"] = 18,
    ["wrestling"] = 70,
    ["armor"] = 25,
    ["magicresist"] = 50,
    ["poisonresist"] = 0.33,
    ["specialresist"] = 0.33,
    ["spellname"] = "Summon Creature",
    ["creaturepool"] = 4,
    ["spellicon"] = "summoncreature",
    ["necro"] = true,
  },
}

local necromancyConversions = {
  ["Vampire Thrall"] = "Daemon",
  ["Lich"] = "Fire Elemental",
  ["Ancient Mummy"] = "Earth Elemental",
  ["Skeletal Fiend"] = "Air Elemental",
  ["Jackel Spirit"] = "Energy Vortex",
  ["Rag Witch"] = "Water Elemental",
  ["Skeletal Husk"] = "Blade Spirit",
}

function CloneTable(t)
  local new_t = {}
  local i, v = next(t, nil)
  while i do
    new_t[i] = v
    i, v = next(t, i)
  end
  return new_t
end

-- Copy summon data for necro varients
for necroSummon, Summon in pairs(necromancyConversions) do
  p[necroSummon] = CloneTable(p[Summon])
  p[necroSummon]["necro"] = true
end

-- Helper function to add comma's between numbers
function FormatInt(int)
  int = string.reverse(int)

  if string.len(int) > 3 and string.len(int) < 6 then
    int = string.gsub(int, "(%d%d%d)", "%1,")
  elseif string.len(int) == 6 then
    int = string.gsub(int, "(%d%d%d)(%d%d%d)", "%1,%2")
  elseif string.len(int) > 6 and string.len(int) < 9 then
    int = string.gsub(int, "(%d%d%d)(%d%d%d)", "%1,%2,")
  end

  int = string.reverse(int)

  return int
end

for index, creature in pairs(p) do
  local defaultStatArray = {
    ["hits"] = "?",
    ["mindmg"] = "?",
    ["maxdmg"] = "?",
    ["wrestling"] = "",
    ["armor"] = "",
    ["magicresist"] = "",
    ["parry"] = "",
    ["atkspd"] = "?",
    ["magery"] = "",
    ["poisontype"] = "",
    ["poisoning"] = "",
    ["poisonresist"] = "",
    ["stealth"] = "",
    ["armormin"] = "",
    ["magicresistmin"] = "",
    ["poisonresistmin"] = "",
    ["slots"] = "?",
    ["combat"] = "?",
    ["cooldownability"] = "",
    ["innateability"] = "",
    ["passiveability"] = "",
    ["specialresist"] = "",
    ["spellname"] = "",
    ["spellicon"] = "",
    ["necro"] = false,
    ["creaturepool"] = "",
  }

  if type(creature.hits) == "number" then
    creature.unformattedhits = creature.hits
    creature.hits = FormatInt(creature.hits)
  end

  if creature.armormin then
    creature.armormin = "<br>(" .. creature.armormin .. " min)"
  end

  if creature.magicresistmin then
    creature.magicresistmin = "<br>(" .. creature.magicresistmin .. " min)"
  end

  if creature.poisonresistmin then
    creature.poisonresistmin = "<br>(" .. creature.poisonresistmin .. " min)"
  end

  if creature.poisonresist then
    creature.poisonresist = (creature.poisonresist * 100) .. "%"
  end

  if creature.specialresist then
    creature.specialresist = (creature.specialresist * 100) .. "%"
  end

  if creature.creaturepool then
    if creature.necro == true then
      creature.creaturepool = "<br>(Necro Pool " .. creature.creaturepool .. ")"
    else
      creature.creaturepool = "<br>(Pool " .. creature.creaturepool .. ")"
    end
  end

  for stat, defaultValue in pairs(defaultStatArray) do
    if creature[stat] == nil then
      creature[stat] = defaultValue
    end
  end
end

-- Copy tameable data for summonable tames
local tameableArray = require("Module:TameableCreatureData")

for tameableName, tameable in pairs(tameableArray) do
  if tameable.slots == 1 and tameable.taming >= 45 and tameable.taming <= 100 and tameable.mount == false then
    local pool

    if tameable.taming >= 45 and tameable.taming <= 55 then
      pool = 1
    elseif tameable.taming >= 60 and tameable.taming <= 70 then
      pool = 2
    elseif tameable.taming >= 75 and tameable.taming <= 85 then
      pool = 3
    elseif tameable.taming >= 90 and tameable.taming <= 100 then
      pool = 4
    end

    p[tameableName] = CloneTable(tameableArray[tameableName])
    p[tameableName].spellname = "Summon Creature"
    p[tameableName].spellicon = "summoncreature"
    p[tameableName].creaturepool = "<br>(Pool " .. pool .. ")"
  end
end

return p