ZSGG Public Library
Mandragora
Grell T1.5 Army Unit
import { GrellArmyUnit } from "../../../../defaults/grell.js";
import { Attack, Spell, Upgrade } from "../../../../engine/ability.js";
class Mandragora extends GrellArmyUnit {
override uuid: string;
static override src = "src/zerospace/faction/grell/unit/mandragora.ts";
constructor() {
super();
this.hexiteCost = 100;
this.fluxCost = 25;
this.buildTime = 35;
this.buildCount = 1;
this.name = "Mandragora";
this.description = "Short ranged tanky unit that deals area damage.";
this.tier = "T1.5";
this.hotkey = "";
this.uuid = "9e8afeef-ffcd-496e-af8b-155219ef61c0";
this.internalId = "Troop_Grell_ManEater_C";
this.internalPath = "/Game/Nova/Archetypes_Troops/Troop_Grell_ManEater.Default__Troop_Grell_ManEater_C";
this.internalTags = [
"Attackable.Unit.Troop",
"Attackable.Unit.Light",
"Attackable.ArmorType.Medium",
"Attackable.Biological",
];
this.internalSecondaryTags = [];
this.hp = 350;
this.shields = 0;
this.armor = 0;
this.armorType = "medium";
this.speed = 550;
this.turnSpeed = 3000;
this.vision = 1600;
this.pushability = 0;
this.supply = 3;
this.createdBy = ["faction/grell/building/broodwomb"];
this.unlockedBy = ["faction/grell/building/young-canopy"];
this.upgradedBy = ["faction/grell/building/macrogenesis-canopy"];
const unit = this;
this.attacks.deadlyJaws = new Attack({
name: "Deadly Jaws",
damage: 32,
cooldown: 1.78,
armorPenetration: 0,
delay: 0.25,
range: 400,
targets: ["ground"],
splash: { multiplier: 2.0, range: 125 },
parentId: this.id,
parentUUID: this.uuid,
});
this.spells.tunnel = new Spell({
name: "Tunnel",
description: "Tunnel to target location",
hotkey: "T",
cooldown: 20,
unlocked: false,
parentId: this.id,
parentUUID: this.uuid,
});
this.upgrades.wideMandibles = new Upgrade({
name: "Wide Mandibles",
description: "+50% splash radius",
tier: "T2.5",
fluxCost: 100,
researchTime: 45,
apply() {
unit.attacks.deadlyJaws!.splash!.range = 187.5;
},
parentId: this.id,
parentUUID: this.uuid,
});
this.upgrades.tunnel = new Upgrade({
name: "Tunnel",
description: `Grants ${this.name} the ability to tunnel to a target point`,
tier: "T2.5",
fluxCost: 100,
researchTime: 45,
apply() {
unit.spells.tunnel!.unlocked = true;
},
parentId: this.id,
parentUUID: this.uuid,
});
this.upgrades.endorphicFrenzy = new Upgrade({
name: "Endorphic Frenzy",
description: `${this.name} gains 20% attack speed for every 10% of missing health`,
tier: "T3.5",
fluxCost: 125,
researchTime: 60,
apply() {
unit.attacks.deadlyJaws!.splash!.range = 187.5;
},
parentId: this.id,
parentUUID: this.uuid,
});
}
}
export default Mandragora;