Skip to content

Commit

Permalink
Fix assertions and hatchery cost to 275
Browse files Browse the repository at this point in the history
  • Loading branch information
BurnySc2 committed Jan 2, 2025
1 parent 3a3afbe commit 88a90b0
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/constants/bo_items.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`)
Expand Down
4 changes: 2 additions & 2 deletions src/constants/research_abilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions src/constants/researched_by.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions src/constants/trained_by.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions src/constants/upgrade_by_id.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/constants/upgrades.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
2 changes: 1 addition & 1 deletion src/game_logic/gamelogic.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
Expand Down

0 comments on commit 88a90b0

Please sign in to comment.