UNPKG

@zerospacegg/iolin

Version:

Pure TypeScript implementation of ZeroSpace game data processing (PKL-free)

86 lines 3.45 kB
/** * Root Colony - Foundational Grell base building * The living heart of Grell expansion with unit production, biomass generation, and defensive capabilities */ import { GrellBaseBuilding } from "../../../../defaults/grell.js"; import { Attack, Spell } from "../../../../engine/ability.js"; import { Turret } from "../../../../engine/turret.js"; export class RootColony extends GrellBaseBuilding { constructor() { super(); this.name = "Root Colony"; this.tier = "T0"; this.hp = 2500; this.shields = 0; this.armor = 2; this.maxAddOns = 1; this.providesBiomass = 1500; this.description = "Mining outpost which builds extractors to mine Hexite. Can be upgraded to attack. Spawns seedling immediately upon completion."; this.uuid = "9f01463e-8972-4011-8364-6714d89d0a1e"; // Setup Grell passives after UUID is assigned this.setupGrellPassives(); // Production capabilities this.createdBy = ["faction/grell/unit/seedling"]; // Built by Seedling this.unlockedBy = []; this.upgradedBy = []; // Creates units and buildings this.creates = [ "faction/grell/unit/seedling", "faction/grell/unit/grell-harvester", "faction/grell/building/grell-extractor", ]; this.unlocks = [ "faction/grell/building/nourishing-pod", "faction/grell/building/cultivator", "faction/grell/unit/seedling", "faction/grell/unit/grell-harvester", ]; // Home Base spell - set as primary base for recall priority this.spells.homeBase = new Spell({ name: "Home Base", hotkey: "U", cooldown: 0.2, targets: ["self"], description: "Set this base as primary", parentId: this.id, parentUUID: this.uuid, }); // Biomass spreading passive inherited automatically from GrellBaseBuilding // Capture colony instance for turret apply method const colony = this; // Defensive attack (unlocked by turret) this.attacks.attack = new Attack({ name: "Attack", description: "Defensive attack system that targets air and ground units", damage: 23, cooldown: 0.66, range: 2000, targets: ["air", "ground"], unlocked: false, parentId: this.id, parentUUID: this.uuid, }); // Defensive turret capability this.turrets.rootColonyAttacker = new Turret({ name: "Root Colony Attacker", description: "Adds a defensive turret and +1 armor", hexiteCost: 200, buildTime: 5, hp: 500, unlocked: false, apply() { // Add armor bonus colony.armor = (colony.armor || 0) + 1; // Unlock attack ability colony.attacks.attack.unlocked = true; }, }); // Set up unlock relationships after both are created this.attacks.attack.unlockedBy = [this.turrets.rootColonyAttacker.id]; this.turrets.rootColonyAttacker.unlocks = [this.attacks.attack.id]; } } RootColony.src = "src/zerospace/faction/grell/building/root-colony.ts"; export default RootColony; //# sourceMappingURL=root-colony.js.map