UNPKG

@zerospacegg/iolin

Version:

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

67 lines 2.5 kB
/** * Cultivator - Grell T0 special building * Bio-symbiotic structure with biomass generation and defensive turret capabilities */ import { Attack } from "../../../../engine/ability.js"; import { Turret } from "../../../../engine/turret.js"; import { GrellSpecialBuilding } from "../../grell-classes.js"; import GrellHarvester from "../unit/grell-harvester.js"; import Seedling from "../unit/seedling.js"; import RootColony from "./root-colony.js"; export class Cultivator extends GrellSpecialBuilding { constructor() { super(); this.name = "Cultivator"; this.tier = "T0"; this.hotkey = "E"; this.hexiteCost = 15; this.fluxCost = 0; this.buildTime = 8; this.buildCount = 1; this.maxAddOns = 1; this.providesBiomass = 1500; this.uuid = "6a63e0bb-cf32-4aab-85e8-b21d0567a3a1"; this.hp = 200; this.shields = 0; this.armor = 0; this.armorType = "building"; this.speed = 0; this.createdBy = [Seedling.id, GrellHarvester.id]; this.unlockedBy = [RootColony.id]; // Capture cultivator instance for turret apply method const cultivator = this; // Defensive attack (unlocked by turret) - triple volley attack this.attacks.attack = new Attack({ name: "Attack", damage: 12, volleys: 3, cooldown: 1.8, range: 1500, targets: ["air", "ground"], unlocked: false, parentId: this.id, parentUUID: this.uuid, }); // Defensive turret capability this.turrets.cultivatorAttacker = new Turret({ name: "Cultivator Attacker", description: "increases hp to 400, grants attack ability (detects stealth)", hexiteCost: 150, buildTime: 12, hp: 200, // HP addition amount unlocked: false, apply() { // Add HP boost (+200 HP, making total 400) cultivator.hp = (cultivator.hp || 0) + 200; // Unlock attack ability cultivator.attacks.attack.unlocked = true; // Add stealth detection capability cultivator.providesDetection = true; }, }); } } // Static property for source path Cultivator.src = "src/zerospace/faction/grell/building/cultivator.ts"; export default Cultivator; //# sourceMappingURL=cultivator.js.map