Commit Graph

82 Commits

Author SHA1 Message Date
Edvinas-Smita
34d6d098e5 PoB2 #694 backport (#8459) 2025-02-13 21:17:28 -06:00
Edvinas-Smita
195006f3a3 Improve EHP accuracy (#8430)
* Improve EHP accuracy

* Hunting more corner cases

MoM with ES when there is ES bypass was not capping effective ES.
MoM with life loss prevention was not accounting for the multiplied life effectiveness when reducing pools.
Max hit smoothing (for conversion + armour) now uses pool reduction to effectively home in on a precise max hit.

* Hunting more corner cases

MoM with ES when there is ES bypass was not capping effective ES.
MoM with life loss prevention was not accounting for the multiplied life effectiveness when reducing pools.
Max hit smoothing (for conversion + armour) now uses pool reduction to effectively home in on a precise max hit.
2025-02-13 01:55:14 +11:00
Paliak
d320c2e27b FIX: broken tests after changing default boss preset (#8327)
Due to #8271 changing the default boss preset many tests that relied on
enemy stats broke. This pr fixes that by changing the boss configuration
back to "None" for affected tests.

Additionally this commit adds an extra test for scorching ray exposure
when using the automatic maximum sustainable stages mode.
2024-11-18 16:56:01 +11:00
Paliak
fd4463a396 FEAT: implement settlers trigger enchant (#8240) 2024-08-31 11:56:44 +10:00
Nighty
684bd3a6d5 indent space -> tab (#8058) 2024-07-31 14:07:24 +10:00
Brendan Thomas
4b8ede6f83 Fix numerous issues in bleed calculations (#7771)
* Fix numerous issues in bleed calculations

- Chance to bleed was applied in the incorrect location
- Chance to hit was applied incorrectly
- Bleed stacks and stack potential was overwritten with incorrect values at times
- Crimson Dance calculations were broken
- Bleed stack potential was incorrectly applied to per-stack bleed damage
- Multiple damage formulas were used simultaneously
- Output from multiple formulas did not align with numbers displayed to user

* Add test for bleed fix

* Fix ailment test

* fix bleed not reflecting different chances on crits

* Apply ailment chance and stack fixes to ignite and poison

* Fix Bleed/Ignite chance breakdown

* Apply instant ability ailment fix

-fixes nan / divide by 0 for hit like corpse explosion

* Move poison stacks affect into calcs tab

* Integrate new formula for average roll

---------

Co-authored-by: Wires77 <Wires77@users.noreply.github.com>
Co-authored-by: LocalIdentity <localidentity2@gmail.com>
2024-07-29 11:23:37 +10:00
Paliak
e640c4107a Implement trigger from the Svalinn unique (#8000)
* FEAT: implement Svalinn trigger

* TEST: add tests for Svalling trigger

* FIX: add mod cache to pass tests

* ModCache

---------

Co-authored-by: LocalIdentity <localidentity2@gmail.com>
2024-07-29 09:06:21 +10:00
LocalIdentity
0a64c94dfa Add support for all new 3.25 Gems (#7988)
* Remove redundant trigger tests + code

* Glacial Shield Swipe

* Puncture of Shanking

* Eviscerate

* Swordstorm

* Vengeful Cry

* Rupture

* Retaliation Mods

* Autoexertion

* Overexertion

* Fix indents

---------

Co-authored-by: LocalIdentity <localidentity2@gmail.com>
2024-07-29 05:54:26 +10:00
Regisle
77b75535c5 update impale tests (#7934) 2024-07-25 20:59:45 +10:00
Cheese
acef6f605c Fix impale not using enemy damage taken (#7831)
* Fix impale not using enemy damage taken (#7787)

* Fix impale using post mitigation damage for crits

`output.impaleStoredHitAvg` already combines crit and non-crits

* Add tests for Impale damage

Testing combinations of:
  - 0%/50%/100% crit chance
  - enemies take increased damage
  - physical reduction and armour
  - dual wield

* Add extra tests for Impale damage

---------

Co-authored-by: Cheese <12050603+mcheese@users.noreply.github.com>
2024-07-23 10:35:39 -05:00
Paliak
3661e5f4d8 FIX: update skills used for testing triggers (#7818) 2024-07-23 09:09:55 +10:00
Paliak
e9dd799221 Fix maximum sustainable stages calculations ignoring certain buffs/mods (#7678)
* FIX: maximum sustainable stacks calculations ignoring certain buffs/mods

Essentially an improved version of
https://github.com/PathOfBuildingCommunity/PathOfBuilding/pull/5164 that
utilizes skill cache functionality.

* FIX: spelling

* TEST: add tests for schorching ray and blight interactions

* FIX: formatting

* DOCS: add fancy annotation for new function

* FIX: calculate the correct skill

* FIX: annotation

* FIX: use activation frequency for penance brand
2024-07-22 06:15:37 +10:00
Paliak
13d2d311bd Implement Automation support/skill (#7558)
* FEAT: impl Automation support/skill

* TEST: add test for automation gem

* FIX: check if triggeredBy exists before dereferencing it

* FIX: handling of icdr for Automation support

* FIX:in breakdown use cast rate for Automation rate

* FIX: formatting
2024-06-28 14:30:17 +10:00
Paliak
41ba38d925 Implement wisps support (#7532)
* FEAT: impl wisps support

* FIX: add display stat for summon wisps

* FIX: less damage mod not applying

* FIX: use mirage archer style calcs

Sacred wisps causes the Summon Sacred Wisps skill to be triggered when a
projectile spell is fired from a wand. This triggers 2 wisps which then
have an x percent to use the skill that was used to trigger them when
you use it. They likely do not care about whether you actually hit
something with the projectile or not. They're also likely not a trigger
which means they're not under the same tick rounding contrstains like
other triggers.

* TEST: add a test for Sacred Wisps

* TEST: fix test for sacred wisps

Sacred wisps support is two part so the SkillTriggerRate check will fail

* FIX: add stat maps to .txt skill files

* Separate stat display in sidebar

* Change flag to mirageArcher

---------

Co-authored-by: LocalIdentity <localidentity2@gmail.com>
2024-06-28 02:56:12 +10:00
Paliak
5f9ed2c868 ItemCondition fixes. Kalandra's Touch not adding to influenced items multiplier. (#7182)
* FIX: ItemCondition issues. Kalandra's touch influence issues.

* TEST: add test for Kalandra's touch influence copy.

* FIX: crash caused by items tbl being nil

* FIX: dmg not increasing in test due to missing main skill.
2023-12-31 19:50:16 +11:00
Morten Tychsen Clausen
a9959c0bdf Fix negative bypass being ignored (#6992)
* changed bypass override

* Add test case

---------

Co-authored-by: Wires77 <Wires77@users.noreply.github.com>
2023-12-11 08:43:43 -06:00
Morten Tychsen Clausen
ec6a17e9a7 Fix ES Bypass not overriding sources of negative bypass (#6965)
* fix es bypass

* Revert to using the correct mods, but make them override mods

* Satisfy spellchecker

* Add tests

* Fix spelling

---------

Co-authored-by: Wires77 <Wires77@users.noreply.github.com>
2023-12-11 20:48:23 +11:00
Wires77
8a01d3842e Update base skills with new qualities (#6976)
* WIP skills export

* Export skills, fix dat file loading bug

* Add back IncrementalEffectiveness

* Don't export gems that don't have a manual GrantedEffect

* Manual fix for Frostbomb

* WIP skills export

* Export skills, fix dat file loading bug

* Add back IncrementalEffectiveness

* Don't export gems that don't have a manual GrantedEffect

* Manual fix for Frostbomb

* Fix Interpolation for DoTs

* Update all dex gems and remove old mods

Adds support for all the new stats on the base dex gems
Remove mods from gems that no longer exist on the base or Transfigured version of the gem

* 1/3rd of Int gems up to Frost Bomb

* Updating Strength skill gems for 3.23

Also removed a condition on Rage Vortex as now the quality can be pumped
up to arbitrarily high values

* Fix remaining intelligence gems

Fix remaining gems
Add support for tertiary durations for Wintertide Brand debuff
Re-organise gems into alphabetical order

* Fix up strength gems

* Update skills from items

* Fix spectres

* Dex Support gems

* Int Support gems

* Export str supports

* Remove redundant line

* Comment out Petrified Blood tests

Petrified Blood losing alt quality makes this test hard to understand.
Plan on revisiting this later to at least simply use the numbers in PoB

* Fix SRS

* New Ascendancy skills

* Adding support for Ravenous and Pacify

* Fix SRS

* Add support for Barkskin

* Move skills

---------

Co-authored-by: LocalIdentity <localidentity2@gmail.com>
2023-12-11 20:47:14 +11:00
Paliak
010c6bbf78 Add rudimentary trigger tests (#6574)
* FEAT: add rudimentary trigger tests

* FIX: spelling

* FIX: self ref is build

* FIX: odd test issue

* FIX: triggered being added to gemData

Fixes order mattering in tests. gemData is never refreshed after program
start.

* Revert "FIX: odd test issue"

This reverts commit ac203b7d091e9b866d9f3e4cf7cc2e4d2d498561.

---------

Co-authored-by: LocalIdentity <localidentity2@gmail.com>
2023-12-05 17:32:23 +11:00
Lancej
c4079bdf7e Fix magic Two-Toned Boots item parsing and add tests (#6666) 2023-09-13 12:53:08 +10:00
Paliak
f7f55c96ea Move mirage calcs to a new file (#6637)
* FIX: move mirage calcs to a new file

* FIX: exerts applying to skills used by mirages

* FIX:ignore source if SkillType.OtherThingUsesSkill

* TEST: test mirage archer + manaforged
2023-09-11 09:45:00 +10:00
Lancej
c76863985c Optimize loading items, improve startup time (#6562)
* Add item parse tests and fix nil BasePercentile

* Optimize loading items, improve startup time

* Fix magic item mods and add test case

* Fix nil namePrefix and nameSuffix for tooltips
2023-09-06 07:40:00 +10:00
Lancej
b0adb69208 Optimize itemLib.applyRange, improve startup time (#6407)
* Add applyRange tests

* Optimize itemLib.applyRange, improve startup time
2023-08-24 06:30:09 +10:00
Edvinas-Smita
bcbafe6349 Calculate hit pool with prevented life loss earlier. (#5908) 2023-04-05 09:13:09 +10:00
Edvinas-Smita
0cb3f055b0 Fix max-hit with 100% taken as conversion (#5865)
* Fix max-hit with 100% taken as conversion

Wrong variable strikes again

* Add a few tests

For the cases that broke due to wrong conversion variables
2023-04-02 23:48:00 -05:00
Edvinas-Smita
ce0cb160d9 Fix/improve some EHP / max hit stuff: (#5756)
* Fix/improve some EHP / max hit stuff:

* Fix petrified blood / progenesis calculations final v2.maybe
* Improve max hit calculations with damage conversion into different size pools
* Expand max hit breakdowns by including pools that were harmed in the making of a max hit

* Add some tests

and small changes to max hit tooltip

* Add flat taken damage to max hit calculations

and refactor some functions to a more sensible place

* Don't use LowPoolThreshold for petrified blood
2023-04-02 22:37:23 +10:00
Tomas Slusny
31798a35f7 Apply enemy damage multiplier to max hit taken (#5424)
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2022-12-29 05:50:34 +11:00
QuickStick
145a3e9717 Fix kalandra's touch not working (#5442)
* Fix old item base

* Update test as well
2022-12-24 15:29:34 +11:00
LocalIdentity
46172e2526 Spelling error 2022-12-09 20:26:39 +11:00
Paliak
f87039126a Add support for socketed in specific socket color mods found on Dialla's Malefaction and Malachai's Artifice and Doomsower (#4981)
* FEAT: add support for socket color specific mods found on Dialla's Malefaction

* FIX: Code cleanup

* FEAT: Add support for Malachai's artifice. NOTE: only active skill gems can grant buffs.

* FEAT: Make support gems work with socket mods. Add more features to SocketedIn condition to allow for more precise handling of mods.

* FIX: fix crash caused by using the wrong variable

* FIX/FEAT: Add support for Doomsower per socketed mod. Minor cleanup and bugfixes.

* FEAT: add support for socketed gem color count mods like the vaal pact one found on Doomsower

* FIX: missing then in an if statement

* FIX: apply suggestions.

* FIX: apply formatting suggestions.

* FIX: remove unnsecessary check in an if statement after pulling it out. Refactor the rest of the code to use dots instead of full keys.

* Apply suggestions from code review

Co-authored-by: QuickStick <31533893+QuickStick123@users.noreply.github.com>

* FIX: add ability to negate more socket based conditions.

* FIX: fix problems with negation of SocketedIn conditions.

* FIX: loosen up resictions on the SocketedIn condition type to simplyfy code and allow easier negation.

* FIX: rework SocketedIn matching. Should hopefully work correctly now with negation.

* FIX: move socketColor check to fix it not being ran in some cases.

* FIX: remove socket color check when sockets='all' as that inherently checks for coloor.

* FIX: stop count = 0 counting as all

* TEST: add tests for implemeted mechanics

* FIX: missing function end.

* FIX: missing function end

Co-authored-by: QuickStick <31533893+QuickStick123@users.noreply.github.com>
Co-authored-by: Wires77 <Wires77@users.noreply.github.com>
2022-12-09 00:14:35 -06:00
Regisle
f12d7b2dec Add support for burning ground from Essence of Hysteria (#4825)
* adds support for hysteria burning ground boots

* remove conprints that were forgotten

* update to force fire

* Fix broken test

Co-authored-by: Wires77 <Wires77@users.noreply.github.com>
2022-12-08 23:32:18 -06:00
Paliak
44121c8193 FIX: typo breaking tests. (#5231) 2022-12-09 16:15:14 +11:00
Nightblade
c0f3202a56 Fix spelling errors (#5237) 2022-12-09 16:13:13 +11:00
Paliak
d15e6fa1e7 Fix Varunastra not working with Nightblade support (#5158)
* FIX: fix Varunastra not working with Nightblade support

* TEST: add test for close combat and nightblade
2022-12-09 03:26:36 +11:00
Paliak
8b06d20721 Implement ring reflection from Kalandra's Touch. (#5120)
* FEAT: imeplement ring reflection from Kalandra's Touch.

* TEST: add test for Kalandra's Touch

* FIX: copy mods to avoid mangling mod sources.
2022-12-09 00:59:57 +11:00
Edvinas-Smita
9035003bca Max hit improvement (#5196)
* Remove usage of magic numbers for damage in max hit calculations

Max hit taken should not depend on enemy damage. This mostly affects how armour is involved in max hit calculations.

* Max hit adjustment with taken-as conversions

Apply some better approximation to taken-as max hit calculations

* Add some tests

* Bigger breakdown and more sprinkles of magic

Moved damage conversion into math part, which allows it to handle elemental taken as elemental better. Improved approximation a bit. If approximation was used, report some more details about it in the breakdown.

* One part of the max hit breakdown was using old value

So refurbished half of the breakdown to have a bit more relevant information.
2022-12-09 00:56:07 +11:00
QuickStick
cf1632fb2f Fix maximum shock double counting. (#5173)
* Fix maximum shock double counting.

* Adding test case that would catch this bug

Co-authored-by: Wires77 <Wires77@users.noreply.github.com>
2022-11-22 22:40:03 -06:00
Nightblade
4dd322d7dc Fix spelling in code (#4690)
* *Interupt* -> *Interrupt*

Tested OK with:
`spec\TestBuilds\3.13\Dual Wield Cospris CoC.xml`

May even fix a bug since `src\Data\SkillStatMap.lua` line 431 was using different (correct) spelling: `mod("AvoidInterruptStun", "BASE", nil)`

* corruptable -> corruptible

* RejuvinationTotem -> RejuvenationTotem

* Absoprtion -> Absorption

* Posioned -> Poisoned

* uppper -> upper

* preceeding -> preceding

* Need this spelling

Co-authored-by: LocalIdentity <localidentity2@gmail.com>
2022-08-09 05:45:02 +10:00
Wires77
5de659f8c7 Exclude failing build tests (#4557) 2022-07-12 13:28:08 +10:00
Regisle
89848f852c Minor EHP improvments (#4227)
* minor improvements to defences

* update helper function

* add option to disable gain on block

* fix spelling mistake

* apply chill to enemy

* fix disable gain on block

* basic support for enemy crit


basic support for enemy crit

* correctly apply speedup maxhit limit

* Fix issue with enemy crit incorrectly being added to 1 twice

* Fix "defend with X% armour" calcs

* esbypass on block

* Cap portionArmour at 100%

For fairly obvious reasons, armour cannot mitigate more than 100% of incoming damage. Also removed an unnecessary NaN check as I cannot get the error it was intended to prevent to trigger under any conditions.

* enemy pen applying when it shouldnt

* apply energyshield recoverable correctly

* fix spelling mistake and max depth value of ehp helper function

* fix armour reduction displays and breakdowns

* Update CalcDefence.lua

* Factor in resistances and flat reduction

.. and explain what's happening briefly in the related tooltip.

* Update CalcDefence.lua

* Update CalcDefence.lua

* Remove obsolete variable reference

* fix armour reduction breakdowns to make more sense

* Fix incorrect PDR calc

* Restore PDR cap

* Add some sanity checks

This prevents nonsensical (negative) damage values and properly handles negative penetration.

* fix merge issue


fix merge issue

* fix gain when hit when speedup happens

* fix wrong damage category for projectile spells

Co-authored-by: Lothrik <maximius@gmail.com>
2022-06-03 00:12:16 -05:00
Nightblade
36c10abda0 fix "maxmium" in test builds 2022-02-23 13:31:18 +11:00
Wires77
297251d453 Fix issue where certain modifiers weren't being converted properly (e.g. Battlemage) (#4086)
* fix: PerStat or other mods without limits weren't being converted

* Added regression test
2022-02-11 19:08:12 +11:00
Wires77
8d4f46a570 test: Adding unit test 2022-01-27 12:29:41 -06:00
randomflyingtaco
f738bf343a Fix TestBuild Fortify Configs 2021-12-08 02:33:55 -05:00
randomflyingtaco
f957a6ffa1 Improve Fortification Stacks Default and Update Legacy Willowgift
Add "Are you Fortified?" field and default Fortification Stacks to max if no override is specified
Correct Fortitude behavior to not override the maximum Fortification
Remove convertFortifyEffect because 3.16.0 removed the more evasion mod from all Willowgifts, so there are no legacy items that use that mod anymore
2021-11-14 02:24:47 -06:00
Nostrademous
71271bac9c Add support for 'X% chance to defend with Y%
* feat: support for 'X% chance to defend with Y% armour' and 'defend with Y% armour while not on low energy shield' masteries

* fix: fix 100% chance to defend with armour not appearing in Min Armour Calculation; fixed above 100% scaling armour
2021-11-02 07:24:08 +11:00
Zpooks
9a5a11e5d0 Regenerated test builds 2021-10-21 23:48:43 +02:00
AlphaCheese
37e499f104 Update Generals Perforate Zerker.xml 2021-10-21 20:10:41 +02:00
AlphaCheese
6d5a54db42 Test Build Fortification edit 2021-10-21 20:10:41 +02:00
Zpooks
b0ea4215b8 3188 Regenerated builds 2021-10-18 21:16:55 +02:00