@zerospacegg/iolin
Version:
Pure TypeScript implementation of ZeroSpace game data processing (PKL-free)
74 lines • 2.96 kB
JavaScript
"use strict";
/**
* Cultivator - Grell T0 special building
* Bio-symbiotic structure with biomass generation and defensive turret capabilities
*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
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_classes_js_1 = require("../../grell-classes.cjs");
const grell_harvester_js_1 = __importDefault(require("../unit/grell-harvester.cjs"));
const seedling_js_1 = __importDefault(require("../unit/seedling.cjs"));
const root_colony_js_1 = __importDefault(require("./root-colony.cjs"));
class Cultivator extends grell_classes_js_1.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_js_1.default.id, grell_harvester_js_1.default.id];
this.unlockedBy = [root_colony_js_1.default.id];
// 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