From 88a90b0142d003887deb1ab6cb6d22692c1100f6 Mon Sep 17 00:00:00 2001 From: burnysc2 Date: Thu, 2 Jan 2025 12:27:54 +0100 Subject: [PATCH] Fix assertions and hatchery cost to 275 --- src/constants/bo_items.ts | 2 +- src/constants/research_abilities.ts | 4 ++-- src/constants/researched_by.ts | 4 ++-- src/constants/trained_by.ts | 4 ++-- src/constants/upgrade_by_id.ts | 4 ++-- src/constants/upgrades.ts | 2 +- src/game_logic/gamelogic.test.ts | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/constants/bo_items.ts b/src/constants/bo_items.ts index eef0d53..c5787cf 100644 --- a/src/constants/bo_items.ts +++ b/src/constants/bo_items.ts @@ -56,7 +56,7 @@ const supplyUnitNameByRace = { }, } -console.assert(Object.keys(BO_ITEMS).length === 234, `${Object.keys(BO_ITEMS).length} is not 234`) +console.assert(Object.keys(BO_ITEMS).length === 235, `${Object.keys(BO_ITEMS).length} is not 235`) console.assert(BO_ITEMS["Zergling"].name === "Zergling", `${BO_ITEMS["Zergling"].name}`) console.assert(BO_ITEMS["Zergling"].type === "unit", `${BO_ITEMS["Zergling"].type}`) diff --git a/src/constants/research_abilities.ts b/src/constants/research_abilities.ts index e6d74fb..1fc8a65 100644 --- a/src/constants/research_abilities.ts +++ b/src/constants/research_abilities.ts @@ -20,8 +20,8 @@ data.Ability.forEach((ability) => { // {524, 45} console.assert( - Object.keys(RESEARCH_ABILITIES).length === 119, - `${Object.keys(RESEARCH_ABILITIES).length} is not 119` + Object.keys(RESEARCH_ABILITIES).length === 120, + `${Object.keys(RESEARCH_ABILITIES).length} is not 120` ) export default RESEARCH_ABILITIES diff --git a/src/constants/researched_by.ts b/src/constants/researched_by.ts index 977c224..90aac35 100644 --- a/src/constants/researched_by.ts +++ b/src/constants/researched_by.ts @@ -92,8 +92,8 @@ RESEARCHED_BY["ZergMeleeWeaponsLevel2"].requires = [ */ console.assert( - Object.keys(RESEARCHED_BY).length === 87, - `${Object.keys(RESEARCHED_BY).length} is not 87` + Object.keys(RESEARCHED_BY).length === 88, + `${Object.keys(RESEARCHED_BY).length} is not 88` ) export default RESEARCHED_BY diff --git a/src/constants/trained_by.ts b/src/constants/trained_by.ts index cdb0cf8..428d5e9 100644 --- a/src/constants/trained_by.ts +++ b/src/constants/trained_by.ts @@ -257,8 +257,8 @@ for (const itemName in TRAINED_BY) { } */ console.assert( - Object.keys(TRAINED_BY).length === 116, - `${Object.keys(TRAINED_BY).length} is not 116` + Object.keys(TRAINED_BY).length === 115, + `${Object.keys(TRAINED_BY).length} is not 115` ) console.assert( diff --git a/src/constants/upgrade_by_id.ts b/src/constants/upgrade_by_id.ts index ccbe9a4..090147e 100644 --- a/src/constants/upgrade_by_id.ts +++ b/src/constants/upgrade_by_id.ts @@ -10,8 +10,8 @@ data.Upgrade.forEach((upgrade) => { }) console.assert( - Object.keys(UPGRADES_BY_ID).length === 123, - `${Object.keys(UPGRADES_BY_ID).length} is not 123` + Object.keys(UPGRADES_BY_ID).length === 124, + `${Object.keys(UPGRADES_BY_ID).length} is not 124` ) export default UPGRADES_BY_ID diff --git a/src/constants/upgrades.ts b/src/constants/upgrades.ts index b3ad287..4af12a4 100644 --- a/src/constants/upgrades.ts +++ b/src/constants/upgrades.ts @@ -81,7 +81,7 @@ UPGRADES.forEach((item) => { // UPGRADES.protoss.sort(sortFn) // UPGRADES.zerg.sort(sortFn) -console.assert(Object.keys(UPGRADES).length === 88, `${Object.keys(UPGRADES).length} is not 88`) +console.assert(Object.keys(UPGRADES).length === 89, `${Object.keys(UPGRADES).length} is not 89`) // Returns object with keys as upgrade id and value is equal to 1 (int) if the upgrade is available from an ability export { UPGRADES, UPGRADE_NAMES_BY_RACE } diff --git a/src/game_logic/gamelogic.test.ts b/src/game_logic/gamelogic.test.ts index 225bfaf..75a5149 100644 --- a/src/game_logic/gamelogic.test.ts +++ b/src/game_logic/gamelogic.test.ts @@ -19,7 +19,7 @@ test("Get the train cost of Depot", () => { }) test("Get the train cost of Hatchery", () => { - expect(GameLogic.getCost("Hatchery").minerals).toBe(300) + expect(GameLogic.getCost("Hatchery").minerals).toBe(275) expect(GameLogic.getCost("Hatchery").vespene).toBe(0) expect(GameLogic.getCost("Hatchery").supply).toBe(-6) })