@zerospacegg/iolin
Version:
Pure TypeScript implementation of ZeroSpace game data processing (PKL-free)
169 lines • 7.49 kB
JavaScript
/**
* Protectorate Main Faction
* Technological human faction focused on engineering excellence and adaptive warfare
*
* Faction structure:
* - Advanced technological superiority through superior planning
* - Modular design and systematic coordination
* - Scientific methodology and continuous innovation
* - Adaptive engineering and tactical flexibility
* - Combined arms warfare and force multiplication
*/
import { MainFaction } from "../../engine/faction.js";
// Import all Protectorate entities
import { ProtectorateTalent, ProtectorateTopbar } from "../../defaults/protectorate.js";
// Restored imports for entity registration
/**
* Protectorate Faction Entity - Modern Class Architecture
*/
class ProtectorateFactionEntity extends MainFaction {
// Readonly properties at class level
constructor() {
super();
this.name = "Protectorate";
this.uuid = "91c4e008-9cef-40b5-aeea-cf74df4838f3";
// Set faction properties
this.faction = "protectorate";
this.factionName = "Protectorate";
// Faction lore
// Faction settings
this.mercHeroesAllowed = true;
this.description = `Technological human faction focused on engineering excellence, adaptive warfare, and systematic coordination. The Protectorate excels at combined arms tactics with modular systems, multi-role units, and progressive research trees. Their superior planning, technological innovation, and force multiplication through advanced engineering ensure human survival and dominance through methodical application of technological superiority.`;
// Add all buildings
this.buildings = [
"faction/protectorate/building/operating-tower",
"faction/protectorate/building/factory",
"faction/protectorate/building/advanced-factory",
"faction/protectorate/building/prot-barracks",
"faction/protectorate/building/research-lab",
"faction/protectorate/building/mechanical-research-lab",
"faction/protectorate/building/supply-platform",
"faction/protectorate/building/airstrip",
"faction/protectorate/building/starport",
"faction/protectorate/building/light-turret",
"faction/protectorate/building/prot-extractor",
"faction/protectorate/building/specialized-research-lab",
];
// Add all units
this.units = [
"faction/protectorate/unit/prot-build-drone",
"faction/protectorate/unit/prot-harvester",
"faction/protectorate/unit/prot-scout-drone",
"faction/protectorate/unit/commando",
"faction/protectorate/unit/bastion",
"faction/protectorate/unit/predator",
"faction/protectorate/unit/ironwing",
"faction/protectorate/unit/hellfire",
"faction/protectorate/unit/titan",
"faction/protectorate/unit/cyclops",
"faction/protectorate/unit/juggernaut",
"faction/protectorate/strider",
"faction/protectorate/unit/griffin",
"faction/protectorate/unit/hammerhead",
"faction/protectorate/unit/sol-invictus",
];
// Add heroes
this.heroes = [
"faction/protectorate/hero/prefect-aster",
"faction/protectorate/hero/tech-hero",
"faction/protectorate/hero/mera",
];
// Add commanders
this.commanders = ["coop/commander/mera-commander"];
// Set Protectorate-specific topbars
this.topbars.beamUp = new ProtectorateTopbar({
name: "Beam Up",
topbarType: "recall",
slot: 1,
description: "Teleports selected units back to base. Energy cost calculated per unit, making it much more expensive than other factions",
hotkey: "Q",
});
this.topbars.protectiveShield = new ProtectorateTopbar({
name: "Protective Shield",
topbarType: "special",
slot: 2,
description: "Grants shield equal to 30% max HP + 50. Increases current and maximum veterancy by 1",
hotkey: "W",
energyCost: 25,
cooldown: 45,
});
this.topbars.airstrike = new ProtectorateTopbar({
name: "Airstrike",
topbarType: "ultimate",
slot: 3,
description: "Devastating airstrike attack",
hotkey: "E",
energyCost: 75,
cooldown: 120,
});
this.topbars.weaponX = new ProtectorateTopbar({
name: "Weapon X",
topbarType: "ultimate",
slot: 4,
description: "Experimental weapon deployment",
hotkey: "R",
energyCost: 100,
cooldown: 180,
});
// Set Protectorate-specific talents
this.talents.improvedBeamUp = new ProtectorateTalent({
name: "Improved Beam Up",
level: 1,
description: "Beam Up has reduced cooldown and energy cost",
});
this.talents.improvedVeterancy = new ProtectorateTalent({
name: "Improved Veterancy",
level: 1,
description: "Units gain experience faster and veterancy bonuses are increased",
});
this.talents.productionEfficiency = new ProtectorateTalent({
name: "Production Efficiency",
level: 2,
description: "All production buildings build units 25% faster",
});
this.talents.buildingShields = new ProtectorateTalent({
name: "Building Shields",
level: 2,
description: "All your structures gain 125 HP shield",
});
this.talents.reinforcements = new ProtectorateTalent({
name: "Reinforcements",
level: 3,
description: "Unlocks reinforcement deployments near Operating Tower with 45 second cooldown",
});
this.talents.protectiveShieldPlus = new ProtectorateTalent({
name: "Protective Shield+",
level: 3,
description: "Protective Shield grants +2 veterancy instead of +1",
});
this.talents.advancedWeaponry = new ProtectorateTalent({
name: "Advanced Weaponry",
level: 4,
description: "All units gain +15% damage and improved weapon systems",
});
this.talents.airstrike = new ProtectorateTalent({
name: "Airstrike",
level: 5,
description: "Unlocks the Airstrike topbar ability",
unlockedBy: [this.topbars.airstrike.id],
});
this.talents.solInvictus = new ProtectorateTalent({
name: "Sol Invictus",
level: 5,
description: "Unlocks the legendary Sol Invictus unit",
});
this.talents.veterancySuperiority = new ProtectorateTalent({
name: "Veterancy Superiority",
level: 6,
description: "All units gain 1 veterancy immediately. New units start with 1 veterancy",
});
// Set up talent-topbar unlock relationships
this.talents.airstrike.apply = () => {
this.topbars.airstrike.unlocked = true;
};
}
}
ProtectorateFactionEntity.src = "src/zerospace/faction/protectorate.ts";
// Export the faction class as default
export default ProtectorateFactionEntity;
//# sourceMappingURL=protectorate.js.map