Merge pull request #20 from molo-pl/master

Fixes #19 adding support for Soul Wars Zeal
This commit is contained in:
Max Swartwout
2021-01-10 15:59:43 -05:00
committed by GitHub
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 (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: {}
}
}

View File

@@ -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 },

View File

@@ -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<Skills>((prev, curr, index) => {
@@ -297,6 +297,7 @@ export function parseStats(csv: string): Stats {
leaguePoints,
bountyHunter,
lastManStanding,
soulWarsZeal,
clues,
bosses,
};

View File

@@ -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 };

View File

@@ -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';