Skip to content

Add aftershock chance for Slam skills and model Earthquake's Aftershock - #2535

Open
515k4 wants to merge 2 commits into
PathOfBuildingCommunity:devfrom
515k4:fix/earthquake-aftershock-duration-cap
Open

515k4 wants to merge 2 commits into
PathOfBuildingCommunity:devfrom
515k4:fix/earthquake-aftershock-duration-cap

Conversation

@515k4

@515k4 515k4 commented Sep 17, 2026 •

Copy link
Copy Markdown

Fixes # .

Description of the problem being solved:

Aftershock chance. The Earthbreaker (Titan) ascendancy notable and the related passive nodes (Split the Earth, Mace Aftershock Chance, Behemoth, Rhythm of Fire, Echoes of Ferocity, Shapeshifted Aftershock Chance) were not parsed. They now feed the existing AftershockChance stat that the Aftershock support gems and gem quality already provide. For Slam skills the summed chance scales the per-skill DPS multiplier by 1 + chance / 100. The chance is not capped: each full 100% guarantees an aftershock and the remainder is a chance for one more. Average hit is unchanged; DPS and ailment stacking scale accordingly. An "Aftershock Chance" row is shown in Skill type-specific Stats and the factor is listed in the Total DPS breakdown.

Earthquake's Aftershock. Jagged Ground cannot be created on top of an existing patch. The Aftershock stat set had no duration at all, so its DPS scaled linearly with attack speed and ignored Skill Effect Duration modifiers. The set now carries the 4s base duration and a hitRateLimitedByDuration flag, and it displays DPS instead of average damage.

An attack that lands before the previous patch erupts creates no patch, so the next patch (and its Aftershock) comes from the first attack at or after the eruption. The time between Aftershocks is therefore attack time × ceil(patch duration / attack time). Example: a 0.40s patch with a 0.39s attack time wastes every other attack and erupts every 0.78s. Attacking slightly faster than the patch duration therefore lowers Aftershock DPS, and reduced duration only pays when it removes a wasted attack. With the duration at or below the attack time, every attack creates a patch; with 100% reduced duration the DPS scales freely with attack speed. When dual wielding, the same rule uses the combined attack time. The Hit Time breakdown shows the attack time and the number of attacks per Aftershock.

This models a single target, where every patch overlaps the previous one. Patches that don't overlap (while moving) are only limited by the patch count, which is not modelled.

The additional aftershock chance only applies to Earthquake's Aftershock set, since the initial Impact is the slam itself and does not repeat. The Impact set carries a cannotCauseAftershock flag for this, and the Impact still hits on every attack.

Steps taken to verify a working solution:

  • New spec/System/TestAftershock_spec.lua and spec/System/TestEarthquake_spec.lua, full suite passes (885 tests).
  • Earthquake level 20, Wooden Club (4.03s patch): the Aftershock fires every ceil(4.03 / attack time) attacks, so the hit time is the smallest multiple of the attack time that covers the patch. The same holds with 30–90% reduced Skill Effect Duration.
  • Patch shortened to 1.5 attack times: the Aftershock rate is half the attack rate.
  • Patch just shorter than the attack time: every attack creates a patch. Adding 10% attack speed makes the next attack land on the live patch, which halves the Aftershock rate and lowers DPS.
  • Dual wield with two different maces: the rule uses the combined attack time; the skill's own "both weapons hit with 30% less damage" stat is unchanged.
  • Skill level data for both stat sets (attack damage, patch limit, radius) verified against poe2db for all 40 levels.

Link to a build that showcases this PR:

N/A

Before screenshot:

image

After screenshot:

image

(Taken before the rounding change; the Hit Time breakdown now shows attack time × attacks per Aftershock instead of max(attack time, skill duration).)

🤖 Generated with Claude Code

515k4 and others added 2 commits September 17, 2026 20:11
Parse the Earthbreaker (Titan) ascendancy notable and the related passive
nodes (Split the Earth, Mace Aftershock Chance, Behemoth, Rhythm of Fire,
Echoes of Ferocity, Shapeshifted Aftershock Chance) into the existing
AftershockChance stat that the Aftershock support gems and gem quality
already provide. For Slam skills the summed chance scales the per-skill
DPS multiplier by 1 + chance / 100. The chance is not capped, as each
full 100% guarantees an aftershock and the remainder is a chance for one
more. Average hit is unchanged; DPS and ailment stacking scale
accordingly. Show an "Aftershock Chance" row in Skill type-specific
Stats and list the aftershock factor in the Total DPS breakdown.

Earthquake: Jagged Ground cannot be created on top of an existing patch,
so the Aftershock cannot hit a target more often than once per patch
duration. The Aftershock stat set had no duration, so its DPS scaled
linearly with attack speed and ignored skill effect duration. Give the
set the 4s base duration and a hitRateLimitedByDuration flag: the hit
time is the larger of the attack time and the skill duration (recomputed
from the combined attack time when dual wielding), the set displays DPS
instead of average damage, and the Hit Rate breakdown shows the cap.
The additional aftershock chance only applies to the Aftershock set, as
the initial Impact is the slam itself and does not repeat.

Regenerate ModCache and add tests.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Jagged Ground cannot be created on top of an existing patch. An attack that
lands before the previous patch erupts creates nothing, so the next patch
(and its Aftershock) comes from the first attack at or after the eruption.
The time between Aftershocks is therefore the attack time multiplied by
ceil(patch duration / attack time), not the larger of the two.

Example: a 0.40s patch with a 0.39s attack time wastes every other attack
and erupts every 0.78s, where the previous model gave 0.40s. Attacking
slightly faster than the patch duration now lowers Aftershock DPS instead of
leaving it unchanged, and reduced duration only pays when it removes a
wasted attack. The Impact hit still lands on every attack.

The dual-wield recompute uses the same rule on the combined attack time,
and the Hit Time breakdown shows the attacks per Aftershock.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant