From 2c5ec2c0a4d0faf6a5285f82dd9e5853c483d4fe Mon Sep 17 00:00:00 2001 From: ifnjeff Date: Wed, 21 Jul 2021 02:56:51 -0700 Subject: [PATCH] Implement new enchantment sources --- src/Classes/Item.lua | 6 +- src/Classes/ItemsTab.lua | 43 +++++--- src/Data/EnchantmentBelt.lua | 2 +- src/Data/EnchantmentBody.lua | 92 ++++++++++++++++ src/Data/EnchantmentBoots.lua | 6 +- src/Data/EnchantmentWeapon.lua | 196 +++++++++++++++++++++++++++++++++ src/Export/Scripts/enchant.lua | 51 +++++++-- src/Modules/Data.lua | 22 ++-- 8 files changed, 377 insertions(+), 41 deletions(-) create mode 100644 src/Data/EnchantmentBody.lua create mode 100644 src/Data/EnchantmentWeapon.lua diff --git a/src/Classes/Item.lua b/src/Classes/Item.lua index fd91b214..6d07b9ff 100644 --- a/src/Classes/Item.lua +++ b/src/Classes/Item.lua @@ -371,7 +371,11 @@ function ItemClass:ParseRaw(raw) self.affixes = (self.base.subType and data.itemMods[self.base.type..self.base.subType]) or data.itemMods[self.base.type] or data.itemMods.Item - self.enchantments = data.enchantments[self.base.type] + if self.base.weapon then + self.enchantments = data.enchantments["Weapon"] + else + self.enchantments = data.enchantments[self.base.type] + end self.corruptable = self.base.type ~= "Flask" and self.base.subType ~= "Cluster" self.influenceTags = data.specialBaseTags[self.type] self.canBeInfluenced = self.influenceTags diff --git a/src/Classes/ItemsTab.lua b/src/Classes/ItemsTab.lua index 2c948309..96e856b0 100644 --- a/src/Classes/ItemsTab.lua +++ b/src/Classes/ItemsTab.lua @@ -1757,8 +1757,8 @@ function ItemsTabClass:EnchantDisplayItem(enchantSlot) local controls = { } local enchantments = self.displayItem.enchantments local haveSkills = true - for _, lab in ipairs(self.build.data.labyrinths) do - if self.displayItem.enchantments[lab.name] then + for _, source in ipairs(self.build.data.enchantmentSource) do + if self.displayItem.enchantments[source.name] then haveSkills = false break end @@ -1787,13 +1787,13 @@ function ItemsTabClass:EnchantDisplayItem(enchantSlot) end table.sort(skillList) end - local labyrinthList = { } - local function buildLabyrinthList() - wipeTable(labyrinthList) + local enchantmentSourceList = { } + local function buildEnchantmentSourceList() + wipeTable(enchantmentSourceList) local list = haveSkills and enchantments[skillList[controls.skill and controls.skill.selIndex or 1]] or enchantments - for _, lab in ipairs(self.build.data.labyrinths) do - if list[lab.name] then - t_insert(labyrinthList, lab) + for _, source in ipairs(self.build.data.enchantmentSource) do + if list[source.name] then + t_insert(enchantmentSourceList, source) end end end @@ -1801,30 +1801,39 @@ function ItemsTabClass:EnchantDisplayItem(enchantSlot) local function buildEnchantmentList() wipeTable(enchantmentList) local list = haveSkills and enchantments[skillList[controls.skill and controls.skill.selIndex or 1]] or enchantments - for _, enchantment in ipairs(list[labyrinthList[controls.labyrinth and controls.labyrinth.selIndex or 1].name]) do + for _, enchantment in ipairs(list[enchantmentSourceList[controls.enchantmentSource and controls.enchantmentSource.selIndex or 1].name]) do t_insert(enchantmentList, enchantment) end end if haveSkills then buildSkillList(true) end - buildLabyrinthList() + buildEnchantmentSourceList() buildEnchantmentList() local function enchantItem() local item = new("Item", self.displayItem:BuildRaw()) item.id = self.displayItem.id - if #item.enchantModLines >= self.enchantSlot then - t_remove(item.enchantModLines, self.enchantSlot) - end local list = haveSkills and enchantments[controls.skill.list[controls.skill.selIndex]] or enchantments - t_insert(item.enchantModLines, self.enchantSlot, { crafted = true, line = list[controls.labyrinth.list[controls.labyrinth.selIndex].name][controls.enchantment.selIndex] }) + local line = list[controls.enchantmentSource.list[controls.enchantmentSource.selIndex].name][controls.enchantment.selIndex] + local first, second = line:match("([^/]+)/([^/]+)") + if first then + item.enchantModLines = { { crafted = true, line = first }, { crafted = true, line = second } } + else + if not item.canHaveTwoEnchants and #item.enchantModLines > 1 then + item.enchantModLines = { item.enchantModLines[1] } + end + if #item.enchantModLines >= self.enchantSlot then + t_remove(item.enchantModLines, self.enchantSlot) + end + t_insert(item.enchantModLines, self.enchantSlot, { crafted = true, line = line}) + end item:BuildAndParseRaw() return item end if haveSkills then controls.skillLabel = new("LabelControl", {"TOPRIGHT",nil,"TOPLEFT"}, 95, 20, 0, 16, "^7Skill:") controls.skill = new("DropDownControl", {"TOPLEFT",nil,"TOPLEFT"}, 100, 20, 180, 18, skillList, function(index, value) - buildLabyrinthList() + buildEnchantmentSourceList() buildEnchantmentList() controls.enchantment:SetSel(1) end) @@ -1840,8 +1849,8 @@ function ItemsTabClass:EnchantDisplayItem(enchantSlot) controls.allSkills.enabled = false end end - controls.labyrinthLabel = new("LabelControl", {"TOPRIGHT",nil,"TOPLEFT"}, 95, 45, 0, 16, "^7Labyrinth:") - controls.labyrinth = new("DropDownControl", {"TOPLEFT",nil,"TOPLEFT"}, 100, 45, 100, 18, labyrinthList, function(index, value) + controls.enchantmentSourceLabel = new("LabelControl", {"TOPRIGHT",nil,"TOPLEFT"}, 95, 45, 0, 16, "^7Source:") + controls.enchantmentSource = new("DropDownControl", {"TOPLEFT",nil,"TOPLEFT"}, 100, 45, 180, 18, enchantmentSourceList, function(index, value) buildEnchantmentList() controls.enchantment:SetSel(m_min(controls.enchantment.selIndex, #enchantmentList)) end) diff --git a/src/Data/EnchantmentBelt.lua b/src/Data/EnchantmentBelt.lua index b2e7b5d9..0369f95a 100644 --- a/src/Data/EnchantmentBelt.lua +++ b/src/Data/EnchantmentBelt.lua @@ -2,7 +2,7 @@ -- Item data (c) Grinding Gear Games return { - ["HARVEST"] = { + ["DEDICATION"] = { "15% increased Area of Effect while you have Arcane Surge", "+300 to Armour while you have Fortify", "Recover 2% of Life when you Kill an Enemy while you have Rage", diff --git a/src/Data/EnchantmentBody.lua b/src/Data/EnchantmentBody.lua new file mode 100644 index 00000000..48851067 --- /dev/null +++ b/src/Data/EnchantmentBody.lua @@ -0,0 +1,92 @@ +-- This file is automatically generated, do not edit! +-- Item data (c) Grinding Gear Games + +return { + ["HARVEST"] = { + "Quality does not increase Defences/Grants +1 to Maximum Life per 2% Quality", + "Quality does not increase Defences/Grants +1 to Maximum Mana per 2% Quality", + "Quality does not increase Defences/Grants +1 to Strength per 2% Quality", + "Quality does not increase Defences/Grants +1 to Dexterity per 2% Quality", + "Quality does not increase Defences/Grants +1 to Intelligence per 2% Quality", + "Quality does not increase Defences/Grants +1% to Fire Resistance per 2% Quality", + "Quality does not increase Defences/Grants +1% to Cold Resistance per 2% Quality", + "Quality does not increase Defences/Grants +1% to Lightning Resistance per 2% Quality", + }, + ["HEIST"] = { + "Life Modifiers have 8% increased Effect", + "Defence Modifiers have 8% increased Effect", + "Mana Modifiers have 8% increased Effect", + "Resistance Modifiers have 8% increased Effect", + "Attribute Modifiers have 8% increased Effect", + "40% reduced Attribute Requirements", + "All Sockets Linked", + "Has 2 White Sockets", + "Life Modifiers have 6% increased Effect/Resistance Modifiers have 6% increased Effect", + "Attribute Modifiers have 6% increased Effect/Life Modifiers have 6% increased Effect", + "25% reduced Attribute Requirements/Life Modifiers have 6% increased Effect", + "All Sockets Linked/Life Modifiers have 6% increased Effect", + "Has no Red Sockets/Life Modifiers have 8% increased Effect", + "Has no Green Sockets/Life Modifiers have 8% increased Effect", + "Has no Blue Sockets/Life Modifiers have 8% increased Effect", + "Has 1 White Socket/Life Modifiers have 8% increased Effect", + "Defence Modifiers have 6% increased Effect/Resistance Modifiers have 6% increased Effect", + "Attribute Modifiers have 6% increased Effect/Defence Modifiers have 6% increased Effect", + "25% reduced Attribute Requirements/Defence Modifiers have 6% increased Effect", + "All Sockets Linked/Defence Modifiers have 6% increased Effect", + "Has no Red Sockets/Defence Modifiers have 8% increased Effect", + "Has no Green Sockets/Defence Modifiers have 8% increased Effect", + "Has no Blue Sockets/Defence Modifiers have 8% increased Effect", + "Has 1 White Socket/Defence Modifiers have 8% increased Effect", + "Mana Modifiers have 6% increased Effect/Resistance Modifiers have 6% increased Effect", + "Attribute Modifiers have 6% increased Effect/Mana Modifiers have 6% increased Effect", + "25% reduced Attribute Requirements/Mana Modifiers have 6% increased Effect", + "All Sockets Linked/Mana Modifiers have 6% increased Effect", + "Has no Red Sockets/Mana Modifiers have 8% increased Effect", + "Has no Green Sockets/Mana Modifiers have 8% increased Effect", + "Has no Blue Sockets/Mana Modifiers have 8% increased Effect", + "Has 1 White Socket/Mana Modifiers have 8% increased Effect", + "All Sockets Linked/Resistance Modifiers have 6% increased Effect", + "Has no Red Sockets/Resistance Modifiers have 8% increased Effect", + "Has no Green Sockets/Resistance Modifiers have 8% increased Effect", + "Has no Blue Sockets/Resistance Modifiers have 8% increased Effect", + "Has 1 White Socket/Resistance Modifiers have 8% increased Effect", + "All Sockets Linked/Attribute Modifiers have 6% increased Effect", + "Has no Red Sockets/Attribute Modifiers have 8% increased Effect", + "Has no Green Sockets/Attribute Modifiers have 8% increased Effect", + "Has no Blue Sockets/Attribute Modifiers have 8% increased Effect", + "Has 1 White Socket/Attribute Modifiers have 8% increased Effect", + "Life Modifiers have 12% increased Effect/Resistance Modifiers have 50% reduced Effect", + "-3 to maximum Sockets/Life Modifiers have 15% increased Effect", + "200% increased Attribute Requirements/Life Modifiers have 15% increased Effect", + "All Sockets are Red/Life Modifiers have 10% increased Effect", + "All Sockets are Blue/Life Modifiers have 10% increased Effect", + "All Sockets are Green/Life Modifiers have 10% increased Effect", + "Defence Modifiers have 12% increased Effect/Resistance Modifiers have 50% reduced Effect", + "-3 to maximum Sockets/Defence Modifiers have 15% increased Effect", + "200% increased Attribute Requirements/Defence Modifiers have 15% increased Effect", + "All Sockets are Red/Defence Modifiers have 10% increased Effect", + "All Sockets are Blue/Defence Modifiers have 10% increased Effect", + "All Sockets are Green/Defence Modifiers have 10% increased Effect", + "Mana Modifiers have 12% increased Effect/Resistance Modifiers have 50% reduced Effect", + "-3 to maximum Sockets/Mana Modifiers have 15% increased Effect", + "200% increased Attribute Requirements/Mana Modifiers have 15% increased Effect", + "All Sockets are Red/Mana Modifiers have 10% increased Effect", + "All Sockets are Blue/Mana Modifiers have 10% increased Effect", + "All Sockets are Green/Mana Modifiers have 10% increased Effect", + "Life Modifiers have 50% reduced Effect/Resistance Modifiers have 12% increased Effect", + "Defence Modifiers have 50% reduced Effect/Resistance Modifiers have 12% increased Effect", + "-3 to maximum Sockets/Resistance Modifiers have 15% increased Effect", + "200% increased Attribute Requirements/Resistance Modifiers have 15% increased Effect", + "All Sockets are Red/Resistance Modifiers have 10% increased Effect", + "All Sockets are Blue/Resistance Modifiers have 10% increased Effect", + "All Sockets are Green/Resistance Modifiers have 10% increased Effect", + "Attribute Modifiers have 12% increased Effect/Life Modifiers have 50% reduced Effect", + "Attribute Modifiers have 12% increased Effect/Defence Modifiers have 50% reduced Effect", + "-3 to maximum Sockets/Attribute Modifiers have 15% increased Effect", + "200% increased Attribute Requirements/Attribute Modifiers have 15% increased Effect", + "All Sockets are Red/Attribute Modifiers have 10% increased Effect", + "All Sockets are Blue/Attribute Modifiers have 10% increased Effect", + "All Sockets are Green/Attribute Modifiers have 10% increased Effect", + "Can have 1 additional Crafted Modifier", + }, +} \ No newline at end of file diff --git a/src/Data/EnchantmentBoots.lua b/src/Data/EnchantmentBoots.lua index ecafd798..1183a47e 100644 --- a/src/Data/EnchantmentBoots.lua +++ b/src/Data/EnchantmentBoots.lua @@ -7,7 +7,7 @@ return { "Regenerate 1% of Life per second if you were Hit Recently", "10% reduced Mana Cost of Skills if you've been Hit Recently", "50% chance to Avoid being Stunned if you've Killed Recently", - "5% chance to Dodge Spell Hits if you've taken Spell Damage Recently", + "5% chance to Dodge Spell Hits if you've/taken Spell Damage Recently", "8% increased Attack and Cast Speed if you've Killed Recently", "Adds 16 to 24 Cold Damage if you've been Hit Recently", "Adds 1 to 56 Lightning Damage if you haven't Killed Recently", @@ -25,7 +25,7 @@ return { "Regenerate 1.5% of Life per second if you were Hit Recently", "14% reduced Mana Cost of Skills if you've been Hit Recently", "65% chance to Avoid being Stunned if you've Killed Recently", - "6% chance to Dodge Spell Hits if you've taken Spell Damage Recently", + "6% chance to Dodge Spell Hits if you've/taken Spell Damage Recently", "12% increased Attack and Cast Speed if you've Killed Recently", "Adds 33 to 50 Cold Damage if you've been Hit Recently", "Adds 1 to 120 Lightning Damage if you haven't Killed Recently", @@ -43,7 +43,7 @@ return { "Regenerate 2% of Life per second if you were Hit Recently", "18% reduced Mana Cost of Skills if you've been Hit Recently", "80% chance to Avoid being Stunned if you've Killed Recently", - "8% chance to Dodge Spell Hits if you've taken Spell Damage Recently", + "8% chance to Dodge Spell Hits if you've/taken Spell Damage Recently", "16% increased Attack and Cast Speed if you've Killed Recently", "Adds 45 to 68 Cold Damage if you've been Hit Recently", "Adds 1 to 160 Lightning Damage if you haven't Killed Recently", diff --git a/src/Data/EnchantmentWeapon.lua b/src/Data/EnchantmentWeapon.lua new file mode 100644 index 00000000..b81cf89c --- /dev/null +++ b/src/Data/EnchantmentWeapon.lua @@ -0,0 +1,196 @@ +-- This file is automatically generated, do not edit! +-- Item data (c) Grinding Gear Games + +return { + ["HARVEST"] = { + "Quality does not increase Physical Damage/1% increased Critical Strike Chance per 4% Quality", + "Quality does not increase Physical Damage/Grants 1% increased Accuracy per 2% Quality", + "Quality does not increase Physical Damage/1% increased Attack Speed per 8% Quality", + "Quality does not increase Physical Damage/+1 Weapon Range per 10% Quality", + "Quality does not increase Physical Damage/Grants 1% increased Elemental Damage per 2% Quality", + "Quality does not increase Physical Damage/Grants 1% increased Area of Effect per 4% Quality", + }, + ["HEIST"] = { + "Physical Modifiers have 8% increased Effect", + "Fire Modifiers have 8% increased Effect", + "Lightning Modifiers have 8% increased Effect", + "Cold Modifiers have 8% increased Effect", + "Chaos Modifiers have 8% increased Effect", + "Caster Damage Modifiers have 8% increased Effect", + "Mana Modifiers have 8% increased Effect", + "Speed Modifiers have 8% increased Effect", + "Critical Modifiers have 8% increased Effect", + "Attribute Modifiers have 8% increased Effect", + "Ailment Modifiers have 8% increased Effect", + "40% reduced Attribute Requirements", + "All Sockets Linked", + "Has 2 White Sockets", + "Physical Modifiers have 6% increased Effect/Speed Modifiers have 6% increased Effect", + "Critical Modifiers have 6% increased Effect/Physical Modifiers have 6% increased Effect", + "Attribute Modifiers have 6% increased Effect/Physical Modifiers have 6% increased Effect", + "Ailment Modifiers have 6% increased Effect/Physical Modifiers have 6% increased Effect", + "25% reduced Attribute Requirements/Physical Modifiers have 6% increased Effect", + "All Sockets Linked/Physical Modifiers have 6% increased Effect", + "Has no Red Sockets/Physical Modifiers have 8% increased Effect", + "Has no Green Sockets/Physical Modifiers have 8% increased Effect", + "Has no Blue Sockets/Physical Modifiers have 8% increased Effect", + "Has 1 White Socket/Physical Modifiers have 8% increased Effect", + "Fire Modifiers have 6% increased Effect/Speed Modifiers have 6% increased Effect", + "Critical Modifiers have 6% increased Effect/Fire Modifiers have 6% increased Effect", + "Attribute Modifiers have 6% increased Effect/Fire Modifiers have 6% increased Effect", + "Ailment Modifiers have 6% increased Effect/Fire Modifiers have 6% increased Effect", + "25% reduced Attribute Requirements/Fire Modifiers have 6% increased Effect", + "All Sockets Linked/Fire Modifiers have 6% increased Effect", + "Has no Red Sockets/Fire Modifiers have 8% increased Effect", + "Has no Green Sockets/Fire Modifiers have 8% increased Effect", + "Has no Blue Sockets/Fire Modifiers have 8% increased Effect", + "Has 1 White Socket/Fire Modifiers have 8% increased Effect", + "Lightning Modifiers have 6% increased Effect/Speed Modifiers have 6% increased Effect", + "Critical Modifiers have 6% increased Effect/Lightning Modifiers have 6% increased Effect", + "Attribute Modifiers have 6% increased Effect/Lightning Modifiers have 6% increased Effect", + "Ailment Modifiers have 6% increased Effect/Lightning Modifiers have 6% increased Effect", + "25% reduced Attribute Requirements/Lightning Modifiers have 6% increased Effect", + "All Sockets Linked/Lightning Modifiers have 6% increased Effect", + "Has no Red Sockets/Lightning Modifiers have 8% increased Effect", + "Has no Green Sockets/Lightning Modifiers have 8% increased Effect", + "Has no Blue Sockets/Lightning Modifiers have 8% increased Effect", + "Has 1 White Socket/Lightning Modifiers have 8% increased Effect", + "Cold Modifiers have 6% increased Effect/Speed Modifiers have 6% increased Effect", + "Cold Modifiers have 6% increased Effect/Critical Modifiers have 6% increased Effect", + "Attribute Modifiers have 6% increased Effect/Cold Modifiers have 6% increased Effect", + "Ailment Modifiers have 6% increased Effect/Cold Modifiers have 6% increased Effect", + "25% reduced Attribute Requirements/Cold Modifiers have 6% increased Effect", + "All Sockets Linked/Cold Modifiers have 6% increased Effect", + "Has no Red Sockets/Cold Modifiers have 8% increased Effect", + "Has no Green Sockets/Cold Modifiers have 8% increased Effect", + "Has no Blue Sockets/Cold Modifiers have 8% increased Effect", + "Has 1 White Socket/Cold Modifiers have 8% increased Effect", + "Chaos Modifiers have 6% increased Effect/Speed Modifiers have 6% increased Effect", + "Chaos Modifiers have 6% increased Effect/Critical Modifiers have 6% increased Effect", + "Attribute Modifiers have 6% increased Effect/Chaos Modifiers have 6% increased Effect", + "Ailment Modifiers have 6% increased Effect/Chaos Modifiers have 6% increased Effect", + "25% reduced Attribute Requirements/Chaos Modifiers have 6% increased Effect", + "All Sockets Linked/Chaos Modifiers have 6% increased Effect", + "Has no Red Sockets/Chaos Modifiers have 8% increased Effect", + "Has no Green Sockets/Chaos Modifiers have 8% increased Effect", + "Has no Blue Sockets/Chaos Modifiers have 8% increased Effect", + "Has 1 White Socket/Chaos Modifiers have 8% increased Effect", + "Caster Damage Modifiers have 6% increased Effect/Speed Modifiers have 6% increased Effect", + "Caster Damage Modifiers have 6% increased Effect/Critical Modifiers have 6% increased Effect", + "Attribute Modifiers have 6% increased Effect/Caster Damage Modifiers have 6% increased Effect", + "Ailment Modifiers have 6% increased Effect/Caster Damage Modifiers have 6% increased Effect", + "25% reduced Attribute Requirements/Caster Damage Modifiers have 6% increased Effect", + "All Sockets Linked/Caster Damage Modifiers have 6% increased Effect", + "Has no Red Sockets/Caster Damage Modifiers have 8% increased Effect", + "Has no Green Sockets/Caster Damage Modifiers have 8% increased Effect", + "Has no Blue Sockets/Caster Damage Modifiers have 8% increased Effect", + "Has 1 White Socket/Caster Damage Modifiers have 8% increased Effect", + "Mana Modifiers have 6% increased Effect/Speed Modifiers have 6% increased Effect", + "Critical Modifiers have 6% increased Effect/Mana Modifiers have 6% increased Effect", + "Attribute Modifiers have 6% increased Effect/Mana Modifiers have 6% increased Effect", + "Ailment Modifiers have 6% increased Effect/Mana Modifiers have 6% increased Effect", + "25% reduced Attribute Requirements/Mana Modifiers have 6% increased Effect", + "All Sockets Linked/Mana Modifiers have 6% increased Effect", + "Has no Red Sockets/Mana Modifiers have 8% increased Effect", + "Has no Green Sockets/Mana Modifiers have 8% increased Effect", + "Has no Blue Sockets/Mana Modifiers have 8% increased Effect", + "Has 1 White Socket/Mana Modifiers have 8% increased Effect", + "25% reduced Attribute Requirements/Speed Modifiers have 6% increased Effect", + "All Sockets Linked/Speed Modifiers have 6% increased Effect", + "Has no Red Sockets/Speed Modifiers have 8% increased Effect", + "Has no Green Sockets/Speed Modifiers have 8% increased Effect", + "Has no Blue Sockets/Speed Modifiers have 8% increased Effect", + "Has 1 White Socket/Speed Modifiers have 8% increased Effect", + "25% reduced Attribute Requirements/Critical Modifiers have 6% increased Effect", + "All Sockets Linked/Critical Modifiers have 6% increased Effect", + "Has no Red Sockets/Critical Modifiers have 8% increased Effect", + "Has no Green Sockets/Critical Modifiers have 8% increased Effect", + "Has no Blue Sockets/Critical Modifiers have 8% increased Effect", + "Has 1 White Socket/Critical Modifiers have 8% increased Effect", + "25% reduced Attribute Requirements/Attribute Modifiers have 6% increased Effect", + "All Sockets Linked/Attribute Modifiers have 6% increased Effect", + "Has no Red Sockets/Attribute Modifiers have 8% increased Effect", + "Has no Green Sockets/Attribute Modifiers have 8% increased Effect", + "Has no Blue Sockets/Attribute Modifiers have 8% increased Effect", + "Has 1 White Socket/Attribute Modifiers have 8% increased Effect", + "25% reduced Attribute Requirements/Ailment Modifiers have 6% increased Effect", + "All Sockets Linked/Ailment Modifiers have 6% increased Effect", + "Has no Red Sockets/Ailment Modifiers have 8% increased Effect", + "Has no Green Sockets/Ailment Modifiers have 8% increased Effect", + "Has no Blue Sockets/Ailment Modifiers have 8% increased Effect", + "Has 1 White Socket/Ailment Modifiers have 8% increased Effect", + "Physical Modifiers have 10% increased Effect/Speed Modifiers have 25% reduced Effect", + "Critical Modifiers have 25% reduced Effect/Physical Modifiers have 10% increased Effect", + "-3 to maximum Sockets/Physical Modifiers have 15% increased Effect", + "200% increased Attribute Requirements/Physical Modifiers have 15% increased Effect", + "All Sockets are Red/Physical Modifiers have 10% increased Effect", + "All Sockets are Blue/Physical Modifiers have 10% increased Effect", + "All Sockets are Green/Physical Modifiers have 10% increased Effect", + "Fire Modifiers have 10% increased Effect/Speed Modifiers have 25% reduced Effect", + "Critical Modifiers have 25% reduced Effect/Fire Modifiers have 10% increased Effect", + "-3 to maximum Sockets/Fire Modifiers have 15% increased Effect", + "200% increased Attribute Requirements/Fire Modifiers have 15% increased Effect", + "All Sockets are Red/Fire Modifiers have 10% increased Effect", + "All Sockets are Blue/Fire Modifiers have 10% increased Effect", + "All Sockets are Green/Fire Modifiers have 10% increased Effect", + "Lightning Modifiers have 10% increased Effect/Speed Modifiers have 25% reduced Effect", + "Critical Modifiers have 25% reduced Effect/Lightning Modifiers have 10% increased Effect", + "-3 to maximum Sockets/Lightning Modifiers have 15% increased Effect", + "200% increased Attribute Requirements/Lightning Modifiers have 15% increased Effect", + "All Sockets are Red/Lightning Modifiers have 10% increased Effect", + "All Sockets are Blue/Lightning Modifiers have 10% increased Effect", + "All Sockets are Green/Lightning Modifiers have 10% increased Effect", + "Cold Modifiers have 10% increased Effect/Speed Modifiers have 25% reduced Effect", + "Cold Modifiers have 10% increased Effect/Critical Modifiers have 25% reduced Effect", + "-3 to maximum Sockets/Cold Modifiers have 15% increased Effect", + "200% increased Attribute Requirements/Cold Modifiers have 15% increased Effect", + "All Sockets are Red/Cold Modifiers have 10% increased Effect", + "All Sockets are Blue/Cold Modifiers have 10% increased Effect", + "All Sockets are Green/Cold Modifiers have 10% increased Effect", + "Chaos Modifiers have 10% increased Effect/Speed Modifiers have 25% reduced Effect", + "Chaos Modifiers have 10% increased Effect/Critical Modifiers have 25% reduced Effect", + "-3 to maximum Sockets/Chaos Modifiers have 15% increased Effect", + "200% increased Attribute Requirements/Chaos Modifiers have 15% increased Effect", + "All Sockets are Red/Chaos Modifiers have 10% increased Effect", + "All Sockets are Blue/Chaos Modifiers have 10% increased Effect", + "All Sockets are Green/Chaos Modifiers have 10% increased Effect", + "Caster Damage Modifiers have 10% increased Effect/Speed Modifiers have 25% reduced Effect", + "Caster Damage Modifiers have 10% increased Effect/Critical Modifiers have 25% reduced Effect", + "-3 to maximum Sockets/Caster Damage Modifiers have 15% increased Effect", + "200% increased Attribute Requirements/Caster Damage Modifiers have 15% increased Effect", + "All Sockets are Red/Caster Damage Modifiers have 10% increased Effect", + "All Sockets are Blue/Caster Damage Modifiers have 10% increased Effect", + "All Sockets are Green/Caster Damage Modifiers have 10% increased Effect", + "Mana Modifiers have 10% increased Effect/Speed Modifiers have 25% reduced Effect", + "Critical Modifiers have 25% reduced Effect/Mana Modifiers have 10% increased Effect", + "-3 to maximum Sockets/Mana Modifiers have 15% increased Effect", + "200% increased Attribute Requirements/Mana Modifiers have 15% increased Effect", + "All Sockets are Red/Mana Modifiers have 10% increased Effect", + "All Sockets are Blue/Mana Modifiers have 10% increased Effect", + "All Sockets are Green/Mana Modifiers have 10% increased Effect", + "Damage Modifiers have 25% reduced Effect/Speed Modifiers have 12% increased Effect", + "-3 to maximum Sockets/Speed Modifiers have 15% increased Effect", + "200% increased Attribute Requirements/Speed Modifiers have 15% increased Effect", + "All Sockets are Red/Speed Modifiers have 10% increased Effect", + "All Sockets are Blue/Speed Modifiers have 10% increased Effect", + "All Sockets are Green/Speed Modifiers have 10% increased Effect", + "Critical Modifiers have 12% increased Effect/Damage Modifiers have 25% reduced Effect", + "-3 to maximum Sockets/Critical Modifiers have 15% increased Effect", + "200% increased Attribute Requirements/Critical Modifiers have 15% increased Effect", + "All Sockets are Red/Critical Modifiers have 10% increased Effect", + "All Sockets are Blue/Critical Modifiers have 10% increased Effect", + "All Sockets are Green/Critical Modifiers have 10% increased Effect", + "Attribute Modifiers have 12% increased Effect/Damage Modifiers have 25% reduced Effect", + "-3 to maximum Sockets/Attribute Modifiers have 15% increased Effect", + "200% increased Attribute Requirements/Attribute Modifiers have 15% increased Effect", + "All Sockets are Red/Attribute Modifiers have 10% increased Effect", + "All Sockets are Blue/Attribute Modifiers have 10% increased Effect", + "All Sockets are Green/Attribute Modifiers have 10% increased Effect", + "-3 to maximum Sockets/Ailment Modifiers have 15% increased Effect", + "200% increased Attribute Requirements/Ailment Modifiers have 15% increased Effect", + "All Sockets are Red/Ailment Modifiers have 10% increased Effect", + "All Sockets are Blue/Ailment Modifiers have 10% increased Effect", + "All Sockets are Green/Ailment Modifiers have 10% increased Effect", + "Can have 1 additional Crafted Modifier", + }, +} \ No newline at end of file diff --git a/src/Export/Scripts/enchant.lua b/src/Export/Scripts/enchant.lua index 55f08c1d..507307c4 100644 --- a/src/Export/Scripts/enchant.lua +++ b/src/Export/Scripts/enchant.lua @@ -8,11 +8,11 @@ local lab = { [53] = "CRUEL", [66] = "MERCILESS", [75] = "ENDGAME", - [83] = "HARVEST", + [83] = "DEDICATION", } -local labOrder = { "NORMAL", "CRUEL", "MERCILESS", "ENDGAME", "HARVEST" } +local sourceOrder = { "NORMAL", "CRUEL", "MERCILESS", "ENDGAME", "DEDICATION", "HARVEST", "HEIST" } -local function doOtherEnchantment(fileName, group) +local function doLabEnchantment(fileName, group) local byDiff = { } for _, mod in ipairs(dat("Mods"):GetRowList("GenerationType", 10)) do if mod.Family == group and mod.SpawnWeights[1] > 0 then @@ -25,11 +25,11 @@ local function doOtherEnchantment(fileName, group) local out = io.open(fileName, "w") out:write('-- This file is automatically generated, do not edit!\n') out:write('-- Item data (c) Grinding Gear Games\n\nreturn {\n') - for _, diff in ipairs(labOrder) do + for _, diff in ipairs(sourceOrder) do if byDiff[diff] then out:write('\t["'..diff..'"] = {\n') for _, stats in ipairs(byDiff[diff]) do - out:write('\t\t"'..table.concat(stats, ' ')..'",\n') + out:write('\t\t"'..table.concat(stats, '/')..'",\n') end out:write('\t},\n') end @@ -38,9 +38,40 @@ local function doOtherEnchantment(fileName, group) out:close() end -doOtherEnchantment("../Data/EnchantmentBoots.lua", "ConditionalBuffEnchantment") -doOtherEnchantment("../Data/EnchantmentGloves.lua", "TriggerEnchantment") -doOtherEnchantment("../Data/EnchantmentBelt.lua", "BuffEnchantment") +doLabEnchantment("../Data/EnchantmentBoots.lua", "ConditionalBuffEnchantment") +doLabEnchantment("../Data/EnchantmentGloves.lua", "TriggerEnchantment") +doLabEnchantment("../Data/EnchantmentBelt.lua", "BuffEnchantment") + +local function doOtherEnchantment(fileName, groups) + local byDiff = { } + for _, mod in ipairs(dat("Mods"):GetRowList("GenerationType", 3)) do + if groups[mod.Family] then + local stats, orders = describeMod(mod) + local diff = groups[mod.Family] + byDiff[diff] = byDiff[diff] or { } + table.insert(byDiff[diff], stats) + end + end + local out = io.open(fileName, "w") + out:write('-- This file is automatically generated, do not edit!\n') + out:write('-- Item data (c) Grinding Gear Games\n\nreturn {\n') + for _, diff in ipairs(sourceOrder) do + if byDiff[diff] then + out:write('\t["'..diff..'"] = {\n') + for _, stats in ipairs(byDiff[diff]) do + out:write('\t\t"'..table.concat(stats, '/')..'",\n') + end + out:write('\t},\n') + end + end + out:write('}') + out:close() +end + +-- Flask enchants stat descriptions don't read properly yet, and might need support for value ranges +--doOtherEnchantment("../Data/EnchantmentFlask.lua", { ["FlaskEnchantment"] = "HARVEST" }) +doOtherEnchantment("../Data/EnchantmentBody.lua", { ["AlternateArmourQuality"] = "HARVEST", ["EnchantmentHeistArmour"] = "HEIST" }) +doOtherEnchantment("../Data/EnchantmentWeapon.lua", { ["AlternateWeaponQuality"] = "HARVEST", ["EnchantmentHeistWeapon"] = "HEIST" }) local skillMap = { ["Summone?d?RagingSpirit"] = "Summon Raging Spirit", @@ -209,11 +240,11 @@ out:write('-- This file is automatically generated, do not edit!\n') out:write('-- Item data (c) Grinding Gear Games\n\nreturn {\n') for _, skill in pairs(skillOrder) do out:write('\t["'..skill..'"] = {\n') - for _, diff in ipairs(labOrder) do + for _, diff in ipairs(sourceOrder) do if bySkill[skill][diff] then out:write('\t\t["'..diff..'"] = {\n') for _, stats in ipairs(bySkill[skill][diff]) do - out:write('\t\t\t"'..table.concat(stats, ' ')..'",\n') + out:write('\t\t\t"'..table.concat(stats, '/')..'",\n') end out:write('\t\t},\n') end diff --git a/src/Modules/Data.lua b/src/Modules/Data.lua index 171b19fe..4bf1e00c 100644 --- a/src/Modules/Data.lua +++ b/src/Modules/Data.lua @@ -139,12 +139,14 @@ data.jewelRadius = { { inner = 1750, outer = 2000, col = "^xC100FF", label = "Variable" }, } -data.labyrinths = { +data.enchantmentSource = { + { name = "HEIST", label = "Heist" }, { name = "HARVEST", label = "Harvest" }, - { name = "ENDGAME", label = "Eternal" }, - { name = "MERCILESS", label = "Merciless" }, - { name = "CRUEL", label = "Cruel" }, - { name = "NORMAL", label = "Normal" }, + { name = "DEDICATION", label = "Dedication to the Goddess" }, + { name = "ENDGAME", label = "Eternal Labyrinth" }, + { name = "MERCILESS", label = "Merciless Labyrinth" }, + { name = "CRUEL", label = "Cruel Labyrinth" }, + { name = "NORMAL", label = "Normal Labyrinth" }, } local maxPenaltyFreeAreaLevel = 70 @@ -311,10 +313,12 @@ data.itemMods = { } data.masterMods = LoadModule("Data/ModMaster") data.enchantments = { - Helmet = LoadModule("Data/EnchantmentHelmet"), - Boots = LoadModule("Data/EnchantmentBoots"), - Gloves = LoadModule("Data/EnchantmentGloves"), - Belt = LoadModule("Data/EnchantmentBelt"), + ["Helmet"] = LoadModule("Data/EnchantmentHelmet"), + ["Boots"] = LoadModule("Data/EnchantmentBoots"), + ["Gloves"] = LoadModule("Data/EnchantmentGloves"), + ["Belt"] = LoadModule("Data/EnchantmentBelt"), + ["Body Armour"] = LoadModule("Data/EnchantmentBody"), + ["Weapon"] = LoadModule("Data/EnchantmentWeapon"), } data.essences = LoadModule("Data/Essence") data.pantheons = LoadModule("Data/Pantheons")