import { EProjectileEffectType, GdProjectileEffect, GdRoot } from "./index.js";

export class GdTower {
    public cost: number = 0;
    public projectileEffect: GdProjectileEffect | null = null;
    public projectileRange: number = 0;
    public projectileRate: number = 0;
    public projectileSize: number = 0;
    public aoeEffect: GdProjectileEffect | null = null;
    public aoeRange: number = 0;
    public aoeRate: number = 0;

    static addTowers(gdRoot: GdRoot) {
        gdRoot.towers.push(createTower0());
    };
}

function createTower0(): GdTower {
    return {
        ...new GdTower(),
        cost: 75,
        projectileEffect: new GdProjectileEffect(EProjectileEffectType.Damage, 2, 10),
        projectileRange: 2,
        projectileRate: 5,
        projectileSize: 0.2,
        aoeEffect: null,
        aoeRange: 0,
        aoeRate: 0,
    };
}
