From a46a623a4e27ab4a17348279ec209823e9ed2bc4 Mon Sep 17 00:00:00 2001 From: Maris Date: Fri, 29 May 2026 12:01:15 +0300 Subject: [PATCH 1/5] Added various facebreaker conditions --- src/Data/ModCache.lua | 4 ++++ src/Data/Uniques/Special/New.lua | 12 ++++++++++++ src/Modules/CalcActiveSkill.lua | 9 +++++++++ src/Modules/CalcSetup.lua | 31 +++++++++++++++++++++---------- src/Modules/ConfigOptions.lua | 8 ++++++++ src/Modules/ModParser.lua | 28 ++++++++++++++++++++++++++++ 6 files changed, 82 insertions(+), 10 deletions(-) diff --git a/src/Data/ModCache.lua b/src/Data/ModCache.lua index 47af27491b..cb1488ebb0 100644 --- a/src/Data/ModCache.lua +++ b/src/Data/ModCache.lua @@ -2838,6 +2838,7 @@ c["45% increased Spell Damage"]={{[1]={flags=2,keywordFlags=0,name="Damage",type c["450% increased Armour"]={{[1]={flags=0,keywordFlags=0,name="Armour",type="INC",value=450}},nil} c["450% increased Armour and Evasion"]={{[1]={flags=0,keywordFlags=0,name="ArmourAndEvasion",type="INC",value=450}},nil} c["48% increased Spirit"]={{[1]={flags=0,keywordFlags=0,name="Spirit",type="INC",value=48}},nil} +c["49% increased Stun Buildup"]={{[1]={flags=0,keywordFlags=0,name="EnemyHeavyStunBuildup",type="INC",value=49}},nil} c["5 Life Regeneration per second"]={{[1]={flags=0,keywordFlags=0,name="LifeRegen",type="BASE",value=5}},nil} c["5 Mana gained when you Block"]={{[1]={flags=0,keywordFlags=0,name="ManaOnBlock",type="BASE",value=5}},nil} c["5 to 10 Physical Thorns damage"]={{[1]={flags=0,keywordFlags=0,name="ThornsDamage",type="BASE",value=5}}," to 10 Physical "} @@ -3013,6 +3014,7 @@ c["50% increased Spell Damage"]={{[1]={flags=2,keywordFlags=0,name="Damage",type c["50% increased Spell damage for each 200 total Mana you have Spent Recently"]={{[1]={[1]={div=200,type="Multiplier",var="ManaSpentRecently"},flags=2,keywordFlags=0,name="Damage",type="INC",value=50}},nil} c["50% increased Spirit"]={{[1]={flags=0,keywordFlags=0,name="Spirit",type="INC",value=50}},nil} c["50% increased Strength Requirement"]={{[1]={flags=0,keywordFlags=0,name="StrRequirement",type="INC",value=50}},nil} +c["50% increased Stun Buildup"]={{[1]={flags=0,keywordFlags=0,name="EnemyHeavyStunBuildup",type="INC",value=50}},nil} c["50% increased Stun Threshold while Channelling"]={{[1]={[1]={type="Condition",var="Channelling"},flags=0,keywordFlags=0,name="StunThreshold",type="INC",value=50}},nil} c["50% increased Surrounded Area of Effect"]={{[1]={flags=0,keywordFlags=0,name="SurroundedArea",type="INC",value=50}},nil} c["50% increased Thorns damage if you've consumed an Endurance Charge Recently"]={{[1]={[1]={limit=1,type="Multiplier",var="RemovableEnduranceCharge"},flags=0,keywordFlags=0,name="ThornsDamage",type="INC",value=50}},nil} @@ -4669,6 +4671,8 @@ c["Has 2 Charm Slots"]={{[1]={flags=0,keywordFlags=0,name="CharmLimit",type="BAS c["Has 3 Charm Slot"]={{[1]={flags=0,keywordFlags=0,name="CharmLimit",type="BASE",value=3}},nil} c["Has 3 Charm Slots"]={{[1]={flags=0,keywordFlags=0,name="CharmLimit",type="BASE",value=3}},nil} c["Has 4 Augment Sockets"]={nil,"Has 4 Augment Sockets "} +c["Has 8 to 12 Physical Damage, +3 to +4 Per Boss's Face Broken"]={nil,"Has 8 to 12 Physical Damage, +3 to +4 Per Boss's Face Broken "} +c["Has 8 to 12 Physical Damage, +3 to +4 Per Boss's Face Broken 50% increased Stun Buildup"]={nil,"Has 8 to 12 Physical Damage, +3 to +4 Per Boss's Face Broken 50% increased Stun Buildup "} c["Has no Attribute Requirements"]={{[1]={flags=0,keywordFlags=0,name="NoAttributeRequirements",type="FLAG",value=true}},nil} c["Hazards have 15% chance to rearm after they are triggered"]={{[1]={[1]={skillType=203,type="SkillType"},flags=0,keywordFlags=0,name="HazardRearmChance",type="BASE",value=15}},nil} c["Hazards have 5% chance to rearm after they are triggered"]={{[1]={[1]={skillType=203,type="SkillType"},flags=0,keywordFlags=0,name="HazardRearmChance",type="BASE",value=5}},nil} diff --git a/src/Data/Uniques/Special/New.lua b/src/Data/Uniques/Special/New.lua index 14948a716a..2d2688c23e 100644 --- a/src/Data/Uniques/Special/New.lua +++ b/src/Data/Uniques/Special/New.lua @@ -5,4 +5,16 @@ data.uniques.new = { -- New +[[ +Facebreaker +Stocky Mitts +Variant: Current +Has 8 to 12 Physical Damage, +3 to +4 Per Boss's Face Broken +(47-50)% increased Stun Buildup +1% more Unarmed Damage per 5 Strength ++3 to Melee Strike Range while Unarmed ++1 to Armour per Strength +Can Attack as though using a One Handed Mace while both of your hand slots are empty +Unarmed Attacks that would use an Equipped One Hand Mace's damage use this Item's damage +]], } diff --git a/src/Modules/CalcActiveSkill.lua b/src/Modules/CalcActiveSkill.lua index 36ea2d7f41..c0a4c7435e 100644 --- a/src/Modules/CalcActiveSkill.lua +++ b/src/Modules/CalcActiveSkill.lua @@ -814,6 +814,15 @@ function calcs.buildActiveSkillModList(env, activeSkill) skillModList:NewMod("PhysicalMax", "BASE", physMax, "Hollow Palm Technique", ModFlag.Attack, nil, { type = "Condition", var = "HollowPalm" }) end + -- Facebreaker added phys for skills that would use Mace (this is a "hidden skill", keep logic similar to Hollow Palm Technique) + if activeSkill.actor.modDB.conditions.UseFacebreaker and ((activeEffect.grantedEffect.weaponTypes and activeEffect.grantedEffect.weaponTypes.OneHandMace)) then + local brokenFaces = activeSkill.actor.modDB.conditions.brokenBossFaces -- For testing, set 5 faces broken, brokenFaces part of configuration (player could set how many faces have been broken) + local physMin = 3 * brokenFaces -- TODO: 3 is GGG set damage number, find proper place to place this value and retrieve from it + local physMax = 4 * brokenFaces -- TODO: 4 is GGG set damage number, find proper place to place this value and retrieve from it + skillModList:NewMod("PhysicalMin", "BASE", physMin, "Facebreaker", ModFlag.Attack, nil, { type = "Condition", var = "Facebreaker" }) + skillModList:NewMod("PhysicalMax", "BASE", physMax, "Facebreaker", ModFlag.Attack, nil, { type = "Condition", var = "Facebreaker" }) + end + -- Extract skill data for _, value in ipairs(env.modDB:List(activeSkill.skillCfg, "SkillData")) do activeSkill.skillData[value.key] = value.value diff --git a/src/Modules/CalcSetup.lua b/src/Modules/CalcSetup.lua index 7d5f215b9f..2726bc138d 100644 --- a/src/Modules/CalcSetup.lua +++ b/src/Modules/CalcSetup.lua @@ -1509,19 +1509,30 @@ function calcs.initEnv(build, mode, override, specEnv) if env.player.weaponData1.countsAsDualWielding then env.player.weaponData2 = env.player.itemList["Weapon 1"].weaponData[2] elseif not env.player.itemList["Weapon 2"] then - -- Hollow Palm Technique - if (not env.player.itemList["Weapon 1"]) and env.modDB.mods.Keystone then - for _, keystone in ipairs(env.modDB.mods.Keystone) do - if keystone.value == "Hollow Palm Technique" then - env.player.weaponData2 = copyTable(env.data.unarmedWeaponData[env.classId]) - for i = 1, 2 do - env.player["weaponData" .. tostring(i)].asThoughUsing = env.player["weaponData" .. tostring(i)].asThoughUsing or { } - env.player["weaponData" .. tostring(i)].asThoughUsing["Staff"] = true + if (not env.player.itemList["Weapon 1"]) then + -- Hollow Palm Technique + if env.modDB.mods.Keystone then + for _, keystone in ipairs(env.modDB.mods.Keystone) do + if keystone.value == "Hollow Palm Technique" then + env.player.weaponData2 = copyTable(env.data.unarmedWeaponData[env.classId]) + for i = 1, 2 do + env.player["weaponData" .. tostring(i)].asThoughUsing = env.player["weaponData" .. tostring(i)].asThoughUsing or { } + env.player["weaponData" .. tostring(i)].asThoughUsing["Staff"] = true + end + env.player.modDB.conditions["HollowPalm"] = true -- Had to add condition here because it was otherwise not recognized correctly when "DisableSkill" is processed + break end - env.player.modDB.conditions["HollowPalm"] = true -- Had to add condition here because it was otherwise not recognized correctly when "DisableSkill" is processed - break end end + + if env.player.itemList["Gloves"] and env.player.itemList["Gloves"].title == "Facebreaker" then + env.player.weaponData2 = copyTable(env.data.unarmedWeaponData[env.classId]) + for i = 1, 2 do + env.player["weaponData" .. tostring(i)].asThoughUsing = env.player["weaponData" .. tostring(i)].asThoughUsing or { } + env.player["weaponData" .. tostring(i)].asThoughUsing["One Hand Mace"] = true + end + modDB:NewMod("Condition:UseFacebreaker", "FLAG", true, "Base") -- Added it here, otherwise item config not showing up in ConfigOptions + end end env.player.weaponData2 = env.player.weaponData2 or { } else diff --git a/src/Modules/ConfigOptions.lua b/src/Modules/ConfigOptions.lua index d69091439b..c9e8a67d8c 100644 --- a/src/Modules/ConfigOptions.lua +++ b/src/Modules/ConfigOptions.lua @@ -778,6 +778,14 @@ Huge sets the radius to 11. { var = "TotalVaalRejuvenationTotemLife", type = "countAllowZero", label = "Total Vaal Rejuvenation Totem Life:", ifSkill = { "Vaal Rejuvenation Totem" }, ifMod = "takenFromVaalRejuvenationTotemsBeforeYou", tooltip = "The total life of your Vaal Rejuvenation Totems that can be taken before yours", apply = function(val, modList, enemyModList) modList:NewMod("TotalVaalRejuvenationTotemLife", "BASE", val, "Config") end }, + + -- Section: Item-specific options + { section = "Item Options", col = 2 }, + { label = "Facebreaker:", ifFlag = "Condition:UseFacebreaker" }, + { var = "brokenBossFaces", type = "count", label = "Broken Boss Faces", ifFlag = "Condition:UseFacebreaker", tooltip = "Each ^xB97123Boss Encounter^7 icon on the World Screen is a face which can be broken by beating the encounter.\n^xADAA47Rare Monster Encounter^7 icons do not provide any bonus when broken.", apply = function(val, modList, enemyModList) + modList:NewMod("BrokenBossFaces", "BASE", val, "Config") + end }, + -- Section: Combat options { section = "When In Combat", col = 1 }, { var = "usePowerCharges", type = "check", label = "Do you use Power Charges?", apply = function(val, modList, enemyModList) diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index c22463521d..17c5724e46 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -5859,6 +5859,34 @@ local specialModList = { mod("Speed", "MORE", tonumber(asNum), nil, ModFlag.Attack, { type = "Condition", var = "HollowPalm" }, { type = "PerStat", stat = "EvasionOnAllArmourItems", div = tonumber(evNum) }), mod("CritChance", "BASE", tonumber(critNum), nil, ModFlag.Attack, { type = "Condition", var = "HollowPalm" }, { type = "PerStat", stat = "EnergyShieldOnAllArmourItems", div = (esNum) }), } end, + + + + + + + + + ["can attack as though using a one handed mace while both of your hand slots are empty unarmed attacks that would use your one hand mace's damage use this item's damage"] = function() return + { -- Facebreaker + flag("Condition:UseFacebreaker"), + } end, + ["has (%d+) to (%d+) physical damage, +(%d+) to +(%d+) per boss's face broken"] = function(bfNum, btNum, afNum, atNum) return + { -- Facebreaker + mod("PhysicalMin", "BASE", tonumber(bfNum), nil, ModFlag.Attack, { type = "Condition", var = "UseFacebreaker" }), + mod("PhysicalMax", "BASE", tonumber(btNum), nil, ModFlag.Attack, { type = "Condition", var = "UseFacebreaker" }), + mod("PhysicalMin", "BASE", tonumber(afNum), nil, ModFlag.Attack, { type = "Condition", var = "UseFacebreaker" }, { type = "PerStat", stat = "BrokenBossFaces", div = tonumber(evNum) }), + mod("PhysicalMax", "BASE", tonumber(atNum), nil, ModFlag.Attack, { type = "Condition", var = "UseFacebreaker" }, { type = "PerStat", stat = "BrokenBossFaces", div = tonumber(evNum) }), + } end, + + + + + + + + + ["storm and plant spells: deal (%d+)%% more damage cost (%d+)%% less have (%d+)%% less duration"] = function(damageNum, _, costNum, durationNum) return { -- Wildsurge Incantation mod("Damage", "MORE", damageNum, nil, 0, KeywordFlag.Spell, { type = "SkillType", skillTypeList = { SkillType.Storm, SkillType.Plant } } ), mod("Cost", "MORE", -tonumber(costNum), nil, 0, KeywordFlag.Spell, { type = "SkillType", skillTypeList = { SkillType.Storm, SkillType.Plant } } ), From 6f68de2e775ca63db7c9116cad2429bf6750b23c Mon Sep 17 00:00:00 2001 From: Maris Date: Fri, 29 May 2026 13:02:01 +0300 Subject: [PATCH 2/5] Added new testing all around --- src/Data/ModCache.lua | 6 ++++++ src/Modules/BuildDisplayStats.lua | 1 + src/Modules/CalcActiveSkill.lua | 7 +++++-- src/Modules/CalcSetup.lua | 1 + src/Modules/ModParser.lua | 8 ++++---- 5 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/Data/ModCache.lua b/src/Data/ModCache.lua index cb1488ebb0..a543e06a74 100644 --- a/src/Data/ModCache.lua +++ b/src/Data/ModCache.lua @@ -93,6 +93,7 @@ c["+1 Ring Slot"]={{[1]={flags=0,keywordFlags=0,name="AdditionalRingSlot",type=" c["+1 maximum stacks of Puppet Master"]={{}," maximum stacks of Puppet Master "} c["+1 metre to Dodge Roll distance"]={{}," metre to Dodge Roll distance "} c["+1 metre to Dodge Roll distance 50% increased Evasion Rating if you've Dodge Rolled Recently"]={{[1]={[1]={type="Condition",var="DodgeRolledRecently"},flags=0,keywordFlags=0,name="Evasion",type="BASE",value=1}}," metre to Dodge Roll distance 50% increased "} +c["+1 to Armour per Strength"]={{[1]={[1]={stat="Str",type="PerStat"},flags=0,keywordFlags=0,name="Armour",type="BASE",value=1}},nil} c["+1 to Evasion Rating per 1 Item Armour on Equipped Gloves"]={{[1]={[1]={div=1,stat="ArmourOnGloves",type="PerStat"},flags=0,keywordFlags=0,name="Evasion",type="BASE",value=1}},nil} c["+1 to Evasion Rating per 1 Item Energy Shield on Equipped Helmet"]={{[1]={[1]={div=1,stat="EnergyShieldOnHelmet",type="PerStat"},flags=0,keywordFlags=0,name="Evasion",type="BASE",value=1}},nil} c["+1 to Level of all Chaos Skills"]={{[1]={flags=0,keywordFlags=0,name="GemProperty",type="LIST",value={key="level",keyOfScaledMod="value",keyword="chaos",value=1}}},nil} @@ -633,6 +634,7 @@ c["+3 to Level of all Wing Blast Skills"]={{[1]={flags=0,keywordFlags=0,name="Ge c["+3 to Level of all Withering Presence Skills"]={{[1]={flags=0,keywordFlags=0,name="GemProperty",type="LIST",value={key="level",keyOfScaledMod="value",keyword="withering presence",value=3}}},nil} c["+3 to Level of all Wolf Pack Skills"]={{[1]={flags=0,keywordFlags=0,name="GemProperty",type="LIST",value={key="level",keyOfScaledMod="value",keyword="wolf pack",value=3}}},nil} c["+3 to Maximum Rage"]={{[1]={flags=0,keywordFlags=0,name="MaximumRage",type="BASE",value=3}},nil} +c["+3 to Melee Strike Range while Unarmed"]={{[1]={[1]={type="Condition",var="Unarmed"},flags=0,keywordFlags=0,name="MeleeWeaponRange",type="BASE",value=3},[2]={[1]={type="Condition",var="Unarmed"},flags=0,keywordFlags=0,name="UnarmedRange",type="BASE",value=3}},nil} c["+3 to Stun Threshold per Strength"]={{[1]={[1]={stat="Str",type="PerStat"},flags=0,keywordFlags=0,name="StunThreshold",type="BASE",value=3}},nil} c["+3 to all Attributes"]={{[1]={flags=0,keywordFlags=0,name="Str",type="BASE",value=3},[2]={flags=0,keywordFlags=0,name="Dex",type="BASE",value=3},[3]={flags=0,keywordFlags=0,name="Int",type="BASE",value=3},[4]={flags=0,keywordFlags=0,name="All",type="BASE",value=3}},nil} c["+3 to maximum Rage while Shapeshifted"]={{[1]={[1]={type="Condition",var="Shapeshifted"},flags=0,keywordFlags=0,name="MaximumRage",type="BASE",value=3}},nil} @@ -964,6 +966,7 @@ c["1% increased maximum Darkness per 1% Chaos Resistance"]={{[1]={[1]={div=1,sta c["1% increased maximum Life"]={{[1]={flags=0,keywordFlags=0,name="Life",type="INC",value=1}},nil} c["1% more Attack Speed per 75 Item Evasion on Equipped Armour Items"]={{[1]={flags=1,keywordFlags=0,name="Speed",type="MORE",value=1}}," per 75 Item Evasion on Equipped Armour Items "} c["1% more Attack Speed per 75 Item Evasion on Equipped Armour Items +0.1% to Critical Hit Chance per 10 Item Energy Shield on Equipped Armour Items"]={{[1]={[1]={div=10,stat="EnergyShieldOnAllArmourItems",type="PerStat"},flags=1,keywordFlags=0,name="Speed",type="MORE",value=1}}," per 75 Item Evasion on Equipped Armour Items +0.1% to Critical Hit Chance "} +c["1% more Unarmed Damage per 5 Strength"]={{[1]={[1]={div=5,stat="Str",type="PerStat"},flags=16777220,keywordFlags=0,name="Damage",type="MORE",value=1}},nil} c["1% of Maximum Life Converted to Energy Shield per 20 Tribute"]={{[1]={[1]={actor="parent",div=20,stat="Tribute",type="PerStat"},flags=0,keywordFlags=0,name="LifeConvertToEnergyShield",type="BASE",value=1}},nil} c["1% of damage taken Recouped as Life per 10 Tribute"]={{[1]={[1]={actor="parent",div=10,stat="Tribute",type="PerStat"},flags=0,keywordFlags=0,name="LifeRecoup",type="BASE",value=1}},nil} c["1% of damage taken Recouped as Mana per 10 Tribute"]={{[1]={[1]={actor="parent",div=10,stat="Tribute",type="PerStat"},flags=0,keywordFlags=0,name="ManaRecoup",type="BASE",value=1}},nil} @@ -3799,6 +3802,8 @@ c["Can Allocate Passive Skills from the Sorceress's starting point"]={nil,"Can A c["Can Allocate Passive Skills from the Sorceress's starting point Grants 4 Passive Skill Points"]={nil,"Can Allocate Passive Skills from the Sorceress's starting point Grants 4 Passive Skill Points "} c["Can Allocate Passive Skills from the Warrior's starting point"]={nil,"Can Allocate Passive Skills from the Warrior's starting point "} c["Can Allocate Passive Skills from the Warrior's starting point Grants 4 Passive Skill Points"]={nil,"Can Allocate Passive Skills from the Warrior's starting point Grants 4 Passive Skill Points "} +c["Can Attack as though using a One Handed Mace while both of your hand slots are empty"]={nil,"Can Attack as though using a One Handed Mace while both of your hand slots are empty "} +c["Can Attack as though using a One Handed Mace while both of your hand slots are empty Unarmed Attacks that would use an Equipped One Hand Mace's damage use this Item's damage"]={nil,"Can Attack as though using a One Handed Mace while both of your hand slots are empty Unarmed Attacks that would use an Equipped One Hand Mace's damage use this Item's damage "} c["Can Attack as though using a Quarterstaff while both of your hand slots are empty"]={nil,"Can Attack as though using a Quarterstaff while both of your hand slots are empty "} c["Can Attack as though using a Quarterstaff while both of your hand slots are empty Unarmed Attacks that would use an Equipped Quarterstaff's damage have:"]={nil,"Can Attack as though using a Quarterstaff while both of your hand slots are empty Unarmed Attacks that would use an Equipped Quarterstaff's damage have: "} c["Can Attack as though using a Quarterstaff while both of your hand slots are empty Unarmed Attacks that would use an Equipped Quarterstaff's damage have: Base Unarmed Physical damage replaced with damage based on their Skill Level"]={nil,"Can Attack as though using a Quarterstaff while both of your hand slots are empty Unarmed Attacks that would use an Equipped Quarterstaff's damage have: Base Unarmed Physical damage replaced with damage based on their Skill Level "} @@ -5506,6 +5511,7 @@ c["Trusted Kinship"]={{[1]={flags=0,keywordFlags=0,name="Keystone",type="LIST",v c["Unaffected by Chill during Dodge Roll"]={nil,"Unaffected by Chill during Dodge Roll "} c["Unaffected by Chill while Leeching Mana"]={{[1]={[1]={type="Condition",var="LeechingMana"},flags=0,keywordFlags=0,name="SelfChillEffect",type="MORE",value=-100}},nil} c["Unaffected by Elemental Weakness"]={nil,"Unaffected by Elemental Weakness "} +c["Unarmed Attacks that would use an Equipped One Hand Mace's damage use this Item's damage"]={nil,"Unarmed Attacks that would use an Equipped One Hand Mace's damage use this Item's damage "} c["Unarmed Attacks that would use an Equipped Quarterstaff's damage have:"]={nil,"Unarmed Attacks that would use an Equipped Quarterstaff's damage have: "} c["Unarmed Attacks that would use an Equipped Quarterstaff's damage have: Base Unarmed Physical damage replaced with damage based on their Skill Level"]={nil,"Unarmed Attacks that would use an Equipped Quarterstaff's damage have: Base Unarmed Physical damage replaced with damage based on their Skill Level "} c["Unarmed Attacks that would use an Equipped Quarterstaff's damage have: Base Unarmed Physical damage replaced with damage based on their Skill Level 1% more Attack Speed per 75 Item Evasion on Equipped Armour Items"]={nil,"Unarmed Attacks that would use an Equipped Quarterstaff's damage have: Base Unarmed Physical damage replaced with damage based on their Skill Level 1% more Attack Speed per 75 Item Evasion on Equipped Armour Items "} diff --git a/src/Modules/BuildDisplayStats.lua b/src/Modules/BuildDisplayStats.lua index 538efd46ca..3fcf9d9ea6 100644 --- a/src/Modules/BuildDisplayStats.lua +++ b/src/Modules/BuildDisplayStats.lua @@ -258,6 +258,7 @@ local extraSaveStats = { "EnduranceChargesMax", "ActiveTotemLimit", "ActiveMinionLimit", + "BrokenBossFaces", } return displayStats, minionDisplayStats, extraSaveStats diff --git a/src/Modules/CalcActiveSkill.lua b/src/Modules/CalcActiveSkill.lua index c0a4c7435e..67e588a5eb 100644 --- a/src/Modules/CalcActiveSkill.lua +++ b/src/Modules/CalcActiveSkill.lua @@ -814,9 +814,12 @@ function calcs.buildActiveSkillModList(env, activeSkill) skillModList:NewMod("PhysicalMax", "BASE", physMax, "Hollow Palm Technique", ModFlag.Attack, nil, { type = "Condition", var = "HollowPalm" }) end + ConPrintf("---prettyPrintTable---") + prettyPrintTable(activeSkill.actor.modDB.conditions) -- Facebreaker added phys for skills that would use Mace (this is a "hidden skill", keep logic similar to Hollow Palm Technique) - if activeSkill.actor.modDB.conditions.UseFacebreaker and ((activeEffect.grantedEffect.weaponTypes and activeEffect.grantedEffect.weaponTypes.OneHandMace)) then - local brokenFaces = activeSkill.actor.modDB.conditions.brokenBossFaces -- For testing, set 5 faces broken, brokenFaces part of configuration (player could set how many faces have been broken) + if activeSkill.actor.modDB.conditions.UseFacebreaker then -- and ((activeEffect.grantedEffect.weaponTypes and activeEffect.grantedEffect.weaponTypes.OneHandMace)) then + ConPrintf("TEST>>>") + local brokenFaces = 5 -- activeSkill.actor.modDB.conditions.brokenBossFaces -- For testing, set 5 faces broken, brokenFaces part of configuration (player could set how many faces have been broken) local physMin = 3 * brokenFaces -- TODO: 3 is GGG set damage number, find proper place to place this value and retrieve from it local physMax = 4 * brokenFaces -- TODO: 4 is GGG set damage number, find proper place to place this value and retrieve from it skillModList:NewMod("PhysicalMin", "BASE", physMin, "Facebreaker", ModFlag.Attack, nil, { type = "Condition", var = "Facebreaker" }) diff --git a/src/Modules/CalcSetup.lua b/src/Modules/CalcSetup.lua index 2726bc138d..75454207fb 100644 --- a/src/Modules/CalcSetup.lua +++ b/src/Modules/CalcSetup.lua @@ -1532,6 +1532,7 @@ function calcs.initEnv(build, mode, override, specEnv) env.player["weaponData" .. tostring(i)].asThoughUsing["One Hand Mace"] = true end modDB:NewMod("Condition:UseFacebreaker", "FLAG", true, "Base") -- Added it here, otherwise item config not showing up in ConfigOptions + env.player.modDB.conditions["UseFacebreaker"] = true -- Had to add condition here because it was otherwise not recognized correctly when "DisableSkill" is processed end end env.player.weaponData2 = env.player.weaponData2 or { } diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index 17c5724e46..cc042c5b3c 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -5867,10 +5867,10 @@ local specialModList = { - ["can attack as though using a one handed mace while both of your hand slots are empty unarmed attacks that would use your one hand mace's damage use this item's damage"] = function() return - { -- Facebreaker - flag("Condition:UseFacebreaker"), - } end, + -- ["can attack as though using a one handed mace while both of your hand slots are empty unarmed attacks that would use your one hand mace's damage use this item's damage"] = function() return + -- { -- Facebreaker + -- flag("Condition:UseFacebreaker"), + -- } end, ["has (%d+) to (%d+) physical damage, +(%d+) to +(%d+) per boss's face broken"] = function(bfNum, btNum, afNum, atNum) return { -- Facebreaker mod("PhysicalMin", "BASE", tonumber(bfNum), nil, ModFlag.Attack, { type = "Condition", var = "UseFacebreaker" }), From 95d88f2131d3b8c00ae8b58b00984d361343cafc Mon Sep 17 00:00:00 2001 From: Maris Date: Fri, 29 May 2026 15:18:21 +0300 Subject: [PATCH 3/5] Fixed ModParser list, now two of the important mods are highlighted as supported, conditions work through ModParser, mode adjustments needed - weapons no more recognized, calc not there, faces not done --- src/Data/ModCache.lua | 11 ++++++----- src/Data/Uniques/Special/New.lua | 3 ++- src/Modules/BuildDisplayStats.lua | 1 - src/Modules/CalcActiveSkill.lua | 6 ++++-- src/Modules/CalcSetup.lua | 8 +++++--- src/Modules/ConfigOptions.lua | 2 +- src/Modules/ModParser.lua | 14 +++++++++----- 7 files changed, 27 insertions(+), 18 deletions(-) diff --git a/src/Data/ModCache.lua b/src/Data/ModCache.lua index a543e06a74..bca713b5dc 100644 --- a/src/Data/ModCache.lua +++ b/src/Data/ModCache.lua @@ -386,6 +386,8 @@ c["+28% to Fire Resistance"]={{[1]={flags=0,keywordFlags=0,name="FireResist",typ c["+28% to Lightning Resistance"]={{[1]={flags=0,keywordFlags=0,name="LightningResist",type="BASE",value=28}},nil} c["+29 to Strength"]={{[1]={flags=0,keywordFlags=0,name="Str",type="BASE",value=29}},nil} c["+29% to Chaos Resistance"]={{[1]={flags=0,keywordFlags=0,name="ChaosResist",type="BASE",value=29}},nil} +c["+3 to +4 Per Boss's Face Broken"]={{}," +4 Per Boss's Face Broken "} +c["+3 to +4 Per Boss's Face Broken 50% increased Stun Buildup"]={{[1]={flags=0,keywordFlags=0,name="EnemyHeavyStunBuildup",type="BASE",value=3}}," +4 Per Boss's Face Broken 50% increased "} c["+3 to Level of all Alchemist's Boon Skills"]={{[1]={flags=0,keywordFlags=0,name="GemProperty",type="LIST",value={key="level",keyOfScaledMod="value",keyword="alchemist's boon",value=3}}},nil} c["+3 to Level of all Ancestral Cry Skills"]={{[1]={flags=0,keywordFlags=0,name="GemProperty",type="LIST",value={key="level",keyOfScaledMod="value",keyword="ancestral cry",value=3}}},nil} c["+3 to Level of all Ancestral Warrior Totem Skills"]={{[1]={flags=0,keywordFlags=0,name="GemProperty",type="LIST",value={key="level",keyOfScaledMod="value",keyword="ancestral warrior totem",value=3}}},nil} @@ -3802,8 +3804,7 @@ c["Can Allocate Passive Skills from the Sorceress's starting point"]={nil,"Can A c["Can Allocate Passive Skills from the Sorceress's starting point Grants 4 Passive Skill Points"]={nil,"Can Allocate Passive Skills from the Sorceress's starting point Grants 4 Passive Skill Points "} c["Can Allocate Passive Skills from the Warrior's starting point"]={nil,"Can Allocate Passive Skills from the Warrior's starting point "} c["Can Allocate Passive Skills from the Warrior's starting point Grants 4 Passive Skill Points"]={nil,"Can Allocate Passive Skills from the Warrior's starting point Grants 4 Passive Skill Points "} -c["Can Attack as though using a One Handed Mace while both of your hand slots are empty"]={nil,"Can Attack as though using a One Handed Mace while both of your hand slots are empty "} -c["Can Attack as though using a One Handed Mace while both of your hand slots are empty Unarmed Attacks that would use an Equipped One Hand Mace's damage use this Item's damage"]={nil,"Can Attack as though using a One Handed Mace while both of your hand slots are empty Unarmed Attacks that would use an Equipped One Hand Mace's damage use this Item's damage "} +c["Can Attack as though using a One Handed Mace while both of your hand slots are empty"]={{[1]={flags=0,keywordFlags=0,name="WeaponData",type="LIST",value={key="countsAsMace1H",value=true}}},nil} c["Can Attack as though using a Quarterstaff while both of your hand slots are empty"]={nil,"Can Attack as though using a Quarterstaff while both of your hand slots are empty "} c["Can Attack as though using a Quarterstaff while both of your hand slots are empty Unarmed Attacks that would use an Equipped Quarterstaff's damage have:"]={nil,"Can Attack as though using a Quarterstaff while both of your hand slots are empty Unarmed Attacks that would use an Equipped Quarterstaff's damage have: "} c["Can Attack as though using a Quarterstaff while both of your hand slots are empty Unarmed Attacks that would use an Equipped Quarterstaff's damage have: Base Unarmed Physical damage replaced with damage based on their Skill Level"]={nil,"Can Attack as though using a Quarterstaff while both of your hand slots are empty Unarmed Attacks that would use an Equipped Quarterstaff's damage have: Base Unarmed Physical damage replaced with damage based on their Skill Level "} @@ -4676,8 +4677,8 @@ c["Has 2 Charm Slots"]={{[1]={flags=0,keywordFlags=0,name="CharmLimit",type="BAS c["Has 3 Charm Slot"]={{[1]={flags=0,keywordFlags=0,name="CharmLimit",type="BASE",value=3}},nil} c["Has 3 Charm Slots"]={{[1]={flags=0,keywordFlags=0,name="CharmLimit",type="BASE",value=3}},nil} c["Has 4 Augment Sockets"]={nil,"Has 4 Augment Sockets "} -c["Has 8 to 12 Physical Damage, +3 to +4 Per Boss's Face Broken"]={nil,"Has 8 to 12 Physical Damage, +3 to +4 Per Boss's Face Broken "} -c["Has 8 to 12 Physical Damage, +3 to +4 Per Boss's Face Broken 50% increased Stun Buildup"]={nil,"Has 8 to 12 Physical Damage, +3 to +4 Per Boss's Face Broken 50% increased Stun Buildup "} +c["Has 8 to 12 Physical Damage"]={nil,"Has 8 to 12 Physical Damage "} +c["Has 8 to 12 Physical Damage +3 to +4 Per Boss's Face Broken"]={nil,"Has 8 to 12 Physical Damage +3 to +4 Per Boss's Face Broken "} c["Has no Attribute Requirements"]={{[1]={flags=0,keywordFlags=0,name="NoAttributeRequirements",type="FLAG",value=true}},nil} c["Hazards have 15% chance to rearm after they are triggered"]={{[1]={[1]={skillType=203,type="SkillType"},flags=0,keywordFlags=0,name="HazardRearmChance",type="BASE",value=15}},nil} c["Hazards have 5% chance to rearm after they are triggered"]={{[1]={[1]={skillType=203,type="SkillType"},flags=0,keywordFlags=0,name="HazardRearmChance",type="BASE",value=5}},nil} @@ -5511,7 +5512,7 @@ c["Trusted Kinship"]={{[1]={flags=0,keywordFlags=0,name="Keystone",type="LIST",v c["Unaffected by Chill during Dodge Roll"]={nil,"Unaffected by Chill during Dodge Roll "} c["Unaffected by Chill while Leeching Mana"]={{[1]={[1]={type="Condition",var="LeechingMana"},flags=0,keywordFlags=0,name="SelfChillEffect",type="MORE",value=-100}},nil} c["Unaffected by Elemental Weakness"]={nil,"Unaffected by Elemental Weakness "} -c["Unarmed Attacks that would use an Equipped One Hand Mace's damage use this Item's damage"]={nil,"Unarmed Attacks that would use an Equipped One Hand Mace's damage use this Item's damage "} +c["Unarmed Attacks that would use an Equipped One Hand Mace's damage use this Item's damage"]={{[1]={flags=0,keywordFlags=0,name="Condition:UseFacebreaker",type="FLAG",value=true}},nil} c["Unarmed Attacks that would use an Equipped Quarterstaff's damage have:"]={nil,"Unarmed Attacks that would use an Equipped Quarterstaff's damage have: "} c["Unarmed Attacks that would use an Equipped Quarterstaff's damage have: Base Unarmed Physical damage replaced with damage based on their Skill Level"]={nil,"Unarmed Attacks that would use an Equipped Quarterstaff's damage have: Base Unarmed Physical damage replaced with damage based on their Skill Level "} c["Unarmed Attacks that would use an Equipped Quarterstaff's damage have: Base Unarmed Physical damage replaced with damage based on their Skill Level 1% more Attack Speed per 75 Item Evasion on Equipped Armour Items"]={nil,"Unarmed Attacks that would use an Equipped Quarterstaff's damage have: Base Unarmed Physical damage replaced with damage based on their Skill Level 1% more Attack Speed per 75 Item Evasion on Equipped Armour Items "} diff --git a/src/Data/Uniques/Special/New.lua b/src/Data/Uniques/Special/New.lua index 2d2688c23e..05ef918ba8 100644 --- a/src/Data/Uniques/Special/New.lua +++ b/src/Data/Uniques/Special/New.lua @@ -9,7 +9,8 @@ data.uniques.new = { Facebreaker Stocky Mitts Variant: Current -Has 8 to 12 Physical Damage, +3 to +4 Per Boss's Face Broken +Has 8 to 12 Physical Damage ++3 to +4 Per Boss's Face Broken (47-50)% increased Stun Buildup 1% more Unarmed Damage per 5 Strength +3 to Melee Strike Range while Unarmed diff --git a/src/Modules/BuildDisplayStats.lua b/src/Modules/BuildDisplayStats.lua index 3fcf9d9ea6..538efd46ca 100644 --- a/src/Modules/BuildDisplayStats.lua +++ b/src/Modules/BuildDisplayStats.lua @@ -258,7 +258,6 @@ local extraSaveStats = { "EnduranceChargesMax", "ActiveTotemLimit", "ActiveMinionLimit", - "BrokenBossFaces", } return displayStats, minionDisplayStats, extraSaveStats diff --git a/src/Modules/CalcActiveSkill.lua b/src/Modules/CalcActiveSkill.lua index 67e588a5eb..2a76b7d929 100644 --- a/src/Modules/CalcActiveSkill.lua +++ b/src/Modules/CalcActiveSkill.lua @@ -287,6 +287,10 @@ local function getWeaponFlags(env, weaponData, weaponTypes) if weaponData.countsAsAll1H then flags = bor(ModFlag.Axe, ModFlag.Claw, ModFlag.Dagger, ModFlag.Mace, ModFlag.Sword, ModFlag.Spear) end + if weaponData.countsAsMace1H then -- Facebreaker + ConPrintf("countsAsMace1H ----- WORKS") + flags = bor(ModFlag.Mace, ModFlag.Weapon1H) + end if weaponData.type ~= "None" then flags = bor(flags, ModFlag.Weapon) if info.oneHand then @@ -814,8 +818,6 @@ function calcs.buildActiveSkillModList(env, activeSkill) skillModList:NewMod("PhysicalMax", "BASE", physMax, "Hollow Palm Technique", ModFlag.Attack, nil, { type = "Condition", var = "HollowPalm" }) end - ConPrintf("---prettyPrintTable---") - prettyPrintTable(activeSkill.actor.modDB.conditions) -- Facebreaker added phys for skills that would use Mace (this is a "hidden skill", keep logic similar to Hollow Palm Technique) if activeSkill.actor.modDB.conditions.UseFacebreaker then -- and ((activeEffect.grantedEffect.weaponTypes and activeEffect.grantedEffect.weaponTypes.OneHandMace)) then ConPrintf("TEST>>>") diff --git a/src/Modules/CalcSetup.lua b/src/Modules/CalcSetup.lua index 75454207fb..06132f839e 100644 --- a/src/Modules/CalcSetup.lua +++ b/src/Modules/CalcSetup.lua @@ -1525,14 +1525,16 @@ function calcs.initEnv(build, mode, override, specEnv) end end - if env.player.itemList["Gloves"] and env.player.itemList["Gloves"].title == "Facebreaker" then + ConPrintf(">>>> prettyPrintTable >>>>>") + ConPrintf("BrokenFaces: %s", env.modDB.BrokenBossFaces) + ConPrintf("PowerCharges: %s", env.modDB.PowerCharges) + -- prettyPrintTable(env.modDB) + if env.modDB.conditions.UseFacebreaker then env.player.weaponData2 = copyTable(env.data.unarmedWeaponData[env.classId]) for i = 1, 2 do env.player["weaponData" .. tostring(i)].asThoughUsing = env.player["weaponData" .. tostring(i)].asThoughUsing or { } env.player["weaponData" .. tostring(i)].asThoughUsing["One Hand Mace"] = true end - modDB:NewMod("Condition:UseFacebreaker", "FLAG", true, "Base") -- Added it here, otherwise item config not showing up in ConfigOptions - env.player.modDB.conditions["UseFacebreaker"] = true -- Had to add condition here because it was otherwise not recognized correctly when "DisableSkill" is processed end end env.player.weaponData2 = env.player.weaponData2 or { } diff --git a/src/Modules/ConfigOptions.lua b/src/Modules/ConfigOptions.lua index c9e8a67d8c..1c8e174458 100644 --- a/src/Modules/ConfigOptions.lua +++ b/src/Modules/ConfigOptions.lua @@ -783,7 +783,7 @@ Huge sets the radius to 11. { section = "Item Options", col = 2 }, { label = "Facebreaker:", ifFlag = "Condition:UseFacebreaker" }, { var = "brokenBossFaces", type = "count", label = "Broken Boss Faces", ifFlag = "Condition:UseFacebreaker", tooltip = "Each ^xB97123Boss Encounter^7 icon on the World Screen is a face which can be broken by beating the encounter.\n^xADAA47Rare Monster Encounter^7 icons do not provide any bonus when broken.", apply = function(val, modList, enemyModList) - modList:NewMod("BrokenBossFaces", "BASE", val, "Config") + modList:NewMod("BrokenBossFaces", "OVERRIDE", val, "Config", { type = "Condition", var = "Combat" }) end }, -- Section: Combat options diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index cc042c5b3c..43b5120e64 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -5866,18 +5866,22 @@ local specialModList = { - - -- ["can attack as though using a one handed mace while both of your hand slots are empty unarmed attacks that would use your one hand mace's damage use this item's damage"] = function() return - -- { -- Facebreaker - -- flag("Condition:UseFacebreaker"), - -- } end, ["has (%d+) to (%d+) physical damage, +(%d+) to +(%d+) per boss's face broken"] = function(bfNum, btNum, afNum, atNum) return { -- Facebreaker + flag("Condition:UseFacebreaker"), mod("PhysicalMin", "BASE", tonumber(bfNum), nil, ModFlag.Attack, { type = "Condition", var = "UseFacebreaker" }), mod("PhysicalMax", "BASE", tonumber(btNum), nil, ModFlag.Attack, { type = "Condition", var = "UseFacebreaker" }), mod("PhysicalMin", "BASE", tonumber(afNum), nil, ModFlag.Attack, { type = "Condition", var = "UseFacebreaker" }, { type = "PerStat", stat = "BrokenBossFaces", div = tonumber(evNum) }), mod("PhysicalMax", "BASE", tonumber(atNum), nil, ModFlag.Attack, { type = "Condition", var = "UseFacebreaker" }, { type = "PerStat", stat = "BrokenBossFaces", div = tonumber(evNum) }), } end, + ["can attack as though using a one handed mace while both of your hand slots are empty"] = function() return + { -- Facebreaker + mod("WeaponData", "LIST", { key = "countsAsMace1H", value = true }), + } end, + ["unarmed attacks that would use an equipped one hand mace's damage use this item's damage"] = function() return + { -- Facebreaker + flag("Condition:UseFacebreaker"), + } end, From 83f4a6e39f3d62c768be3b9cbf495dd7ca654007 Mon Sep 17 00:00:00 2001 From: Maris Date: Fri, 29 May 2026 15:45:05 +0300 Subject: [PATCH 4/5] Added 'blue' mods, aka mods are being recognized, now conditions and functionality --- src/Data/ModCache.lua | 5 +---- src/Data/Uniques/Special/New.lua | 3 +-- src/Modules/ModParser.lua | 13 +++---------- 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/src/Data/ModCache.lua b/src/Data/ModCache.lua index bca713b5dc..0591af9ec5 100644 --- a/src/Data/ModCache.lua +++ b/src/Data/ModCache.lua @@ -386,8 +386,6 @@ c["+28% to Fire Resistance"]={{[1]={flags=0,keywordFlags=0,name="FireResist",typ c["+28% to Lightning Resistance"]={{[1]={flags=0,keywordFlags=0,name="LightningResist",type="BASE",value=28}},nil} c["+29 to Strength"]={{[1]={flags=0,keywordFlags=0,name="Str",type="BASE",value=29}},nil} c["+29% to Chaos Resistance"]={{[1]={flags=0,keywordFlags=0,name="ChaosResist",type="BASE",value=29}},nil} -c["+3 to +4 Per Boss's Face Broken"]={{}," +4 Per Boss's Face Broken "} -c["+3 to +4 Per Boss's Face Broken 50% increased Stun Buildup"]={{[1]={flags=0,keywordFlags=0,name="EnemyHeavyStunBuildup",type="BASE",value=3}}," +4 Per Boss's Face Broken 50% increased "} c["+3 to Level of all Alchemist's Boon Skills"]={{[1]={flags=0,keywordFlags=0,name="GemProperty",type="LIST",value={key="level",keyOfScaledMod="value",keyword="alchemist's boon",value=3}}},nil} c["+3 to Level of all Ancestral Cry Skills"]={{[1]={flags=0,keywordFlags=0,name="GemProperty",type="LIST",value={key="level",keyOfScaledMod="value",keyword="ancestral cry",value=3}}},nil} c["+3 to Level of all Ancestral Warrior Totem Skills"]={{[1]={flags=0,keywordFlags=0,name="GemProperty",type="LIST",value={key="level",keyOfScaledMod="value",keyword="ancestral warrior totem",value=3}}},nil} @@ -4677,8 +4675,7 @@ c["Has 2 Charm Slots"]={{[1]={flags=0,keywordFlags=0,name="CharmLimit",type="BAS c["Has 3 Charm Slot"]={{[1]={flags=0,keywordFlags=0,name="CharmLimit",type="BASE",value=3}},nil} c["Has 3 Charm Slots"]={{[1]={flags=0,keywordFlags=0,name="CharmLimit",type="BASE",value=3}},nil} c["Has 4 Augment Sockets"]={nil,"Has 4 Augment Sockets "} -c["Has 8 to 12 Physical Damage"]={nil,"Has 8 to 12 Physical Damage "} -c["Has 8 to 12 Physical Damage +3 to +4 Per Boss's Face Broken"]={nil,"Has 8 to 12 Physical Damage +3 to +4 Per Boss's Face Broken "} +c["Has 8 to 12 Physical Damage, +3 to +4 Per Boss's Face Broken"]={{[1]={[1]={type="Condition",var="UseFacebreaker"},[2]={type="SkillType"},flags=1,keywordFlags=0,name="PhysicalMin",type="BASE",value=20},[2]={[1]={type="Condition",var="UseFacebreaker"},[2]={type="SkillType"},flags=1,keywordFlags=0,name="PhysicalMax",type="BASE",value=11}},nil} c["Has no Attribute Requirements"]={{[1]={flags=0,keywordFlags=0,name="NoAttributeRequirements",type="FLAG",value=true}},nil} c["Hazards have 15% chance to rearm after they are triggered"]={{[1]={[1]={skillType=203,type="SkillType"},flags=0,keywordFlags=0,name="HazardRearmChance",type="BASE",value=15}},nil} c["Hazards have 5% chance to rearm after they are triggered"]={{[1]={[1]={skillType=203,type="SkillType"},flags=0,keywordFlags=0,name="HazardRearmChance",type="BASE",value=5}},nil} diff --git a/src/Data/Uniques/Special/New.lua b/src/Data/Uniques/Special/New.lua index 05ef918ba8..2d2688c23e 100644 --- a/src/Data/Uniques/Special/New.lua +++ b/src/Data/Uniques/Special/New.lua @@ -9,8 +9,7 @@ data.uniques.new = { Facebreaker Stocky Mitts Variant: Current -Has 8 to 12 Physical Damage -+3 to +4 Per Boss's Face Broken +Has 8 to 12 Physical Damage, +3 to +4 Per Boss's Face Broken (47-50)% increased Stun Buildup 1% more Unarmed Damage per 5 Strength +3 to Melee Strike Range while Unarmed diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index 43b5120e64..2bd04fc090 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -5863,16 +5863,10 @@ local specialModList = { - - - - ["has (%d+) to (%d+) physical damage, +(%d+) to +(%d+) per boss's face broken"] = function(bfNum, btNum, afNum, atNum) return + ["has (%d+) to (%d+) physical damage, %+(%d) to %+(%d) per boss's face broken"] = function(bfNum, btNum, afNum, atNum) return { -- Facebreaker - flag("Condition:UseFacebreaker"), - mod("PhysicalMin", "BASE", tonumber(bfNum), nil, ModFlag.Attack, { type = "Condition", var = "UseFacebreaker" }), - mod("PhysicalMax", "BASE", tonumber(btNum), nil, ModFlag.Attack, { type = "Condition", var = "UseFacebreaker" }), - mod("PhysicalMin", "BASE", tonumber(afNum), nil, ModFlag.Attack, { type = "Condition", var = "UseFacebreaker" }, { type = "PerStat", stat = "BrokenBossFaces", div = tonumber(evNum) }), - mod("PhysicalMax", "BASE", tonumber(atNum), nil, ModFlag.Attack, { type = "Condition", var = "UseFacebreaker" }, { type = "PerStat", stat = "BrokenBossFaces", div = tonumber(evNum) }), + mod("PhysicalMin", "BASE", tonumber(bfNum + afNum), nil, ModFlag.Attack, { type = "Condition", var = "UseFacebreaker" }, { type = "SkillType", skillType = SkillType.MaceSkill } ), + mod("PhysicalMax", "BASE", tonumber(btNum + atNum), nil, ModFlag.Attack, { type = "Condition", var = "UseFacebreaker" }, { type = "SkillType", skillType = SkillType.MaceSkill } ), } end, ["can attack as though using a one handed mace while both of your hand slots are empty"] = function() return { -- Facebreaker @@ -5890,7 +5884,6 @@ local specialModList = { - ["storm and plant spells: deal (%d+)%% more damage cost (%d+)%% less have (%d+)%% less duration"] = function(damageNum, _, costNum, durationNum) return { -- Wildsurge Incantation mod("Damage", "MORE", damageNum, nil, 0, KeywordFlag.Spell, { type = "SkillType", skillTypeList = { SkillType.Storm, SkillType.Plant } } ), mod("Cost", "MORE", -tonumber(costNum), nil, 0, KeywordFlag.Spell, { type = "SkillType", skillTypeList = { SkillType.Storm, SkillType.Plant } } ), From 55c04e9af05c7cca44a343fcaf86560b14d0b5ad Mon Sep 17 00:00:00 2001 From: Maris Date: Fri, 29 May 2026 22:06:14 +0300 Subject: [PATCH 5/5] Added temp commit, a lot various changes forgot what was what --- src/Classes/ItemsTab.lua | 4 ++++ src/Data/ModCache.lua | 4 ++-- src/Data/Uniques/Special/New.lua | 1 - src/Modules/CalcActiveSkill.lua | 15 +++++++++++---- src/Modules/CalcSetup.lua | 14 ++++++++------ src/Modules/ConfigOptions.lua | 2 +- src/Modules/ModParser.lua | 32 ++++++++++++++++++++++++++++---- 7 files changed, 54 insertions(+), 18 deletions(-) diff --git a/src/Classes/ItemsTab.lua b/src/Classes/ItemsTab.lua index f490b94b80..6c463b4651 100644 --- a/src/Classes/ItemsTab.lua +++ b/src/Classes/ItemsTab.lua @@ -3272,6 +3272,10 @@ function ItemsTabClass:AddItemTooltip(tooltip, item, slot, dbMode, maxWidth) if armourData.Ward > 0 then tooltip:AddLine(fontSizeBig, s_format("^x7F7F7FWard: %s%d", main:StatColor(armourData.Ward, base.armour.WardBase), armourData.Ward), "FONTIN SC") end + -- Facebreaker + if armourData.PhysicalDPS then + tooltip:AddLine(fontSizeBig, s_format("^x7F7F7FPhysical Damage: "..colorCodes.MAGIC.."%d-%d", armourData.PhysicalMin, armourData.PhysicalMax), "FONTIN SC") + end elseif base.flask then -- Flask-specific info local flaskData = item.flaskData diff --git a/src/Data/ModCache.lua b/src/Data/ModCache.lua index 0591af9ec5..3ef904a839 100644 --- a/src/Data/ModCache.lua +++ b/src/Data/ModCache.lua @@ -4675,7 +4675,7 @@ c["Has 2 Charm Slots"]={{[1]={flags=0,keywordFlags=0,name="CharmLimit",type="BAS c["Has 3 Charm Slot"]={{[1]={flags=0,keywordFlags=0,name="CharmLimit",type="BASE",value=3}},nil} c["Has 3 Charm Slots"]={{[1]={flags=0,keywordFlags=0,name="CharmLimit",type="BASE",value=3}},nil} c["Has 4 Augment Sockets"]={nil,"Has 4 Augment Sockets "} -c["Has 8 to 12 Physical Damage, +3 to +4 Per Boss's Face Broken"]={{[1]={[1]={type="Condition",var="UseFacebreaker"},[2]={type="SkillType"},flags=1,keywordFlags=0,name="PhysicalMin",type="BASE",value=20},[2]={[1]={type="Condition",var="UseFacebreaker"},[2]={type="SkillType"},flags=1,keywordFlags=0,name="PhysicalMax",type="BASE",value=11}},nil} +c["Has 8 to 12 Physical Damage, +3 to +4 Per Boss's Face Broken"]={{[1]={flags=0,keywordFlags=0,name="Condition:UseFacebreaker",type="FLAG",value=true},[2]={flags=0,keywordFlags=0,name="ArmourData",type="LIST",value={key="PhysicalDPS",value=true}},[3]={flags=0,keywordFlags=0,name="ArmourData",type="LIST",value={key="PhysicalMin",value="8"}},[4]={flags=0,keywordFlags=0,name="ArmourData",type="LIST",value={key="PhysicalMax",value="12"}},[5]={[1]={type="Condition",var="{Hand}Attack"},flags=16777216,keywordFlags=0,name="PhysicalMin",type="BASE",value=8},[6]={[1]={type="Condition",var="{Hand}Attack"},flags=16777216,keywordFlags=0,name="PhysicalMax",type="BASE",value=12},[7]={[1]={type="Condition",var="{Hand}Attack"},[2]={limit=60,type="Multiplier",var="BrokenBossFaces"},flags=16777216,keywordFlags=0,name="PhysicalMin",type="BASE",value=3},[8]={[1]={type="Condition",var="{Hand}Attack"},[2]={limit=60,type="Multiplier",var="BrokenBossFaces"},flags=16777216,keywordFlags=0,name="PhysicalMax",type="BASE",value=4}},nil} c["Has no Attribute Requirements"]={{[1]={flags=0,keywordFlags=0,name="NoAttributeRequirements",type="FLAG",value=true}},nil} c["Hazards have 15% chance to rearm after they are triggered"]={{[1]={[1]={skillType=203,type="SkillType"},flags=0,keywordFlags=0,name="HazardRearmChance",type="BASE",value=15}},nil} c["Hazards have 5% chance to rearm after they are triggered"]={{[1]={[1]={skillType=203,type="SkillType"},flags=0,keywordFlags=0,name="HazardRearmChance",type="BASE",value=5}},nil} @@ -5509,7 +5509,7 @@ c["Trusted Kinship"]={{[1]={flags=0,keywordFlags=0,name="Keystone",type="LIST",v c["Unaffected by Chill during Dodge Roll"]={nil,"Unaffected by Chill during Dodge Roll "} c["Unaffected by Chill while Leeching Mana"]={{[1]={[1]={type="Condition",var="LeechingMana"},flags=0,keywordFlags=0,name="SelfChillEffect",type="MORE",value=-100}},nil} c["Unaffected by Elemental Weakness"]={nil,"Unaffected by Elemental Weakness "} -c["Unarmed Attacks that would use an Equipped One Hand Mace's damage use this Item's damage"]={{[1]={flags=0,keywordFlags=0,name="Condition:UseFacebreaker",type="FLAG",value=true}},nil} +c["Unarmed Attacks that would use an Equipped One Hand Mace's damage use this Item's damage"]={{[1]={flags=0,keywordFlags=0,name="UnarmedAttacksAsItemDamage",value="One Hand Mace"},[2]={flags=0,keywordFlags=0,name="Condition:UnarmedAttacksAsItemDamage",type="FLAG",value=true}},nil} c["Unarmed Attacks that would use an Equipped Quarterstaff's damage have:"]={nil,"Unarmed Attacks that would use an Equipped Quarterstaff's damage have: "} c["Unarmed Attacks that would use an Equipped Quarterstaff's damage have: Base Unarmed Physical damage replaced with damage based on their Skill Level"]={nil,"Unarmed Attacks that would use an Equipped Quarterstaff's damage have: Base Unarmed Physical damage replaced with damage based on their Skill Level "} c["Unarmed Attacks that would use an Equipped Quarterstaff's damage have: Base Unarmed Physical damage replaced with damage based on their Skill Level 1% more Attack Speed per 75 Item Evasion on Equipped Armour Items"]={nil,"Unarmed Attacks that would use an Equipped Quarterstaff's damage have: Base Unarmed Physical damage replaced with damage based on their Skill Level 1% more Attack Speed per 75 Item Evasion on Equipped Armour Items "} diff --git a/src/Data/Uniques/Special/New.lua b/src/Data/Uniques/Special/New.lua index 2d2688c23e..040d129220 100644 --- a/src/Data/Uniques/Special/New.lua +++ b/src/Data/Uniques/Special/New.lua @@ -8,7 +8,6 @@ data.uniques.new = { [[ Facebreaker Stocky Mitts -Variant: Current Has 8 to 12 Physical Damage, +3 to +4 Per Boss's Face Broken (47-50)% increased Stun Buildup 1% more Unarmed Damage per 5 Strength diff --git a/src/Modules/CalcActiveSkill.lua b/src/Modules/CalcActiveSkill.lua index 2a76b7d929..ce35afd767 100644 --- a/src/Modules/CalcActiveSkill.lua +++ b/src/Modules/CalcActiveSkill.lua @@ -274,6 +274,13 @@ local function getWeaponFlags(env, weaponData, weaponTypes) if not info then return end + + -- ConPrintf("############# FACEBREAKER TEST BLOCK ###################") + -- ConPrintf(">>>> prettyPrintTable >>>>>") + -- prettyPrintTable(weaponData) + -- ConPrintf("########################################################") + + if weaponTypes then for _, types in ipairs(weaponTypes) do if not types[weaponData.type] and @@ -287,10 +294,10 @@ local function getWeaponFlags(env, weaponData, weaponTypes) if weaponData.countsAsAll1H then flags = bor(ModFlag.Axe, ModFlag.Claw, ModFlag.Dagger, ModFlag.Mace, ModFlag.Sword, ModFlag.Spear) end - if weaponData.countsAsMace1H then -- Facebreaker - ConPrintf("countsAsMace1H ----- WORKS") - flags = bor(ModFlag.Mace, ModFlag.Weapon1H) - end + -- if weaponData.countsAsMace1H then -- Facebreaker + -- ConPrintf("countsAsMace1H ----- WORKS") + -- flags = bor(ModFlag.Mace, ModFlag.Weapon1H) + -- end if weaponData.type ~= "None" then flags = bor(flags, ModFlag.Weapon) if info.oneHand then diff --git a/src/Modules/CalcSetup.lua b/src/Modules/CalcSetup.lua index 06132f839e..3cfe2ab153 100644 --- a/src/Modules/CalcSetup.lua +++ b/src/Modules/CalcSetup.lua @@ -1524,16 +1524,18 @@ function calcs.initEnv(build, mode, override, specEnv) end end end - - ConPrintf(">>>> prettyPrintTable >>>>>") - ConPrintf("BrokenFaces: %s", env.modDB.BrokenBossFaces) - ConPrintf("PowerCharges: %s", env.modDB.PowerCharges) - -- prettyPrintTable(env.modDB) - if env.modDB.conditions.UseFacebreaker then + -- Facebreaker + if env.player.itemList["Gloves"] and env.player.itemList["Gloves"].title == "Facebreaker" then env.player.weaponData2 = copyTable(env.data.unarmedWeaponData[env.classId]) for i = 1, 2 do env.player["weaponData" .. tostring(i)].asThoughUsing = env.player["weaponData" .. tostring(i)].asThoughUsing or { } env.player["weaponData" .. tostring(i)].asThoughUsing["One Hand Mace"] = true + ConPrintf("TESTzzzz") + prettyPrintTable(env.player) + -- env.player["weaponData" .. tostring(i)]["PhysicalMin"] = env.player["armourData"]["PhysicalMin"] + -- env.player["weaponData" .. tostring(i)]["PhysicalMax"] = env.player["armourData"]["PhysicalMax"] + env.player["weaponData" .. tostring(i)]["PhysicalMin"] = 999 -- Debugging + env.player["weaponData" .. tostring(i)]["PhysicalMax"] = 9999 -- Debugging end end end diff --git a/src/Modules/ConfigOptions.lua b/src/Modules/ConfigOptions.lua index 1c8e174458..c689ee84ae 100644 --- a/src/Modules/ConfigOptions.lua +++ b/src/Modules/ConfigOptions.lua @@ -783,7 +783,7 @@ Huge sets the radius to 11. { section = "Item Options", col = 2 }, { label = "Facebreaker:", ifFlag = "Condition:UseFacebreaker" }, { var = "brokenBossFaces", type = "count", label = "Broken Boss Faces", ifFlag = "Condition:UseFacebreaker", tooltip = "Each ^xB97123Boss Encounter^7 icon on the World Screen is a face which can be broken by beating the encounter.\n^xADAA47Rare Monster Encounter^7 icons do not provide any bonus when broken.", apply = function(val, modList, enemyModList) - modList:NewMod("BrokenBossFaces", "OVERRIDE", val, "Config", { type = "Condition", var = "Combat" }) + modList:NewMod("Multiplier:BrokenBossFaces", "BASE", val, "Config", { type = "Condition", var = "Combat" }) end }, -- Section: Combat options diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index 2bd04fc090..a2f1646140 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -5863,10 +5863,33 @@ local specialModList = { - ["has (%d+) to (%d+) physical damage, %+(%d) to %+(%d) per boss's face broken"] = function(bfNum, btNum, afNum, atNum) return + ["has (%d+) to (%d+) physical damage, %+(%d) to %+(%d) per boss's face broken"] = function(_, baseFromNum, baseToNum, addFromNum, addToNum) return { -- Facebreaker - mod("PhysicalMin", "BASE", tonumber(bfNum + afNum), nil, ModFlag.Attack, { type = "Condition", var = "UseFacebreaker" }, { type = "SkillType", skillType = SkillType.MaceSkill } ), - mod("PhysicalMax", "BASE", tonumber(btNum + atNum), nil, ModFlag.Attack, { type = "Condition", var = "UseFacebreaker" }, { type = "SkillType", skillType = SkillType.MaceSkill } ), + flag("Condition:UseFacebreaker"), + -- mod("WeaponData", "LIST", { key = "asThoughUsing", value = { key = "One Hand Mace", value = true } } ), + + mod("ArmourData", "LIST", { key = "PhysicalDPS", value = true }), + mod("ArmourData", "LIST", { key = "PhysicalMin", value = baseFromNum } ), + mod("ArmourData", "LIST", { key = "PhysicalMax", value = baseToNum } ), + + -- mod("WeaponData", "LIST", { key = "PhysicalMin", value = baseFromNum } ), + -- mod("WeaponData", "LIST", { key = "PhysicalMax", value = baseToNum } ), + -- mod("WeaponData", "LIST", { key = "PhysicalMin", value = addFromNum }, { type = "Multiplier", var = "BrokenBossFaces", limit=60 } ), + -- mod("WeaponData", "LIST", { key = "PhysicalMax", value = addToNum }, { type = "Multiplier", var = "BrokenBossFaces", limit=60 } ), + + mod("PhysicalMin", "BASE", tonumber(baseFromNum), nil, ModFlag.Unarmed, 0, { type = "Condition", var = "{Hand}Attack" } ), + mod("PhysicalMax", "BASE", tonumber(baseToNum), nil, ModFlag.Unarmed, 0, { type = "Condition", var = "{Hand}Attack" } ), + mod("PhysicalMin", "BASE", tonumber(addFromNum), nil, ModFlag.Unarmed, 0, { type = "Condition", var = "{Hand}Attack" }, { type = "Multiplier", var = "BrokenBossFaces", limit=60 } ), + mod("PhysicalMax", "BASE", tonumber(addToNum), nil, ModFlag.Unarmed, 0, { type = "Condition", var = "{Hand}Attack" }, { type = "Multiplier", var = "BrokenBossFaces", limit=60 } ), + + -- ["for every different grenade fired in the past (%d+) seconds"] = { tag = { type = "Multiplier", var = "DifferentGrenadeFired", limitVar = "GrenadeTypes" } }, + -- mod("PhysicalMin", "BASE", tonumber(baseFromNum), nil, ModFlag.Attack, 0, { type = "Condition", var = "{Hand}Attack" }, { type = "WeaponType", weaponType = SkillType.Attack } ), + -- mod("PhysicalMax", "BASE", tonumber(baseToNum), nil, ModFlag.Attack, 0, { type = "Condition", var = "{Hand}Attack" }, { type = "WeaponType", weaponType = SkillType.Attack } ), + -- mod("PhysicalMin", "BASE", tonumber(addFromNum), nil, ModFlag.Attack, 0, { type = "Condition", var = "{Hand}Attack" }, { type = "WeaponType", weaponType = SkillType.Attack }, { type = "Multiplier", var = "BrokenBossFaces", limit=60 } ), + -- mod("PhysicalMax", "BASE", tonumber(addToNum), nil, ModFlag.Attack, 0, { type = "Condition", var = "{Hand}Attack" }, { type = "WeaponType", weaponType = SkillType.Attack }, { type = "Multiplier", var = "BrokenBossFaces", limit=60 } ), + -- env.player["weaponData" .. tostring(i)].asThoughUsing["One Hand Mace"] = true + -- mod("PhysicalMin", "BASE", tonumber(bfNum + afNum), nil, ModFlag.Attack ), + -- mod("PhysicalMax", "BASE", tonumber(btNum + atNum), nil, ModFlag.Attack ), } end, ["can attack as though using a one handed mace while both of your hand slots are empty"] = function() return { -- Facebreaker @@ -5874,7 +5897,8 @@ local specialModList = { } end, ["unarmed attacks that would use an equipped one hand mace's damage use this item's damage"] = function() return { -- Facebreaker - flag("Condition:UseFacebreaker"), + mod("UnarmedAttacksAsItemDamage", nil, "One Hand Mace"), + flag("Condition:UnarmedAttacksAsItemDamage"), } end,