diff --git a/README.md b/README.md index 73ed001..87be7c2 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,7 @@ Activities consist of all levels of clue scrolls as well as minigames and bosses | Bounty Hunter (Rogue) | `rogueBH` | | Bounty Hunter (Hunter) | `hunterBH` | | Last Man Standing | `lastManStanding` | +| Soul Wars Zeal | `soulWarsZeal` | ### Leagues @@ -186,6 +187,7 @@ Activities consist of all levels of clue scrolls as well as minigames and bosses leaguePoints: {}, bountyHunter: {}, lastManStanding: {}, + soulWarsZeal: {}, bosses: {} } } diff --git a/__tests__/hiscores.test.ts b/__tests__/hiscores.test.ts index 402c421..0aeed27 100644 --- a/__tests__/hiscores.test.ts +++ b/__tests__/hiscores.test.ts @@ -43,6 +43,7 @@ test('Parse CSV to json', () => { 392,250 1,6143 4814,898 + 37,225 382,2780 944,3000 1981,1452 @@ -121,6 +122,7 @@ test('Parse CSV to json', () => { hunter: { rank: -1, score: -1 }, }, lastManStanding: { rank: 4814, score: 898 }, + soulWarsZeal: { rank: 37, score: 225 }, clues: { all: { rank: 32, score: 12148 }, beginner: { rank: 3105, score: 76 }, diff --git a/src/hiscores.ts b/src/hiscores.ts index 62d4fd2..906d7e8 100644 --- a/src/hiscores.ts +++ b/src/hiscores.ts @@ -265,7 +265,7 @@ export function parseStats(csv: string): Stats { const [leaguePoints] = activityObjects.splice(0, 1); const bhObjects = activityObjects.splice(0, BH_MODES.length); const clueObjects = activityObjects.splice(0, CLUES.length); - const [lastManStanding] = activityObjects.splice(0, 1); + const [lastManStanding, soulWarsZeal] = activityObjects.splice(0, 2); const bossObjects = activityObjects.splice(0, BOSSES.length); const skills: Skills = skillObjects.reduce((prev, curr, index) => { @@ -297,6 +297,7 @@ export function parseStats(csv: string): Stats { leaguePoints, bountyHunter, lastManStanding, + soulWarsZeal, clues, bosses, }; diff --git a/src/types.ts b/src/types.ts index 234d70c..9084500 100644 --- a/src/types.ts +++ b/src/types.ts @@ -114,6 +114,7 @@ export type ActivityName = | 'hunterBH' | 'rogueBH' | 'lastManStanding' + | 'soulWarsZeal' | 'allClues' | 'beginnerClues' | 'easyClues' @@ -129,6 +130,7 @@ export interface Stats { leaguePoints: Activity; bountyHunter: BH; lastManStanding: Activity; + soulWarsZeal: Activity; bosses: Bosses; } export type Modes = { [M in Gamemode]?: Stats }; diff --git a/src/utils/constants.ts b/src/utils/constants.ts index dd52857..b48d85b 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -127,6 +127,7 @@ export const ACTIVITIES: ActivityName[] = [ 'eliteClues', 'masterClues', 'lastManStanding', + 'soulWarsZeal', ...BOSSES, ]; @@ -236,4 +237,5 @@ export const FORMATTED_BH_NAMES: FormattedBHNames = { }; export const FORMATTED_LMS = 'Last Man Standing'; +export const FORMATTED_SOUL_WARS = 'Soul Wars Zeal'; export const FORMATTED_LEAGUE_POINTS = 'League Points';