new buildings: mining! increase alloy + max alloy cap
[browser-rts.git] / src / repository / city.ts
index 0ab8478a6d6ebed98d6c67e10b514a72d88c6bef..c3bcae849b50979254c6b6d418a8f3a0217a1892 100644 (file)
@@ -32,6 +32,7 @@ export type City = {
     solar_panels: number;
     accumulators: number;
     mining_facilities: number;
+    ore_refinery: number;
     barracks: number;
     special_attacker_trainer: number;
     special_defender_trainer: number;
@@ -83,6 +84,7 @@ export class CityRepository extends Repository<City> {
             solar_panels: 5,
             accumulators: 5,
             mining_facilities: 5,
+            ore_refinery: 5,
             barracks: 0,
             special_attacker_trainer: 0,
             special_defender_trainer: 0,
@@ -340,6 +342,10 @@ where l.sector_id = ?`, [sector_id]);
       return city.accumulators * 150;
     }
 
+    maxAlloy(city: City): number {
+      return city.ore_refinery * 75;
+    }
+
     async foodProductionPerTick(city: City): Promise<number> {
       // eventually we should supply the warehouse formula 
       // to calculate the max amount of food created per tick