Skip to content

Add initial implementation for fake poison hits #788

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/Data/SkillStatMap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -1096,7 +1101,12 @@ 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),

},
["base_chance_to_ignite_%"] = {
mod("EnemyIgniteChance", "BASE", nil),
Expand Down
3 changes: 3 additions & 0 deletions src/Data/Skills/act_dex.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
7 changes: 6 additions & 1 deletion src/Data/Skills/act_int.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4493,9 +4493,14 @@ skills["CorpseCloudPlayer"] = {
damageIncrementalEffectiveness = 0.0065000001341105,
statDescriptionScope = "corpse_cloud_statset_0",
baseFlags = {
spell = true,
area = true,
duration = true,
spell = true,
},
baseMods = {
mod("PoisonChance", "BASE", 100),
skill("explodeCorpse", true),
skill("corpseExplosionDamageType", "Chaos"),
},
constantStats = {
{ "active_skill_base_area_of_effect_radius", 16 },
Expand Down
1 change: 1 addition & 0 deletions src/Export/Skills/act_dex.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ statMap = {
#skill GasArrowPlayer
#set GasArrowPlayer
#flags attack projectile area
#baseMod flag("fakeHit")
#mods
#set GasArrowGasDegenPlayer
#flags attack area duration projectile
Expand Down
5 changes: 4 additions & 1 deletion src/Export/Skills/act_int.txt
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,10 @@ statMap = {
#from item
#skill CorpseCloudPlayer
#set CorpseCloudPlayer
#flags spell area duration
#flags area duration spell
#baseMod mod("PoisonChance", "BASE", 100)
#baseMod skill("explodeCorpse", true)
#baseMod skill("corpseExplosionDamageType", "Chaos")
#mods
#set CorpseCloudExplosionPlayer
#flags spell area
Expand Down
24 changes: 21 additions & 3 deletions src/Modules/CalcOffence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading