Fixes #19 adding support for Soul Wars Zeal

This commit is contained in:
molo-pl
2021-01-06 17:09:11 +01:00
parent 7de2d9a95a
commit 939f4d2721
5 changed files with 10 additions and 1 deletions

View File

@@ -108,6 +108,7 @@ Activities consist of all levels of clue scrolls as well as minigames and bosses
| Bounty Hunter (Rogue) | `rogueBH` | | Bounty Hunter (Rogue) | `rogueBH` |
| Bounty Hunter (Hunter) | `hunterBH` | | Bounty Hunter (Hunter) | `hunterBH` |
| Last Man Standing | `lastManStanding` | | Last Man Standing | `lastManStanding` |
| Soul Wars Zeal | `soulWarsZeal` |
### Leagues ### Leagues
@@ -186,6 +187,7 @@ Activities consist of all levels of clue scrolls as well as minigames and bosses
leaguePoints: {}, leaguePoints: {},
bountyHunter: {}, bountyHunter: {},
lastManStanding: {}, lastManStanding: {},
soulWarsZeal: {},
bosses: {} bosses: {}
} }
} }

View File

@@ -43,6 +43,7 @@ test('Parse CSV to json', () => {
392,250 392,250
1,6143 1,6143
4814,898 4814,898
37,225
382,2780 382,2780
944,3000 944,3000
1981,1452 1981,1452
@@ -121,6 +122,7 @@ test('Parse CSV to json', () => {
hunter: { rank: -1, score: -1 }, hunter: { rank: -1, score: -1 },
}, },
lastManStanding: { rank: 4814, score: 898 }, lastManStanding: { rank: 4814, score: 898 },
soulWarsZeal: { rank: 37, score: 225 },
clues: { clues: {
all: { rank: 32, score: 12148 }, all: { rank: 32, score: 12148 },
beginner: { rank: 3105, score: 76 }, beginner: { rank: 3105, score: 76 },

View File

@@ -265,7 +265,7 @@ export function parseStats(csv: string): Stats {
const [leaguePoints] = activityObjects.splice(0, 1); const [leaguePoints] = activityObjects.splice(0, 1);
const bhObjects = activityObjects.splice(0, BH_MODES.length); const bhObjects = activityObjects.splice(0, BH_MODES.length);
const clueObjects = activityObjects.splice(0, CLUES.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 bossObjects = activityObjects.splice(0, BOSSES.length);
const skills: Skills = skillObjects.reduce<Skills>((prev, curr, index) => { const skills: Skills = skillObjects.reduce<Skills>((prev, curr, index) => {
@@ -297,6 +297,7 @@ export function parseStats(csv: string): Stats {
leaguePoints, leaguePoints,
bountyHunter, bountyHunter,
lastManStanding, lastManStanding,
soulWarsZeal,
clues, clues,
bosses, bosses,
}; };

View File

@@ -114,6 +114,7 @@ export type ActivityName =
| 'hunterBH' | 'hunterBH'
| 'rogueBH' | 'rogueBH'
| 'lastManStanding' | 'lastManStanding'
| 'soulWarsZeal'
| 'allClues' | 'allClues'
| 'beginnerClues' | 'beginnerClues'
| 'easyClues' | 'easyClues'
@@ -129,6 +130,7 @@ export interface Stats {
leaguePoints: Activity; leaguePoints: Activity;
bountyHunter: BH; bountyHunter: BH;
lastManStanding: Activity; lastManStanding: Activity;
soulWarsZeal: Activity;
bosses: Bosses; bosses: Bosses;
} }
export type Modes = { [M in Gamemode]?: Stats }; export type Modes = { [M in Gamemode]?: Stats };

View File

@@ -127,6 +127,7 @@ export const ACTIVITIES: ActivityName[] = [
'eliteClues', 'eliteClues',
'masterClues', 'masterClues',
'lastManStanding', 'lastManStanding',
'soulWarsZeal',
...BOSSES, ...BOSSES,
]; ];
@@ -236,4 +237,5 @@ export const FORMATTED_BH_NAMES: FormattedBHNames = {
}; };
export const FORMATTED_LMS = 'Last Man Standing'; export const FORMATTED_LMS = 'Last Man Standing';
export const FORMATTED_SOUL_WARS = 'Soul Wars Zeal';
export const FORMATTED_LEAGUE_POINTS = 'League Points'; export const FORMATTED_LEAGUE_POINTS = 'League Points';