diff --git a/examples/output.json b/examples/output.json index 8576200..dfac6dd 100644 --- a/examples/output.json +++ b/examples/output.json @@ -903,5 +903,5 @@ "randomRaces": false, "speed": 2 }, - "parseTime": 136 + "parseTime": 145 } \ No newline at end of file diff --git a/src/mappings.ts b/src/mappings.ts index dccdf0c..d4ab5e5 100644 --- a/src/mappings.ts +++ b/src/mappings.ts @@ -254,12 +254,6 @@ const units: { [key: string]: string } = { hgyr: "u_Flying Machine", hspt: "u_Spell Breaker", hdhw: "u_Dragonhawk Rider", - // building upgrades - hkee: "b_Keep", - hcas: "b_Castle", - hctw: "b_Cannon Tower", - hgtw: "b_Guard Tower", - hatw: "b_Arcane Tower", ebal: "u_Glaive Thrower", echm: "u_Chimaera", edoc: "u_Druid of the Claw", @@ -271,9 +265,6 @@ const units: { [key: string]: string } = { ehip: "u_Hippogryph", emtg: "u_Mountain Giant", efdr: "u_Faerie Dragon", - // building upgrades - etoa: "b_Tree of Ages", - etoe: "b_Tree of Eternity", ocat: "u_Demolisher", odoc: "u_Troll Witch Doctor", ogru: "u_Grunt", @@ -288,9 +279,6 @@ const units: { [key: string]: string } = { ospw: "u_Spirit Walker", ospm: "u_Spirit Walker", otbr: "u_Troll Batrider", - // building upgrades - ofrt: "b_Fortress", - ostr: "b_Stronghold", uaco: "u_Acolyte", uabo: "u_Abomination", uban: "u_Banshee", @@ -303,12 +291,6 @@ const units: { [key: string]: string } = { ushd: "u_Shade", uobs: "u_Obsidian Statue", ubsp: "u_Destroyer", - // building upgrades - unp1: "b_Halls of the Dead", - unp2: "b_Black Citadel", - uzg1: "b_Spirit Tower", - uzg2: "b_Nerubian Tower", - nskm: "u_Skeletal Marksman", nskf: "u_Burning Archer", nws1: "u_Dragon Hawk", @@ -415,6 +397,11 @@ const buildings: { [key: string]: string } = { hvlt: "Arcane Vault", hlum: "Lumber Mill", htow: "Town Hall", + hkee: "b_Keep", + hcas: "b_Castle", + hctw: "b_Cannon Tower", + hgtw: "b_Guard Tower", + hatw: "b_Arcane Tower", etrp: "Ancient Protector", etol: "Tree of Life", edob: "Hunter's Hall", @@ -425,6 +412,8 @@ const buildings: { [key: string]: string } = { eaow: "Ancient of Wind", edos: "Chimaera Roost", emow: "Moon Well", + etoa: "b_Tree of Ages", + etoe: "b_Tree of Eternity", oalt: "Altar of Storms", obar: "Barracks", obea: "Beastiary", @@ -436,6 +425,8 @@ const buildings: { [key: string]: string } = { otto: "Tauren Totem", ovln: "Voodoo Lounge", owtw: "Watch Tower", + ofrt: "b_Fortress", + ostr: "b_Stronghold", uaod: "Altar of Darkness", unpl: "Necropolis", usep: "Crypt", @@ -447,6 +438,10 @@ const buildings: { [key: string]: string } = { usap: "Sacrificial Pit", uslh: "Slaughterhouse", ugrv: "Graveyard", + unp1: "b_Halls of the Dead", + unp2: "b_Black Citadel", + uzg1: "b_Spirit Tower", + uzg2: "b_Nerubian Tower", }; const upgrades: { [key: string]: string } = { diff --git a/test/replays/129/replays.test.ts b/test/replays/129/replays.test.ts index 5fb694c..18138f7 100644 --- a/test/replays/129/replays.test.ts +++ b/test/replays/129/replays.test.ts @@ -35,7 +35,6 @@ it("parses a standard 1.29 replay with observers properly", async () => { expect(test.players[1].units.summary).toEqual({ opeo: 10, ogru: 5, - ostr: 1, orai: 6, ospm: 5, okod: 2, @@ -63,7 +62,6 @@ it("parses a standard 1.29 replay with observers properly", async () => { expect(test.players[0].units.summary).toEqual({ opeo: 11, ogru: 8, - ostr: 2, orai: 8, ospm: 4, okod: 3, diff --git a/test/replays/130/__snapshots__/replays.test.ts.snap b/test/replays/130/__snapshots__/replays.test.ts.snap index d43201b..cd5adae 100644 --- a/test/replays/130/__snapshots__/replays.test.ts.snap +++ b/test/replays/130/__snapshots__/replays.test.ts.snap @@ -63,6 +63,10 @@ Object { "id": "hhou", "ms": 122755, }, + Object { + "id": "hkee", + "ms": 190494, + }, Object { "id": "hhou", "ms": 210930, @@ -71,6 +75,10 @@ Object { "id": "hwtw", "ms": 216711, }, + Object { + "id": "hatw", + "ms": 248942, + }, Object { "id": "hhou", "ms": 253012, @@ -103,6 +111,10 @@ Object { "id": "hhou", "ms": 673657, }, + Object { + "id": "hatw", + "ms": 933869, + }, Object { "id": "htow", "ms": 1065471, @@ -110,9 +122,11 @@ Object { ], "summary": Object { "halt": 1, + "hatw": 2, "hbar": 1, "hbla": 1, "hhou": 9, + "hkee": 1, "hlum": 1, "htow": 2, "hvlt": 1, @@ -329,18 +343,10 @@ Object { "id": "hrif", "ms": 160527, }, - Object { - "id": "hkee", - "ms": 190494, - }, Object { "id": "hrif", "ms": 202902, }, - Object { - "id": "hatw", - "ms": 248942, - }, Object { "id": "hrif", "ms": 250426, @@ -497,10 +503,6 @@ Object { "id": "hrif", "ms": 916553, }, - Object { - "id": "hatw", - "ms": 933869, - }, Object { "id": "hrif", "ms": 959420, @@ -531,8 +533,6 @@ Object { }, ], "summary": Object { - "hatw": 2, - "hkee": 1, "hpea": 20, "hrif": 38, },