ZeroSpace.gg

Seedling

Grell Co-Op T0 Builder Unit

import { GrellBuilderUnit } from "../../../../../defaults/grell.js"; import { InfuseState } from "../../../../../engine/unit.js"; export class CoopSeedling extends GrellBuilderUnit { override uuid: string; static override src = "src/zerospace/coop/commander/vynthra/unit/coop-vynthra-seedling.ts"; override get variantOf(): string { return "faction/grell/unit/seedling"; } 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 = "595ac040-798b-450d-a010-a50ecb6fc03c"; 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 = ["coop/commander/vynthra/building/coop-vynthra-bloomwell"]; this.createdBy = ["coop/commander/vynthra/building/coop-vynthra-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 = [ "coop/commander/vynthra/building/coop-vynthra-broodwomb", "coop/commander/vynthra/building/coop-vynthra-incubator", "coop/commander/vynthra/building/coop-vynthra-elderwomb", "coop/commander/vynthra/building/coop-vynthra-young-canopy", "coop/commander/vynthra/building/coop-vynthra-synapse-canopy", "coop/commander/vynthra/building/coop-vynthra-cultivator", "coop/commander/vynthra/building/coop-vynthra-bloomwell", "faction/grell/building/skyclutch", "coop/commander/vynthra/building/coop-vynthra-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; this.internalId = undefined; this.internalPath = undefined; this.setVariantUUID("coop-vynthra"); this.unlockedBy = ["coop/commander/vynthra/building/coop-vynthra-bloomwell"]; this.createdBy = ["coop/commander/vynthra/building/coop-vynthra-bloomwell"]; this.creates = [ "coop/commander/vynthra/building/coop-vynthra-broodwomb", "coop/commander/vynthra/building/coop-vynthra-incubator", "coop/commander/vynthra/building/coop-vynthra-elderwomb", "coop/commander/vynthra/building/coop-vynthra-young-canopy", "coop/commander/vynthra/building/coop-vynthra-synapse-canopy", "coop/commander/vynthra/building/coop-vynthra-cultivator", "coop/commander/vynthra/building/coop-vynthra-bloomwell", "coop/commander/vynthra/building/coop-vynthra-nourishing-pod", "coop/commander/vynthra/building/coop-vynthra-feeding-vine", ]; } /** 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 CoopSeedling;