Skip to content

Fix Energy Blade quality attack speed applying as more multiplier - #10448

Open
lucaskarsten wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
lucaskarsten:fix-energy-blade-quality-attack-speed
Open

lucaskarsten wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
lucaskarsten:fix-energy-blade-quality-attack-speed

Conversation

@lucaskarsten

Copy link
Copy Markdown

Description of the problem being solved:

Energy Blade's quality stat storm_blade_global_attack_speed_+% ("Buff grants {0}% increased Attack Speed", 0.5 per quality) was mapped as EnergyBladeAttackSpeed MORE, which only multiplies the blade's base attack rate (CalcOffence.lua, AffectedByEnergyBlade block). The stat is global increased attack speed, so it should add to the other increased attack speed sources instead of multiplying on top of them.

It now uses the same mapping the other global attack speed buffs use: mod("Speed", "INC", nil, ModFlag.Attack, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true }), in both src/Export/Skills/act_int.txt and the generated src/Data/Skills/act_int.lua. The item mod "Energy Blades have X% increased attack speed" still uses EnergyBladeAttackSpeed and is unchanged.

Open question for review: I kept unscalable = true to match the rest of Energy Blade's statMap. If buff effect is meant to scale this like other attack speed buffs, it can be dropped.

Steps taken to verify a working solution:

  • Added a test in TestOffence_spec.lua: Energy Blade 20/20 vs 20/0 with Cleave and 100% increased Attack Speed now gives a 1.05 speed ratio ((1 + 1 + 0.1) / 2); it fails on dev with 1.10.
  • Full busted suite: 667 successes, 1 failure. The failure (TestRareLike_spec.lua:84) also fails on dev without this change (Fix TestRareLike spec failing after level requirement change #10417 addresses it).

Link to a build that showcases this PR:

Energy Blade with quality plus any increased Attack Speed.

Before screenshot:

Energy Blade 20/20, Cleave, 100% increased Attack Speed: 2.992 attacks per second (quality multiplies: 2.72 × 1.10).

After screenshot:

Same setup: 2.856 attacks per second (2.72 × 2.10 / 2.00).

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