@zerospacegg/iolin
Version:
Pure TypeScript implementation of ZeroSpace game data processing (PKL-free)
98 lines • 3.88 kB
JavaScript
"use strict";
/**
* Thrall - Legion's basic infantry unit with battle frenzy capabilities
* Religious warriors enhanced by divine blessing and upgrade potential
*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Thrall = void 0;
const ability_js_1 = require("../../../../engine/ability.cjs");
const legion_classes_js_1 = require("../../legion-classes.cjs");
const citadel_js_1 = __importDefault(require("../building/citadel.cjs"));
const legion_barracks_js_1 = __importDefault(require("../building/legion-barracks.cjs"));
class Thrall extends legion_classes_js_1.LegionArmyUnit {
constructor() {
super();
this.name = "Thrall";
this.tier = "T1";
this.hexiteCost = 50;
this.fluxCost = 0;
this.buildTime = 18;
this.buildCount = 3;
this.uuid = "36ebdf54-30ef-4672-8cf2-69b099129c6d";
// Mutable properties - basic infantry enhanced by religious fervor
this.supply = 1;
this.hp = 75;
this.shields = 0;
this.armor = 0;
this.armorType = "light";
this.speed = 525; // Enhanced by divine blessing
this.hotkey = "Q";
// Relationships - created by Legion Barracks
this.createdBy = [legion_barracks_js_1.default.id];
this.unlockedBy = [legion_barracks_js_1.default.id];
this.upgradedBy = [citadel_js_1.default.id];
this.description = "Light ranged infantry. Attacks ground and air units.";
// Tags for identification and targeting
this.tag("legion:thrall");
// Versatile attack system
this.attacks.attack = new ability_js_1.Attack({
name: "Attack",
damage: 7,
cooldown: 1.5,
range: 750,
targets: ["air", "ground"],
parentId: this.id,
parentUUID: this.uuid,
});
// Capture instance for upgrade apply methods
const unit = this;
// Battle Frenzy upgrade - stacking attack speed bonus
this.upgrades.battleFrenzy = new ability_js_1.Upgrade({
name: "Battle Frenzy",
description: "Each hit increases attack speed (+15% up to 75%)",
tier: "T1.5",
fluxCost: 100,
researchTime: 40,
apply() {
// Implementation handled by game engine for stacking bonuses
},
parentId: this.id,
parentUUID: this.uuid,
});
// Charged Shot upgrade - periodic damage bonus
this.upgrades.chargedShot = new ability_js_1.Upgrade({
name: "Charged Shot",
description: "Attacks twice every 10 seconds instead of double damage",
tier: "T1.5",
fluxCost: 100,
researchTime: 40,
apply() {
// Implementation handled by game engine for charged attack timing
},
parentId: this.id,
parentUUID: this.uuid,
});
// Performance Enhancers upgrade - speed bonuses
this.upgrades.performanceEnhancers = new ability_js_1.Upgrade({
name: "Performance Enhancers",
description: "+15% attack and move speed",
tier: "T2.5",
fluxCost: 150,
researchTime: 50,
apply() {
unit.speed = (unit.speed || 0) * 1.15;
unit.attacks.attack.cooldown = (unit.attacks.attack.cooldown || 0) * 0.85;
},
parentId: this.id,
parentUUID: this.uuid,
});
}
}
exports.Thrall = Thrall;
// Static property for source path
Thrall.src = "src/zerospace/faction/legion/unit/thrall.ts";
exports.default = Thrall;
//# sourceMappingURL=thrall.js.map