UNPKG

@zerospacegg/iolin

Version:

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

197 lines 8.19 kB
/** * Dreadnought - Legion's ultimate flying fortress * Flying cathedral with teleportation, bombardment, and modular add-on systems */ import { LegionArmyUnit } from "../../../../defaults/legion.js"; import { Attack, Passive, Spell } from "../../../../engine/ability.js"; import { Turret } from "../../../../engine/turret.js"; export class Dreadnought extends LegionArmyUnit { // Readonly properties (never change after creation) get infuseCost() { return 100; } constructor() { super(); // Auto-generated fixes from dev data comparison this.hexiteCost = 150; this.fluxCost = 250; this.buildTime = 30; this.buildCount = 1; this.name = "Dreadnought"; this.tier = "T3"; this.domain = "air"; this.maxAddOns = 2; this.uuid = "7ecb8b22-f467-40b0-b12d-2869bdf7090c"; this.internalId = "Troop_Leg_Dreadnaught_C"; this.internalPath = "/Game/Nova/Archetypes_Troops/Troop_Leg_Dreadnaught.Default__Troop_Leg_Dreadnaught_C"; this.internalTags = [ "Attackable.Unit.Troop", "Attackable.FlyingUnit", "Attackable.ArmorType.Heavy", "Attackable.Unit.Massive", ]; this.internalSecondaryTags = ["Air"]; this.description = "Heavy aircraft with installable turrets."; // Mutable properties - ultimate flying fortress this.supply = 15; // Massive unit consumes huge supply this.hp = 800; // Flying cathedral durability this.shields = 0; this.armor = 1; this.armorType = "heavy"; this.speed = 500; this.stunResist = 75; // Divine protection against disruption this.vision = 1800; this.turnSpeed = 800; // Relationships - created by build drone, unlocked by terror tower this.createdBy = ["faction/legion/unit/legion-build-drone"]; this.unlockedBy = ["faction/legion/building/terror-tower"]; // Tags for identification and targeting this.tag("massive"); // Rapid-fire beam weapon system this.attacks.mainBeamWeapon = new Attack({ name: "Main Beam Weapon", damage: 9, cooldown: 0.5, cooldownBetweenShots: 0, armorPenetration: 100, delay: 0.1, range: 1100, targets: ["air", "ground"], parentId: this.id, parentUUID: this.uuid, }); // Turret attack system this.attacks.turretAttack = new Attack({ name: "Turret Attack", damage: 9, cooldown: 2, range: 2000, targets: ["air", "ground"], volleys: 2, bonusDamage: [{ multiplier: 3, vs: ["flyer"] }], unlocked: false, unlockedBy: ["antiAirTurret"], parentId: this.id, parentUUID: this.uuid, }); // Devastating bombardment spell this.spells.bombardmentRun = new Spell({ name: "Bombardment Run", description: "Devastating bombardment run targeting ground units", cooldown: 1.0, damage: 60, targets: ["ground"], volleys: 4, unlocked: false, unlockedBy: ["bombBay"], parentId: this.id, parentUUID: this.uuid, }); // Divine teleportation ability this.spells.teleport = new Spell({ name: "Teleport", description: "Divine teleportation ability", cooldown: 0, targets: [], unlocked: false, unlockedBy: ["commandModule"], parentId: this.id, parentUUID: this.uuid, }); // Sensor detection system this.passives.sensor = new Passive({ name: "Sensor", description: "Advanced sensor detection system", unlocked: false, unlockedBy: ["commandModule"], parentId: this.id, parentUUID: this.uuid, }); // Turret System Implementation const dreadnought = this; // Bomb Bay - Adds bombs to Bombardment Run this.turrets.bombBay = new Turret({ internalId: "Legion_Dreadnaught_BombBay2_C", internalPath: "/Game/Nova/Archetypes_Buildings/Legion_Dreadnaught_BombBay2.Default__Legion_Dreadnaught_BombBay2_C", name: "Bomb Bay", description: "Each Bomb Bay adds 3 bombs to Dreadnought's Bombardment Run spell. Total bomb damage 267/534/801/1068/1335 for 0/1/2/3/4.", hexiteCost: 100, fluxCost: 100, buildTime: 20, hp: 225, unlocked: false, unlocks: ["bombardmentRun"], apply() { // Enhance Bombardment Run with additional bombs const bombardment = dreadnought.spells.bombardmentRun; bombardment.damage = (bombardment.damage || 0) + 45; bombardment.volleys = (bombardment.volleys || 4) + 3; bombardment.unlocked = true; }, }); // Command Module - Unlocks Teleport and Sensor abilities this.turrets.commandModule = new Turret({ internalId: "Legion_Dreadnought_CommandModule_C", internalPath: "/Game/Nova/Archetypes_Buildings/Legion_Dreadnought_CommandModule.Default__Legion_Dreadnought_CommandModule_C", name: "Command Module", description: "Unlocks Dreadnought's Teleport spell and Sensor passive. Both abilities have a base 4000 range, and each Command Module adds +1000 range. 5000/6000/7000/8000 for 1/2/3/4.", hexiteCost: 100, fluxCost: 100, buildTime: 20, hp: 225, unlocked: false, unlocks: ["teleport", "sensor"], apply() { // Unlock Teleport and Sensor abilities dreadnought.spells.teleport.unlocked = true; dreadnought.passives.sensor.unlocked = true; // Add stealth detection capability dreadnought.providesDetection = true; // Add range enhancement (base 4000 + 1000 per turret) if (!dreadnought.spells.teleport.range) { dreadnought.spells.teleport.range = 5000; } else { dreadnought.spells.teleport.range += 1000; } }, }); // Shield Generator - Adds shield capacity this.turrets.shieldGenerator = new Turret({ internalId: "Legion_TerrorTankShieldGenerator_C", internalPath: "/Game/Nova/Archetypes_Buildings/Legion_TerrorTankShieldGenerator.Default__Legion_TerrorTankShieldGenerator_C", name: "Shield Generator", description: "Dreadnought shield generator adds +100 shields", hexiteCost: 100, fluxCost: 100, buildTime: 20, hp: 225, unlocked: false, apply() { // Add shield capacity dreadnought.shields = (dreadnought.shields || 0) + 100; }, }); // Anti-Air Turret - Adds anti-air attack capability this.turrets.antiAirTurret = new Turret({ internalId: "Legion_DreadnaughtTurretAA_2_C", internalPath: "/Game/Nova/Archetypes_Buildings/Legion_DreadnaughtTurretAA_2.Default__Legion_DreadnaughtTurretAA_2_C", name: "Anti-Air Turret", description: "Attacks ground and air but does 3x damage to air targets", hexiteCost: 100, fluxCost: 100, buildTime: 20, hp: 225, unlocked: false, unlocks: ["turretAttack"], apply() { // Unlock turret attack ability dreadnought.attacks.turretAttack.unlocked = true; }, }); } } // Static property for source path Dreadnought.src = "src/zerospace/faction/legion/unit/dreadnought.ts"; export default Dreadnought; //# sourceMappingURL=dreadnought.js.map