From 2d117b05e51d7223958efd41a1bd8ac868bbf851 Mon Sep 17 00:00:00 2001 From: mauriliogenovese <125388969+mauriliogenovese@users.noreply.github.com> Date: Sat, 15 Feb 2025 08:58:37 +0100 Subject: [PATCH 1/3] Initial fake hits implementation --- src/Data/SkillStatMap.lua | 8 ++++++++ src/Data/Skills/act_dex.lua | 3 +++ src/Data/Skills/act_int.lua | 6 +++++- src/Export/Skills/act_dex.txt | 1 + src/Export/Skills/act_int.txt | 5 ++++- src/Modules/CalcOffence.lua | 24 +++++++++++++++++++++--- 6 files changed, 42 insertions(+), 5 deletions(-) diff --git a/src/Data/SkillStatMap.lua b/src/Data/SkillStatMap.lua index a3dd63bc0f..1f1ec6ee4a 100644 --- a/src/Data/SkillStatMap.lua +++ b/src/Data/SkillStatMap.lua @@ -291,6 +291,11 @@ return { skill("corpseExplosionLifeMultiplier", nil), div = 1000, }, +["corpse_explosion_monster_life_permillage_chaos"] = { + skill("corpseExplosionLifeMultiplier", nil), + div = 1000, + flag("fakeHit"), +}, ["spell_base_fire_damage_%_maximum_life"] = { skill("selfFireExplosionLifeMultiplier", nil), div = 100, @@ -1097,6 +1102,9 @@ return { ["display_fake_attack_hit_poison"] = { mod("PoisonChance", "BASE", nil, ModFlag.Attack), value = 100, + flag("fakeHit"), + skill("cannotBeEvaded", true), + }, ["base_chance_to_ignite_%"] = { mod("EnemyIgniteChance", "BASE", nil), diff --git a/src/Data/Skills/act_dex.lua b/src/Data/Skills/act_dex.lua index 7092929adb..95fb566a43 100644 --- a/src/Data/Skills/act_dex.lua +++ b/src/Data/Skills/act_dex.lua @@ -1013,6 +1013,9 @@ skills["GasArrowPlayer"] = { projectile = true, area = true, }, + baseMods = { + flag("fakeHit"), + }, constantStats = { { "active_skill_base_area_of_effect_radius", 18 }, { "movement_speed_+%_final_while_performing_action", -70 }, diff --git a/src/Data/Skills/act_int.lua b/src/Data/Skills/act_int.lua index 4b1adc779a..b1b9bc4cdc 100644 --- a/src/Data/Skills/act_int.lua +++ b/src/Data/Skills/act_int.lua @@ -4493,10 +4493,14 @@ skills["CorpseCloudPlayer"] = { damageIncrementalEffectiveness = 0.0065000001341105, statDescriptionScope = "corpse_cloud_statset_0", baseFlags = { - spell = true, area = true, duration = true, }, + baseMods = { + mod("PoisonChance", "BASE", 100), + skill("explodeCorpse", true), + skill("corpseExplosionDamageType", "Chaos"), + }, constantStats = { { "active_skill_base_area_of_effect_radius", 16 }, { "base_skill_effect_duration", 4000 }, diff --git a/src/Export/Skills/act_dex.txt b/src/Export/Skills/act_dex.txt index 4be46533a2..e368163f53 100644 --- a/src/Export/Skills/act_dex.txt +++ b/src/Export/Skills/act_dex.txt @@ -109,6 +109,7 @@ statMap = { #skill GasArrowPlayer #set GasArrowPlayer #flags attack projectile area +#baseMod flag("fakeHit") #mods #set GasArrowGasDegenPlayer #flags attack area duration projectile diff --git a/src/Export/Skills/act_int.txt b/src/Export/Skills/act_int.txt index c9b9c7fd76..9e249b58e7 100644 --- a/src/Export/Skills/act_int.txt +++ b/src/Export/Skills/act_int.txt @@ -289,7 +289,10 @@ statMap = { #from item #skill CorpseCloudPlayer #set CorpseCloudPlayer -#flags spell area duration +#flags area duration +#baseMod mod("PoisonChance", "BASE", 100) +#baseMod skill("explodeCorpse", true) +#baseMod skill("corpseExplosionDamageType", "Chaos") #mods #set CorpseCloudExplosionPlayer #flags spell area diff --git a/src/Modules/CalcOffence.lua b/src/Modules/CalcOffence.lua index 94f26e5c0c..0e37ed2c25 100644 --- a/src/Modules/CalcOffence.lua +++ b/src/Modules/CalcOffence.lua @@ -2170,6 +2170,10 @@ function calcs.offence(env, actor, activeSkill) if enemyDB:Flag(nil, "CannotBlockAttacks") and isAttack then output.enemyBlockChance = 0 end + + if skillModList:Flag(cfg, "fakeHit") then + output.enemyBlockChance = 0 + end output.HitChance = output.AccuracyHitChance * (1 - output.enemyBlockChance / 100) if output.enemyBlockChance > 0 and not isAttack then @@ -3109,9 +3113,9 @@ function calcs.offence(env, actor, activeSkill) local lifeLeechTotal = 0 local energyShieldLeechTotal = 0 local manaLeechTotal = 0 - local noLifeLeech = skillModList:Flag(cfg, "CannotLeechLife") or enemyDB:Flag(nil, "CannotLeechLifeFromSelf") or skillModList:Flag(cfg, "CannotGainLife") - local noEnergyShieldLeech = skillModList:Flag(cfg, "CannotLeechEnergyShield") or enemyDB:Flag(nil, "CannotLeechEnergyShieldFromSelf") or skillModList:Flag(cfg, "CannotGainEnergyShield") - local noManaLeech = skillModList:Flag(cfg, "CannotLeechMana") or enemyDB:Flag(nil, "CannotLeechManaFromSelf") or skillModList:Flag(cfg, "CannotGainMana") + local noLifeLeech = skillModList:Flag(cfg, "CannotLeechLife") or enemyDB:Flag(nil, "CannotLeechLifeFromSelf") or skillModList:Flag(cfg, "CannotGainLife") or skillModList:Flag(cfg, "fakeHit") + local noEnergyShieldLeech = skillModList:Flag(cfg, "CannotLeechEnergyShield") or enemyDB:Flag(nil, "CannotLeechEnergyShieldFromSelf") or skillModList:Flag(cfg, "CannotGainEnergyShield") or skillModList:Flag(cfg, "fakeHit") + local noManaLeech = skillModList:Flag(cfg, "CannotLeechMana") or enemyDB:Flag(nil, "CannotLeechManaFromSelf") or skillModList:Flag(cfg, "CannotGainMana") or skillModList:Flag(cfg, "fakeHit") for _, damageType in ipairs(dmgTypeList) do local damageTypeHitMin, damageTypeHitMax, damageTypeHitAvg, damageTypeLuckyChance, damageTypeHitAvgLucky, damageTypeHitAvgNotLucky = 0, 0, 0, 0, 0 if skillFlags.hit and canDeal[damageType] then @@ -5007,6 +5011,20 @@ function calcs.offence(env, actor, activeSkill) end end + + -- Set hit damage to 0 for skills that only apply ailment as though they hit + if skillModList:Flag(cfg, "fakeHit") then + output.AverageHit = 0 + output.AverageDamage = 0 + output.TotalDPS = 0 + output.TotalMin = 0 + output.TotalMax = 0 + for _, damageType in ipairs(dmgTypeList) do + output[damageType.."Min"] = 0 + output[damageType.."Max"] = 0 + end + end + -- Calculate combined DPS estimate, including DoTs local baseDPS = output[(skillData.showAverage and "AverageDamage") or "TotalDPS"] output.CombinedDPS = baseDPS From 5fc69ae9d3ae6be50a2fdadebd256ebaa3dd16bf Mon Sep 17 00:00:00 2001 From: mauriliogenovese <125388969+mauriliogenovese@users.noreply.github.com> Date: Sat, 15 Feb 2025 09:54:27 +0100 Subject: [PATCH 2/3] reminder for minion skills --- src/Data/SkillStatMap.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Data/SkillStatMap.lua b/src/Data/SkillStatMap.lua index 1f1ec6ee4a..0a08502d84 100644 --- a/src/Data/SkillStatMap.lua +++ b/src/Data/SkillStatMap.lua @@ -1101,6 +1101,8 @@ return { }, ["display_fake_attack_hit_poison"] = { mod("PoisonChance", "BASE", nil, ModFlag.Attack), + -- TODO: handle GasShotSkeletonSniperMinion + --mod("MinionModifier", "LIST", { mod = mod("PoisonChance", "BASE", nil, ModFlag.Attack) }), value = 100, flag("fakeHit"), skill("cannotBeEvaded", true), From 083bea908bf1ef7c8257eaacdc9a6ea50c7ca18c Mon Sep 17 00:00:00 2001 From: mauriliogenovese <125388969+mauriliogenovese@users.noreply.github.com> Date: Sun, 16 Feb 2025 07:59:22 +0100 Subject: [PATCH 3/3] spell flag reintroduced --- src/Data/Skills/act_int.lua | 1 + src/Export/Skills/act_int.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Data/Skills/act_int.lua b/src/Data/Skills/act_int.lua index b1b9bc4cdc..0602dc3104 100644 --- a/src/Data/Skills/act_int.lua +++ b/src/Data/Skills/act_int.lua @@ -4495,6 +4495,7 @@ skills["CorpseCloudPlayer"] = { baseFlags = { area = true, duration = true, + spell = true, }, baseMods = { mod("PoisonChance", "BASE", 100), diff --git a/src/Export/Skills/act_int.txt b/src/Export/Skills/act_int.txt index 9e249b58e7..910d8bd965 100644 --- a/src/Export/Skills/act_int.txt +++ b/src/Export/Skills/act_int.txt @@ -289,7 +289,7 @@ statMap = { #from item #skill CorpseCloudPlayer #set CorpseCloudPlayer -#flags area duration +#flags area duration spell #baseMod mod("PoisonChance", "BASE", 100) #baseMod skill("explodeCorpse", true) #baseMod skill("corpseExplosionDamageType", "Chaos")