UNPKG

@zerospacegg/iolin

Version:

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

232 lines 9.61 kB
"use strict"; /** * Transformation Mechanics - ZeroSpace * Complex multi-phase systems that modify units through gameplay actions * * Transformation mechanics represent advanced systems like Infuse and Reanimate * that can dramatically alter unit capabilities through multiple phases of effect. * These systems often involve complex stat modifications, eligibility rules, * and multi-stage transformations. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.allTransformationMechanics = exports.controlTransformations = exports.necromancyTransformations = exports.enhancementTransformations = exports.sacrificeEnhancement = exports.reanimate = exports.mindControl = exports.infuse = void 0; const mechanic_js_1 = require("../../engine/mechanic.cjs"); /** * Infuse - Grell symbiotic enhancement * Enhances units through Grell-Koru symbiosis with stackable effects */ const infuse = new mechanic_js_1.AdvancedTransformationMechanic("Infuse", mechanic => { mechanic.uuid = "transformation-mechanic-001-infuse-symbiosis"; mechanic.keywords = ["buff", "enhancement", "grell", "symbiosis", "upgrade", "stackable"]; mechanic.category = "Enhancement"; mechanic.description = ` Infuse is a Grell faction ability that enhances friendly units through symbiotic fusion with Koru organisms. Each infusion increases the unit's health and damage by 50%. This transformation can be applied multiple times under special circumstances, with each stack multiplying the benefits. The symbiotic relationship represents the beneficial merger between Grell and Koru, where both organisms become stronger together. `; // Stacking configuration mechanic.stackable = true; mechanic.maxStacks = 2; mechanic.conflictsWith = []; // Phase configuration mechanic.hasPhases = false; mechanic.triggersOnDeath = false; // Requirements mechanic.requirements = { eligibility: { allowedSubtypes: ["army", "merc"], excludedTags: ["massive"], allowedFactions: undefined, }, cost: { formula: "supply * 2 (floored)", supplyMultiplier: 2, }, preventedByTags: ["massive"], }; // Stat modifications mechanic.statModifications = { hpMultiplier: 1.5, damageMultiplier: 1.5, }; // Tags mechanic.tagsAdded = ["infused"]; mechanic.tagsRemoved = []; // Notes mechanic.notes = ` Can be stacked up to 2 times. At 2 stacks, unit effectively has 2.25x HP and damage (1.5 * 1.5), often rounded to 2x for display purposes. Can coexist with other transformation types like reanimate. `; }); exports.infuse = infuse; /** * Reanimate - Legion necromantic transformation * Dual-phase transformation with pre-death and post-death effects */ const reanimate = new mechanic_js_1.AdvancedTransformationMechanic("Reanimate", mechanic => { mechanic.uuid = "transformation-mechanic-002-reanimate-necromancy"; mechanic.keywords = ["death", "resurrection", "necromancy", "dual-phase", "buff-debuff"]; mechanic.category = "Necromancy"; mechanic.description = ` Reanimate is a Legion necromantic ability that supercharges a living unit with death energy, then brings it back as a zombie when it dies. The living unit gains enhanced speed and faster abilities (pre-death phase), but when it dies, a zombie copy spawns with the inverse effects - slower movement and abilities (post-death phase). This creates a tactical choice between immediate power and sustained presence. `; // Stacking configuration mechanic.stackable = false; mechanic.maxStacks = 1; mechanic.conflictsWith = []; // Phase configuration mechanic.hasPhases = true; mechanic.triggersOnDeath = true; // Requirements mechanic.requirements = { eligibility: { allowedSubtypes: ["army", "merc", "hero"], excludedTags: ["reanimated-alive", "reanimated-zombie"], allowedFactions: undefined, }, cost: { formula: "(hexiteCost + fluxCost * 1.25) * 0.0675", hexiteMultiplier: 1.0, fluxMultiplier: 1.25, baseMultiplier: 0.0675, }, preventedByTags: ["reanimated-alive", "reanimated-zombie"], }; // Base stat modifications (none for reanimate) mechanic.statModifications = {}; // Pre-death phase (living enhanced) mechanic.preDeathPhase = { speedMultiplier: 1.3, cooldownMultiplier: 0.7, }; // Post-death phase (zombie degraded) mechanic.postDeathPhase = { speedMultiplier: 0.7, cooldownMultiplier: 1.3, }; // Tags mechanic.tagsAdded = ["reanimated-alive"]; mechanic.tagsRemoved = ["can-be-reanimated"]; // Notes mechanic.notes = ` Pre-death phase gives unit enhanced performance. Post-death phase spawns zombie with degraded performance but extends unit presence. Can be applied to units that are already infused, creating powerful combinations. `; }); exports.reanimate = reanimate; /** * Mind Control - Temporary unit conversion * Takes control of enemy units for a limited time */ const mindControl = new mechanic_js_1.AdvancedTransformationMechanic("Mind Control", mechanic => { mechanic.uuid = "transformation-mechanic-003-mind-control-conversion"; mechanic.keywords = ["control", "temporary", "conversion", "spell", "enemy"]; mechanic.category = "Control"; mechanic.description = ` Mind Control is a temporary transformation that converts enemy units to fight for the caster's faction. The controlled unit retains all of its original capabilities but fights for the controlling player until the effect expires or the unit is destroyed. This powerful ability can turn the tide of battle by converting key enemy units. `; // Stacking configuration mechanic.stackable = false; mechanic.maxStacks = 1; mechanic.conflictsWith = ["mind-controlled"]; // Phase configuration mechanic.hasPhases = false; mechanic.triggersOnDeath = false; // Requirements mechanic.requirements = { eligibility: { allowedSubtypes: ["army", "merc"], excludedTags: ["mind-controlled", "massive", "hero"], allowedFactions: undefined, }, cost: { formula: "target unit cost * 0.5", baseMultiplier: 0.5, }, preventedByTags: ["mind-controlled", "massive", "hero"], }; // No stat modifications (unit keeps original stats) mechanic.statModifications = {}; // Tags mechanic.tagsAdded = ["mind-controlled"]; mechanic.tagsRemoved = ["can-be-mind-controlled"]; // Notes mechanic.notes = ` Temporary effect that expires after a set duration. Controlled unit fights for the controlling player but retains all original capabilities. Cannot be applied to heroes or massive units. `; }); exports.mindControl = mindControl; /** * Sacrifice Enhancement - Legion ritual empowerment * Permanently enhances units through sacrifice of other units */ const sacrificeEnhancement = new mechanic_js_1.AdvancedTransformationMechanic("Sacrifice Enhancement", mechanic => { mechanic.uuid = "transformation-mechanic-004-sacrifice-enhancement"; mechanic.keywords = ["sacrifice", "enhancement", "legion", "permanent", "ritual"]; mechanic.category = "Enhancement"; mechanic.description = ` Sacrifice Enhancement is a Legion mechanic where units can be sacrificed to permanently enhance another unit, typically the Legion Emperor. Each sacrifice adds permanent bonuses to the target unit's health, damage, or other attributes. This mechanic represents the Legion's ritualistic approach to warfare and the Emperor's ability to absorb the essence of sacrificed units. `; // Stacking configuration mechanic.stackable = true; mechanic.maxStacks = 99; // Effectively unlimited // Phase configuration mechanic.hasPhases = false; mechanic.triggersOnDeath = false; // Requirements mechanic.requirements = { eligibility: { allowedSubtypes: ["hero"], // Typically only Emperor excludedTags: [], allowedFactions: ["Legion"], }, cost: { formula: "sacrificed unit cost", baseMultiplier: 1.0, }, preventedByTags: [], }; // Stat modifications (varies by sacrificed unit) mechanic.statModifications = { hpMultiplier: 1.1, // Base 10% increase per sacrifice damageMultiplier: 1.05, // Base 5% damage increase per sacrifice }; // Tags mechanic.tagsAdded = ["sacrifice-enhanced"]; mechanic.tagsRemoved = []; // Notes mechanic.notes = ` Each sacrifice permanently enhances the target unit. The Emperor can grow dramatically in power through multiple sacrifices. Sacrificed units are permanently destroyed in the process. `; }); exports.sacrificeEnhancement = sacrificeEnhancement; // Export transformations by category exports.enhancementTransformations = [infuse, sacrificeEnhancement]; exports.necromancyTransformations = [reanimate]; exports.controlTransformations = [mindControl]; // Export all transformation mechanics as collection exports.allTransformationMechanics = [infuse, reanimate, mindControl, sacrificeEnhancement]; // Export default collection exports.default = exports.allTransformationMechanics; //# sourceMappingURL=transformations.js.map