Module:StrangelandsCreatureData

From UO Outlands Wiki
Jump to navigation Jump to search

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

local p = {
  ["Ankheg"] = {
    ["location"] = "Strangelands",
    ["difficulty"] = 23.9,
    ["goldvalue"] = 239,
    ["hits"] = 1500,
    ["minmeleedmg"] = 25,
    ["maxmeleedmg"] = 35,
    ["wrestling"] = 80,
    ["armor"] = 75,
    ["magicresist"] = 25,
    ["poisoning"] = 50,
    ["poisonresist"] = 0.4,
    ["slayer"] = "Beastial",
    ["ai"] = "Melee",
    ["speed"] = "Slow",
    ["uniquescalar"] = 1.25,
  },
  ["Bullvore"] = {
    ["location"] = "Strangelands",
    ["difficulty"] = 33.6,
    ["goldvalue"] = 336,
    ["hits"] = 2000,
    ["minmeleedmg"] = 35,
    ["maxmeleedmg"] = 45,
    ["wrestling"] = 90,
    ["armor"] = 50,
    ["magicresist"] = 25,
    ["slayer"] = "Beastial",
    ["ai"] = "Melee",
    ["speed"] = "Fast",
    ["uniquescalar"] = 1.1,
  },
  ["Devilbat"] = {
    ["location"] = "Strangelands",
    ["difficulty"] = 10.9,
    ["goldvalue"] = 110,
    ["hits"] = 800,
    ["minmeleedmg"] = 10,
    ["maxmeleedmg"] = 20,
    ["wrestling"] = 90,
    ["armor"] = 25,
    ["magicresist"] = 25,
    ["slayer"] = "Beastial",
    ["ai"] = "Melee",
    ["speed"] = "VeryFast",
    ["uniquescalar"] = 1.25,
  },
  ["Diseased Ankheg"] = {
    ["location"] = "Strangelands",
    ["difficulty"] = 23.9,
    ["goldvalue"] = 239,
    ["hits"] = 1500,
    ["minmeleedmg"] = 25,
    ["maxmeleedmg"] = 35,
    ["wrestling"] = 80,
    ["armor"] = 75,
    ["magicresist"] = 25,
    ["poisoning"] = 50,
    ["poisonresist"] = 0.4,
    ["slayer"] = "Beastial",
    ["ai"] = "Melee",
    ["speed"] = "Slow",
    ["uniquescalar"] = 1.25,
  },
  ["Diseased Bullvore"] = {
    ["location"] = "Strangelands",
    ["difficulty"] = 33.6,
    ["goldvalue"] = 336,
    ["hits"] = 2000,
    ["minmeleedmg"] = 35,
    ["maxmeleedmg"] = 45,
    ["wrestling"] = 90,
    ["armor"] = 50,
    ["magicresist"] = 25,
    ["slayer"] = "Beastial",
    ["ai"] = "Melee",
    ["speed"] = "Fast",
    ["uniquescalar"] = 1.1,
  },
  ["Diseased Devilbat"] = {
    ["location"] = "Strangelands",
    ["difficulty"] = 10.9,
    ["goldvalue"] = 110,
    ["hits"] = 800,
    ["minmeleedmg"] = 10,
    ["maxmeleedmg"] = 20,
    ["wrestling"] = 90,
    ["armor"] = 25,
    ["magicresist"] = 25,
    ["slayer"] = "Beastial",
    ["ai"] = "Melee",
    ["speed"] = "VeryFast",
    ["uniquescalar"] = 1.25,
  },
  ["Diseased Giant Slug"] = {
    ["location"] = "Strangelands",
    ["difficulty"] = 6.7,
    ["goldvalue"] = 67,
    ["hits"] = 600,
    ["minmeleedmg"] = 10,
    ["maxmeleedmg"] = 20,
    ["wrestling"] = 50,
    ["armor"] = 25,
    ["magicresist"] = 25,
    ["poisonresist"] = 0.4,
    ["slayer"] = "Nature",
    ["ai"] = "Melee",
    ["speed"] = "Slow",
    ["uniquescalar"] = 1.14,
  },
  ["Diseased Giant Spider"] = {
    ["location"] = "Strangelands",
    ["difficulty"] = 16.5,
    ["goldvalue"] = 166,
    ["hits"] = 1200,
    ["minmeleedmg"] = 15,
    ["maxmeleedmg"] = 25,
    ["wrestling"] = 80,
    ["armor"] = 25,
    ["magicresist"] = 25,
    ["poisontype"] = "Deadly",
    ["poisoning"] = 50,
    ["poisonresist"] = 0.6,
    ["slayer"] = "Beastial",
    ["ai"] = "Melee",
    ["speed"] = "Medium",
    ["uniquescalar"] = 1.1,
  },
  ["Diseased Great Hart"] = {
    ["location"] = "Strangelands",
    ["difficulty"] = 6,
    ["goldvalue"] = 61,
    ["hits"] = 600,
    ["minmeleedmg"] = 10,
    ["maxmeleedmg"] = 20,
    ["wrestling"] = 60,
    ["armor"] = 25,
    ["magicresist"] = 25,
    ["slayer"] = "Beastial",
    ["ai"] = "Melee",
    ["speed"] = "Fast",
    ["uniquescalar"] = 1,
  },
  ["Diseased Stalker"] = {
    ["location"] = "Strangelands",
    ["difficulty"] = 26.8,
    ["goldvalue"] = 269,
    ["hits"] = 1500,
    ["minmeleedmg"] = 30,
    ["maxmeleedmg"] = 40,
    ["wrestling"] = 90,
    ["armor"] = 25,
    ["magicresist"] = 25,
    ["stealth"] = "X",
    ["slayer"] = "Beastial",
    ["ai"] = "Melee",
    ["speed"] = "VeryFast",
    ["uniquescalar"] = 1.2,
  },
  ["Giant Slug"] = {
    ["location"] = "Strangelands",
    ["difficulty"] = 6.7,
    ["goldvalue"] = 67,
    ["hits"] = 600,
    ["minmeleedmg"] = 10,
    ["maxmeleedmg"] = 20,
    ["wrestling"] = 50,
    ["armor"] = 25,
    ["magicresist"] = 25,
    ["poisonresist"] = 0.4,
    ["slayer"] = "Nature",
    ["ai"] = "Melee",
    ["speed"] = "Slow",
    ["uniquescalar"] = 1.14,
  },
  ["Giant Spider"] = {
    ["location"] = "Strangelands",
    ["difficulty"] = 16.5,
    ["goldvalue"] = 166,
    ["hits"] = 1200,
    ["minmeleedmg"] = 15,
    ["maxmeleedmg"] = 25,
    ["wrestling"] = 80,
    ["armor"] = 25,
    ["magicresist"] = 25,
    ["poisontype"] = "Deadly",
    ["poisoning"] = 50,
    ["poisonresist"] = 0.6,
    ["slayer"] = "Beastial",
    ["ai"] = "Melee",
    ["speed"] = "Medium",
    ["uniquescalar"] = 1.1,
  },
  ["Great Hart"] = {
    ["location"] = "Strangelands",
    ["difficulty"] = 6,
    ["goldvalue"] = 61,
    ["hits"] = 600,
    ["minmeleedmg"] = 10,
    ["maxmeleedmg"] = 20,
    ["wrestling"] = 60,
    ["armor"] = 25,
    ["magicresist"] = 25,
    ["slayer"] = "Beastial",
    ["ai"] = "Melee",
    ["speed"] = "Fast",
    ["uniquescalar"] = 1,
  },
  ["Guar"] = {
    ["location"] = "Strangelands",
    ["difficulty"] = 7.7,
    ["goldvalue"] = 78,
    ["hits"] = 800,
    ["minmeleedmg"] = 10,
    ["maxmeleedmg"] = 20,
    ["wrestling"] = 50,
    ["armor"] = 50,
    ["magicresist"] = 25,
    ["slayer"] = "Beastial",
    ["ai"] = "Melee",
    ["speed"] = "Medium",
    ["uniquescalar"] = 1,
  },
  ["Diseased Guar"] = {
    ["location"] = "Strangelands",
    ["difficulty"] = 7.7,
    ["goldvalue"] = 78,
    ["hits"] = 800,
    ["minmeleedmg"] = 10,
    ["maxmeleedmg"] = 20,
    ["wrestling"] = 50,
    ["armor"] = 50,
    ["magicresist"] = 25,
    ["slayer"] = "Beastial",
    ["ai"] = "Melee",
    ["speed"] = "Medium",
    ["uniquescalar"] = 1,
  },
  ["Diseased Primordial"] = {
    ["location"] = "Strangelands",
    ["difficulty"] = 12.8,
    ["goldvalue"] = 128,
    ["hits"] = 1000,
    ["minmeleedmg"] = 15,
    ["maxmeleedmg"] = 25,
    ["wrestling"] = 80,
    ["armor"] = 25,
    ["magicresist"] = 25,
    ["slayer"] = "Beastial",
    ["ai"] = "Melee",
    ["speed"] = "VeryFast",
    ["uniquescalar"] = 1.1,
  },
  ["Primordial"] = {
    ["location"] = "Strangelands",
    ["difficulty"] = 12.8,
    ["goldvalue"] = 128,
    ["hits"] = 1000,
    ["minmeleedmg"] = 15,
    ["maxmeleedmg"] = 25,
    ["wrestling"] = 80,
    ["armor"] = 25,
    ["magicresist"] = 25,
    ["slayer"] = "Beastial",
    ["ai"] = "Melee",
    ["speed"] = "VeryFast",
    ["uniquescalar"] = 1.1,
  },
  ["Stalker"] = {
    ["location"] = "Strangelands",
    ["difficulty"] = 26.8,
    ["goldvalue"] = 269,
    ["hits"] = 1500,
    ["minmeleedmg"] = 30,
    ["maxmeleedmg"] = 40,
    ["wrestling"] = 90,
    ["armor"] = 25,
    ["magicresist"] = 25,
    ["stealth"] = "X",
    ["slayer"] = "Beastial",
    ["ai"] = "Melee",
    ["speed"] = "VeryFast",
    ["uniquescalar"] = 1.2,
  },
  ["Strangehell Deathstalk"] = {
    ["location"] = "Strangelands",
    ["difficulty"] = 49.5,
    ["goldvalue"] = 496,
    ["hits"] = 2500,
    ["minmeleedmg"] = 25,
    ["maxmeleedmg"] = 35,
    ["wrestling"] = 130,
    ["armor"] = 25,
    ["magicresist"] = 200,
    ["poisonresist"] = 0.2,
    ["slayer"] = "Nature",
    ["ai"] = "Melee",
    ["speed"] = "VeryFast",
    ["uniquescalar"] = 1.3,
  },
  ["Strangehell Lashweed"] = {
    ["location"] = "Strangelands",
    ["difficulty"] = 28.8,
    ["goldvalue"] = 288,
    ["hits"] = 1500,
    ["minmeleedmg"] = 15,
    ["maxmeleedmg"] = 25,
    ["wrestling"] = 110,
    ["armor"] = 25,
    ["magicresist"] = 100,
    ["poisontype"] = "Greater",
    ["poisoning"] = 25,
    ["poisonresist"] = 0.2,
    ["slayer"] = "Monstrous",
    ["ai"] = "Ranged",
    ["speed"] = "Fast",
    ["uniquescalar"] = 1.5,
  },
  ["Strangehell Spikebush"] = {
    ["location"] = "Strangelands",
    ["difficulty"] = 42.9,
    ["goldvalue"] = 429,
    ["hits"] = 2500,
    ["minmeleedmg"] = 15,
    ["maxmeleedmg"] = 25,
    ["wrestling"] = 100,
    ["armor"] = 50,
    ["magicresist"] = 200,
    ["poisonresist"] = 0.2,
    ["slayer"] = "Nature",
    ["ai"] = "Melee",
    ["speed"] = "Fast",
    ["uniquescalar"] = 1.5,
  },
  ["Strangehell Vines"] = {
    ["location"] = "Strangelands",
    ["difficulty"] = 27,
    ["goldvalue"] = 271,
    ["hits"] = 1500,
    ["minmeleedmg"] = 15,
    ["maxmeleedmg"] = 25,
    ["wrestling"] = 120,
    ["armor"] = 25,
    ["magicresist"] = 100,
    ["poisontype"] = "Deadly",
    ["poisoning"] = 50,
    ["poisonresist"] = 0.4,
    ["slayer"] = "Nature",
    ["ai"] = "Melee",
    ["speed"] = "VeryFast",
    ["uniquescalar"] = 1.2,
  },
  ["Stranger"] = {
    ["location"] = "Strangelands",
    ["difficulty"] = 20.7,
    ["goldvalue"] = 208,
    ["hits"] = 1000,
    ["minmeleedmg"] = 10,
    ["maxmeleedmg"] = 20,
    ["wrestling"] = 85,
    ["armor"] = 25,
    ["magicresist"] = 100,
    ["magery"] = 100,
    ["minspelldmg"] = 20,
    ["maxspelldmg"] = 30,
    ["slayer"] = "Humanoid",
    ["ai"] = "Mage",
    ["speed"] = "Medium",
    ["uniquescalar"] = 1,
  },
}

