@zerospacegg/iolin
Version:
Pure TypeScript implementation of ZeroSpace game data processing (PKL-free)
130 lines • 5.15 kB
JavaScript
"use strict";
/**
* Stinger - A fast small melee unit. Attacks deal additional damage over time. Attacks ground units.
* Light armor, high speed, vicious claw attacks with upgrade potential
*/
Object.defineProperty(exports, "__esModule", { value: true });
const grell_js_1 = require("../../../../defaults/grell.cjs");
const ability_js_1 = require("../../../../engine/ability.cjs");
class Stinger extends grell_js_1.GrellArmyUnit {
constructor() {
super();
// Auto-generated fixes from dev data comparison
this.hexiteCost = 25;
this.fluxCost = 0;
this.buildTime = 8;
this.name = "Stinger";
this.tier = "T1";
this.hotkey = "Q";
this.uuid = "234bc62d-ee5e-4033-ab5c-73abd6ae9947";
// Internal game engine data
this.internalId = "Troop_Grell_Stinger_C";
this.internalPath = "/Game/Nova/Archetypes_Troops/Troop_Grell_Stinger.Default__Troop_Grell_Stinger_C";
this.internalTags = [
"Attackable.Unit.Troop",
"Attackable.Unit.Light",
"Attackable.ArmorType.Light",
"Attackable.Biological",
];
this.internalSecondaryTags = [];
// Mutable properties (can be modified by upgrades)
this.hp = 90;
this.shields = 0;
this.armor = 0;
this.armorType = "light";
this.speed = 700;
this.supply = 1;
this.turnSpeed = 5000;
this.description = "A fast small melee unit. Attacks deal additional damage over time. Attacks ground units.";
this.createdBy = ["faction/grell/building/incubator"];
this.unlockedBy = ["faction/grell/building/incubator"];
this.upgradedBy = ["faction/grell/building/augmentation-pool"];
// Capture stinger instance for upgrade apply methods
const stinger = this;
// Primary attack - Claws
this.attacks.claws = new ability_js_1.Attack({
name: "Claws",
damage: 6,
range: 100,
cooldown: 0.65,
cooldownBetweenShots: 0.65,
delay: 0.06,
targets: ["ground"],
armorPenetration: 0,
parentId: this.id,
parentUUID: this.uuid,
});
// Stealth passive (unlocked by Raptor upgrade)
this.passives.stealth = new ability_js_1.Passive({
name: "Stealth",
description: "On friendly biomass gain stealth and +50% attack speed",
unlocked: false,
parentId: this.id,
parentUUID: this.uuid,
});
// Poison passive (unlocked by Poison Sting upgrade)
this.passives.poison = new ability_js_1.Passive({
name: "Poison",
description: "Attacks deal 6 dps and slows move speed by 25%. Lasts for 5 seconds.",
unlocked: false,
parentId: this.id,
parentUUID: this.uuid,
});
// Biomass healing passive inherited automatically from GrellArmyUnit
// Upgrades
this.upgrades.fastLegs = new ability_js_1.Upgrade({
name: "Fast Legs",
description: "Increase Stinger movement speed by 30%",
tier: "T1.5",
fluxCost: 70,
researchTime: 40,
apply: () => {
stinger.speed = (stinger.speed || 0) * 1.3; // 700 * 1.3 = 910
},
parentId: this.id,
parentUUID: this.uuid,
});
this.upgrades.poisonSting = new ability_js_1.Upgrade({
name: "Poison Sting",
description: "Attacks deal 6 dps and slows move speed by 25%. Lasts for 5 seconds.",
tier: "T3.5",
fluxCost: 125,
researchTime: 60,
apply: () => {
stinger.passives.poison.unlocked = true;
},
parentId: this.id,
parentUUID: this.uuid,
});
this.upgrades.raptor = new ability_js_1.Upgrade({
name: "Raptor",
description: "On friendly biomass gain stealth and +50% attack speed",
tier: "T2.5",
fluxCost: 100,
researchTime: 45,
apply: () => {
stinger.passives.stealth.unlocked = true;
// Note: +50% attack speed boost applies conditionally on friendly biomass gain
},
parentId: this.id,
parentUUID: this.uuid,
});
this.upgrades.cliffJumping = new ability_js_1.Upgrade({
name: "Cliff Jumping",
description: "Stingers can jump up and down normal cliffs. +20% movement speed.",
tier: "T2.5",
fluxCost: 100,
researchTime: 45,
apply: () => {
stinger.speed = (stinger.speed || 0) * 1.2; // +20% movement speed
stinger._addTags("jump:up", "jump:down");
},
parentId: this.id,
parentUUID: this.uuid,
});
}
}
// Static property for source path
Stinger.src = "src/zerospace/faction/grell/unit/stinger.ts";
exports.default = Stinger;
//# sourceMappingURL=stinger.js.map