UNPKG

@zerospacegg/iolin

Version:

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

83 lines 3.37 kB
/** * Seedling - Grell builder unit * T0 builder that can construct all Grell structures. Becomes flying scout when infused. */ import { InfuseState } from "../../../../engine/unit.js"; import { GrellBuilderUnit } from "../../grell-classes.js"; import { AdvancedAugmentationPool } from "../building/advanced-augmentation-pool.js"; import { AugmentationPool } from "../building/augmentation-pool.js"; import { Cultivator } from "../building/cultivator.js"; import { Incubator } from "../building/incubator.js"; import { LargeIncubator } from "../building/large-incubator.js"; import { MediumIncubator } from "../building/medium-incubator.js"; import { NourishingPod } from "../building/nourishing-pod.js"; import RootColony from "../building/root-colony.js"; import { SkrellingNest } from "../building/skrelling-nest.js"; import { SpecialAugmentationPool } from "../building/special-augmentation-pool.js"; export class Seedling extends GrellBuilderUnit { constructor() { super(); this.name = "Seedling"; this.tier = "T0"; this.hotkey = "S"; this.hexiteCost = 0; this.fluxCost = 0; this.buildTime = 5; this.buildCount = 1; this.uuid = "f184e771-d2b9-4669-a9e3-99061a95c775"; this.unlockedBy = [RootColony.id]; this.createdBy = [RootColony.id]; this.description = "Can build structures."; // Construction capabilities - all Grell buildings this.creates = [ Incubator.id, MediumIncubator.id, LargeIncubator.id, AugmentationPool.id, AdvancedAugmentationPool.id, SpecialAugmentationPool.id, Cultivator.id, RootColony.id, SkrellingNest.id, NourishingPod.id, ]; this.hp = 20; this.shields = 0; this.armor = 0; this.armorType = "medium"; this.speed = 225; this.supply = 0; // domain is readonly, can't be changed after construction // Biomass healing passive inherited automatically from GrellBuilderUnit // No combat abilities - this is a pure builder/scout unit } get canBeInfused() { return this._getInfused() === InfuseState.none; } get canBeReanimated() { return false; // Seedlings cannot be reanimated } // Custom infusion logic - transforms ground builder into flying scout _applyInfusion(value) { if (value !== this._getInfused()) { if (value === InfuseState.none) { // Reset to base ground builder form const base = new this.constructor(); this.hp = base.hp; this.speed = base.speed; // domain is readonly, can't be changed - would need different approach } else { // Transform into flying scout (both single and double infusion same for seedling) this.hp = 120; this.speed = 575; // PKL shows 575 speed when infused // domain is readonly, can't be changed - would need different approach } this._setInfused(value); } } } // Static property for source path Seedling.src = "src/zerospace/faction/grell/unit/seedling.ts"; export default Seedling; //# sourceMappingURL=seedling.js.map