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 = 1;
this.supply = 3;
this.createdBy = ["faction/grell/building/broodwomb"];
this.unlockedBy = ["faction/grell/building/young-canopy"];
this.upgradedBy = ["faction/grell/building/young-canopy"];
const unit = this;
this.attacks.savageMaw = new Attack({
internalId: "Default__Weapon_Grell_Beetle_C",
name: "Savage Maw",
damage: 32,
cooldown: 1.78,
armorPenetration: 0,
delay: 0.25,
range: 275,
targets: ["ground"],
splash: { multiplier: 1, 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",
unlockedBy: ["faction/grell/building/young-canopy"],
description: "+50% splash radius",
tier: "T1",
position: "A",
fluxCost: 100,
researchTime: 45,
apply() {
unit.attacks.savageMaw!.splash!.range = 187.5;
},
parentId: this.id,
parentUUID: this.uuid,
});
this.upgrades.tunnel = new Upgrade({
name: "Tunnel",
unlockedBy: ["faction/grell/building/young-canopy"],
description: "Tunnel to a target location",
tier: "T1",
position: "B",
fluxCost: 100,
researchTime: 45,
apply() {
unit.spells.tunnel!.unlocked = true;
},
parentId: this.id,
parentUUID: this.uuid,
});
this.upgrades.endorphicFrenzy = new Upgrade({
name: "Endorphic Frenzy",
unlockedBy: ["faction/grell/building/synapse-canopy"],
description: `${this.name}s gain 20% attack speed for every 10% of missing health`,
tier: "T2",
position: "A",
fluxCost: 125,
researchTime: 60,
apply() {
unit.attacks.savageMaw!.splash!.range = 187.5;
},
parentId: this.id,
parentUUID: this.uuid,
});
}
}
export default Mandragora;