diff --git a/.gitignore b/.gitignore index b2c27c28..71d1a599 100644 --- a/.gitignore +++ b/.gitignore @@ -250,3 +250,4 @@ ModelManifest.xml # FAKE - F# Make .fake/ *.lnk +/Export/stat_descriptions.txt diff --git a/Classes/ConfigTab.lua b/Classes/ConfigTab.lua index 513021dc..5a5eabd9 100644 --- a/Classes/ConfigTab.lua +++ b/Classes/ConfigTab.lua @@ -259,6 +259,9 @@ local varList = { { var = "conditionBeenHitRecently", type = "check", label = "Have you been Hit Recently?", ifCond = "BeenHitRecently", apply = function(val, modList, enemyModList) modList:NewMod("Condition:BeenHitRecently", "FLAG", true, "Config", { type = "Condition", var = "Combat" }) end }, + { var = "conditionBeenCritRecently", type = "check", label = "Have you been Crit Recently?", ifCond = "BeenCritRecently", apply = function(val, modList, enemyModList) + modList:NewMod("Condition:BeenCritRecently", "FLAG", true, "Config", { type = "Condition", var = "Combat" }) + end }, { var = "conditionBeenSavageHitRecently", type = "check", label = "Have you been Savage Hit Recently?", ifCond = "BeenSavageHitRecently", apply = function(val, modList, enemyModList) modList:NewMod("Condition:BeenSavageHitRecently", "FLAG", true, "Config", { type = "Condition", var = "Combat" }) end }, diff --git a/Classes/ItemListControl.lua b/Classes/ItemListControl.lua index 760cfd28..6c4f2cb4 100644 --- a/Classes/ItemListControl.lua +++ b/Classes/ItemListControl.lua @@ -57,7 +57,7 @@ end function ItemListClass:AddValueTooltip(index, itemId) local item = self.itemsTab.list[itemId] if not main.popups[1] then - self.itemsTab:AddItemTooltip(item, nil, true) + self.itemsTab:AddItemTooltip(item) return data.colorCodes[item.rarity], true end end diff --git a/Classes/SharedItemListControl.lua b/Classes/SharedItemListControl.lua index 9da878aa..ab2e6f8d 100644 --- a/Classes/SharedItemListControl.lua +++ b/Classes/SharedItemListControl.lua @@ -31,7 +31,7 @@ end function SharedItemListClass:AddValueTooltip(index, item) if not main.popups[1] then - self.itemsTab:AddItemTooltip(item, nil, true) + self.itemsTab:AddItemTooltip(item) return data.colorCodes[item.rarity], true end end @@ -42,7 +42,7 @@ end function SharedItemListClass:ReceiveDrag(type, value, source) if type == "Item" then - local newItem = itemLib.makeItemFromRaw(value.raw) + local newItem = itemLib.makeItemFromRaw(itemLib.createItemRaw(value)) if not value.id then itemLib.normaliseQuality(newItem) end diff --git a/Classes/SkillsTab.lua b/Classes/SkillsTab.lua index 929af431..7970e66d 100644 --- a/Classes/SkillsTab.lua +++ b/Classes/SkillsTab.lua @@ -77,7 +77,7 @@ local SkillsTabClass = common.NewClass("SkillsTab", "UndoHandler", "ControlHost" local item = self.displayGroup.sourceItem or { rarity = "NORMAL", name = "?" } local itemName = data.colorCodes[item.rarity]..item.name.."^7" local activeGem = self.displayGroup.gemList[1] - local label = [[^7This is a special group created for the ']]..activeGem.color..activeGem.name..[[^7' skill, + local label = [[^7This is a special group created for the ']]..activeGem.color..(activeGem.name or activeGem.nameSpec)..[[^7' skill, which is being provided by ']]..itemName..[['. You cannot delete this group, but it will disappear if you un-equip the item.]] if not self.displayGroup.noSupports then diff --git a/Data/ModCorrupted.lua b/Data/ModCorrupted.lua new file mode 100644 index 00000000..810e35a1 --- /dev/null +++ b/Data/ModCorrupted.lua @@ -0,0 +1,114 @@ +-- Item data (c) Grinding Gear Games + +return { + ["MovementVelocityCorrupted"] = { "(2-5)% increased Movement Speed", weightKey = { "amulet", "boots", "default", }, weightVal = { 1000, 1000, 0, }, }, + ["MaxFrenzyChargesCorrupted"] = { "+1 to Maximum Frenzy Charges", weightKey = { "boots", "amulet", "default", }, weightVal = { 1000, 1000, 0, }, }, + ["MaxPowerChargesCorrupted"] = { "+1 to Maximum Power Charges", weightKey = { "two_hand_weapon", "default", }, weightVal = { 1000, 0, }, }, + ["MinionDamageCorrupted"] = { "Minions deal (15-20)% increased Damage", weightKey = { "helmet", "amulet", "default", }, weightVal = { 1000, 1000, 0, }, }, + ["SocketedVaalGemsIncreaseCorrupted"] = { "+(1-2) to Level of Socketed Vaal Gems", weightKey = { "helmet", "gloves", "boots", "body_armour", "shield", "default", }, weightVal = { 1000, 1000, 1000, 1000, 1000, 0, }, }, + ["DamageTakenFlatReductionCorrupted1"] = { "-(10-5) Physical Damage taken from Attacks", weightKey = { "amulet", "shield", "default", }, weightVal = { 1000, 1000, 0, }, }, + ["DamageTakenFlatReductionCorrupted2"] = { "-(16-11) Physical Damage taken from Attacks", weightKey = { "amulet", "shield", "default", }, weightVal = { 1000, 1000, 0, }, }, + ["DamageTakenFlatReductionCorrupted3"] = { "-(24-17) Physical Damage taken from Attacks", weightKey = { "amulet", "shield", "default", }, weightVal = { 1000, 1000, 0, }, }, + ["FireDamageLifeLeechPermyriadCorrupted"] = { "0.2% of Fire Damage Leeched as Life", weightKey = { "amulet", "quiver", "two_hand_weapon", "weapon", "default", }, weightVal = { 1000, 1000, 1000, 200, 0, }, }, + ["ColdDamageLifeLeechPermyriadCorrupted"] = { "0.2% of Cold Damage Leeched as Life", weightKey = { "amulet", "quiver", "two_hand_weapon", "weapon", "default", }, weightVal = { 1000, 1000, 1000, 200, 0, }, }, + ["LightningDamageLifeLeechPermyriadCorrupted"] = { "0.2% of Lightning Damage Leeched as Life", weightKey = { "amulet", "quiver", "two_hand_weapon", "weapon", "default", }, weightVal = { 1000, 1000, 1000, 200, 0, }, }, + ["IncreasedCastSpeedCorrupted"] = { "(4-6)% increased Cast Speed", weightKey = { "no_caster_mods", "ring", "gloves", "focus", "default", }, weightVal = { 0, 500, 1000, 1000, 0, }, }, + ["ChanceToFleeCorrupted"] = { "5% chance to Cause Monsters to Flee", weightKey = { "weapon", "default", }, weightVal = { 1000, 0, }, }, + ["BlockChanceCorrupted"] = { "(2-4)% Chance to Block", weightKey = { "staff", "amulet", "default", }, weightVal = { 1000, 1000, 0, }, }, + ["LocalAddedChaosDamageCorrupted1"] = { "Adds (1-2) to (3-5) Chaos Damage", weightKey = { "no_attack_mods", "weapon", "default", }, weightVal = { 0, 1000, 0, }, }, + ["LocalAddedChaosDamageCorrupted2"] = { "Adds (6-8) to (11-13) Chaos Damage", weightKey = { "no_attack_mods", "weapon", "default", }, weightVal = { 0, 1000, 0, }, }, + ["LocalAddedChaosDamageCorrupted3"] = { "Adds (8-11) to (19-23) Chaos Damage", weightKey = { "no_attack_mods", "weapon", "default", }, weightVal = { 0, 1000, 0, }, }, + ["AddedChaosDamageCorrupted1"] = { "Adds 1 to (2-3) Chaos Damage to Attacks", weightKey = { "no_attack_mods", "ring", "default", }, weightVal = { 0, 1000, 0, }, }, + ["AddedChaosDamageCorrupted2"] = { "Adds (3-4) to (6-8) Chaos Damage to Attacks", weightKey = { "no_attack_mods", "ring", "default", }, weightVal = { 0, 1000, 0, }, }, + ["AddedChaosDamageCorrupted3"] = { "Adds (7-9) to (11-13) Chaos Damage to Attacks", weightKey = { "no_attack_mods", "ring", "default", }, weightVal = { 0, 1000, 0, }, }, + ["SpellBlockChanceCorrupted"] = { "(2-4)% Chance to Block Spells", weightKey = { "staff", "amulet", "shield", "default", }, weightVal = { 1000, 1000, 1000, 0, }, }, + ["AttackSpeedCorrupted"] = { "(4-8)% increased Attack Speed", weightKey = { "no_attack_mods", "amulet", "default", }, weightVal = { 0, 1000, 0, }, }, + ["WeaponElementalDamageCorrupted"] = { "(6-12)% increased Elemental Damage with Weapons", weightKey = { "no_attack_mods", "ring", "amulet", "default", }, weightVal = { 0, 1000, 1000, 0, }, }, + ["CullingStrikeCorrupted"] = { "Culling Strike", weightKey = { "sword", "axe", "dagger", "wand", "bow", "claw", "default", }, weightVal = { 1000, 1000, 1000, 1000, 1000, 1000, 0, }, }, + ["ManaOnLifeLostCorrupted"] = { "(3-6)% of Damage taken gained as Mana when Hit", weightKey = { "amulet", "ring", "shield", "default", }, weightVal = { 1000, 1000, 1000, 0, }, }, + ["MaximumResistanceCorrupted"] = { "+1% to all maximum Resistances", weightKey = { "amulet", "body_armour", "default", }, weightVal = { 100, 200, 0, }, }, + ["AdditionalCurseCorrupted"] = { "Enemies can have 1 additional Curse", weightKey = { "amulet", "default", }, weightVal = { 500, 0, }, }, + ["ChanceToAvoidFreezeCorruption"] = { "(10-20)% chance to Avoid being Frozen", weightKey = { "amulet", "body_armour", "ring", "default", }, weightVal = { 500, 500, 100, 0, }, }, + ["ChanceToAvoidIgniteCorruption"] = { "(10-20)% chance to Avoid being Ignited", weightKey = { "amulet", "body_armour", "shield", "default", }, weightVal = { 500, 500, 500, 0, }, }, + ["ChaosResistCorruption"] = { "+(2-4)% to Chaos Resistance", weightKey = { "fishing_rod", "weapon", "jewel", "default", }, weightVal = { 0, 0, 0, 2000, }, }, + ["ChanceToDodgeCorruption"] = { "(2-4)% chance to Dodge Attacks", weightKey = { "boots", "default", }, weightVal = { 1000, 0, }, }, + ["CannotBeKnockedBackCorruption"] = { "Cannot be Knocked Back", weightKey = { "boots", "body_armour", "default", }, weightVal = { 1000, 1000, 0, }, }, + ["GemLevelCorruption"] = { "+1 to Level of Socketed Gems", weightKey = { "boots", "gloves", "body_armour", "shield", "default", }, weightVal = { 1000, 1000, 1000, 1000, 0, }, }, + ["AvoidShockCorruption"] = { "(10-20)% chance to Avoid being Shocked", weightKey = { "body_armour", "belt", "default", }, weightVal = { 1000, 1000, 0, }, }, + ["CannotBeLeechedFromCorruption"] = { "Enemies Cannot Leech Life From You", weightKey = { "helmet", "default", }, weightVal = { 1000, 0, }, }, + ["DamageTakenFromManaBeforeLifeCorruption"] = { "When Hit, (3-5)% of Damage is taken from Mana before Life", weightKey = { "helmet", "default", }, weightVal = { 1000, 0, }, }, + ["DamageConversionFireCorruption"] = { "(10-20)% of Physical Damage Converted to Fire Damage", weightKey = { "quiver", "sceptre", "default", }, weightVal = { 500, 500, 0, }, }, + ["DamageConversionColdCorruption"] = { "(10-20)% of Physical Damage Converted to Cold Damage", weightKey = { "quiver", "sceptre", "default", }, weightVal = { 500, 500, 0, }, }, + ["DamageConversionLighningCorruption"] = { "(10-20)% of Physical Damage Converted to Lightning Damage", weightKey = { "quiver", "sceptre", "default", }, weightVal = { 500, 500, 0, }, }, + ["AdditionalArrowsCorruption"] = { "Adds an additional Arrow", weightKey = { "no_attack_mods", "quiver", "bow", "default", }, weightVal = { 0, 1000, 500, 0, }, }, + ["AdditionalAOERangeCorruption"] = { "(4-6)% increased Area of Effect of Area Skills", weightKey = { "belt", "default", }, weightVal = { 1000, 0, }, }, + ["IncreasedDurationCorruption"] = { "(5-8)% increased Skill Effect Duration", weightKey = { "belt", "default", }, weightVal = { 1000, 0, }, }, + ["AdditionalTrapsCorruption_"] = { "Can have up to 1 additional Trap placed at a time", weightKey = { "belt", "default", }, weightVal = { 1000, 0, }, }, + ["MaximumEnduranceChargesCorruption_"] = { "+1 to Maximum Endurance Charges", weightKey = { "belt", "default", }, weightVal = { 1000, 0, }, }, + ["DualWieldBlockCorruption"] = { "(3-6)% additional Block Chance while Dual Wielding", weightKey = { "sceptre", "axe", "mace", "wand", "one_hand_weapon", "default", }, weightVal = { 0, 0, 0, 0, 1000, 0, }, }, + ["PierceCurruption"] = { "(5-10)% chance of Arrows Piercing", weightKey = { "no_attack_mods", "bow", "default", }, weightVal = { 0, 1000, 0, }, }, + ["GlobalPierceCorruption"] = { "(4-8)% chance of Projectiles Piercing", weightKey = { "wand", "default", }, weightVal = { 1000, 0, }, }, + ["CurseOnHitTemporalChainsCurruption"] = { "Curse Enemies with level (10-12) Temporal Chains on Hit", weightKey = { "gloves", "default", }, weightVal = { 400, 0, }, }, + ["CurseOnHitVulnerabilityCorruption"] = { "Curse Enemies with level (10-12) Vulnerability on Hit", weightKey = { "gloves", "default", }, weightVal = { 400, 0, }, }, + ["CurseOnHitElementalWeaknessCorruption"] = { "Curse Enemies with level (10-12) Elemental Weakness on Hit", weightKey = { "gloves", "default", }, weightVal = { 400, 0, }, }, + ["SupportedByCastOnStunCorruption"] = { "Socketed Gems are supported by level 12 Cast when Stunned", weightKey = { "gloves", "helmet", "default", }, weightVal = { 1000, 1000, 0, }, }, + ["SupportedByCastOnCritCorruption"] = { "Socketed Gems are supported by level 12 Cast On Crit", weightKey = { "gloves", "helmet", "default", }, weightVal = { 1000, 1000, 0, }, }, + ["SupportedByMeleeSplashCorruption"] = { "Socketed Gems are supported by level 10 Melee Splash", weightKey = { "no_attack_mods", "wand", "one_hand_weapon", "default", }, weightVal = { 0, 0, 1000, 0, }, }, + ["SupportedByAddedFireDamageCorrupted"] = { "Socketed Gems are Supported by level 12 Added Fire Damage", weightKey = { "two_hand_weapon", "mace", "default", }, weightVal = { 0, 1000, 0, }, }, + ["SupportedByStunCorrupted"] = { "Socketed Gems are supported by level 6 Stun", weightKey = { "mace", "default", }, weightVal = { 1000, 0, }, }, + ["LocalMeleeWeaponRangeCorrupted"] = { "+(1-2) to Weapon range", weightKey = { "no_attack_mods", "sceptre", "rapier", "wand", "bow", "weapon", "default", }, weightVal = { 0, 0, 0, 0, 0, 1000, 0, }, }, + ["SocketedSkillsManaMultiplierCorrupted"] = { "Socketed Skill Gems get a 95% Mana Multiplier", weightKey = { "body_armour", "default", }, weightVal = { 1000, 0, }, }, + ["SupportedByElementalProliferationCorrupted"] = { "Socketed Gems are Supported by level 1 Elemental Proliferation", weightKey = { "wand", "default", }, weightVal = { 1000, 0, }, }, + ["SupportedByAccuracyCorrupted_"] = { "Socketed Gems are supported by level 12 Additional Accuracy", weightKey = { "no_attack_mods", "one_hand_weapon", "sword", "default", }, weightVal = { 0, 0, 1000, 0, }, }, + ["SupportedByMultistrikeCorrupted"] = { "Socketed Gems are supported by level 1 Multistrike", weightKey = { "no_attack_mods", "two_hand_weapon", "sword", "default", }, weightVal = { 0, 0, 1000, 0, }, }, + ["SupportedByAreaOfEffectCorrupted_"] = { "Socketed Gems are Supported by level 1 Increased Area of Effect", weightKey = { "staff", "default", }, weightVal = { 1000, 0, }, }, + ["SupportedByLifeLeechCorrupted"] = { "Socketed Gems are supported by level 15 Life Leech", weightKey = { "claw", "default", }, weightVal = { 1000, 0, }, }, + ["SupportedByCriticalMultiplierCorrupted"] = { "Socketed Gems are supported by level 14 Increased Critical Damage", weightKey = { "dagger", "default", }, weightVal = { 1000, 0, }, }, + ["SupportedByForkCorrupted"] = { "Socketed Gems are supported by level 1 Fork", weightKey = { "bow", "default", }, weightVal = { 1000, 0, }, }, + ["SupportedByWeaponElementalDamageCorrupted_"] = { "Socketed Gems are supported by level 12 Weapon Elemental Damage", weightKey = { "no_attack_mods", "sceptre", "default", }, weightVal = { 0, 1000, 0, }, }, + ["SupportedByFasterCastCorrupted"] = { "Socketed Gems are Supported by Level 10 Faster Casting", weightKey = { "no_caster_mods", "sceptre", "default", }, weightVal = { 0, 1000, 0, }, }, + ["PuritySkillCorrupted"] = { "Grants level 15 Purity of Elements Skill", weightKey = { "amulet", "belt", "default", }, weightVal = { 300, 1000, 0, }, }, + ["CriticalWeaknessSkillCorrupted"] = { "Grants level 10 Assassin's Mark Skill", weightKey = { "gloves", "default", }, weightVal = { 1000, 0, }, }, + ["PurityOfFireSkillCorrupted_"] = { "Grants level 15 Purity of Fire Skill", weightKey = { "amulet", "body_armour", "default", }, weightVal = { 150, 500, 0, }, }, + ["PurityOfColdSkillCorrupted"] = { "Grants level 15 Purity of Ice Skill", weightKey = { "amulet", "body_armour", "default", }, weightVal = { 150, 500, 0, }, }, + ["PurityOfLightningSkillCorrupted"] = { "Grants level 15 Purity of Lightning Skill", weightKey = { "amulet", "body_armour", "default", }, weightVal = { 150, 500, 0, }, }, + ["WrathSkillCorrupted"] = { "Grants level 7 Wrath Skill", weightKey = { "helmet", "default", }, weightVal = { 330, 0, }, }, + ["HatredSkillCorrupted"] = { "Grants level 11 Hatred Skill", weightKey = { "helmet", "default", }, weightVal = { 330, 0, }, }, + ["AngerSkillCorrupted"] = { "Grants level 15 Anger Skill", weightKey = { "helmet", "default", }, weightVal = { 330, 0, }, }, + ["DeterminationSkillCorrupted"] = { "Grants level 16 Determination Skill", weightKey = { "shield", "default", }, weightVal = { 330, 0, }, }, + ["GraceSkillCorrupted"] = { "Grants level 16 Grace Skill", weightKey = { "shield", "default", }, weightVal = { 330, 0, }, }, + ["DisciplineSkillCorrupted"] = { "Grants level 16 Discipline Skill", weightKey = { "shield", "default", }, weightVal = { 330, 0, }, }, + ["ProjectileWeaknessSkillCorrupted"] = { "Grants level 15 Projectile Weakness Skill", weightKey = { "quiver", "default", }, weightVal = { 1000, 0, }, }, + ["ElementalWeaknessSkillCorrupted"] = { "Grants level 10 Elemental Weakness Skill", weightKey = { "wand", "default", }, weightVal = { 1000, 0, }, }, + ["VulnerabilitySkillCorrupted"] = { "Grants level 10 Vulnerability Skill", weightKey = { "axe", "default", }, weightVal = { 1000, 0, }, }, + ["ClaritySkillCorrupted1"] = { "Grants level 4 Clarity Skill", weightKey = { "amulet", "belt", "default", }, weightVal = { 250, 350, 0, }, }, + ["ClaritySkillCorrupted2"] = { "Grants level 8 Clarity Skill", weightKey = { "amulet", "belt", "default", }, weightVal = { 250, 350, 0, }, }, + ["ClaritySkillCorrupted3"] = { "Grants level 12 Clarity Skill", weightKey = { "belt", "default", }, weightVal = { 350, 0, }, }, + ["ClaritySkillCorrupted4"] = { "Grants level 16 Clarity Skill", weightKey = { "belt", "default", }, weightVal = { 350, 0, }, }, + ["FrostbiteSkillCorrupted"] = { "Grants level 14 Frostbite Skill", weightKey = { "ring", "default", }, weightVal = { 500, 0, }, }, + ["FlammabilitySkillCorrupted"] = { "Grants level 14 Flammability Skill", weightKey = { "ring", "default", }, weightVal = { 500, 0, }, }, + ["ConductivitySkillCorrupted"] = { "Grants level 14 Conductivity Skill", weightKey = { "ring", "default", }, weightVal = { 500, 0, }, }, + ["TemporalChainsSkillCorrupted"] = { "Grants level 14 Temporal Chains Skill", weightKey = { "boots", "default", }, weightVal = { 1000, 0, }, }, + ["HasteSkillCorrupted"] = { "Grants level 14 Haste Skill", weightKey = { "boots", "default", }, weightVal = { 1000, 0, }, }, + ["ManaOnHitCorrupted"] = { "+(1-2) Mana gained for each Enemy hit by your Attacks", weightKey = { "no_attack_mods", "ring", "default", }, weightVal = { 0, 500, 0, }, }, + ["VitalitySkillCorrupted"] = { "Grants level 15 Vitality Skill", weightKey = { "belt", "default", }, weightVal = { 1000, 0, }, }, + ["FishingQuantityCorrupted"] = { "(5-10)% increased Quantity of Fish Caught", weightKey = { "fishing_rod", "default", }, weightVal = { 1000, 0, }, }, + ["FishingRarityCorrupted"] = { "(5-10)% increased Rarity of Fish Caught", weightKey = { "fishing_rod", "default", }, weightVal = { 1000, 0, }, }, + ["CastSpeedCorrupted"] = { "(10-20)% increased Cast Speed", weightKey = { "no_caster_mods", "fishing_rod", "default", }, weightVal = { 0, 1000, 0, }, }, + ["CanCatchCorruptFishCorrupted"] = { "You can catch Corrupted Fish", weightKey = { "fishing_rod", "default", }, weightVal = { 1000, 0, }, }, + ["ChaosResistJewelCorrupted"] = { "+(1-3)% to Chaos Resistance", weightKey = { "jewel", "default", }, weightVal = { 1000, 0, }, }, + ["ReducedCharacterSizeJewelCorrupted"] = { "1% reduced Character Size", weightKey = { "jewel", "default", }, weightVal = { 1000, 0, }, }, + ["ReducedChillDurationJewelCorrupted"] = { "(3-5)% reduced Chill Duration on You", weightKey = { "jewel", "default", }, weightVal = { 1000, 0, }, }, + ["ReducedFreezeDurationJewelCorrupted"] = { "(3-5)% reduced Freeze Duration on You", weightKey = { "jewel", "default", }, weightVal = { 1000, 0, }, }, + ["ReducedIgniteDurationJewelCorrupted"] = { "(3-5)% reduced Ignite Duration on You", weightKey = { "jewel", "default", }, weightVal = { 1000, 0, }, }, + ["ReducedShockDurationJewelCorrupted"] = { "(3-5)% reduced Shock Duration on You", weightKey = { "jewel", "default", }, weightVal = { 1000, 0, }, }, + ["IncreasedChargeDurationJewelCorrupted_"] = { "(3-7)% increased Endurance, Frenzy and Power Charge Duration", weightKey = { "jewel", "default", }, weightVal = { 1000, 0, }, }, + ["AddedChaosDamageJewelCorrupted"] = { "Adds 1 to (2-3) Chaos Damage to Attacks", weightKey = { "jewel", "default", }, weightVal = { 1000, 0, }, }, + ["ChanceToBeCritJewelCorrupted"] = { "(3-5)% additional Chance to receive a Critical Strike", weightKey = { "jewel", "default", }, weightVal = { 1000, 0, }, }, + ["DamageWhileDeadJewelCorrupted"] = { "(20-30)% increased Damage while Dead", weightKey = { "jewel", "default", }, weightVal = { 1000, 0, }, }, + ["VaalSkillDamageJewelCorrupted"] = { "(5-10)% increased Vaal Skill Damage", weightKey = { "jewel", "default", }, weightVal = { 1000, 0, }, }, + ["ChaosDamagePerCorruptedItemJewelCorrupted"] = { "1% increased Chaos Damage per equipped Corrupted Item", weightKey = { "jewel", "default", }, weightVal = { 1000, 0, }, }, + ["LifeLeechRatePerCorruptedItemJewelCorrupted"] = { "1% increased Life Leeched per second per equipped Corrupted Item", weightKey = { "jewel", "default", }, weightVal = { 1000, 0, }, }, + ["ManaLeechRatePerCorruptedItemJewelCorrupted"] = { "1% increased Mana Leeched per second per equipped Corrupted Item", weightKey = { "jewel", "default", }, weightVal = { 1000, 0, }, }, + ["SilenceImmunityJewelCorrupted"] = { "You cannot be Cursed with Silence", weightKey = { "jewel", "default", }, weightVal = { 1000, 0, }, }, +} \ No newline at end of file diff --git a/Export/mods.lua b/Export/mods.lua new file mode 100644 index 00000000..139d68ec --- /dev/null +++ b/Export/mods.lua @@ -0,0 +1,195 @@ +#@ + +dofile("_common.lua") + +loadDat("Mods") +loadDat("Stats") +loadDat("Tags") +loadDat("ItemClasses") + +local nk = { } + +local statDescriptor = { } +do + local curLang + local curDescriptor = { } + for line in io.lines("stat_descriptions.txt") do + local noDesc = line:match("no_description ([%w_%+%-%%]+)") + if noDesc then + statDescriptor[noDesc] = { } + elseif line:match("description") then + curLang = { } + curDescriptor = { lang = { ["English"] = curLang } } + elseif not curDescriptor.stats then + local stats = line:match("%d+ ([%w_%+%-%% ]+)") + if stats then + curDescriptor.stats = { } + for stat in stats:gmatch("[%w_%+%-%%]+") do + table.insert(curDescriptor.stats, stat) + statDescriptor[stat] = curDescriptor + end + end + else + local langName = line:match('lang ".+"') + if langName then + curLang = { } + curDescriptor.lang[langName] = curLang + else + local statLimits, text, special = line:match('([%d%-#| ]+) "(.-)"%s*(.*)') + if statLimits then + local desc = { text = text, special = { }, limit = { } } + for statLimit in statLimits:gmatch("[%d%-#|]+") do + local limit = { } + if statLimit == "#" then + limit.min = "#" + limit.max = "#" + elseif statLimit:match("^%d+$") then + limit.min = tonumber(statLimit) + limit.max = tonumber(statLimit) + else + limit.min, limit.max = statLimit:match("([%d%-#]+)|([%d%-#]+)") + limit.min = tonumber(limit.min) or limit.min + limit.max = tonumber(limit.max) or limit.max + end + table.insert(desc.limit, limit) + end + for k, v in special:gmatch("([%w%%_]+) (%w+)") do + table.insert(desc.special, { + k = k, + v = tonumber(v) or v, + }) + nk[k] = v + end + table.insert(curLang, desc) + end + end + end + end +end + +for k, v in pairs(nk) do + --print("'"..k.."' = '"..v.."'") +end + +local function matchLimit(lang, val) + for _, desc in ipairs(lang) do + local match = true + for i, limit in ipairs(desc.limit) do + if (limit.max ~= "#" and val[i].min > limit.max) or (limit.min ~= "#" and val[i].min < limit.min) then + match = false + break + end + end + if match then + return desc + end + end +end + +local function describeMod(mod) + local out = { } + local stats = { } + for i = 1, 5 do + if mod["StatsKey"..i] then + stats[Stats[mod["StatsKey"..i]].Id] = { min = mod["Stat"..i.."Min"], max = mod["Stat"..i.."Max"], fmt = "d" } + end + end + local descriptors = { } + for s, v in pairs(stats) do + descriptors[statDescriptor[s]] = true + end + for descriptor in pairs(descriptors) do + local val = { } + for i, s in ipairs(descriptor.stats) do + val[i] = stats[s] + end + local desc = matchLimit(descriptor.lang["English"], val) + if desc then + for _, spec in ipairs(desc.special) do + if spec.k == "negate" then + val[spec.v].max, val[spec.v].min = -val[spec.v].min, -val[spec.v].max + elseif spec.k == "divide_by_one_hundred" then + val[spec.v].min = val[spec.v].min / 100 + val[spec.v].max = val[spec.v].max / 100 + val[spec.v].fmt = ".1f" + elseif spec.k == "divide_by_one_hundred_2dp" then + val[spec.v].min = val[spec.v].min / 100 + val[spec.v].max = val[spec.v].max / 100 + val[spec.v].fmt = ".2f" + elseif spec.k == "per_minute_to_per_second" then + val[spec.v].min = val[spec.v].min / 60 + val[spec.v].max = val[spec.v].max / 60 + val[spec.v].fmt = ".1f" + elseif spec.k == "per_minute_to_per_second_0dp" then + val[spec.v].min = val[spec.v].min / 60 + val[spec.v].max = val[spec.v].max / 60 + elseif spec.k == "milliseconds_to_seconds" then + val[spec.v].min = val[spec.v].min / 1000 + val[spec.v].max = val[spec.v].max / 1000 + val[spec.v].fmt = ".2f" + elseif spec.k == "milliseconds_to_seconds_0dp" then + val[spec.v].min = val[spec.v].min / 1000 + val[spec.v].max = val[spec.v].max / 1000 + elseif spec.k == "deciseconds_to_seconds" then + val[spec.v].min = val[spec.v].min / 10 + val[spec.v].max = val[spec.v].max / 10 + val[spec.v].fmt = ".2f" + elseif spec.k == "60%_of_value" then + val[spec.v].min = val[spec.v].min * 0.6 + val[spec.v].max = val[spec.v].max * 0.6 + elseif spec.k == "mod_value_to_item_class" then + val[spec.v].min = ItemClasses[val[spec.v].min].Name + val[spec.v].max = ItemClasses[val[spec.v].max].Name + val[spec.v].fmt = "s" + elseif spec.k == "multiplicative_damage_modifier" then + val[spec.v].min = 100 + val[spec.v].min + val[spec.v].max = 100 + val[spec.v].max + end + end + table.insert(out, (desc.text:gsub("%%(%d)%%", function(n) + local v = val[tonumber(n)] + if v.min == v.max then + return string.format("%"..v.fmt, v.min) + else + return string.format("(%"..v.fmt.."-%"..v.fmt..")", v.min, v.max) + end + end):gsub("%%d", function() + local v = val[1] + if v.min == v.max then + return string.format("%"..v.fmt, v.min) + else + return string.format("(%"..v.fmt.."-%"..v.fmt..")", v.min, v.max) + end + end):gsub("%%(%d)$(%+?d)", function(n, fmt) + local v = val[tonumber(n)] + if v.min == v.max then + return string.format("%"..fmt, v.min) + elseif fmt == "+d" then + if v.min < 0 then + return string.format("-(%d-%d)", -v.min, -v.max) + else + return string.format("+(%d-%d)", v.min, v.max) + end + else + return string.format("(%"..fmt.."-%"..fmt..")", v.min, v.max) + end + end):gsub("%%%%","%%"))) + end + end + return out +end + +local corr = io.open("../Data/ModCorrupted.lua", "w") +corr:write('-- Item data (c) Grinding Gear Games\n\nreturn {\n') +for _, modKey in ipairs(Mods.GenerationType(5)) do + local mod = Mods[modKey] + corr:write('\t["', mod.Id, '"] = { "', table.concat(describeMod(mod), '", "'), '", weightKey = { ') + for _, tagKey in ipairs(mod.SpawnWeight_TagsKeys) do + corr:write('"', Tags[tagKey].Id, '", ') + end + corr:write('}, weightVal = { ', table.concat(mod.SpawnWeight_Values, ', '), ', }, },\n') +end +corr:write('}') +corr:close() + +--io.read("*l") \ No newline at end of file diff --git a/Modules/ItemTools.lua b/Modules/ItemTools.lua index 780f12a2..749fe99a 100644 --- a/Modules/ItemTools.lua +++ b/Modules/ItemTools.lua @@ -380,7 +380,7 @@ function itemLib.createItemRaw(item) if not modLine.buff then local line = modLine.line if modLine.range then - line = "{range:"..round(modLine.range,2).."}" .. line + line = "{range:"..round(modLine.range,3).."}" .. line end if modLine.crafted then line = "{crafted}" .. line diff --git a/Modules/ModParser.lua b/Modules/ModParser.lua index 91645f89..963e3fcc 100644 --- a/Modules/ModParser.lua +++ b/Modules/ModParser.lua @@ -519,6 +519,7 @@ local modTagList = { ["if you[' ]h?a?ve been hit recently"] = { tag = { type = "Condition", var = "BeenHitRecently" } }, ["if you were hit recently"] = { tag = { type = "Condition", var = "BeenHitRecently" } }, ["if you were damaged by a hit recently"] = { tag = { type = "Condition", var = "BeenHitRecently" } }, + ["if you've taken a critical strike recently"] = { tag = { type = "Condition", var = "BeenCritRecently" } }, ["if you've taken a savage hit recently"] = { tag = { type = "Condition", var = "BeenSavageHitRecently" } }, ["if you have ?n[o']t been hit recently"] = { tag = { type = "Condition", var = "BeenHitRecently", neg = true } }, ["if you've taken no damage from hits recently"] = { tag = { type = "Condition", var = "BeenHitRecently", neg = true } }, diff --git a/PathOfBuilding.sln b/PathOfBuilding.sln index 68075a6f..43c104d6 100644 --- a/PathOfBuilding.sln +++ b/PathOfBuilding.sln @@ -102,6 +102,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Data", "Data", "{F2327651-C Data\EnchantmentBoots.lua = Data\EnchantmentBoots.lua Data\EnchantmentHelmet.lua = Data\EnchantmentHelmet.lua Data\Minions.lua = Data\Minions.lua + Data\ModCorrupted.lua = Data\ModCorrupted.lua Data\ModFlask.lua = Data\ModFlask.lua Data\ModJewel.lua = Data\ModJewel.lua Data\New.lua = Data\New.lua diff --git a/README.md b/README.md index e67ed4a4..60073b25 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,10 @@ If you'd like to help support the development of Path of Building, I have a [Pat ![ss3](https://cloud.githubusercontent.com/assets/19189971/18089780/f0ff234a-6f04-11e6-8c88-6193fe59a5c4.png) ## Changelog +### 1.4.14 - 2017/05/24 + * Added an option to the Configuration tab for "Have you been Crit Recently?" + * Fixed some issues with item templates and the All items/Shared items lists + ### 1.4.13 - 2017/05/20 * Detonate Dead now has an input in the Configuration tab for "Corpse Life" * Added support for Hungry Abyss diff --git a/changelog.txt b/changelog.txt index bb4efc61..90465e5c 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,6 @@ +VERSION[1.4.14][2017/05/24] + * Added an option to the Configuration tab for "Have you been Crit Recently?" + * Fixed some issues with item templates and the All items/Shared items lists VERSION[1.4.13][2017/05/20] * Detonate Dead now has an input in the Configuration tab for "Corpse Life" * Added support for Hungry Abyss diff --git a/manifest.xml b/manifest.xml index 3fb74d99..5876237e 100644 --- a/manifest.xml +++ b/manifest.xml @@ -1,20 +1,20 @@ - + - + - + @@ -22,7 +22,7 @@ - + @@ -38,9 +38,9 @@ - + - + @@ -58,9 +58,9 @@ - + - + @@ -70,6 +70,7 @@ +