Module:SummonableCreatureData: Difference between revisions
Jump to navigation
Jump to search
TheGmaster (talk | contribs) mNo edit summary |
TheGmaster (talk | contribs) mNo edit summary |
||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
-- | -- 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, | ||
["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"] = | ["mindmg"] = 18, | ||
["maxdmg"] = | ["maxdmg"] = 22, | ||
["wrestling"] = 90, | ["wrestling"] = 90, | ||
["armor"] = 50, | ["armor"] = 50, | ||
["magicresist"] = | ["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", | ||
}, | }, | ||
[" | ["Zombie"] = { | ||
["slots"] = 1, | ["slots"] = 1, | ||
["combat"] = "Melee", | ["combat"] = "Melee", | ||
["hits"] = 175, | ["hits"] = 175, | ||
["mindmg"] = 12, | ["mindmg"] = 12, | ||
["maxdmg"] = 16, | ["maxdmg"] = 16, | ||
["wrestling"] = | ["wrestling"] = 40, | ||
["armor"] = 25, | ["armor"] = 25, | ||
["magicresist"] = 50, | ["magicresist"] = 50, | ||
["passiveability"] = "Disease", | ["passiveability"] = "Disease", | ||
["spellname"] = "Summon Creature", | ["spellname"] = "Summon Creature", | ||
["spellicon"] = "summoncreature", | ["spellicon"] = "summoncreature", | ||
["creaturepool"] = 1, | |||
["necro"] = true, | |||
}, | }, | ||
[" | ["Skeleton"] = { | ||
["slots"] = 1, | ["slots"] = 1, | ||
["combat"] = "Melee", | ["combat"] = "Melee", | ||
["hits"] = | ["hits"] = 175, | ||
["mindmg"] = 14, | ["mindmg"] = 14, | ||
["maxdmg"] = 18, | ["maxdmg"] = 18, | ||
["wrestling"] = 45, | ["wrestling"] = 45, | ||
["armor"] = 25, | ["armor"] = 25, | ||
["magicresist"] = 50, | ["magicresist"] = 50, | ||
["passiveability"] = "Enrage", | ["passiveability"] = "Enrage", | ||
["spellname"] = "Summon Creature", | ["spellname"] = "Summon Creature", | ||
["spellicon"] = "summoncreature", | ["spellicon"] = "summoncreature", | ||
["creaturepool"] = 1, | |||
["necro"] = true, | |||
}, | }, | ||
[" | ["Skeletal Knight"] = { | ||
["slots"] = 1, | ["slots"] = 1, | ||
["combat"] = "Melee", | ["combat"] = "Melee", | ||
["hits"] = | ["hits"] = 200, | ||
["mindmg"] = 14, | ["mindmg"] = 14, | ||
["maxdmg"] = 18, | ["maxdmg"] = 18, | ||
["wrestling"] = 50, | ["wrestling"] = 50, | ||
["armor"] = 25, | ["armor"] = 25, | ||
["magicresist"] = 50, | ["magicresist"] = 50, | ||
["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, | ||
}, | }, | ||
[" | ["Skeletal Mage"] = { | ||
["slots"] = 1, | ["slots"] = 1, | ||
["combat"] = " | ["combat"] = "Spell", | ||
["hits"] = | ["hits"] = 150, | ||
["mindmg"] = | ["mindmg"] = 7, | ||
["maxdmg"] = | ["maxdmg"] = 9, | ||
["wrestling"] = | ["wrestling"] = 50, | ||
["armor"] = 25, | ["armor"] = 25, | ||
["magicresist"] = | ["magicresist"] = 75, | ||
["spellname"] = "Summon Creature", | ["spellname"] = "Summon Creature", | ||
["creaturepool"] = 3, | |||
["spellicon"] = "summoncreature", | ["spellicon"] = "summoncreature", | ||
["necro"] = true, | ["necro"] = true, | ||
}, | }, | ||
[" | ["Ghost"] = { | ||
["slots"] = 1, | ["slots"] = 1, | ||
["combat"] = "Melee", | ["combat"] = "Melee", | ||
["hits"] = 200, | ["hits"] = 200, | ||
["mindmg"] = | ["mindmg"] = 16, | ||
["maxdmg"] = | ["maxdmg"] = 20, | ||
["wrestling"] = | ["wrestling"] = 80, | ||
["armor"] = 25, | ["armor"] = 25, | ||
["magicresist"] = 50, | ["magicresist"] = 50, | ||
["spellname"] = "Summon Creature", | ["spellname"] = "Summon Creature", | ||
["spellicon"] = "summoncreature", | ["spellicon"] = "summoncreature", | ||
["creaturepool"] = 3, | |||
["necro"] = true, | ["necro"] = true, | ||
}, | }, | ||
Line 587: | Line 197: | ||
["magicresist"] = 50, | ["magicresist"] = 50, | ||
["spellname"] = "Summon Creature", | ["spellname"] = "Summon Creature", | ||
[" | ["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", | ||
[" | ["creaturepool"] = 4, | ||
["spellicon"] = "summoncreature", | ["spellicon"] = "summoncreature", | ||
["necro"] = true, | ["necro"] = true, | ||
Line 619: | Line 229: | ||
} | } | ||
-- | 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 | 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) | |||
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 | 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. | 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 | ||
end | |||
if creature | for stat, defaultValue in pairs(defaultStatArray) do | ||
if creature[stat] == nil then | |||
creature[stat] = defaultValue | |||
end | 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 | 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 | end | ||
p[tameableName] = CloneTable(tameableArray[tameableName]) | |||
p[tameableName].spellname = "Summon Creature" | |||
p[tameableName].spellicon = "summoncreature" | |||
p[tameableName].creaturepool = "<br>(Pool " .. pool .. ")" | |||
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