Module:ItemTables: Difference between revisions

typo
capacitor move slow
 
(11 intermediate revisions by 3 users not shown)
Line 4: Line 4:
local commas = require("Module:Addcommas")
local commas = require("Module:Addcommas")
local GameData = require("Module:GameData")
local GameData = require("Module:GameData")
-- Override dead/hidden stats that exist in data but don't actually work in‑game.
-- Keys are item Names, values are tables of { [internalStatName] = replacementValue }
local deadStatOverrides = {
    ["Witchmail"] = { CooldownReduction = "0" },
    ["Refresher"] = { BulletResist = "0", TechResist = "0" },
    ["Glass Cannon"] = { SlowPercent = "0", MovementSpeedSlow = "0" },
    ["Majestic Leap"] = { SlowPercent = "0", MovementSpeedSlow = "0" }
}


  -- Translate internal attribute names to plain text for module calls
  -- Translate internal attribute names to plain text for module calls
Line 27: Line 18:
friendly_to_internal["spirit resist reduction"] = { "TechArmorDamageReduction", "MagicResistReduction" }
friendly_to_internal["spirit resist reduction"] = { "TechArmorDamageReduction", "MagicResistReduction" }
friendly_to_internal["bonus health"] = { "BonusHealth" }
friendly_to_internal["bonus health"] = { "BonusHealth" }
friendly_to_internal["bonus base health"] = { "BonusBaseHealth", "MaxHealthLossPercent" }
friendly_to_internal["health regen"] = { "BonusHealthRegen" }
friendly_to_internal["health regen"] = { "BonusHealthRegen" }
friendly_to_internal["regeneration"] = { "Regeneration" }
friendly_to_internal["regeneration"] = { "Regeneration" }
Line 40: Line 32:
friendly_to_internal["move speed"] = { "BonusMoveSpeed", "ActiveBonusMoveSpeed", "FervorMovespeed",}
friendly_to_internal["move speed"] = { "BonusMoveSpeed", "ActiveBonusMoveSpeed", "FervorMovespeed",}
friendly_to_internal["sprint speed"] = { "BonusSprintSpeed", "InvisMoveSpeedMod" }
friendly_to_internal["sprint speed"] = { "BonusSprintSpeed", "InvisMoveSpeedMod" }
friendly_to_internal["movement slow"] = { "SlowPercent", "MovementSpeedSlow" }
friendly_to_internal["movement slow"] = { "SlowPercent", "MovementSpeedSlow", "MaxSlowPercent" }
friendly_to_internal["reload time"] = { "ReloadSpeedMultipler" }
friendly_to_internal["reload time"] = { "ReloadSpeedMultipler" }
friendly_to_internal["heavy melee distance"] = { "MeleeDistanceScale" }
friendly_to_internal["heavy melee distance"] = { "MeleeDistanceScale" }
Line 54: Line 46:
friendly_to_internal["item cooldown reduction"] = { "ItemCooldownReduction" }
friendly_to_internal["item cooldown reduction"] = { "ItemCooldownReduction" }
friendly_to_internal["charge cooldown reduction"] = { "CooldownReductionOnChargedAbilities" }
friendly_to_internal["charge cooldown reduction"] = { "CooldownReductionOnChargedAbilities" }
friendly_to_internal["debuff resist"] = { "StatusResistancePercent" }
friendly_to_internal["debuff resist"] = { "StatusResistancePercent", "FervorStatusResistancePercent" }
friendly_to_internal["ability range"] = { "TechRangeMultiplier", "ImbuedTechRangeMultiplier"}
friendly_to_internal["ability range"] = { "TechRangeMultiplier", "ImbuedTechRangeMultiplier"}
friendly_to_internal["falloff range"] = { "BonusAttackRangePercent" }
friendly_to_internal["falloff range"] = { "BonusAttackRangePercent" }
Line 61: Line 53:
friendly_to_internal["dash distance"] = { "GroundDashReductionPercent", "AirMoveIncreasePercent" }
friendly_to_internal["dash distance"] = { "GroundDashReductionPercent", "AirMoveIncreasePercent" }
friendly_to_internal["damage reduction"] = { "OutgoingDamagePenaltyPercent", "DeathImmunityDamageReduction" }
friendly_to_internal["damage reduction"] = { "OutgoingDamagePenaltyPercent", "DeathImmunityDamageReduction" }
friendly_to_internal["gravity scale"] = { "GravityScale" }
-- Override dead/hidden stats that exist in data but don't actually work in‑game.
-- Keys are item Names, values are tables of { [internalStatName] = replacementValue }
local deadStatOverrides = {
    ["Witchmail"] = { CooldownReduction = "0" },
    ["Refresher"] = { BulletResist = "0", TechResist = "0" },
    ["Glass Cannon"] = { SlowPercent = "0", MovementSpeedSlow = "0" },
    ["Majestic Leap"] = { SlowPercent = "0", MovementSpeedSlow = "0" },
    ["Improved Spirit"] = { BonusSprintSpeed = "0"},
}


--- Copies original table with its children as deep as possible. Does not handle metatables. (Copy is needed because Lua passes by reference, not value)
--- Copies original table with its children as deep as possible. Does not handle metatables. (Copy is needed because Lua passes by reference, not value)
Line 115: Line 118:
"SlideScale",
"SlideScale",
"StaminaCooldownReduction",
"StaminaCooldownReduction",
"SlowPercent", "MovementSpeedSlow",
"SlowPercent", "MovementSpeedSlow", "MaxSlowPercent",
"HealAmpReceivePenaltyPercent", "HealAmpRegenPenaltyPercent",
"HealAmpReceivePenaltyPercent", "HealAmpRegenPenaltyPercent",
"ImbuedBonusDuration", "NonImbuedBonusDuration", "BonusAbilityDurationPercent",
"ImbuedBonusDuration", "NonImbuedBonusDuration", "BonusAbilityDurationPercent",
Line 127: Line 130:
"TechDamageReduction",
"TechDamageReduction",
"OutgoingDamagePenaltyPercent", "DeathImmunityDamageReduction", "TechPowerPercent",
"OutgoingDamagePenaltyPercent", "DeathImmunityDamageReduction", "TechPowerPercent",
"GroundDashReductionPercent", "AirMoveIncreasePercent"
"GroundDashReductionPercent", "AirMoveIncreasePercent",
"GravityScale",
"BonusBaseHealth", "MaxHealthLossPercent"
     },
     },
["m/s"] = { "BonusMoveSpeed", "ActiveBonusMoveSpeed", "BonusSprintSpeed", "FervorMovespeed", "InvisMoveSpeedMod" },
["m/s"] = { "BonusMoveSpeed", "ActiveBonusMoveSpeed", "BonusSprintSpeed", "FervorMovespeed", "InvisMoveSpeedMod" },
Line 285: Line 290:
     local disclaimer = frame:preprocess(
     local disclaimer = frame:preprocess(
         '<div class="item-stat-table-disclaimer">'
         '<div class="item-stat-table-disclaimer">'
         .. "This is an automatic list. "
         .. 'This is a dynamic list '
         .. "[" .. tostring(edit_url) .. " Click here]"
        .. '<span class="item-stat-table-list-name">"' .. property .. '"</span>. '
        .. " to correct the contents."
         .. '[' .. tostring(edit_url) .. ' Edit contents].'
         .. "</div>"
         .. '</div>'
     )
     )