-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(hiscore-parser): add varlamore p1 support
- Loading branch information
1 parent
efd3dc5
commit 8f82554
Showing
17 changed files
with
316 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
@osrs-tracker/hiscores/dist/parser/parse-order/po-2024-03-20.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import { ParseOrder } from './parse-order'; | ||
export declare const PO_2024_03_20: ParseOrder; |
106 changes: 106 additions & 0 deletions
106
@osrs-tracker/hiscores/dist/parser/parse-order/po-2024-03-20.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
import { BossEnum, BountyHunterEnum, ClueScrollsEnum, CompetitiveEnum, MiniGameEnum, RaidEnum, SkillEnum, } from '../../models/hiscore.enum'; | ||
export const PO_2024_03_20 = [ | ||
SkillEnum.Overall, | ||
SkillEnum.Attack, | ||
SkillEnum.Defence, | ||
SkillEnum.Strength, | ||
SkillEnum.Hitpoints, | ||
SkillEnum.Ranged, | ||
SkillEnum.Prayer, | ||
SkillEnum.Magic, | ||
SkillEnum.Cooking, | ||
SkillEnum.Woodcutting, | ||
SkillEnum.Fletching, | ||
SkillEnum.Fishing, | ||
SkillEnum.Firemaking, | ||
SkillEnum.Crafting, | ||
SkillEnum.Smithing, | ||
SkillEnum.Mining, | ||
SkillEnum.Herblore, | ||
SkillEnum.Agility, | ||
SkillEnum.Thieving, | ||
SkillEnum.Slayer, | ||
SkillEnum.Farming, | ||
SkillEnum.Runecraft, | ||
SkillEnum.Hunter, | ||
SkillEnum.Construction, | ||
CompetitiveEnum.LeaguePoints, | ||
CompetitiveEnum.Unknown, | ||
BountyHunterEnum.BountyHunter, | ||
BountyHunterEnum.BountyHunterRogues, | ||
BountyHunterEnum.BountyHunterLegacy, | ||
BountyHunterEnum.BountyHunterLegacyRogues, | ||
ClueScrollsEnum.ClueScrollsAll, | ||
ClueScrollsEnum.ClueScrollsBeginner, | ||
ClueScrollsEnum.ClueScrollsEasy, | ||
ClueScrollsEnum.ClueScrollsMedium, | ||
ClueScrollsEnum.ClueScrollsHard, | ||
ClueScrollsEnum.ClueScrollsElite, | ||
ClueScrollsEnum.ClueScrollsMaster, | ||
CompetitiveEnum.LastManStanding, | ||
CompetitiveEnum.PvpArena, | ||
MiniGameEnum.SoulWarsZeal, | ||
MiniGameEnum.RiftsClosed, | ||
MiniGameEnum.ColosseumGlory, | ||
BossEnum.AbyssalSire, | ||
BossEnum.AlchemicalHydra, | ||
BossEnum.Artio, | ||
BossEnum.BarrowsChests, | ||
BossEnum.Bryophyta, | ||
BossEnum.Callisto, | ||
BossEnum.Calvarion, | ||
BossEnum.Cerberus, | ||
RaidEnum.ChambersOfXeric, | ||
RaidEnum.ChambersOfXericChallengeMode, | ||
BossEnum.ChaosElemental, | ||
BossEnum.ChaosFanatic, | ||
BossEnum.CommanderZilyana, | ||
BossEnum.CorporealBeast, | ||
BossEnum.CrazyArchaeologist, | ||
BossEnum.DagannothPrime, | ||
BossEnum.DagannothRex, | ||
BossEnum.DagannothSupreme, | ||
BossEnum.DerangedArchaeologist, | ||
BossEnum.DukeSucellus, | ||
BossEnum.GeneralGraardor, | ||
BossEnum.GiantMole, | ||
BossEnum.GrotesqueGuardians, | ||
BossEnum.Hespori, | ||
BossEnum.KalphiteQueen, | ||
BossEnum.KingBlackDragon, | ||
BossEnum.Kraken, | ||
BossEnum.KreeArra, | ||
BossEnum.KrilTsutsaroth, | ||
BossEnum.LunarChests, | ||
BossEnum.Mimic, | ||
BossEnum.Nex, | ||
BossEnum.Nightmare, | ||
BossEnum.PhosanisNightmare, | ||
BossEnum.Obor, | ||
BossEnum.PhantomMuspah, | ||
BossEnum.Sarachnis, | ||
BossEnum.Scorpia, | ||
BossEnum.Scurrius, | ||
BossEnum.Skotizo, | ||
BossEnum.SolHeredit, | ||
BossEnum.Spindel, | ||
BossEnum.Tempoross, | ||
RaidEnum.TheGauntlet, | ||
RaidEnum.TheCorruptedGauntlet, | ||
BossEnum.TheLeviathan, | ||
BossEnum.TheWhisperer, | ||
RaidEnum.TheatreOfBlood, | ||
RaidEnum.TheatreOfBloodHardMode, | ||
BossEnum.ThermoNuclearSmokeDevil, | ||
RaidEnum.TombsOfAmascut, | ||
RaidEnum.TombsOfAmascutExpertMode, | ||
BossEnum.TzKalZuk, | ||
BossEnum.TzTokJad, | ||
BossEnum.Vardorvis, | ||
BossEnum.Venenatis, | ||
BossEnum.Vetion, | ||
BossEnum.Vorkath, | ||
BossEnum.Wintertodt, | ||
BossEnum.Zalcano, | ||
BossEnum.Zulrah, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
@osrs-tracker/hiscores/src/parser/parse-order/po-2024-03-20.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { describe, expect, it } from '@jest/globals'; | ||
import { BossEnum, MiniGameEnum } from '../../models/hiscore.enum'; | ||
import { parseHiscoreString } from '../parser'; | ||
|
||
describe('Parser with 2024-03-20 parse order', () => { | ||
it('should parse new varlamore p1', () => { | ||
const hiscoreString = | ||
'5438,2277,771059571\n29994,99,28726468\n24068,99,24138705\n4138,99,118840880\n5163,99,114462745\n5476,99,121240041\n4728,99,15105170\n3522,99,63232991\n75127,99,14633301\n17789,99,20856483\n24818,99,14527396\n18871,99,17825689\n28593,99,16436735\n17497,99,15195490\n9333,99,17559129\n24624,99,15386266\n10921,99,14753059\n5175,99,16985186\n36656,99,15348274\n6643,99,32472129\n25900,99,25046544\n12581,99,16085099\n28820,99,14656276\n1508,99,17545515\n-1,-1\n-1,-1\n1414,558\n456,101\n7812,501\n513,800\n1045,5535\n1474,737\n757,2012\n4188,1139\n2201,845\n734,429\n1987,373\n7607,4205\n103,4460\n24587,3616\n130570,176\n1,10050\n67819,375\n79227,751\n10214,703\n15970,1104\n9761,87\n5067,1633\n54518,102\n16067,2093\n81147,218\n8560,241\n28921,165\n764,1322\n49528,320\n49486,164\n21252,200\n50516,511\n60398,555\n55057,478\n20617,50\n17781,519\n31066,965\n79837,402\n15244,753\n10412,233\n35007,325\n28096,889\n14405,4903\n22268,566\n23241,388\n-1,-1\n4791,19\n22948,900\n21430,154\n16282,101\n13729,56\n13113,407\n33866,270\n3102,1177\n44891,127\n2931,114\n-1,-1\n5661,947\n21462,420\n50287,53\n103207,134\n8890,527\n12025,282\n20039,330\n550,635\n1889,5268\n43438,100\n19072,222\n8178,5\n28219,23\n19252,641\n7414,1196\n8339,610\n247228,245\n215871,510\n65643,150\n16910,3752'; | ||
|
||
const hiscore = parseHiscoreString(hiscoreString, new Date(2024, 2, 20, 12)); | ||
|
||
expect(hiscore.miniGames[MiniGameEnum.ColosseumGlory]).toEqual({ | ||
name: MiniGameEnum.ColosseumGlory, | ||
rank: 1, | ||
score: 10050, | ||
}); | ||
expect(hiscore.bosses[BossEnum.KrilTsutsaroth]).toEqual({ | ||
name: BossEnum.KrilTsutsaroth, | ||
rank: 23241, | ||
score: 388, | ||
}); | ||
expect(hiscore.bosses[BossEnum.LunarChests]).toEqual({ | ||
name: BossEnum.LunarChests, | ||
rank: -1, | ||
score: -1, | ||
}); | ||
expect(hiscore.bosses[BossEnum.Mimic]).toEqual({ | ||
name: BossEnum.Mimic, | ||
rank: 4791, | ||
score: 19, | ||
}); | ||
expect(hiscore.bosses[BossEnum.Scurrius]).toEqual({ | ||
name: BossEnum.Scurrius, | ||
rank: 44891, | ||
score: 127, | ||
}); | ||
expect(hiscore.bosses[BossEnum.SolHeredit]).toEqual({ | ||
name: BossEnum.SolHeredit, | ||
rank: -1, | ||
score: -1, | ||
}); | ||
expect(hiscore.bosses[BossEnum.Skotizo]).toEqual({ | ||
name: BossEnum.Skotizo, | ||
rank: 2931, | ||
score: 114, | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.