2024-10-24 09:32:31 +00:00
|
|
|
import type { Hex } from "./hexgrid";
|
|
|
|
|
2024-10-24 14:24:39 +00:00
|
|
|
|
|
|
|
export type GameTab = 'village' | 'resources';
|
|
|
|
|
|
|
|
|
2024-10-21 15:35:32 +00:00
|
|
|
export interface Cost {
|
|
|
|
wood: number;
|
|
|
|
stone: number;
|
|
|
|
iron: number;
|
|
|
|
food: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2024-10-22 15:15:35 +00:00
|
|
|
export type Production = Cost;
|
|
|
|
|
|
|
|
|
2024-10-21 15:35:32 +00:00
|
|
|
export interface BuildingSource {
|
|
|
|
name: string;
|
2024-10-24 14:24:39 +00:00
|
|
|
type: string;
|
|
|
|
autoBuilt?: boolean;
|
2024-10-21 15:35:32 +00:00
|
|
|
cost: (level: number) => Cost;
|
|
|
|
behavior: {
|
|
|
|
production?: Function;
|
2024-10-22 15:15:35 +00:00
|
|
|
storage?: Function;
|
2024-10-21 15:35:32 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export interface Building extends BuildingSource {
|
|
|
|
id: number;
|
2024-10-23 08:14:19 +00:00
|
|
|
level: number;
|
2024-10-24 09:32:31 +00:00
|
|
|
tile: Hex;
|
2024-10-21 15:35:32 +00:00
|
|
|
}
|