-- 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

-- Fill out or format values
for index, creature in pairs(p) do
    local defaultStatArray = {
        ["location"] = "Strangelands",
        ["difficulty"] = "?",
        ["goldvalue"] = "?",
        ["hits"] = "?",
        ["minmeleedmg"] = "",
        ["maxmeleedmg"] = "",
        ["wrestling"] = "",
        ["armor"] = "",
        ["magicresist"] = "",
        ["parry"] = "",
        ["atkspd"] = "?",
        ["magery"] = "",
        ["minspelldmg"] = "",
        ["maxspelldmg"] = "",
        ["poisontype"] = "",
        ["poisoning"] = "",
        ["poisonresist"] = "",
        ["stealth"] = "",
        ["slayer"] = "?",
        ["ai"] = "?",
        ["speed"] = "?",
        ["uniquescalar"] = "?",
        ["bosstype"] = "",
        ["armormin"] = "",
        ["magicresistmin"] = "",
        ["poisonresistmin"] = "",
    }

    if type(creature.location) == "table" then
        local locations = ""
        for i, spawnLocation in pairs(creature.location) do
            if locations ~= "" then
                locations = locations .. "<br>"
            end

            locations = locations .. "[[" .. spawnLocation .. "]]"
        end
        creature.location = locations
    elseif type(creature.location) == "string" and creature.location ~= "?" then
        creature.location = "[[" .. creature.location .. "]]"
    end

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

    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.minmeleedmg and creature.minmeleedmg ~= creature.maxmeleedmg then
        creature.minmeleedmg = creature.minmeleedmg .. " - "
    elseif creature.minmeleedmg == creature.maxmeleedmg then
        creature.maxmeleedmg = ""
    end

    if creature.minspelldmg and creature.minspelldmg ~= creature.maxspelldmg then
        creature.minspelldmg = creature.minspelldmg .. " - "
    elseif creature.minspelldmg == creature.maxspelldmg then
        creature.maxspelldmg = ""
    end

    if creature.tometier then
        creature.tometier = " (Tier " .. creature.tometier .. ")"
    end

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

return p