ZeroSpace.gg

Dreadnought

Legion Co-Op T3 Army Unit

import { LegionArmyUnit } from "../../../../../defaults/legion.js"; import { Attack, Passive, Spell } from "../../../../../engine/ability.js"; import { Turret } from "../../../../../engine/turret.js"; export class CoopGalavaxDreadnought extends LegionArmyUnit { override uuid: string; static override src = "src/zerospace/coop/commander/galavax/unit/coop-galavax-dreadnought.ts"; override get infuseCost(): number | undefined { return 100; } constructor() { super(); this.uuid = "bee44fa9-c0a0-4e0b-b119-49f7823de074"; this.name = "Dreadnought"; this.description = "Heavy aircraft with installable turrets."; this.tier = "T3"; this.domain = "air"; this.maxTurrets = 2; this.hexiteCost = 150; this.fluxCost = 250; this.buildTime = 45; this.buildCount = 1; this.supply = 15; this.internalId = "Troop_Galavax_Dreadnought_C"; this.internalPath = undefined; this.internalTags = [ "Attackable.Unit.Troop", "Attackable.FlyingUnit", "Attackable.ArmorType.Heavy", "Attackable.Unit.Massive", ]; this.internalSecondaryTags = ["Air"]; this.hp = 839; this.shields = 419; this.armor = 1; this.armorType = "heavy"; this.speed = 600; this.stunResist = 75; this.vision = 1800; this.turnSpeed = 800; this.createdBy = ["coop/commander/galavax/building/coop-galavax-terror-tower"]; this.unlockedBy = ["coop/commander/galavax/building/coop-galavax-terror-tower"]; this.upgradedBy = ["coop/commander/galavax/building/coop-galavax-armory"]; this.constructingVersion = { name: "Dreadnought (Constructing)", hp: 1000, buildTime: 45, uuid: "eacfc8a6-42e4-468c-8eee-966751d8ebc8", }; this.tag("massive"); [1, 2].forEach(i => { this.attacks[`starscourge${i}`] = new Attack({ name: "Starscourge", damage: 10, cooldown: 0.5, range: 1700, targets: ["ground", "air"], parentId: this.id, parentUUID: this.uuid, }); }); this.attacks.antiAirMissileTurretAttack = new Attack({ name: "Anti-Air Missile Turret Attack", damage: 9, cooldown: 2, range: 2000, targets: ["air"], shots: 2, unlocked: false, unlockedBy: ["antiAirMissileTurret"], parentId: this.id, parentUUID: this.uuid, }); this.spells.bombardment = new Spell({ name: "Bombardment", description: "Bombard the area under Dreadnought. Drops 4 bombs on targets (+4 for each bomb bay). Bombs deal 60 damage in a small radius.", cooldown: 1, damage: 60, targets: ["ground"], volleys: 4, parentId: this.id, parentUUID: this.uuid, }); this.passives.sensor = new Passive({ name: "Advanced Sensors", description: "Shows enemies in fog of war. Each Missile Turret increases that range.", unlocked: false, unlockedBy: ["antiAirMissileTurret"], parentId: this.id, parentUUID: this.uuid, }); this.passives.tempestCore = new Passive({ name: "Tempest Core", description: "When a friendly unit dies, lightning strikes a random enemy nearby for 35 damage.", damage: 35, unlocked: false, unlockedBy: ["tempestCore"], parentId: this.id, parentUUID: this.uuid, }); const dreadnought = this; 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: "+4 bombs dropped. +400 shields.", hexiteCost: 125, fluxCost: 125, buildTime: 20, hp: 225, apply() { const bombardment = dreadnought.spells.bombardment; bombardment.volleys = (bombardment.volleys || 4) + 4; dreadnought.shields = (dreadnought.shields || 0) + 400; }, }); this.turrets.gatlingGun = new Turret({ name: "Gatling Gun", description: "Add a Gatling turret. +25% movement speed per turret.", hexiteCost: 125, fluxCost: 125, buildTime: 20, hp: 225, apply() { dreadnought.speed = (dreadnought.speed || 0) * 1.25; }, }); this.turrets.antiAirMissileTurret = new Turret({ internalId: "Legion_DreadnaughtTurretAA_2_C", internalPath: "/Game/Nova/Archetypes_Buildings/Legion_DreadnaughtTurretAA_2.Default__Legion_DreadnaughtTurretAA_2_C", name: "Missile Turret", description: "Add an anti-air missile turret. Passive: Advanced sensors show enemies in fog of war; each turret increases that range.", hexiteCost: 125, fluxCost: 125, buildTime: 20, hp: 225, unlocks: ["antiAirMissileTurretAttack", "sensor"], apply() { dreadnought.attacks.antiAirMissileTurretAttack!.unlocked = true; dreadnought.passives.sensor!.unlocked = true; dreadnought.providesDetection = true; }, }); this.turrets.tempestCore = new Turret({ name: "Tempest Core", description: "When a friendly unit dies, lightning strikes a random enemy nearby for 35 damage.", hexiteCost: 125, fluxCost: 125, buildTime: 20, hp: 225, unlocks: ["tempestCore"], apply() { dreadnought.passives.tempestCore!.unlocked = true; }, }); } } export default CoopGalavaxDreadnought;