ZeroSpace.gg

Seedling

Grell T0 Builder Unit

import { GrellBuilderUnit } from "../../../../defaults/grell.js"; import { InfuseState } from "../../../../engine/unit.js"; export class Seedling extends GrellBuilderUnit { override uuid: string; static override src = "src/zerospace/faction/grell/unit/seedling.ts"; constructor() { super(); this.hexiteCost = 0; this.fluxCost = 0; this.buildTime = 5; this.buildCount = 1; this.name = "Seedling"; this.tier = "T0"; this.hotkey = "S"; this.uuid = "f184e771-d2b9-4669-a9e3-99061a95c775"; this.internalId = "Troop_Grell_Seedling_C"; this.internalPath = "/Game/Nova/Archetypes_Troops/Troop_Grell_Seedling.Default__Troop_Grell_Seedling_C"; this.internalTags = [ "Attackable.Unit.Troop", "Attackable.Unit.Light", "Unit.AutoControlGroup.Ignore", "Unit.Temporary", "Attackable.ArmorType.Light", "Unit.Builder", "Unit.IgnoreAllArmySelect", "Attackable.Biological", ]; this.internalSecondaryTags = []; this.unlockedBy = ["faction/grell/building/bloomwell"]; this.createdBy = ["faction/grell/building/bloomwell"]; this.description = "Can build structures. \nWhen infused, becomes a fast flying scout unit, still capable of building structures. \nCan only build on biomass."; this.creates = [ "faction/grell/building/broodwomb", "faction/grell/building/incubator", "faction/grell/building/elderwomb", "faction/grell/building/young-canopy", "faction/grell/building/synapse-canopy", "faction/grell/building/cultivator", "faction/grell/building/bloomwell", "faction/grell/building/skyclutch", "faction/grell/building/nourishing-pod", ]; this.hp = 20; this.shields = 0; this.armor = 0; this.armorType = "light"; this.speed = 225; this.supply = 0; this.vision = 1400; this.turnSpeed = 3000; } /** The lone exception to the rules: a zero-supply builder that Grell can still infuse. */ override get eligibleForInfusion(): boolean { return this._infused === InfuseState.none; } /** Costs nothing to build, so the formula has nothing to work from. */ override infuseCostOverride = 2; /** Infusion is the only one of the three that can touch a Seedling. */ override eligibleForReanimateOverride = false; override eligibleForReplicateOverride = false; protected override _applyInfusion(value: 0 | 1 | 2): void { if (value !== this._infused) { if (value === InfuseState.none) { const base = new (this.constructor as any)(); this.hp = base.hp; this.speed = base.speed; this.vision = base.vision; this.detectionRadius = base.detectionRadius; this.domain = base.domain; } else { // An infused Seedling gets tougher, quicker, sees further, and takes to the air. this.hp = 75; this.speed = 650; this.vision = 1800; // Detection matches vision, and only an infused Seedling has any. this.detectionRadius = 1800; this.domain = "air"; } this._infused = value; } } } export default Seedling;