@zerospacegg/iolin
Version:
Pure TypeScript implementation of ZeroSpace game data processing (PKL-free)
68 lines • 2.6 kB
JavaScript
"use strict";
/**
* Cultivator - Grell T0 special building
* Bio-symbiotic structure with biomass generation and defensive turret capabilities
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.Cultivator = void 0;
const ability_js_1 = require("../../../../engine/ability.cjs");
const turret_js_1 = require("../../../../engine/turret.cjs");
const grell_js_1 = require("../../../../defaults/grell.cjs");
class Cultivator extends grell_js_1.GrellSpecialBuilding {
constructor() {
super();
this.hexiteCost = 15;
this.fluxCost = 0;
this.buildTime = 8;
this.buildCount = 1;
this.name = "Cultivator";
this.tier = "T0";
this.hotkey = "E";
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 = ["faction/grell/unit/seedling", "faction/grell/unit/grell-harvester"];
this.unlockedBy = ["faction/grell/building/root-colony"];
// Capture cultivator instance for turret apply method
const cultivator = this;
// Defensive attack (unlocked by turret) - triple volley attack
this.attacks.attack = new ability_js_1.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_js_1.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;
},
});
}
}
exports.Cultivator = Cultivator;
// Static property for source path
Cultivator.src = "src/zerospace/faction/grell/building/cultivator.ts";
exports.default = Cultivator;
//# sourceMappingURL=cultivator.js.map