SWGOH Unit-stats Calculator
Unit stats and Galactic Power calculator for raw player data
npm i shitty-swgoh-stats
Initializing the class
Initialize with an existing crinolo_core
const Stats = const stats = crinolo_core
Initialize and fetch/update crinolo core
For shittybots api token, see: https://swgoh.shittybots.me/register
Note: "update" will update the class and return you the updated gamedata
const Stats = const stats = const token = "your_shittybots_api_token"const crinolo_core = await stats
Calculate stats
Units-in are modified with stats and gp attached
Returns a Map of all players, keyed by playerId
Each player is a Map of roster units keyed by baseId
//Requires player's rosterUnitListconst rosterMap = stats/*Map { 'unit_baseId' => { stats:{ final:<Object>, mods:<Object>, crew:<Object> }, gp:<Integer> }, ...}*/
//Accepts a single or array of playersconst playerMap = stats/*Map { 'playerId' => Map { 'unit_baseId' => { stats:{ final:<Object>, mods:<Object>, crew:<Object> }, gp:<Integer> }, ... }, ...}*/