UNPKG

@zerospacegg/iolin

Version:

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

306 lines 9.8 kB
"use strict"; /** * Grell Classes - Separate file to avoid circular imports * Contains all Grell-specific class definitions for buildings and units */ Object.defineProperty(exports, "__esModule", { value: true }); exports.GrellSpecialBuilding = exports.GrellTechBuilding = exports.GrellProductionBuilding = exports.GrellSupplyBuilding = exports.GrellExtractorBuilding = exports.GrellBaseBuilding = exports.GrellHeroUnit = exports.GrellHarvesterUnit = exports.GrellBuilderUnit = exports.GrellArmyUnit = exports.GrellFaction = exports.GrellTopbar = exports.GrellTalent = void 0; const ability_js_1 = require("../engine/ability.cjs"); const building_js_1 = require("../engine/building.cjs"); const faction_js_1 = require("../engine/faction.cjs"); const unit_js_1 = require("../engine/unit.cjs"); /** * Dedicated passive for Grell biomass healing */ class BiomassHealPassive extends ability_js_1.Passive { get type() { return "ability"; } constructor(props) { super({ description: "Heals when on biomass" }); this.name = "Biomass Heal"; if (props?.parentUUID) { this.parentUUID = props.parentUUID; } if (props?.parentId) { this.parentId = props.parentId; } } } /** * Dedicated passive for Grell biomass spreading */ class BiomassSpreadPassive extends ability_js_1.Passive { get type() { return "ability"; } constructor(radius, props) { super({ description: `Spreads biomass in a ${radius} radius` }); this.name = "Biomass Spread"; if (props?.parentUUID) { this.parentUUID = props.parentUUID; } if (props?.parentId) { this.parentId = props.parentId; } } } /** * Dedicated passive for Grell building healing (patch 19202990) */ class BuildingHealPassive extends ability_js_1.Passive { get type() { return "ability"; } constructor(healPerSecond = 4, props) { super({ description: `Heals ${healPerSecond} HP per second` }); this.name = "Building Heal"; if (props?.parentUUID) { this.parentUUID = props.parentUUID; } if (props?.parentId) { this.parentId = props.parentId; } } } /** * Grell-specific talent that automatically sets abilityOf to "grell" */ class GrellTalent extends ability_js_1.FactionTalent { get type() { return "ability"; } constructor(props) { super(props); this.factionName = "Grell"; } get abilityOf() { return "grell"; } } exports.GrellTalent = GrellTalent; /** * Grell Topbar class with faction-specific settings */ class GrellTopbar extends ability_js_1.Topbar { get type() { return "ability"; } constructor(props) { super(props); this.description = ""; // Ensure description from props overrides the default empty string if (props?.description) { this.description = props.description; } } get abilityOf() { return "grell"; } get faction() { return "grell"; } get factionName() { return "Grell"; } get subtype() { return "topbar"; } } exports.GrellTopbar = GrellTopbar; /** * Main Grell Faction class */ class GrellFaction extends faction_js_1.MainFaction { get type() { return "faction"; } constructor() { super(); this.uuid = ""; this.faction = GrellFaction.factionSlug; this.factionName = GrellFaction.factionName; } } exports.GrellFaction = GrellFaction; GrellFaction.factionSlug = "grell"; GrellFaction.factionName = "Grell"; /** * Grell Army Unit class */ class GrellArmyUnit extends unit_js_1.ArmyUnit { constructor(props) { super(props); this.faction = "grell"; this.factionName = "Grell"; // TODO: Re-enable biomass passives after fixing constructor timing // this.setupGrellPassives(); } setupGrellPassives() { // this.passives.biomassHeal = new BiomassHealPassive({ parentUUID: this.uuid }); } } exports.GrellArmyUnit = GrellArmyUnit; /** * Grell Builder Unit class */ class GrellBuilderUnit extends unit_js_1.BuilderUnit { constructor() { super(); this.faction = "grell"; this.factionName = "Grell"; } } exports.GrellBuilderUnit = GrellBuilderUnit; /** * Grell Harvester Unit class */ class GrellHarvesterUnit extends unit_js_1.HarvesterUnit { constructor() { super(); this.faction = "grell"; this.factionName = "Grell"; } } exports.GrellHarvesterUnit = GrellHarvesterUnit; /** * Grell Hero Unit class */ class GrellHeroUnit extends unit_js_1.HeroUnit { constructor() { super(); this.faction = "grell"; this.factionName = "Grell"; } } exports.GrellHeroUnit = GrellHeroUnit; /** * Grell Base Building class (Root Colony) */ class GrellBaseBuilding extends building_js_1.BaseBuilding { constructor() { super(); this.providesBiomass = 750; // Default biomass for Grell buildings this.faction = "grell"; this.factionName = "Grell"; // NOTE: setupGrellPassives() should be called AFTER uuid is set in concrete classes } setupGrellPassives() { if (this.providesBiomass && this.providesBiomass > 0) { this.passives.spreadsBiomass = new BiomassSpreadPassive(this.providesBiomass, { parentUUID: this.uuid, parentId: this.id }); } this.passives.buildingHeal = new BuildingHealPassive(4, { parentUUID: this.uuid, parentId: this.id }); } get buildingType() { return "base"; } } exports.GrellBaseBuilding = GrellBaseBuilding; /** * Grell Extractor Building class (Grell Extractor) */ class GrellExtractorBuilding extends building_js_1.ExtractorBuilding { constructor() { super(); this.providesBiomass = 0; // Extractors don't spread biomass this.faction = "grell"; this.factionName = "Grell"; } get buildingType() { return "extractor"; } } exports.GrellExtractorBuilding = GrellExtractorBuilding; /** * Grell Supply Building class (Nourishing Pod) */ class GrellSupplyBuilding extends building_js_1.SupplyBuilding { constructor() { super(); this.providesBiomass = 750; // Default biomass for Grell buildings this.faction = "grell"; this.factionName = "Grell"; // TODO: Re-enable biomass passives after fixing constructor timing // this.setupGrellPassives(); } setupGrellPassives() { if (this.providesBiomass && this.providesBiomass > 0) { this.passives.spreadsBiomass = new BiomassSpreadPassive(this.providesBiomass, { parentUUID: this.uuid, parentId: this.id }); } this.passives.buildingHeal = new BuildingHealPassive(4, { parentUUID: this.uuid, parentId: this.id }); } get buildingType() { return "supply"; } } exports.GrellSupplyBuilding = GrellSupplyBuilding; /** * Grell Production Building class (Incubators, Nests) */ class GrellProductionBuilding extends building_js_1.ProductionBuilding { constructor() { super(); this.providesBiomass = 750; // Default biomass for Grell buildings this.faction = "grell"; this.factionName = "Grell"; // TODO: Re-enable biomass passives after fixing constructor timing // this.setupGrellPassives(); } setupGrellPassives() { if (this.providesBiomass && this.providesBiomass > 0) { this.passives.spreadsBiomass = new BiomassSpreadPassive(this.providesBiomass, { parentUUID: this.uuid, parentId: this.id }); } this.passives.buildingHeal = new BuildingHealPassive(4, { parentUUID: this.uuid, parentId: this.id }); } get buildingType() { return "production"; } } exports.GrellProductionBuilding = GrellProductionBuilding; /** * Grell Tech Building class (Augmentation Pools) */ class GrellTechBuilding extends building_js_1.TechBuilding { constructor() { super(); this.providesBiomass = 750; // Default biomass for Grell buildings this.faction = "grell"; this.factionName = "Grell"; // TODO: Re-enable biomass passives after fixing constructor timing // this.setupGrellPassives(); } setupGrellPassives() { if (this.providesBiomass && this.providesBiomass > 0) { this.passives.spreadsBiomass = new BiomassSpreadPassive(this.providesBiomass, { parentUUID: this.uuid, parentId: this.id }); } this.passives.buildingHeal = new BuildingHealPassive(4, { parentUUID: this.uuid, parentId: this.id }); } get buildingType() { return "tech"; } } exports.GrellTechBuilding = GrellTechBuilding; /** * Grell Special Building class (Cultivator) */ class GrellSpecialBuilding extends building_js_1.SpecialBuilding { constructor() { super(); this.providesBiomass = 750; // Default biomass for Grell buildings this.faction = "grell"; this.factionName = "Grell"; // TODO: Re-enable biomass passives after fixing constructor timing // this.setupGrellPassives(); } setupGrellPassives() { if (this.providesBiomass && this.providesBiomass > 0) { this.passives.spreadsBiomass = new BiomassSpreadPassive(this.providesBiomass, { parentUUID: this.uuid, parentId: this.id }); } this.passives.buildingHeal = new BuildingHealPassive(4, { parentUUID: this.uuid, parentId: this.id }); } get buildingType() { return "special"; } } exports.GrellSpecialBuilding = GrellSpecialBuilding; //# sourceMappingURL=grell.js.map