sendou.ink/app/modules/analyzer
William Lam 2da0738dc6
Ability Chunks Required section in Build Analyzer (#1120)
* Added Ability Chunks Required section in Build Analyzer

* Renamed a variable to be more precisely correct

* Added reference

* Removed some extra Javadoc comments

* Prettier fix

* We now only render the AbilityChunksRequired section only if the main abilities array contains a value other than "UNKNOWN"

* Improved React keys naming for performance reasons

* Ability Chunks map is now converted to an array & sorted by value (descending) before it gets rendered as visual components

* Fixed typing error

* Moved logical function to a new file in the analyzer module called abilityChunksCalc.ts
- Refactored for loop content to be cleaner
- Removed & changed some comments

* More for loop refactoring

* We now pass the entire build into abilityChunksCalc.ts

* Refactored map() to flatMap() so we avoid unknowns/null/undefined

* Refactored code to process mainAbilities and subAbilities

* Fixed subability list construction logic & typing in updateAbilityChunksMap()

* Got my first unit test working

* Added working unit tests, also changed sort order slightly

* Added a "real" build for testing

* Removed residual console.warn() call

* Moved constants to abilityChunksCalc.ts

* Ability chunk calculation is now correct for sub abilities

* Uncommented tests & improved their descriptions

* Rearranged expected output to match sorted order for clarity (even though it doesn't have to be)

* Fixed Prettier error

* Spacing

* Moved comments around

* More spacing

* Prettier error on test file

* Improved check in the tests

* Added a second "real" build to tests for good measure

* Added error message to empty array test

* Updated comments again

* More comments updated

* Update test name

* Ability Chunks section is now shown if we have at least one selected ability (handles edge case for primary slot-only abilities being the only chosen ability)
2022-11-16 00:10:48 +02:00
..
ability-values.json Add BRU Beakon effect 2022-09-21 00:17:59 +03:00
abilityChunksCalc.test.ts Ability Chunks Required section in Build Analyzer (#1120) 2022-11-16 00:10:48 +02:00
abilityChunksCalc.ts Ability Chunks Required section in Build Analyzer (#1120) 2022-11-16 00:10:48 +02:00
constants.ts Support for blob 4 shots in analyzer 2022-10-29 21:04:34 +03:00
index.ts Object damage filter by damage type 2022-10-23 12:50:25 +03:00
object-dmg.json Object damage calculator page initial 2022-10-18 01:12:52 +03:00
objectDamage.test.ts Add slosher class weapons damages 2022-10-29 20:36:48 +03:00
objectDamage.ts Add tests and fix damage calculation of some wpns 2022-10-26 08:42:04 +03:00
objectHitPoints.ts Add remaining hitpoint values 2022-10-23 15:05:20 +03:00
specialEffects.test.ts Calculate own use of RP 2022-09-18 21:14:47 +03:00
specialEffects.ts Calculate own use of RP 2022-09-18 21:14:47 +03:00
stats.test.ts Add slosher class weapons damages 2022-10-29 20:36:48 +03:00
stats.ts Support for blob 4 shots in analyzer 2022-10-29 21:04:34 +03:00
types.ts Ability Chunks Required section in Build Analyzer (#1120) 2022-11-16 00:10:48 +02:00
useAnalyzeBuild.ts Object damage calculator page initial 2022-10-18 01:12:52 +03:00
useObjectDamage.ts Add slosher class weapons damages 2022-10-29 20:36:48 +03:00
utils.test.ts Calculate own use of RP 2022-09-18 21:14:47 +03:00
utils.ts Objective damage table change SPU/BRU 2022-10-23 11:59:03 +03:00
weapon-params.json Add slosher class weapons damages 2022-10-29 20:36:48 +03:00