@zerospacegg/iolin
Version:
Pure TypeScript implementation of ZeroSpace game data processing (PKL-free)
90 lines • 3.64 kB
JavaScript
"use strict";
/**
* Root Colony - Foundational Grell base building
* The living heart of Grell expansion with unit production, biomass generation, and defensive capabilities
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.RootColony = void 0;
const grell_js_1 = require("../../../../defaults/grell.cjs");
const ability_js_1 = require("../../../../engine/ability.cjs");
const turret_js_1 = require("../../../../engine/turret.cjs");
class RootColony extends grell_js_1.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 ability_js_1.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 ability_js_1.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_js_1.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];
}
}
exports.RootColony = RootColony;
RootColony.src = "src/zerospace/faction/grell/building/root-colony.ts";
exports.default = RootColony;
//# sourceMappingURL=root-colony.js.map