UNPKG

@zerospacegg/iolin

Version:

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

649 lines 29 kB
"use strict"; /** * Basic Game Mechanics - ZeroSpace * Fundamental gameplay systems that apply across factions and units * * This module defines core game mechanics and systems that form the foundation * of ZeroSpace gameplay. These mechanics are documented with rich descriptions * and keyword tags for searchability and understanding. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.allBasicMechanics = exports.systemMechanics = exports.factionMechanics = exports.supportMechanics = exports.economicMechanics = exports.combatMechanics = exports.upgrades = exports.untargetable = exports.unitTypes = exports.transformationOverride = exports.tierSystem = exports.techTree = exports.supply = exports.statusResist = exports.spellcaster = exports.siege = exports.shielded = exports.sacrifices = exports.respawns = exports.mercenaryTopbar = exports.massive = exports.legionThrall = exports.healer = exports.hasTurret = exports.hasPassive = exports.gathers = exports.flyer = exports.flux = exports.energy = exports.detection = exports.coopCommander = exports.canBeReanimated = exports.canBeMindControlled = exports.canBeInfused = exports.buildingUpgrade = exports.biomass = exports.attacker = exports.armorTypes = exports.armorMitigation = exports.armored = exports.altAttack = exports.abes = void 0; const mechanic_js_1 = require("../../engine/mechanic.cjs"); /** * ABES - Attack-Based Energy System * Units gain energy through combat to power their abilities */ const abes = new mechanic_js_1.GameMechanic("ABES", mechanic => { mechanic.uuid = "basic-mechanic-001-attack-based-energy-system"; mechanic.keywords = ["attack-based", "energy", "system", "ability", "combat"]; mechanic.description = ` ABES stands for Attack-Based Energy System. This means that every time a unit attacks another unit or structure, the attacker gets +1 energy. When they have enough energy to cast their ability, they can use it, but need to build the energy back up again through attacking. This creates a rhythm of combat where units must engage in battle to power their special abilities. `; }); exports.abes = abes; /** * Biomass - Grell terrain control mechanic * Living organic terrain that reduces enemy vision */ const biomass = new mechanic_js_1.GameMechanic("Biomass", mechanic => { mechanic.uuid = "basic-mechanic-002-biomass-terrain-control"; mechanic.keywords = ["grell", "creep", "terrain", "vision", "spread"]; mechanic.description = ` Biomass is the Grell faction's unique terrain control mechanic. Grell structures and units can spread biomass across the map, similar to creep from StarCraft. Enemy units that stand upon biomass have reduced vision, giving the Grell a tactical advantage on their own territory. Biomass represents the living, organic influence of the Grell-Koru symbiosis terraforming the battlefield. `; }); exports.biomass = biomass; /** * Armor Mitigation - Damage reduction formula * Determines how armor reduces incoming damage */ const armorMitigation = new mechanic_js_1.GameMechanic("Armor Mitigation", mechanic => { mechanic.uuid = "basic-mechanic-003-armor-mitigation-formula"; mechanic.keywords = ["armor", "damage", "reduction", "formula", "defense"]; mechanic.description = ` Armor Mitigation determines how much damage is reduced by a unit's armor value. The formula is: damage reduction = armor / (armor + 6). This means that armor provides diminishing returns - the first few points of armor are very effective, but stacking high armor values provides less benefit per point. This system ensures that even heavily armored units remain vulnerable to sustained attacks. `; }); exports.armorMitigation = armorMitigation; /** * Flux - Faction-specific resource * Powers special abilities and faction mechanics */ const flux = new mechanic_js_1.GameMechanic("Flux", mechanic => { mechanic.uuid = "basic-mechanic-004-flux-resource-system"; mechanic.keywords = ["resource", "abilities", "faction", "energy", "power"]; mechanic.description = ` Flux is a faction-specific resource used to power special abilities, upgrades, and faction-unique mechanics. Different factions generate and spend flux in different ways - some through combat, others through special structures or abilities. Flux represents the mystical or technological energy that each faction harnesses for their most powerful capabilities. `; }); exports.flux = flux; /** * Supply - Population management system * Limits army size and requires logistics infrastructure */ const supply = new mechanic_js_1.GameMechanic("Supply", mechanic => { mechanic.uuid = "basic-mechanic-005-supply-population-system"; mechanic.keywords = ["population", "cap", "limit", "units", "economy"]; mechanic.description = ` Supply represents the logistical capacity to support military units. Each unit requires a certain amount of supply, and players must build supply structures to increase their population cap. This creates strategic decisions about army composition and base development, as players must balance economic structures with supply infrastructure. `; }); exports.supply = supply; /** * Tech Tree - Research progression system * Unlocks new units, buildings, and abilities */ const techTree = new mechanic_js_1.GameMechanic("Tech Tree", mechanic => { mechanic.uuid = "basic-mechanic-006-tech-tree-progression"; mechanic.keywords = ["research", "upgrades", "progression", "unlock", "requirements"]; mechanic.description = ` The Tech Tree represents the progression system for unlocking new units, buildings, and abilities. Players must research specific technologies and meet building requirements to advance through their faction's tech tree. This creates strategic depth as players choose which technologies to prioritize based on their game plan and opponent's strategy. `; }); exports.techTree = techTree; /** * Status Resist - Immunity to status effects * Protection against stuns, mind control, and debuffs */ const statusResist = new mechanic_js_1.GameMechanic("Status Resist", mechanic => { mechanic.uuid = "basic-mechanic-007-status-resistance-immunity"; mechanic.keywords = ["immunity", "stun", "mind-control", "debuff", "resistance", "status", "effects"]; mechanic.description = ` Status Resist indicates that a unit has resistance or immunity to certain status effects like stuns, mind control, slows, or other debuffs. Units with status resistance can shrug off crowd control effects that would normally disable or convert them, making them more reliable in combat situations where enemy abilities might otherwise neutralize them. `; }); exports.statusResist = statusResist; /** * Siege - Enhanced attack modes and area denial * Special modes for enhanced battlefield effectiveness */ const siege = new mechanic_js_1.GameMechanic("Siege", mechanic => { mechanic.uuid = "basic-mechanic-008-siege-mode-mechanics"; mechanic.keywords = ["mode", "attack", "debuff", "area", "siege-mode", "deployment"]; mechanic.description = ` Siege represents special modes or abilities that units can enter for enhanced effectiveness against specific targets or in certain situations. This can include siege attack modes for enhanced building damage, or siege-based debuff abilities like the Time Warper's area denial effects. Siege mechanics often involve trade-offs between mobility and power. `; }); exports.siege = siege; /** * Legion Thrall - Infantry classification system * Identifies basic Legion infantry units */ const legionThrall = new mechanic_js_1.GameMechanic("Legion Thrall", mechanic => { mechanic.uuid = "basic-mechanic-009-legion-thrall-classification"; mechanic.keywords = ["classification", "barracks", "legion", "infantry", "basic"]; mechanic.description = ` Legion Thrall is a classification system indicating any basic infantry unit produced from Legion barracks structures. These units represent the backbone of Legion armies - the uplifted alien species that have been converted to serve the Legion's cause. The thrall classification helps identify which units benefit from Legion's infantry-focused upgrades and abilities. `; }); exports.legionThrall = legionThrall; /** * Alt-Attack - Multiple weapon configurations * Units with alternate attack modes */ const altAttack = new mechanic_js_1.GameMechanic("Alt-Attack", mechanic => { mechanic.uuid = "basic-mechanic-010-alternate-attack-modes"; mechanic.keywords = ["alternate", "multiple", "modes", "weapon", "versatile"]; mechanic.description = ` Alt-Attack indicates that a unit has multiple attack modes or weapon configurations. These units can switch between different attack types, such as anti-air versus anti-ground modes, or different damage/range combinations. This versatility allows players to adapt the same unit to different tactical situations. `; }); exports.altAttack = altAttack; /** * Massive - Large collision size classification * Units with significant battlefield presence */ const massive = new mechanic_js_1.GameMechanic("Massive", mechanic => { mechanic.uuid = "basic-mechanic-011-massive-size-classification"; mechanic.keywords = ["size", "collision", "large", "blocking", "pathfinding"]; mechanic.description = ` Massive indicates that a unit has a large collision size that affects movement and positioning. Massive units take up more space on the battlefield, can block pathways more effectively, and may have different collision interactions with other units. This size classification affects both tactical positioning and unit movement dynamics. `; }); exports.massive = massive; /** * Respawns - Automatic revival mechanism * Units that return after being destroyed */ const respawns = new mechanic_js_1.GameMechanic("Respawns", mechanic => { mechanic.uuid = "basic-mechanic-012-respawn-revival-system"; mechanic.keywords = ["revival", "death", "resurrection", "comeback", "persistence"]; mechanic.description = ` Respawns indicates that a unit will automatically return to life after being destroyed, usually after a cooldown period or under specific conditions. This mechanic makes certain units more persistent threats that enemies must account for repeatedly, changing the tactical value of eliminating them. `; }); exports.respawns = respawns; /** * Gathers - Resource collection capability * Units that can collect hexite or flux */ const gathers = new mechanic_js_1.GameMechanic("Gathers", mechanic => { mechanic.uuid = "basic-mechanic-013-resource-gathering-system"; mechanic.keywords = ["resource", "collection", "economy", "hexite", "flux"]; mechanic.description = ` Gathers indicates that a unit can collect specific resources like hexite or flux. The tag is followed by the resource type (e.g., 'gathers:hexite', 'gathers:flux'). This mechanic allows certain units to contribute to economic development while potentially serving other battlefield roles. `; }); exports.gathers = gathers; /** * Armored - High defensive capabilities * Units with significant damage resistance */ const armored = new mechanic_js_1.GameMechanic("Armored", mechanic => { mechanic.uuid = "basic-mechanic-014-armored-defense-classification"; mechanic.keywords = ["protection", "defense", "durability", "tank", "resistant"]; mechanic.description = ` Armored indicates that a unit has significant defensive capabilities, typically through high armor values or damage reduction. Armored units are designed to absorb damage and serve as front-line combatants, though they may be vulnerable to specialized anti-armor weapons or abilities. `; }); exports.armored = armored; /** * Flyer - Air domain operations * Units that operate in aerial space */ const flyer = new mechanic_js_1.GameMechanic("Flyer", mechanic => { mechanic.uuid = "basic-mechanic-015-flyer-air-domain"; mechanic.keywords = ["air", "flying", "elevated", "mobility", "terrain"]; mechanic.description = ` Flyer indicates that a unit operates in the air domain, giving it unique movement and tactical advantages. Flying units can typically move over terrain obstacles and other units, but may be vulnerable to specialized anti-air attacks while being immune to certain ground-based effects. `; }); exports.flyer = flyer; /** * Spellcaster - Ability-focused units * Units with special powers and energy management */ const spellcaster = new mechanic_js_1.GameMechanic("Spellcaster", mechanic => { mechanic.uuid = "basic-mechanic-016-spellcaster-abilities"; mechanic.keywords = ["abilities", "magic", "energy", "special", "powers"]; mechanic.description = ` Spellcaster indicates that a unit has access to special abilities or 'spells' that consume energy or have cooldowns. These units typically have more complex tactical applications beyond basic attacks, requiring energy management and timing to use effectively. `; }); exports.spellcaster = spellcaster; /** * Healer - Support and restoration * Units that restore health to allies */ const healer = new mechanic_js_1.GameMechanic("Healer", mechanic => { mechanic.uuid = "basic-mechanic-017-healer-support-system"; mechanic.keywords = ["support", "restoration", "medical", "recovery", "ally"]; mechanic.description = ` Healer indicates that a unit has abilities to restore health to friendly units. Healers provide crucial battlefield support, extending the effectiveness of other units and potentially turning the tide of engagements through sustained healing capabilities. `; }); exports.healer = healer; /** * Shielded - Energy barrier protection * Units with regenerating energy shields */ const shielded = new mechanic_js_1.GameMechanic("Shielded", mechanic => { mechanic.uuid = "basic-mechanic-018-shielded-energy-barriers"; mechanic.keywords = ["energy", "barrier", "protection", "regenerating", "defense"]; mechanic.description = ` Shielded indicates that a unit has energy shields in addition to or instead of traditional armor. Shields typically regenerate over time when not taking damage, providing a different defensive dynamic than permanent armor values. `; }); exports.shielded = shielded; /** * Sacrifices - Unit enhancement system * Legion's ritual enhancement mechanic */ const sacrifices = new mechanic_js_1.GameMechanic("Sacrifices", mechanic => { mechanic.uuid = "basic-mechanic-019-sacrifice-enhancement-system"; mechanic.keywords = ["legion", "emperor", "add-on", "enhancement", "ritual"]; mechanic.description = ` Sacrifices indicates that a unit can be sacrificed to enhance another unit, typically the Legion Emperor. When a unit is sacrificed, it permanently enhances the target with additional health, damage, or other bonuses. This mechanic represents the Legion's ritualistic approach to warfare and unit enhancement. `; }); exports.sacrifices = sacrifices; /** * Attacker - Basic combat capability * Units with standard attack mechanics */ const attacker = new mechanic_js_1.GameMechanic("Attacker", mechanic => { mechanic.uuid = "basic-mechanic-020-attacker-combat-system"; mechanic.keywords = ["combat", "basic", "auto-attack", "damage", "weapon"]; mechanic.description = ` Attacker indicates that a unit has a basic auto-attack capability and can engage in direct combat. This tag distinguishes combat units from purely support or utility units, marking them as capable of dealing damage through standard attack mechanics. `; }); exports.attacker = attacker; /** * Tier System - Technological progression levels * Advancement through T0 to T4 and ultimate units */ const tierSystem = new mechanic_js_1.GameMechanic("Tier System", mechanic => { mechanic.uuid = "basic-mechanic-021-tier-progression-system"; mechanic.keywords = [ "progression", "tech", "advancement", "unlock", "tier-0", "tier-1", "tier-2", "tier-3", "tier-4", "ultimate", ]; mechanic.description = ` The Tier System represents the technological progression levels of units and buildings. T0 units are available from the beginning of the game. T1/T2/T3 require production buildings to unlock, while their .5 versions (T1.5/T2.5/T3.5) require both the production building AND its corresponding tech structure. T4 represents ultimate tier units that are unlocked by high-level talents and triggered through topbar abilities, representing the pinnacle of each faction's technological capabilities. `; }); exports.tierSystem = tierSystem; /** * Has Passive - Always-active abilities * Units with continuous passive effects */ const hasPassive = new mechanic_js_1.GameMechanic("Has Passive", mechanic => { mechanic.uuid = "basic-mechanic-022-passive-abilities-system"; mechanic.keywords = ["passive", "ability", "always-on", "automatic", "trait"]; mechanic.description = ` Has Passive indicates that a unit possesses passive abilities that are always active without player input. These abilities provide continuous benefits or effects, such as aura buffs to nearby allies, automatic regeneration, or permanent stat bonuses. `; }); exports.hasPassive = hasPassive; /** * Has Turret - Defensive attachments * Buildings and units with turret weapons */ const hasTurret = new mechanic_js_1.GameMechanic("Has Turret", mechanic => { mechanic.uuid = "basic-mechanic-023-turret-defense-system"; mechanic.keywords = ["defensive", "attachment", "weapon", "building", "upgrade"]; mechanic.description = ` Has Turret indicates that a building or unit has attached turret weapons for defensive purposes. These turrets typically provide automated defensive fire against enemies within range, enhancing the defensive capabilities of structures or mobile units. `; }); exports.hasTurret = hasTurret; /** * Building Upgrade - Structure enhancement system * Modular improvements for buildings */ const buildingUpgrade = new mechanic_js_1.GameMechanic("Building Upgrade", mechanic => { mechanic.uuid = "basic-mechanic-024-building-upgrade-system"; mechanic.keywords = ["enhancement", "attachment", "modification", "improvement", "add-on"]; mechanic.description = ` Building Upgrade indicates that a structure can be enhanced with additional modules or attachments. These upgrades might include defensive turrets, production boosters, or specialized equipment that expand the building's capabilities beyond its base function. `; }); exports.buildingUpgrade = buildingUpgrade; /** * Untargetable - Targeting immunity * Protection from direct targeting */ const untargetable = new mechanic_js_1.GameMechanic("Untargetable", mechanic => { mechanic.uuid = "basic-mechanic-025-untargetable-immunity"; mechanic.keywords = ["invulnerable", "immunity", "protection", "targeting", "selection"]; mechanic.description = ` Untargetable indicates that a unit cannot be directly targeted by enemy abilities or attacks under certain conditions. This might be a permanent trait or a temporary effect from abilities, providing tactical immunity and forcing enemies to use area-of-effect attacks or wait for the effect to end. `; }); exports.untargetable = untargetable; /** * Upgrades - Technology research provider * Buildings that provide upgrade research */ const upgrades = new mechanic_js_1.GameMechanic("Upgrades", mechanic => { mechanic.uuid = "basic-mechanic-026-upgrades-research-system"; mechanic.keywords = ["provides", "enhancement", "research", "technology", "improvement"]; mechanic.description = ` Upgrades indicates that a building or unit provides upgrade research capabilities for other units or structures. These facilities allow players to enhance their forces with improved weapons, armor, abilities, or other technological advances that affect multiple units of the same type. `; }); exports.upgrades = upgrades; /** * Energy - Resource pool for abilities * Power source for special abilities */ const energy = new mechanic_js_1.GameMechanic("Energy", mechanic => { mechanic.uuid = "basic-mechanic-027-energy-resource-system"; mechanic.keywords = ["resource", "abilities", "power", "mana", "casting"]; mechanic.description = ` Energy indicates that a unit has an energy resource pool used to power special abilities. Unlike ABES which builds through combat, energy typically regenerates over time or through specific mechanics, allowing units to cast spells and use special abilities when they have sufficient energy reserves. `; }); exports.energy = energy; /** * Can Be Mind Controlled - Spell targeting eligibility * Units eligible for mind control effects */ const canBeMindControlled = new mechanic_js_1.GameMechanic("Can Be Mind Controlled", mechanic => { mechanic.uuid = "basic-mechanic-028-mind-control-targeting"; mechanic.keywords = ["spell", "targeting", "mind-control", "ability", "eligible"]; mechanic.description = ` Can Be Mind Controlled indicates that a unit can be targeted by mind control spells and abilities. This tag simply marks which units are valid targets for mind control effects. `; }); exports.canBeMindControlled = canBeMindControlled; /** * Can Be Infused - Infusion targeting eligibility * Units eligible for Grell infusion */ const canBeInfused = new mechanic_js_1.GameMechanic("Can Be Infused", mechanic => { mechanic.uuid = "basic-mechanic-029-infusion-targeting"; mechanic.keywords = ["spell", "targeting", "infuse", "ability", "eligible"]; mechanic.description = ` Can Be Infused indicates that a unit can be targeted by infuse spells and abilities. This tag simply marks which units are valid targets for infusion effects. `; }); exports.canBeInfused = canBeInfused; /** * Can Be Reanimated - Reanimation targeting eligibility * Units eligible for Legion reanimation */ const canBeReanimated = new mechanic_js_1.GameMechanic("Can Be Reanimated", mechanic => { mechanic.uuid = "basic-mechanic-030-reanimation-targeting"; mechanic.keywords = ["spell", "targeting", "reanimate", "ability", "eligible"]; mechanic.description = ` Can Be Reanimated indicates that a unit can be targeted by reanimate spells and abilities. This tag simply marks which units are valid targets for reanimation effects. `; }); exports.canBeReanimated = canBeReanimated; /** * Armor Types - Damage interaction system * Classification system for defensive interactions */ const armorTypes = new mechanic_js_1.GameMechanic("Armor Types", mechanic => { mechanic.uuid = "basic-mechanic-031-armor-types-system"; mechanic.keywords = ["light", "medium", "heavy", "building", "damage", "mitigation"]; mechanic.description = ` Armor Types classify units and structures into defensive categories that determine damage interactions. Light armor is vulnerable to certain attacks, medium armor provides balanced protection, heavy armor offers maximum physical defense, and building armor protects structures. Different weapons may have bonuses or penalties against specific armor types, creating tactical rock-paper-scissors interactions. `; }); exports.armorTypes = armorTypes; /** * Detection - Stealth counter system * Reveals cloaked and invisible units */ const detection = new mechanic_js_1.GameMechanic("Detection", mechanic => { mechanic.uuid = "basic-mechanic-032-detection-stealth-counter"; mechanic.keywords = ["cloak", "stealth", "reveal", "vision", "invisible"]; mechanic.description = ` Detection indicates that a unit or structure can reveal cloaked or stealthed enemies. Units with detection capabilities can see through invisibility effects and target hidden enemies that would otherwise be untargetable. This creates a tactical counter-play dynamic against stealth-based strategies. `; }); exports.detection = detection; /** * Unit Types - Role classification system * Primary battlefield role categories */ const unitTypes = new mechanic_js_1.GameMechanic("Unit Types", mechanic => { mechanic.uuid = "basic-mechanic-033-unit-types-classification"; mechanic.keywords = ["army", "builder", "harvester", "hero", "special", "ultimate", "mercenary"]; mechanic.description = ` Unit Types classify units by their primary battlefield role. Army units are standard combat forces, builders construct structures, harvesters gather resources, heroes are powerful unique units, special units have unique mechanics, ultimate units are high-tier powerhouses, and mercenaries are hired neutral units available to all factions. `; }); exports.unitTypes = unitTypes; /** * Coop Commander - Cooperative mission specialization * Enhanced units for PvE scenarios */ const coopCommander = new mechanic_js_1.GameMechanic("Coop Commander", mechanic => { mechanic.uuid = "basic-mechanic-034-coop-commander-specialization"; mechanic.keywords = ["cooperative", "mission", "special", "campaign", "pve"]; mechanic.description = ` Coop Commander indicates special versions of units designed for cooperative PvE missions. These units may have enhanced capabilities or modified mechanics specifically balanced for cooperative gameplay scenarios rather than standard PvP matches. `; }); exports.coopCommander = coopCommander; /** * Mercenary Topbar - Strategic mercenary abilities * Elite mercenaries with faction-wide effects */ const mercenaryTopbar = new mechanic_js_1.GameMechanic("Mercenary Topbar", mechanic => { mechanic.uuid = "basic-mechanic-035-mercenary-topbar-abilities"; mechanic.keywords = ["neutral", "faction-ability", "hired", "special", "contract"]; mechanic.description = ` Mercenary Topbar indicates special mercenary units that provide faction-wide abilities accessible through the top bar interface. These elite mercenaries offer strategic capabilities that affect the entire battlefield rather than just local combat. `; }); exports.mercenaryTopbar = mercenaryTopbar; /** * Transformation Override - Custom transformation behavior * Unit-specific transformation exceptions */ const transformationOverride = new mechanic_js_1.GameMechanic("Transformation Override", mechanic => { mechanic.uuid = "basic-mechanic-036-transformation-override-system"; mechanic.keywords = ["custom", "special", "unit-specific", "exception", "override"]; mechanic.description = ` Transformation Override allows individual units to specify custom transformation behavior that differs from the standard transformation rules. For example, the Grell Seedling has a unique infuse transformation that changes it from a ground builder to an aerial constructor with dramatically different stats, rather than applying standard multipliers. These overrides are defined directly on the unit and take precedence over standard transformation mechanics. `; }); exports.transformationOverride = transformationOverride; // Export mechanics by category exports.combatMechanics = [ abes, altAttack, armored, armorMitigation, armorTypes, attacker, detection, flyer, massive, siege, spellcaster, statusResist, ]; exports.economicMechanics = [flux, gathers, supply, techTree, tierSystem]; exports.supportMechanics = [energy, hasPassive, hasTurret, healer, shielded]; exports.factionMechanics = [biomass, legionThrall, sacrifices, transformationOverride]; exports.systemMechanics = [ buildingUpgrade, canBeInfused, canBeMindControlled, canBeReanimated, coopCommander, mercenaryTopbar, respawns, unitTypes, untargetable, upgrades, ]; // Export all basic mechanics as collection exports.allBasicMechanics = [ abes, altAttack, armored, armorMitigation, armorTypes, attacker, biomass, buildingUpgrade, canBeInfused, canBeMindControlled, canBeReanimated, coopCommander, detection, energy, flyer, flux, gathers, hasPassive, hasTurret, healer, legionThrall, massive, mercenaryTopbar, respawns, sacrifices, shielded, siege, spellcaster, statusResist, supply, techTree, tierSystem, transformationOverride, unitTypes, untargetable, upgrades, ]; // Export default collection exports.default = exports.allBasicMechanics; //# sourceMappingURL=basic.js.map