UNPKG

@zerospacegg/iolin

Version:

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

125 lines 4.64 kB
/** * Harbinger - Grell flying artillery unit with bio-chemical warfare capabilities * Heavy armor, acidic attacks, and devastating area-effect eruption ability */ import { GrellArmyUnit } from "../../../../defaults/grell.js"; import { Attack, Spell, Upgrade } from "../../../../engine/ability.js"; export class Harbinger extends GrellArmyUnit { constructor() { super(); this.hexiteCost = 75; this.fluxCost = 50; this.buildTime = 26; this.buildCount = 1; this.name = "Harbinger"; this.tier = "T2"; this.hotkey = "W"; this.uuid = "ea9c4201-f6df-47b8-b54e-732b03a5daab"; // Internal game engine data this.internalId = "Troop_GrellHarbinger_C"; this.internalPath = "/Game/Nova/Archetypes_Troops/Troop_GrellHarbinger.Default__Troop_GrellHarbinger_C"; this.internalTags = [ "Attackable.Unit.Troop", "Attackable.Unit.Light", "Attackable.ArmorType.Heavy", "Attackable.Biological", ]; this.internalSecondaryTags = []; this.unlockedBy = ["faction/grell/building/medium-incubator"]; this.createdBy = ["faction/grell/building/medium-incubator"]; this.upgradedBy = ["faction/grell/building/advanced-augmentation-pool"]; this.hp = 400; this.shields = 0; this.armor = 1; this.armorType = "heavy"; this.speed = 475; this.supply = 4; this.turnSpeed = 4000; this.healthRegen = 9; Object.assign(this, { domain: "air" }); this.description = "Durable ranged unit with an area damage ability. Attacks ground and air units."; const harbinger = this; this.attacks.acidicSpit = new Attack({ name: "Acidic Spit", damage: 27, range: 500, cooldown: 2, cooldownBetweenShots: 2, armorPenetration: 0, delay: 0.17, targets: ["ground", "air"], bonusDamage: [{ multiplier: 1.5, vs: ["armor:heavy"] }], parentId: this.id, parentUUID: this.uuid, }); this.spells.eruption = new Spell({ name: "Eruption", description: "Deals 150 damage to units in the target area after 1.5 seconds. Heals 25% per unit.", targets: ["air", "ground"], energyCost: 100, energyType: "health", delay: 1.5, range: 1500, hotkey: "E", damage: 150, splash: { range: 100, multiplier: 1.0, }, parentId: this.id, parentUUID: this.uuid, }); this.upgrades.harbingerArmor = new Upgrade({ name: "Harbinger Armor", description: "+2 armor", tier: "T2.5", fluxCost: 150, researchTime: 50, apply() { harbinger.armor = (harbinger.armor ?? 0) + 1; // 1 + 1 = 2 }, parentId: this.id, parentUUID: this.uuid, }); this.upgrades.harbingerSpeed = new Upgrade({ name: "Harbinger Speed", description: "+200 move speed", tier: "T2.5", fluxCost: 150, researchTime: 50, apply() { harbinger.speed = (harbinger.speed ?? 0) + 100; // 575 + 100 = 675 }, parentId: this.id, parentUUID: this.uuid, }); this.upgrades.eruptionRadius = new Upgrade({ name: "Eruption Radius", description: "Increases the radius of eruption by 50%", tier: "T3.5", fluxCost: 150, researchTime: 60, apply() { harbinger.spells.eruption.range = (harbinger.spells.eruption.range ?? 0) * 1.5; // 1500 * 1.5 = 2250 }, parentId: this.id, parentUUID: this.uuid, }); this.upgrades.eruptionCost = new Upgrade({ name: "Eruption Cost", description: "Reduces Eruption HP Cost by 60", tier: "T3.5", fluxCost: 200, researchTime: 60, apply() { harbinger.spells.eruption.energyCost = (harbinger.spells.eruption.energyCost ?? 0) - 60; // 100 - 60 = 40 }, parentId: this.id, parentUUID: this.uuid, }); } } // Static property for source path Harbinger.src = "src/zerospace/faction/grell/unit/harbinger.ts"; export default Harbinger; //# sourceMappingURL=harbinger.js.map