UNPKG

@zerospacegg/iolin

Version:

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

123 lines 4.71 kB
/** * Commando - Protectorate light infantry unit * Fast-moving elite soldier with jetpack mobility and precision weaponry */ import { ProtectorateArmyUnit } from "../../../../defaults/protectorate.js"; import { Attack, Spell, Upgrade } from "../../../../engine/ability.js"; export class Commando extends ProtectorateArmyUnit { // Readonly properties at class level get infuseCost() { return 3; } constructor() { super(); // Auto-generated fixes from dev data comparison this.hexiteCost = 50; this.fluxCost = 0; this.buildTime = 18; this.name = "Commando"; this.tier = "T1"; this.supply = 2; this.uuid = "38c2cfa9-c894-47b9-a2c0-7715de8ed15c"; // Internal game engine data this.internalId = "Troop_Prot_Commando_C"; this.internalPath = "/Game/Nova/Archetypes_Troops/Troop_Prot_Commando.Default__Troop_Prot_Commando_C"; this.internalTags = [ "Attackable.Unit.Troop", "Attackable.Unit.Light", "Attackable.ArmorType.Light", "Attackable.Biological", ]; this.internalSecondaryTags = ["Infantry"]; // Mutable properties in constructor this.hp = 140; this.armor = 0; this.armorType = "light"; this.speed = 550; this.turnSpeed = 5000; this.description = "Light ranged infantry equipped with jump jets. Attacks ground and air units."; // Combat abilities this.attacks.s10CombatRifle = new Attack({ name: "S-10 Combat Rifle", damage: 8, cooldown: 0.84, cooldownBetweenShots: 0.84, armorPenetration: 0, delay: 0.01, range: 800, targets: ["ground", "air"], parentId: this.id, parentUUID: this.uuid, }); this.spells.jetpack = new Spell({ name: "Jetpack", hotkey: "D", cooldown: 18, description: "jumps to the target point, bypassing any terrain. Jump speed: 1000", parentId: this.id, parentUUID: this.uuid, }); // Upgrades this.upgrades.highPoweredJetpacks = new Upgrade({ name: "High Powered Jetpacks", description: "+5 jump range, jetpack cooldown reduced from 18 to 12 seconds", tier: "T1", fluxCost: 75, researchTime: 30, parentId: this.id, parentUUID: this.uuid, }); this.upgrades.commandoSpeed = new Upgrade({ name: "Commando Speed", description: "Increases move speed by +100", tier: "T1.5", fluxCost: 100, researchTime: 45, parentId: this.id, parentUUID: this.uuid, }); // Capture instance for upgrade apply methods const commando = this; this.upgrades.improvedRifles = new Upgrade({ name: "Improved Rifles", description: "Increases range from 7 to 11 (+400 total range)", tier: "T1.5", fluxCost: 100, researchTime: 45, apply: () => { if (commando.attacks.attack && commando.attacks.attack.range) { commando.attacks.attack.range = 1100; // 700 + 400 = 1100 } }, parentId: this.id, parentUUID: this.uuid, }); this.upgrades.shreddingRounds = new Upgrade({ name: "Shredding Rounds", description: "Each hit causes target to take 2% more damage for 8s", tier: "T2.5", fluxCost: 150, researchTime: 60, parentId: this.id, parentUUID: this.uuid, }); this.upgrades.eagleSense = new Upgrade({ name: "Eagle Sense", description: "Gains +75% attack speed and +25% move speed for 4 seconds after jetpack finishes", tier: "T2.5", fluxCost: 150, researchTime: 60, parentId: this.id, parentUUID: this.uuid, }); // Entity relationships using static ID references this.createdBy = ["faction/protectorate/building/prot-barracks"]; this.upgradedBy = ["faction/protectorate/building/research-lab"]; this.unlockedBy = ["faction/protectorate/building/prot-barracks"]; // Tags for identification and targeting - none needed for Commando // Lore with beautiful formatting } } Commando.src = "src/zerospace/faction/protectorate/unit/commando.ts"; export default Commando; //# sourceMappingURL=commando.js.map