UNPKG

@zerospacegg/iolin

Version:

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

104 lines 3.97 kB
/** * Skrelling - Grell swarm flyer with anti-air specialization and kamikaze abilities * Light armor, high speed, anti-air focus with suicide attack potential */ import { GrellArmyUnit } from "../../../../defaults/grell.js"; import { Attack, Passive, Upgrade } from "../../../../engine/ability.js"; export class Skrelling extends GrellArmyUnit { // Static properties for ID references constructor() { super(); this.hexiteCost = 50; this.fluxCost = 100; this.buildTime = 16; this.buildCount = 4; this.name = "Skrelling"; this.tier = "T2.5"; this.hotkey = "T"; this.uuid = "06475a6d-672c-4d64-a876-c22686ea3535"; // Internal game engine data this.internalId = "Troop_GrellSkrelling_C"; this.internalPath = "/Game/Nova/Archetypes_Troops/Troop_GrellSkrelling.Default__Troop_GrellSkrelling_C"; this.internalTags = [ "Attackable.Unit.Troop", "Attackable.FlyingUnit", "Attackable.ArmorType.Light", "Attackable.Unit.Light", "Attackable.Biological", ]; this.internalSecondaryTags = ["Air"]; this.unlockedBy = ["faction/grell/building/skrelling-nest"]; this.createdBy = ["faction/grell/building/incubator"]; this.upgradedBy = ["faction/grell/building/skrelling-nest"]; // Capture instance for upgrade apply methods const unit = this; this.hp = 60; this.shields = 0; this.armor = 0; this.armorType = "light"; this.speed = 950; this.supply = 1; this.vision = 1400; this.turnSpeed = 5000; this.description = "Light skirmish flier which poisons enemies on attack. Attacks ground units."; // domain = "air" is readonly, use Object.assign Object.assign(this, { domain: "air" }); this.attacks.attack = new Attack({ name: "Attack", damage: 5, range: 200, cooldown: 1, cooldownBetweenShots: 0, targets: ["air", "ground"], bonusDamage: [ { multiplier: 1.5, vs: ["flyer"] }, { multiplier: 1.5, vs: ["unit:harvester"] }, ], armorPenetration: 0, delay: 0, parentId: this.id, parentUUID: this.uuid, }); this.passives.suicide = new Passive({ name: "Suicide", description: "Suicide itself on enemy air units dealing 200 damage +50 damage to nearby units (25% splash)", hotkey: "K", damage: 200, targets: ["air"], splash: { multiplier: 0.25, range: 125 }, unlocked: false, parentId: this.id, parentUUID: this.uuid, }); this.upgrades.airBonus = new Upgrade({ name: "Air Bonus", description: "Increase bonus damage vs air by 100%", tier: "T2.5", fluxCost: 100, researchTime: 50, apply() { if (unit.attacks.attack.bonusDamage && unit.attacks.attack.bonusDamage[0]) { unit.attacks.attack.bonusDamage[0].multiplier = 3.0; } }, parentId: this.id, parentUUID: this.uuid, }); this.upgrades.suicide = new Upgrade({ name: "Suicide", description: "Suicide itself on enemy air units dealing 200 damage +50 damage to nearby units (25% splash)", tier: "T3.5", fluxCost: 100, researchTime: 50, apply() { unit.passives.suicide.unlocked = true; }, parentId: this.id, parentUUID: this.uuid, }); } } // Static property for source path Skrelling.src = "src/zerospace/faction/grell/unit/skrelling.ts"; export default Skrelling; //# sourceMappingURL=skrelling.js.map