diff --git a/spec/System/TestDefence_spec.lua b/spec/System/TestDefence_spec.lua index 16300d48d1..0f8aa0bc74 100644 --- a/spec/System/TestDefence_spec.lua +++ b/spec/System/TestDefence_spec.lua @@ -10,8 +10,9 @@ describe("TestDefence", function() local function pob1and2Compat() build.configTab.input.customMods = build.configTab.input.customMods.."\n\z 5% reduced maximum life\n\z + 5% reduced maximum mana\n\z -2 to life\n\z - -20% to elemental resistances\n\z + -10% to elemental resistances\n\z -60% to chaos resistance\n\z +2 to mana\n\z " diff --git a/src/Data/QuestRewards.lua b/src/Data/QuestRewards.lua index 58f2f21891..9472494688 100644 --- a/src/Data/QuestRewards.lua +++ b/src/Data/QuestRewards.lua @@ -1,15 +1,17 @@ return { { + -- "Beira of the Rotten Pack" ["Act"] = 1, - ["Type"] = "Normal", + ["Type"] = "", ["Area"] = "Clearfell", ["Stat"] = "+10% to Cold Resistance", ["AreaLevel"] = 2, ["useConfig"] = true }, { + -- "The Crowbell" ["Act"] = 1, - ["Type"] = "Normal", + ["Type"] = "", ["Area"] = "Hunting Grounds", ["Stat"] = "+2 Weapon Set Passive Skill Points", ["questPoints"] = 2, @@ -17,16 +19,18 @@ return { ["useConfig"] = false }, { + -- "The King in the Mists" ["Act"] = 1, - ["Type"] = "Normal", + ["Type"] = "", ["Area"] = "Freythorn", ["Stat"] = "+30 to Spirit", ["AreaLevel"] = 11, ["useConfig"] = true }, { + -- Una's Lute ["Act"] = 1, - ["Type"] = "Normal", + ["Type"] = "", ["Area"] = "Ogham Farmlands", ["Stat"] = "+2 Weapon Set Passive Skill Points", ["questPoints"] = 2, @@ -34,16 +38,18 @@ return { ["useConfig"] = false }, { + -- "Candlemass, the Living Rite" ["Act"] = 1, - ["Type"] = "Normal", + ["Type"] = "", ["Area"] = "Ogham Manor", ["Stat"] = "+20 to maximum Life", ["AreaLevel"] = 15, ["useConfig"] = true }, { + -- "Kabala, Constrictor Queen" ["Act"] = 2, - ["Type"] = "Normal", + ["Type"] = "", ["Area"] = "Keth", ["Stat"] = "+2 Weapon Set Passive Skill Points", ["questPoints"] = 2, @@ -51,19 +57,21 @@ return { ["useConfig"] = false }, { + -- "Medallion" ["Act"] = 2, - ["Type"] = "Normal", + ["Type"] = "", ["Area"] = "Valley of the Titans", ["Options"] = { - "30% increased Charm Charges gained", - "15% increased Mana Recovery from Flasks", + "30% increased Charm Charges Gained\n\t+1 Charm Slot", + "30% increased Charm Effect Duration\n\t+1 Charm Slot", }, ["AreaLevel"] = 26, ["useConfig"] = true }, { + -- "Final Letter" ["Act"] = 2, - ["Type"] = "Normal", + ["Type"] = "", ["Area"] = "Deshar", ["Stat"] = "+2 Weapon Set Passive Skill Points", ["questPoints"] = 2, @@ -71,53 +79,59 @@ return { ["useConfig"] = false }, { + -- "Sisters of Garukhan Shrine" ["Act"] = 2, - ["Type"] = "Normal", + ["Type"] = "", ["Area"] = "The Spires of Deshar", ["Stat"] = "+10% to Lightning Resistance", ["AreaLevel"] = 30, ["useConfig"] = true }, { + -- "Mighty Silverfist" ["Act"] = 3, - ["Type"] = "Normal", + ["Type"] = "", ["Area"] = "Jungle Ruins", ["Stat"] = "+2 Weapon Set Passive Skill Points", ["questPoints"] = 2, - ["AreaLevel"] = 32, + ["AreaLevel"] = 34, ["useConfig"] = false }, { + -- "Ignagduk, the Bog Witch" ["Act"] = 3, - ["Type"] = "Normal", + ["Type"] = "", ["Area"] = "The Azak Bog", ["Stat"] = "+30 to Spirit", - ["AreaLevel"] = 38, + ["AreaLevel"] = 36, ["useConfig"] = true }, { + -- "Venom Draught" ["Act"] = 3, - ["Type"] = "Normal", + ["Type"] = "", ["Area"] = "The Venom Crypts", ["Options"] = { "25% increased Stun Threshold", "30% increased Elemental Ailment Threshold", "25% increased Mana Regeneration Rate", }, - ["AreaLevel"] = 39, + ["AreaLevel"] = 35, ["useConfig"] = true }, { + -- "Blackjaw, the Remnant" ["Act"] = 3, - ["Type"] = "Normal", + ["Type"] = "", ["Area"] = "Jiquanis Machinarium", ["Stat"] = "+10% to Fire Resistance", - ["AreaLevel"] = 40, + ["AreaLevel"] = 37, ["useConfig"] = true }, { + -- "Blood Sacrifice" ["Act"] = 3, - ["Type"] = "Normal", + ["Type"] = "", ["Area"] = "Aggorat", ["Stat"] = "+2 Weapon Set Passive Skill Points", ["questPoints"] = 2, @@ -125,120 +139,155 @@ return { ["useConfig"] = false }, { - ["Act"] = 1, - ["Type"] = "Cruel", - ["Area"] = "Clearfell", - ["Stat"] = "+10% to Cold Resistance", - ["AreaLevel"] = 45, - ["useConfig"] = true - }, - { - ["Act"] = 1, - ["Type"] = "Cruel", - ["Area"] = "Hunting Grounds", + -- The Blind Beast + ["Act"] = 4, + ["Type"] = "", + ["Area"] = "Isle Of Kin", ["Stat"] = "+2 Weapon Set Passive Skill Points", ["questPoints"] = 2, - ["AreaLevel"] = 49, + ["AreaLevel"] = 51, ["useConfig"] = false }, { - ["Act"] = 1, - ["Type"] = "Cruel", - ["Area"] = "Ogham Farmlands", - ["Stat"] = "+2 Weapon Set Passive Skill Points", - ["questPoints"] = 2, - ["AreaLevel"] = 49, - ["useConfig"] = false + -- Silent Hall + ["Act"] = 4, + ["Type"] = "", + ["Area"] = "Eye of Hinekora", + ["Stat"] = "5% increased Maximum Mana", + ["AreaLevel"] = 51, + ["useConfig"] = true }, { - ["Act"] = 1, - ["Type"] = "Cruel", - ["Area"] = "Ogham Manor", - ["Stat"] = "5% increased maximum Life", - ["AreaLevel"] = 51, + -- Halls of the dead + ["Act"] = 4, + ["Type"] = "", + ["Area"] = "Tawhoa's Test", + ["Options"] = { + "+5 to Dexterity", + "+5% to Lightning Resistance", + }, + ["AreaLevel"] = 52, ["useConfig"] = true }, { - ["Act"] = 2, - ["Type"] = "Cruel", - ["Area"] = "Keth", - ["Stat"] = "+2 Weapon Set Passive Skill Points", - ["questPoints"] = 2, - ["AreaLevel"] = 55, - ["useConfig"] = false + -- Halls of the dead + ["Act"] = 4, + ["Type"] = "", + ["Area"] = "Tasalio's Test", + ["Options"] = { + "+5 to Intelligence", + "+5% to Cold Resistance", + }, + ["AreaLevel"] = 52, + ["useConfig"] = true }, { - ["Act"] = 2, - ["Type"] = "Cruel", - ["Area"] = "Valley of the Titans", + -- Halls of the dead + ["Act"] = 4, + ["Type"] = "", + ["Area"] = "Ngamahu's Test", ["Options"] = { - "30% increased Charm Charges gained", - "15% increased Life Recovery from Flasks", + "+5 to Strength", + "+5% to Fire Resistance", }, - ["AreaLevel"] = 55, + ["AreaLevel"] = 52, ["useConfig"] = true }, { - ["Act"] = 2, - ["Type"] = "Cruel", - ["Area"] = "Deshar", + -- Hinekora + ["Act"] = 4, + ["Type"] = "", + ["Area"] = "Trial Of The Ancestors", ["Stat"] = "+2 Weapon Set Passive Skill Points", ["questPoints"] = 2, - ["AreaLevel"] = 56, + ["AreaLevel"] = 51, ["useConfig"] = false }, { - ["Act"] = 2, - ["Type"] = "Cruel", - ["Area"] = "The Spires of Deshar", - ["Stat"] = "+10% to Lightning Resistance", - ["AreaLevel"] = 57, + -- "Goddess of Justice" + ["Act"] = 4, + ["Type"] = "", + ["Area"] = "Abandoned prison", + ["Options"] = { + "30% increased Life Recovery from Flasks", + "30% increased Mana Recovery from Flasks", + }, + ["AreaLevel"] = 51, ["useConfig"] = true }, { - ["Act"] = 3, - ["Type"] = "Cruel", - ["Area"] = "Jungle Ruins", + -- "Oswin, the Dread Warden" + ["Act"] = 5, + ["Type"] = "Interlude 1", + ["Area"] = "Wolvenhold", ["Stat"] = "+2 Weapon Set Passive Skill Points", ["questPoints"] = 2, - ["AreaLevel"] = 58, + ["AreaLevel"] = 64, ["useConfig"] = false }, { - ["Act"] = 3, - ["Type"] = "Cruel", - ["Area"] = "The Azak Bog", - ["Stat"] = "+40 to Spirit", - ["AreaLevel"] = 60, + -- "Clearing The Way" + ["Act"] = 5, + ["Type"] = "Interlude 2", + ["Area"] = "Khari Bazaar", + ["Stat"] = "+2 Weapon Set Passive Skill Points", + ["questPoints"] = 2, + ["AreaLevel"] = 61, + ["useConfig"] = false + }, + { + -- "Molten Shrine" + ["Act"] = 5, + ["Type"] = "Interlude 2", + ["Area"] = "The Khari Crossing", + ["Stat"] = "5% increased maximum Life", + ["AreaLevel"] = 61, ["useConfig"] = true }, { - ["Act"] = 3, - ["Type"] = "Cruel", - ["Area"] = "The Venom Crypts", + -- "The Seven Pillars" + ["Act"] = 5, + ["Type"] = "Interlude 2", + ["Area"] = "Qimah", ["Options"] = { - "+10% to Chaos Resistance", - "+5 to All Attributes", - "15% reduced Slowing Potency of Debuffs on you", + "+5% to Elemental Resistances", + "3% increased Movement Speed", + "15% increased Global Defences", + "20% increased Presence Area Of Effect", + "12% increased Cooldown Recovery Rate", + "+5 to all Attributes", + "5% increased Experience Gain\n\t-5% to Elemental Resistances\n\t3% reduced Movement Speed\n\t15% reduced Global Defences\n\t20% reduced Presence Area Of Effect\n\t12% reduced Cooldown Recovery Rate\n\t-5 to all Attributes", }, - ["AreaLevel"] = 59, + ["AreaLevel"] = 63, ["useConfig"] = true }, { - ["Act"] = 3, - ["Type"] = "Cruel", - ["Area"] = "Jiquanis Machinarium", - ["Stat"] = "+10% to Fire Resistance", - ["AreaLevel"] = 60, + -- "Lythara, the Wayward Spear" + ["Act"] = 5, + ["Type"] = "Interlude 3", + ["Area"] = "Kriar Village", + ["Stat"] = "+40 to Spirit", + ["AreaLevel"] = 61, ["useConfig"] = true }, { - ["Act"] = 3, - ["Type"] = "Cruel", - ["Area"] = "Aggorat", + -- "The Abominable Yeti" + ["Act"] = 5, + ["Type"] = "Interlude 3", + ["Area"] = "Howling Caves", ["Stat"] = "+2 Weapon Set Passive Skill Points", ["questPoints"] = 2, - ["AreaLevel"] = 63, + ["AreaLevel"] = 62, + ["useConfig"] = false + }, + { + -- "Siege Of Oriath" + ["Act"] = 6, + ["Type"] = "Epilog", + ["Area"] = "Kingsmarch", + ["Stat"] = "+2 Weapon Set Passive Skill Points", + ["questPoints"] = 2, + ["AreaLevel"] = 62, ["useConfig"] = false }, -} \ No newline at end of file +} diff --git a/src/Modules/ConfigOptions.lua b/src/Modules/ConfigOptions.lua index 46b609f173..cfbacabbe3 100644 --- a/src/Modules/ConfigOptions.lua +++ b/src/Modules/ConfigOptions.lua @@ -55,40 +55,51 @@ end local function addQuestModsRewardsConfigOptions(configSettings) table.insert(configSettings, { section = "Quest Rewards", col = 3 }) + + -- Loop through sections of line to apply multiple mods + local function applyModsFromString(source, str, modList) + for line in tostring(str):gmatch("[^\r\n]+") do + if line ~= "" then + questModsRewards(source, line, modList) + end + end + end - for i, quest in ipairs(data.questRewards) do + for _, quest in ipairs(data.questRewards) do if quest.useConfig == false then goto continue end + local key = "questAct" .. quest.Act .. quest.Type .. quest.Area + local label = string.format("Act %d %s: %s", quest.Act, quest.Type, quest.Area) local source = string.format("Quest:Act %d %s %s", quest.Act, quest.Type, quest.Area) if quest.Stat then - table.insert(configSettings,{ - var = "questAct".. quest.Act .. quest.Type .. quest.Area, - label = string.format("Act %d %s: %s", quest.Act, quest.Type, quest.Area), + table.insert(configSettings, { + var = key, + label = label, type = "check", defaultState = true, tooltip = quest.Stat, apply = function(val, modList, enemyModList) - questModsRewards(source, quest.Stat, modList) + applyModsFromString(source, quest.Stat, modList) end }) elseif quest.Options then local listOptions = { { label = "Nothing", val = "None" } } - for j, option in ipairs(quest.Options) do + for _, option in ipairs(quest.Options) do table.insert(listOptions, { label = option, val = option }) end - table.insert(configSettings,{ - var = "questAct".. quest.Act .. quest.Type .. quest.Area, - label = string.format("Act %d %s: %s", quest.Act, quest.Type, quest.Area), + table.insert(configSettings, { + var = key, + label = label, type = "list", list = listOptions, defaultIndex = 1, tooltip = "Choose one of the following options:\n" .. table.concat(quest.Options, "\n"), apply = function(val, modList, enemyModList) - if val == "None" then - return - end - questModsRewards(source, val, modList) + if val == "None" then + return + end + applyModsFromString(source, val, modList) end }) end