playlist-data-engine 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +352 -0
- package/dist/__vite-browser-external-DYxpcVy9.js +4 -0
- package/dist/constants/DefaultClasses.d.ts +46 -0
- package/dist/constants/DefaultClasses.d.ts.map +1 -0
- package/dist/constants/DefaultEnchantments.d.ts +337 -0
- package/dist/constants/DefaultEnchantments.d.ts.map +1 -0
- package/dist/constants/DefaultEnemies.d.ts +83 -0
- package/dist/constants/DefaultEnemies.d.ts.map +1 -0
- package/dist/constants/DefaultEquipment.d.ts +23 -0
- package/dist/constants/DefaultEquipment.d.ts.map +1 -0
- package/dist/constants/DefaultFeatures.d.ts +22 -0
- package/dist/constants/DefaultFeatures.d.ts.map +1 -0
- package/dist/constants/DefaultRaces.d.ts +102 -0
- package/dist/constants/DefaultRaces.d.ts.map +1 -0
- package/dist/constants/DefaultSkills.d.ts +26 -0
- package/dist/constants/DefaultSkills.d.ts.map +1 -0
- package/dist/constants/DefaultSpells.d.ts +41 -0
- package/dist/constants/DefaultSpells.d.ts.map +1 -0
- package/dist/constants/EncounterBalance.d.ts +208 -0
- package/dist/constants/EncounterBalance.d.ts.map +1 -0
- package/dist/constants/EnemyEquipment.d.ts +71 -0
- package/dist/constants/EnemyEquipment.d.ts.map +1 -0
- package/dist/constants/EnemyRarity.d.ts +79 -0
- package/dist/constants/EnemyRarity.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Construct.d.ts +63 -0
- package/dist/constants/EnemyTemplates/Construct.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Dragon.d.ts +68 -0
- package/dist/constants/EnemyTemplates/Dragon.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Elemental.d.ts +64 -0
- package/dist/constants/EnemyTemplates/Elemental.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Fiend.d.ts +62 -0
- package/dist/constants/EnemyTemplates/Fiend.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Monstrosity.d.ts +63 -0
- package/dist/constants/EnemyTemplates/Monstrosity.d.ts.map +1 -0
- package/dist/constants/EnemyTemplates/Undead.d.ts +61 -0
- package/dist/constants/EnemyTemplates/Undead.d.ts.map +1 -0
- package/dist/constants/ItemTemplates.d.ts +40 -0
- package/dist/constants/ItemTemplates.d.ts.map +1 -0
- package/dist/constants/MagicItems.d.ts +30 -0
- package/dist/constants/MagicItems.d.ts.map +1 -0
- package/dist/constants/SpellSlots.d.ts +30 -0
- package/dist/constants/SpellSlots.d.ts.map +1 -0
- package/dist/constants/StatScaling.d.ts +113 -0
- package/dist/constants/StatScaling.d.ts.map +1 -0
- package/dist/core/analysis/AudioAnalyzer.d.ts +599 -0
- package/dist/core/analysis/AudioAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/ColorExtractor.d.ts +64 -0
- package/dist/core/analysis/ColorExtractor.d.ts.map +1 -0
- package/dist/core/analysis/EssentiaPitchDetector.d.ts +282 -0
- package/dist/core/analysis/EssentiaPitchDetector.d.ts.map +1 -0
- package/dist/core/analysis/LevelSerializer.d.ts +265 -0
- package/dist/core/analysis/LevelSerializer.d.ts.map +1 -0
- package/dist/core/analysis/MelodyContourAnalyzer.d.ts +283 -0
- package/dist/core/analysis/MelodyContourAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/MultiBandAnalyzer.d.ts +214 -0
- package/dist/core/analysis/MultiBandAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/MusicClassifier.d.ts +524 -0
- package/dist/core/analysis/MusicClassifier.d.ts.map +1 -0
- package/dist/core/analysis/PitchAnalyzer.d.ts +266 -0
- package/dist/core/analysis/PitchAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/PitchDetector.d.ts +251 -0
- package/dist/core/analysis/PitchDetector.d.ts.map +1 -0
- package/dist/core/analysis/SpectrumScanner.d.ts +52 -0
- package/dist/core/analysis/SpectrumScanner.d.ts.map +1 -0
- package/dist/core/analysis/beat/BeatInterpolator.d.ts +477 -0
- package/dist/core/analysis/beat/BeatInterpolator.d.ts.map +1 -0
- package/dist/core/analysis/beat/BeatMapGenerator.d.ts +170 -0
- package/dist/core/analysis/beat/BeatMapGenerator.d.ts.map +1 -0
- package/dist/core/analysis/beat/BeatStream.d.ts +316 -0
- package/dist/core/analysis/beat/BeatStream.d.ts.map +1 -0
- package/dist/core/analysis/beat/BeatSubdivider.d.ts +205 -0
- package/dist/core/analysis/beat/BeatSubdivider.d.ts.map +1 -0
- package/dist/core/analysis/beat/BeatTracker.d.ts +137 -0
- package/dist/core/analysis/beat/BeatTracker.d.ts.map +1 -0
- package/dist/core/analysis/beat/CompositeStreamGenerator.d.ts +180 -0
- package/dist/core/analysis/beat/CompositeStreamGenerator.d.ts.map +1 -0
- package/dist/core/analysis/beat/DensityAnalyzer.d.ts +246 -0
- package/dist/core/analysis/beat/DensityAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/beat/DifficultyVariantGenerator.d.ts +1082 -0
- package/dist/core/analysis/beat/DifficultyVariantGenerator.d.ts.map +1 -0
- package/dist/core/analysis/beat/GrooveAnalyzer.d.ts +192 -0
- package/dist/core/analysis/beat/GrooveAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/beat/OnsetStrengthEnvelope.d.ts +133 -0
- package/dist/core/analysis/beat/OnsetStrengthEnvelope.d.ts.map +1 -0
- package/dist/core/analysis/beat/PhraseAnalyzer.d.ts +230 -0
- package/dist/core/analysis/beat/PhraseAnalyzer.d.ts.map +1 -0
- package/dist/core/analysis/beat/RhythmQuantizer.d.ts +399 -0
- package/dist/core/analysis/beat/RhythmQuantizer.d.ts.map +1 -0
- package/dist/core/analysis/beat/RhythmicBalancer.d.ts +262 -0
- package/dist/core/analysis/beat/RhythmicBalancer.d.ts.map +1 -0
- package/dist/core/analysis/beat/StreamScorer.d.ts +275 -0
- package/dist/core/analysis/beat/StreamScorer.d.ts.map +1 -0
- package/dist/core/analysis/beat/TempoAwareQuantizer.d.ts +256 -0
- package/dist/core/analysis/beat/TempoAwareQuantizer.d.ts.map +1 -0
- package/dist/core/analysis/beat/TempoDetector.d.ts +220 -0
- package/dist/core/analysis/beat/TempoDetector.d.ts.map +1 -0
- package/dist/core/analysis/beat/TransientDetector.d.ts +303 -0
- package/dist/core/analysis/beat/TransientDetector.d.ts.map +1 -0
- package/dist/core/analysis/beat/beatKeyHelpers.d.ts +180 -0
- package/dist/core/analysis/beat/beatKeyHelpers.d.ts.map +1 -0
- package/dist/core/analysis/beat/index.d.ts +41 -0
- package/dist/core/analysis/beat/index.d.ts.map +1 -0
- package/dist/core/analysis/beat/utils/audioUtils.d.ts +204 -0
- package/dist/core/analysis/beat/utils/audioUtils.d.ts.map +1 -0
- package/dist/core/analysis/beat/utils/beatInterpolationDebug.d.ts +404 -0
- package/dist/core/analysis/beat/utils/beatInterpolationDebug.d.ts.map +1 -0
- package/dist/core/analysis/beat/utils/subdivideBeatMap.d.ts +61 -0
- package/dist/core/analysis/beat/utils/subdivideBeatMap.d.ts.map +1 -0
- package/dist/core/analysis/beat/utils/unifyBeatMap.d.ts +33 -0
- package/dist/core/analysis/beat/utils/unifyBeatMap.d.ts.map +1 -0
- package/dist/core/analysis/index.d.ts +18 -0
- package/dist/core/analysis/index.d.ts.map +1 -0
- package/dist/core/combat/AI/AICombatRunner.d.ts +108 -0
- package/dist/core/combat/AI/AICombatRunner.d.ts.map +1 -0
- package/dist/core/combat/AI/CombatAI.d.ts +179 -0
- package/dist/core/combat/AI/CombatAI.d.ts.map +1 -0
- package/dist/core/combat/AI/CombatMetricsTracker.d.ts +30 -0
- package/dist/core/combat/AI/CombatMetricsTracker.d.ts.map +1 -0
- package/dist/core/combat/Analysis/BalanceValidator.d.ts +170 -0
- package/dist/core/combat/Analysis/BalanceValidator.d.ts.map +1 -0
- package/dist/core/combat/Analysis/ComparativeAnalyzer.d.ts +231 -0
- package/dist/core/combat/Analysis/ComparativeAnalyzer.d.ts.map +1 -0
- package/dist/core/combat/Analysis/DifficultyCalculator.d.ts +203 -0
- package/dist/core/combat/Analysis/DifficultyCalculator.d.ts.map +1 -0
- package/dist/core/combat/Analysis/ParameterSweep.d.ts +201 -0
- package/dist/core/combat/Analysis/ParameterSweep.d.ts.map +1 -0
- package/dist/core/combat/AttackResolver.d.ts +220 -0
- package/dist/core/combat/AttackResolver.d.ts.map +1 -0
- package/dist/core/combat/CombatEngine.d.ts +388 -0
- package/dist/core/combat/CombatEngine.d.ts.map +1 -0
- package/dist/core/combat/DiceRoller.d.ts +115 -0
- package/dist/core/combat/DiceRoller.d.ts.map +1 -0
- package/dist/core/combat/InitiativeRoller.d.ts +62 -0
- package/dist/core/combat/InitiativeRoller.d.ts.map +1 -0
- package/dist/core/combat/PartyAnalyzer.d.ts +215 -0
- package/dist/core/combat/PartyAnalyzer.d.ts.map +1 -0
- package/dist/core/combat/SeededDiceRoller.d.ts +120 -0
- package/dist/core/combat/SeededDiceRoller.d.ts.map +1 -0
- package/dist/core/combat/Simulation/CombatSimulator.d.ts +366 -0
- package/dist/core/combat/Simulation/CombatSimulator.d.ts.map +1 -0
- package/dist/core/combat/SpellCaster.d.ts +113 -0
- package/dist/core/combat/SpellCaster.d.ts.map +1 -0
- package/dist/core/config/index.d.ts +24 -0
- package/dist/core/config/index.d.ts.map +1 -0
- package/dist/core/config/progressionConfig.d.ts +73 -0
- package/dist/core/config/progressionConfig.d.ts.map +1 -0
- package/dist/core/config/sensorConfig.d.ts +134 -0
- package/dist/core/config/sensorConfig.d.ts.map +1 -0
- package/dist/core/equipment/BoxOpener.d.ts +175 -0
- package/dist/core/equipment/BoxOpener.d.ts.map +1 -0
- package/dist/core/equipment/EquipmentEffectApplier.d.ts +189 -0
- package/dist/core/equipment/EquipmentEffectApplier.d.ts.map +1 -0
- package/dist/core/equipment/EquipmentModifier.d.ts +327 -0
- package/dist/core/equipment/EquipmentModifier.d.ts.map +1 -0
- package/dist/core/equipment/EquipmentSpawnHelper.d.ts +246 -0
- package/dist/core/equipment/EquipmentSpawnHelper.d.ts.map +1 -0
- package/dist/core/equipment/EquipmentValidator.d.ts +173 -0
- package/dist/core/equipment/EquipmentValidator.d.ts.map +1 -0
- package/dist/core/extensions/ExtensionManager.d.ts +517 -0
- package/dist/core/extensions/ExtensionManager.d.ts.map +1 -0
- package/dist/core/extensions/WeightedSelector.d.ts +156 -0
- package/dist/core/extensions/WeightedSelector.d.ts.map +1 -0
- package/dist/core/extensions/index.d.ts +11 -0
- package/dist/core/extensions/index.d.ts.map +1 -0
- package/dist/core/extensions/initializeDefaults.d.ts +170 -0
- package/dist/core/extensions/initializeDefaults.d.ts.map +1 -0
- package/dist/core/features/FeatureEffectApplier.d.ts +102 -0
- package/dist/core/features/FeatureEffectApplier.d.ts.map +1 -0
- package/dist/core/features/FeatureQuery.d.ts +368 -0
- package/dist/core/features/FeatureQuery.d.ts.map +1 -0
- package/dist/core/features/FeatureTypes.d.ts +199 -0
- package/dist/core/features/FeatureTypes.d.ts.map +1 -0
- package/dist/core/features/FeatureValidator.d.ts +149 -0
- package/dist/core/features/FeatureValidator.d.ts.map +1 -0
- package/dist/core/features/index.d.ts +12 -0
- package/dist/core/features/index.d.ts.map +1 -0
- package/dist/core/generation/AbilityScoreCalculator.d.ts +83 -0
- package/dist/core/generation/AbilityScoreCalculator.d.ts.map +1 -0
- package/dist/core/generation/AppearanceGenerator.d.ts +32 -0
- package/dist/core/generation/AppearanceGenerator.d.ts.map +1 -0
- package/dist/core/generation/BeatConverter.d.ts +127 -0
- package/dist/core/generation/BeatConverter.d.ts.map +1 -0
- package/dist/core/generation/ButtonMapper.d.ts +346 -0
- package/dist/core/generation/ButtonMapper.d.ts.map +1 -0
- package/dist/core/generation/ButtonPatternLibrary.d.ts +92 -0
- package/dist/core/generation/ButtonPatternLibrary.d.ts.map +1 -0
- package/dist/core/generation/CRLevelConverter.d.ts +242 -0
- package/dist/core/generation/CRLevelConverter.d.ts.map +1 -0
- package/dist/core/generation/CharacterGenerator.d.ts +194 -0
- package/dist/core/generation/CharacterGenerator.d.ts.map +1 -0
- package/dist/core/generation/ClassSuggester.d.ts +184 -0
- package/dist/core/generation/ClassSuggester.d.ts.map +1 -0
- package/dist/core/generation/EnemyEquipmentGenerator.d.ts +151 -0
- package/dist/core/generation/EnemyEquipmentGenerator.d.ts.map +1 -0
- package/dist/core/generation/EnemyGenerator.d.ts +595 -0
- package/dist/core/generation/EnemyGenerator.d.ts.map +1 -0
- package/dist/core/generation/EquipmentGenerator.d.ts +204 -0
- package/dist/core/generation/EquipmentGenerator.d.ts.map +1 -0
- package/dist/core/generation/LegendaryGenerator.d.ts +213 -0
- package/dist/core/generation/LegendaryGenerator.d.ts.map +1 -0
- package/dist/core/generation/LevelGenerator.d.ts +390 -0
- package/dist/core/generation/LevelGenerator.d.ts.map +1 -0
- package/dist/core/generation/NamingEngine.d.ts +136 -0
- package/dist/core/generation/NamingEngine.d.ts.map +1 -0
- package/dist/core/generation/PitchBeatLinker.d.ts +150 -0
- package/dist/core/generation/PitchBeatLinker.d.ts.map +1 -0
- package/dist/core/generation/RaceSelector.d.ts +58 -0
- package/dist/core/generation/RaceSelector.d.ts.map +1 -0
- package/dist/core/generation/RhythmGenerator.d.ts +597 -0
- package/dist/core/generation/RhythmGenerator.d.ts.map +1 -0
- package/dist/core/generation/SkillAssigner.d.ts +78 -0
- package/dist/core/generation/SkillAssigner.d.ts.map +1 -0
- package/dist/core/generation/SpellManager.d.ts +132 -0
- package/dist/core/generation/SpellManager.d.ts.map +1 -0
- package/dist/core/generation/SpellcastingGenerator.d.ts +255 -0
- package/dist/core/generation/SpellcastingGenerator.d.ts.map +1 -0
- package/dist/core/generation/index.d.ts +41 -0
- package/dist/core/generation/index.d.ts.map +1 -0
- package/dist/core/parser/MetadataExtractor.d.ts +66 -0
- package/dist/core/parser/MetadataExtractor.d.ts.map +1 -0
- package/dist/core/parser/PlaylistParser.d.ts +45 -0
- package/dist/core/parser/PlaylistParser.d.ts.map +1 -0
- package/dist/core/playback/SubdivisionPlaybackController.d.ts +333 -0
- package/dist/core/playback/SubdivisionPlaybackController.d.ts.map +1 -0
- package/dist/core/playback/index.d.ts +5 -0
- package/dist/core/playback/index.d.ts.map +1 -0
- package/dist/core/progression/CharacterUpdater.d.ts +203 -0
- package/dist/core/progression/CharacterUpdater.d.ts.map +1 -0
- package/dist/core/progression/LevelUpProcessor.d.ts +234 -0
- package/dist/core/progression/LevelUpProcessor.d.ts.map +1 -0
- package/dist/core/progression/PrestigeSystem.d.ts +217 -0
- package/dist/core/progression/PrestigeSystem.d.ts.map +1 -0
- package/dist/core/progression/RhythmXPCalculator.d.ts +182 -0
- package/dist/core/progression/RhythmXPCalculator.d.ts.map +1 -0
- package/dist/core/progression/SessionTracker.d.ts +169 -0
- package/dist/core/progression/SessionTracker.d.ts.map +1 -0
- package/dist/core/progression/XPCalculator.d.ts +128 -0
- package/dist/core/progression/XPCalculator.d.ts.map +1 -0
- package/dist/core/progression/stat/StatIncreaseStrategy.d.ts +97 -0
- package/dist/core/progression/stat/StatIncreaseStrategy.d.ts.map +1 -0
- package/dist/core/progression/stat/StatManager.d.ts +179 -0
- package/dist/core/progression/stat/StatManager.d.ts.map +1 -0
- package/dist/core/sensors/EnvironmentalSensors.d.ts +301 -0
- package/dist/core/sensors/EnvironmentalSensors.d.ts.map +1 -0
- package/dist/core/sensors/GamingPlatformSensors.d.ts +162 -0
- package/dist/core/sensors/GamingPlatformSensors.d.ts.map +1 -0
- package/dist/core/sensors/GeolocationProvider.d.ts +156 -0
- package/dist/core/sensors/GeolocationProvider.d.ts.map +1 -0
- package/dist/core/sensors/MotionDetector.d.ts +58 -0
- package/dist/core/sensors/MotionDetector.d.ts.map +1 -0
- package/dist/core/sensors/SteamAPIClient.d.ts +108 -0
- package/dist/core/sensors/SteamAPIClient.d.ts.map +1 -0
- package/dist/core/sensors/WeatherAPIClient.d.ts +360 -0
- package/dist/core/sensors/WeatherAPIClient.d.ts.map +1 -0
- package/dist/core/sensors/schemas/weather.schema.d.ts +144 -0
- package/dist/core/sensors/schemas/weather.schema.d.ts.map +1 -0
- package/dist/core/skills/SkillQuery.d.ts +159 -0
- package/dist/core/skills/SkillQuery.d.ts.map +1 -0
- package/dist/core/skills/SkillTypes.d.ts +233 -0
- package/dist/core/skills/SkillTypes.d.ts.map +1 -0
- package/dist/core/skills/SkillValidator.d.ts +146 -0
- package/dist/core/skills/SkillValidator.d.ts.map +1 -0
- package/dist/core/skills/index.d.ts +11 -0
- package/dist/core/skills/index.d.ts.map +1 -0
- package/dist/core/spells/SpellQuery.d.ts +194 -0
- package/dist/core/spells/SpellQuery.d.ts.map +1 -0
- package/dist/core/spells/SpellTypes.d.ts +71 -0
- package/dist/core/spells/SpellTypes.d.ts.map +1 -0
- package/dist/core/spells/SpellValidator.d.ts +129 -0
- package/dist/core/spells/SpellValidator.d.ts.map +1 -0
- package/dist/core/spells/index.d.ts +11 -0
- package/dist/core/spells/index.d.ts.map +1 -0
- package/dist/core/types/AudioProfile.d.ts +143 -0
- package/dist/core/types/AudioProfile.d.ts.map +1 -0
- package/dist/core/types/BeatMap.d.ts +1825 -0
- package/dist/core/types/BeatMap.d.ts.map +1 -0
- package/dist/core/types/ButtonMapping.d.ts +345 -0
- package/dist/core/types/ButtonMapping.d.ts.map +1 -0
- package/dist/core/types/Character.d.ts +397 -0
- package/dist/core/types/Character.d.ts.map +1 -0
- package/dist/core/types/ChartedBeatMap.d.ts +169 -0
- package/dist/core/types/ChartedBeatMap.d.ts.map +1 -0
- package/dist/core/types/Combat.d.ts +268 -0
- package/dist/core/types/Combat.d.ts.map +1 -0
- package/dist/core/types/CombatAI.d.ts +143 -0
- package/dist/core/types/CombatAI.d.ts.map +1 -0
- package/dist/core/types/Enemy.d.ts +447 -0
- package/dist/core/types/Enemy.d.ts.map +1 -0
- package/dist/core/types/Environmental.d.ts +213 -0
- package/dist/core/types/Environmental.d.ts.map +1 -0
- package/dist/core/types/Equipment.d.ts +309 -0
- package/dist/core/types/Equipment.d.ts.map +1 -0
- package/dist/core/types/ISessionTracker.d.ts +48 -0
- package/dist/core/types/ISessionTracker.d.ts.map +1 -0
- package/dist/core/types/LevelExport.d.ts +366 -0
- package/dist/core/types/LevelExport.d.ts.map +1 -0
- package/dist/core/types/Playlist.d.ts +70 -0
- package/dist/core/types/Playlist.d.ts.map +1 -0
- package/dist/core/types/Prestige.d.ts +94 -0
- package/dist/core/types/Prestige.d.ts.map +1 -0
- package/dist/core/types/Progression.d.ts +214 -0
- package/dist/core/types/Progression.d.ts.map +1 -0
- package/dist/core/types/RhythmXP.d.ts +398 -0
- package/dist/core/types/RhythmXP.d.ts.map +1 -0
- package/dist/core/utils/AbilityConstants.d.ts +31 -0
- package/dist/core/utils/AbilityConstants.d.ts.map +1 -0
- package/dist/core/utils/EffectApplierUtils.d.ts +56 -0
- package/dist/core/utils/EffectApplierUtils.d.ts.map +1 -0
- package/dist/core/utils/ImageValidator.d.ts +66 -0
- package/dist/core/utils/ImageValidator.d.ts.map +1 -0
- package/dist/core/utils/PrerequisiteValidator.d.ts +88 -0
- package/dist/core/utils/PrerequisiteValidator.d.ts.map +1 -0
- package/dist/essentia-wasm.es-BUEnKUts.js +2990 -0
- package/dist/essentia.js-model.es-CGA0xotH.js +306 -0
- package/dist/index.d.ts +176 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/playlist-data-engine.js +124 -0
- package/dist/playlist-data-engine.mjs +49251 -0
- package/dist/utils/EnchantmentLibrary.d.ts +378 -0
- package/dist/utils/EnchantmentLibrary.d.ts.map +1 -0
- package/dist/utils/arweaveGatewayManager.d.ts +485 -0
- package/dist/utils/arweaveGatewayManager.d.ts.map +1 -0
- package/dist/utils/arweaveUtils.d.ts +118 -0
- package/dist/utils/arweaveUtils.d.ts.map +1 -0
- package/dist/utils/constants.d.ts +439 -0
- package/dist/utils/constants.d.ts.map +1 -0
- package/dist/utils/equipmentConstants.d.ts +60 -0
- package/dist/utils/equipmentConstants.d.ts.map +1 -0
- package/dist/utils/hash.d.ts +33 -0
- package/dist/utils/hash.d.ts.map +1 -0
- package/dist/utils/logger.d.ts +192 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/magicItemExamples.d.ts +46 -0
- package/dist/utils/magicItemExamples.d.ts.map +1 -0
- package/dist/utils/playlistUtils.d.ts +149 -0
- package/dist/utils/playlistUtils.d.ts.map +1 -0
- package/dist/utils/random.d.ts +34 -0
- package/dist/utils/random.d.ts.map +1 -0
- package/dist/utils/sensorDashboard.d.ts +60 -0
- package/dist/utils/sensorDashboard.d.ts.map +1 -0
- package/dist/utils/validators.d.ts +189 -0
- package/dist/utils/validators.d.ts.map +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +82 -0
|
@@ -0,0 +1,447 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enemy Generation Type Definitions
|
|
3
|
+
*
|
|
4
|
+
* Defines types and interfaces for the enemy generation system.
|
|
5
|
+
* Enemies are generated as CharacterSheet instances with enemy-specific
|
|
6
|
+
* traits and abilities, supporting multiple rarity tiers and audio-influenced generation.
|
|
7
|
+
*/
|
|
8
|
+
import type { AudioProfile } from './AudioProfile.js';
|
|
9
|
+
import type { AbilityScores, Attack } from './Character.js';
|
|
10
|
+
import type { DamageType } from './Combat.js';
|
|
11
|
+
import type { PlaylistTrack } from './Playlist.js';
|
|
12
|
+
/**
|
|
13
|
+
* Enemy categories for classification and filtering
|
|
14
|
+
*/
|
|
15
|
+
export type EnemyCategory = 'humanoid' | 'beast' | 'undead' | 'dragon' | 'fiend' | 'construct' | 'elemental' | 'monstrosity';
|
|
16
|
+
/**
|
|
17
|
+
* Rarity tiers that determine enemy power scaling
|
|
18
|
+
*
|
|
19
|
+
* Each rarity increases stats, scales signature ability dice, and adds extra abilities
|
|
20
|
+
*/
|
|
21
|
+
export type EnemyRarity = 'common' | 'uncommon' | 'elite' | 'boss';
|
|
22
|
+
/**
|
|
23
|
+
* Combat archetypes that define enemy role in battle
|
|
24
|
+
*/
|
|
25
|
+
export type EnemyArchetype = 'brute' | 'archer' | 'support';
|
|
26
|
+
/**
|
|
27
|
+
* Enemy mix modes for encounter generation
|
|
28
|
+
*/
|
|
29
|
+
export type EnemyMixMode = 'uniform' | 'custom' | 'category' | 'random';
|
|
30
|
+
/**
|
|
31
|
+
* Difficulty settings for party-based encounters
|
|
32
|
+
*
|
|
33
|
+
* Maps to D&D 5e encounter difficulty thresholds
|
|
34
|
+
*/
|
|
35
|
+
export type EncounterDifficulty = 'easy' | 'medium' | 'hard' | 'deadly';
|
|
36
|
+
/**
|
|
37
|
+
* Signature ability - The unique ability shared across all rarities of an enemy type
|
|
38
|
+
*
|
|
39
|
+
* The damageDie scales by rarity: d6 (common) -> d8 (uncommon) -> d10 (elite) -> d12 (boss)
|
|
40
|
+
*/
|
|
41
|
+
export interface SignatureAbility {
|
|
42
|
+
/** Unique identifier for this ability */
|
|
43
|
+
id: string;
|
|
44
|
+
/** Display name shown to players */
|
|
45
|
+
name: string;
|
|
46
|
+
/** Detailed description of what the ability does */
|
|
47
|
+
description: string;
|
|
48
|
+
/** Base damage die (scales by rarity: d6 -> d8 -> d10 -> d12) */
|
|
49
|
+
damageDie: string;
|
|
50
|
+
/** Type of damage dealt */
|
|
51
|
+
damageType: DamageType;
|
|
52
|
+
/** Attack type (melee, ranged, spell) */
|
|
53
|
+
attackType: 'melee' | 'ranged' | 'spell';
|
|
54
|
+
/** Range in feet (for ranged attacks) */
|
|
55
|
+
range?: number;
|
|
56
|
+
/** Any special properties (e.g., 'versatile', 'finesse') */
|
|
57
|
+
properties?: string[];
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Audio preference weights for template selection
|
|
61
|
+
*
|
|
62
|
+
* Determines which templates are more likely to be selected
|
|
63
|
+
* based on audio profile characteristics
|
|
64
|
+
*/
|
|
65
|
+
export interface AudioPreference {
|
|
66
|
+
/** Weight for bass-heavy audio (0.0 - 1.0) */
|
|
67
|
+
bass: number;
|
|
68
|
+
/** Weight for mid-range audio (0.0 - 1.0) */
|
|
69
|
+
mid: number;
|
|
70
|
+
/** Weight for treble-heavy audio (0.0 - 1.0) */
|
|
71
|
+
treble: number;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Enemy template - Base definition for an enemy type
|
|
75
|
+
*
|
|
76
|
+
* Templates define the foundation of an enemy that is then scaled
|
|
77
|
+
* by rarity tier and modified by audio profile
|
|
78
|
+
*/
|
|
79
|
+
export interface EnemyTemplate {
|
|
80
|
+
/** Unique identifier (e.g., 'orc', 'goblin-archer', 'giant-spider') */
|
|
81
|
+
id: string;
|
|
82
|
+
/** Display name (used as enemy name when generated) */
|
|
83
|
+
name: string;
|
|
84
|
+
/** Category for classification and filtering */
|
|
85
|
+
category: EnemyCategory;
|
|
86
|
+
/** Combat role archetype */
|
|
87
|
+
archetype: EnemyArchetype;
|
|
88
|
+
/** Signature ability shared across all rarities */
|
|
89
|
+
signatureAbility: SignatureAbility;
|
|
90
|
+
/** Base ability scores before rarity scaling */
|
|
91
|
+
baseStats: AbilityScores;
|
|
92
|
+
/** Base hit points before rarity scaling */
|
|
93
|
+
baseHP: number;
|
|
94
|
+
/** Base armor class before DEX modifier */
|
|
95
|
+
baseAC: number;
|
|
96
|
+
/** Base speed in feet */
|
|
97
|
+
baseSpeed: number;
|
|
98
|
+
/** Audio preference weights for template selection */
|
|
99
|
+
audioPreference: AudioPreference;
|
|
100
|
+
/** Damage resistances/immunities for Elite+ rarity scaling */
|
|
101
|
+
resistances?: {
|
|
102
|
+
/** Damage types resisted (half damage) */
|
|
103
|
+
resistances?: DamageType[];
|
|
104
|
+
/** Damage types immune (zero damage) */
|
|
105
|
+
immunities?: DamageType[];
|
|
106
|
+
};
|
|
107
|
+
/** Optional icon URL for small UI display */
|
|
108
|
+
icon?: string;
|
|
109
|
+
/** Optional image URL for larger display */
|
|
110
|
+
image?: string;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Rarity configuration - Scaling factors per rarity tier
|
|
114
|
+
*
|
|
115
|
+
* Defines how enemies scale across rarity tiers
|
|
116
|
+
*/
|
|
117
|
+
export interface RarityConfig {
|
|
118
|
+
/** Multiplier applied to base ability scores */
|
|
119
|
+
statMultiplier: number;
|
|
120
|
+
/** Multiplier applied to HP on top of stat scaling (separate for dramatic HP differences) */
|
|
121
|
+
hpMultiplier: number;
|
|
122
|
+
/** Die size for signature ability (6 = d6, 8 = d8, etc.) */
|
|
123
|
+
signatureDieSize: number;
|
|
124
|
+
/** Number of extra abilities from FeatureQuery pool */
|
|
125
|
+
extraAbilityCount: number;
|
|
126
|
+
/** Whether this rarity gains resistances from template */
|
|
127
|
+
hasResistances: boolean;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Options for generating a single enemy
|
|
131
|
+
*
|
|
132
|
+
* All generation is deterministic based on the provided seed
|
|
133
|
+
*
|
|
134
|
+
* ## CR vs Rarity Distinction
|
|
135
|
+
*
|
|
136
|
+
* **CR (Challenge Rating)** and **Rarity** are two INDEPENDENT axes:
|
|
137
|
+
*
|
|
138
|
+
* | Property | Determines | Examples |
|
|
139
|
+
* |----------|------------|----------|
|
|
140
|
+
* | **CR** | Power level (stats, HP, level, proficiency) | Weak beast vs. ancient dragon |
|
|
141
|
+
* | **Rarity** | Complexity (abilities, resistances, legendary actions) | Simple guard vs. complex spellcaster |
|
|
142
|
+
*
|
|
143
|
+
* **Any CR can combine with any rarity:**
|
|
144
|
+
* - CR 0.25 + Boss = Goblin chieftain (weak but complex)
|
|
145
|
+
* - CR 20 + Common = Ancient beast (powerful but simple)
|
|
146
|
+
*
|
|
147
|
+
* **CR is the primary power-scaling parameter.** Always provide `cr` for predictable enemy power.
|
|
148
|
+
* If omitted, CR is derived from rarity (deprecated behavior for backward compatibility).
|
|
149
|
+
*/
|
|
150
|
+
export interface EnemyGenerationOptions {
|
|
151
|
+
/** Required - Seed for deterministic generation */
|
|
152
|
+
seed: string;
|
|
153
|
+
/**
|
|
154
|
+
* Challenge Rating for power scaling.
|
|
155
|
+
*
|
|
156
|
+
* **RECOMMENDED** - Always provide CR for predictable power scaling.
|
|
157
|
+
* Determines level, HP, and base stats. Fractional CRs (0.25, 0.5) create sub-level enemies
|
|
158
|
+
* with reduced stats (75%/85% respectively).
|
|
159
|
+
*
|
|
160
|
+
* If omitted, falls back to rarity-based CR (deprecated for backward compatibility).
|
|
161
|
+
*
|
|
162
|
+
* @example
|
|
163
|
+
* ```typescript
|
|
164
|
+
* // Generate a CR 5 elite enemy
|
|
165
|
+
* EnemyGenerator.generate({ seed: 'test', cr: 5, rarity: 'elite' });
|
|
166
|
+
*
|
|
167
|
+
* // Generate a weak but complex boss (CR 0.25 + boss)
|
|
168
|
+
* EnemyGenerator.generate({ seed: 'test', cr: 0.25, rarity: 'boss' });
|
|
169
|
+
* ```
|
|
170
|
+
*/
|
|
171
|
+
cr?: number;
|
|
172
|
+
/**
|
|
173
|
+
* Optional level override. If provided, overrides CR-based level calculation.
|
|
174
|
+
* Default: derived from CR via CRLevelConverter (CR ≈ level in D&D 5e)
|
|
175
|
+
*/
|
|
176
|
+
level?: number;
|
|
177
|
+
/** Optional - Force specific template by ID */
|
|
178
|
+
templateId?: string;
|
|
179
|
+
/**
|
|
180
|
+
* Rarity tier for complexity scaling.
|
|
181
|
+
* Affects ability count, resistances, and legendary actions - NOT power level.
|
|
182
|
+
* @default 'common'
|
|
183
|
+
*/
|
|
184
|
+
rarity?: EnemyRarity;
|
|
185
|
+
/** Optional - Difficulty multiplier (default: 1.0) */
|
|
186
|
+
difficultyMultiplier?: number;
|
|
187
|
+
/** Optional - Audio profile for stat influence */
|
|
188
|
+
audioProfile?: AudioProfile;
|
|
189
|
+
/** Optional - Track data (required if audioProfile provided) */
|
|
190
|
+
track?: PlaylistTrack;
|
|
191
|
+
/**
|
|
192
|
+
* Optional - Override effective levels for HP, attack, and defense independently
|
|
193
|
+
*
|
|
194
|
+
* Allows each stat axis to scale at a different effective level than the CR-derived level.
|
|
195
|
+
* When not set, all stats use the CR-derived level (identical to current generation).
|
|
196
|
+
*
|
|
197
|
+
* @see StatLevelOverrides
|
|
198
|
+
* @example
|
|
199
|
+
* ```typescript
|
|
200
|
+
* // Glass cannon: high attack, low HP and defense
|
|
201
|
+
* EnemyGenerator.generate({
|
|
202
|
+
* seed: 'glass-cannon',
|
|
203
|
+
* cr: 5,
|
|
204
|
+
* rarity: 'elite',
|
|
205
|
+
* statLevels: { attackLevel: 15, hpLevel: 1, defenseLevel: 1 }
|
|
206
|
+
* });
|
|
207
|
+
* ```
|
|
208
|
+
*/
|
|
209
|
+
statLevels?: StatLevelOverrides;
|
|
210
|
+
/** Optional - Enemy category for template selection */
|
|
211
|
+
category?: EnemyCategory;
|
|
212
|
+
/** Optional - Combat archetype for template selection */
|
|
213
|
+
archetype?: EnemyArchetype;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Options for generating an encounter (group of enemies)
|
|
217
|
+
*
|
|
218
|
+
* Supports two generation modes:
|
|
219
|
+
* 1. Party-based: Analyze party strength for balanced encounter
|
|
220
|
+
* 2. CR-based: Generate enemies matching target CR directly
|
|
221
|
+
*
|
|
222
|
+
* CR vs Rarity Distinction:
|
|
223
|
+
* - **CR (Challenge Rating)**: Determines power level (stats, HP, level, proficiency)
|
|
224
|
+
* - **Rarity**: Determines complexity (abilities, resistances, legendary actions)
|
|
225
|
+
*
|
|
226
|
+
* By default, rarity is **independent of CR**. Set `scaleRarityWithCR: true` to enable
|
|
227
|
+
* automatic rarity scaling based on CR tier (opt-in feature).
|
|
228
|
+
*/
|
|
229
|
+
export interface EncounterGenerationOptions {
|
|
230
|
+
/** Required - Seed for deterministic generation */
|
|
231
|
+
seed: string;
|
|
232
|
+
/** Required - Number of enemies to generate */
|
|
233
|
+
count: number;
|
|
234
|
+
/** Optional - Difficulty for party-based encounters (default: 'medium') */
|
|
235
|
+
difficulty?: EncounterDifficulty;
|
|
236
|
+
/** Optional - Target CR for CR-based generation (no party needed) */
|
|
237
|
+
targetCR?: number;
|
|
238
|
+
/**
|
|
239
|
+
* Optional - Base rarity for all enemies (default: 'common')
|
|
240
|
+
*
|
|
241
|
+
* Rarity is independent of CR by default. Use `scaleRarityWithCR: true` to enable
|
|
242
|
+
* automatic rarity scaling based on CR tier.
|
|
243
|
+
*/
|
|
244
|
+
baseRarity?: EnemyRarity;
|
|
245
|
+
/**
|
|
246
|
+
* Optional - Enable automatic rarity scaling based on CR (default: false)
|
|
247
|
+
*
|
|
248
|
+
* When enabled, rarities scale gradually with CR:
|
|
249
|
+
* - CR 0-2: all common
|
|
250
|
+
* - CR 3-5: one uncommon upgrade per party
|
|
251
|
+
* - CR 6-10: two uncommon upgrades
|
|
252
|
+
* - CR 11-15: three uncommon upgrades
|
|
253
|
+
* - CR 16-20: one elite + uncommon upgrades
|
|
254
|
+
* - CR 21-30: two elite + uncommon upgrades
|
|
255
|
+
* - CR 31+: all elite
|
|
256
|
+
*
|
|
257
|
+
* When disabled (default), uses explicit `baseRarity` for all enemies.
|
|
258
|
+
*/
|
|
259
|
+
scaleRarityWithCR?: boolean;
|
|
260
|
+
/** Optional - Fine-tune difficulty multiplier (default: 1.0) */
|
|
261
|
+
difficultyMultiplier?: number;
|
|
262
|
+
/** Optional - Filter by category */
|
|
263
|
+
category?: EnemyCategory;
|
|
264
|
+
/** Optional - Filter by archetype */
|
|
265
|
+
archetype?: EnemyArchetype;
|
|
266
|
+
/** Optional - Force specific template for all enemies */
|
|
267
|
+
templateId?: string;
|
|
268
|
+
/** Optional - Enemy mix mode (default: 'uniform') */
|
|
269
|
+
enemyMix?: EnemyMixMode;
|
|
270
|
+
/** Optional - Template IDs for 'custom' mix mode */
|
|
271
|
+
templates?: string[];
|
|
272
|
+
/** Optional - Audio profile for template selection and stat influence */
|
|
273
|
+
audioProfile?: AudioProfile;
|
|
274
|
+
/** Optional - Track data (required if audioProfile provided) */
|
|
275
|
+
track?: PlaylistTrack;
|
|
276
|
+
/** Optional - Enable leader promotion for groups > 3 (default: true) */
|
|
277
|
+
enableLeaderPromotion?: boolean;
|
|
278
|
+
/** Optional - Allow mixing enemy categories in 'random' mode (default: false) */
|
|
279
|
+
allowMixedCategories?: boolean;
|
|
280
|
+
/** Optional - Include lair actions for boss enemies (default: false) */
|
|
281
|
+
lairFeatures?: boolean;
|
|
282
|
+
/** Optional - Force minimum rarity for all enemies */
|
|
283
|
+
minRarity?: EnemyRarity;
|
|
284
|
+
/** Optional - Cap maximum rarity for all enemies */
|
|
285
|
+
maxRarity?: EnemyRarity;
|
|
286
|
+
/** Optional - Override effective levels for HP, attack, and defense independently */
|
|
287
|
+
statLevels?: StatLevelOverrides;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Generated enemy metadata
|
|
291
|
+
*
|
|
292
|
+
* Tracks information about how an enemy was generated
|
|
293
|
+
*/
|
|
294
|
+
export interface EnemyMetadata {
|
|
295
|
+
/** Template ID used for generation */
|
|
296
|
+
templateId: string;
|
|
297
|
+
/** Rarity tier of this enemy */
|
|
298
|
+
rarity: EnemyRarity;
|
|
299
|
+
/** Seed used for generation */
|
|
300
|
+
seed: string;
|
|
301
|
+
/** Whether leader promotion was applied */
|
|
302
|
+
isLeader?: boolean;
|
|
303
|
+
/** Audio profile used (if any) */
|
|
304
|
+
audioProfile?: AudioProfile;
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Feature type for enemy abilities
|
|
308
|
+
*
|
|
309
|
+
* Reuses ClassFeature structure but simplified for enemy use
|
|
310
|
+
* Enemies don't have classes, so features are standalone abilities
|
|
311
|
+
*/
|
|
312
|
+
export interface EnemyFeature {
|
|
313
|
+
/** Unique identifier */
|
|
314
|
+
id: string;
|
|
315
|
+
/** Display name */
|
|
316
|
+
name: string;
|
|
317
|
+
/** Description of ability */
|
|
318
|
+
description: string;
|
|
319
|
+
/** Type: passive, active, resource, trigger */
|
|
320
|
+
type: 'passive' | 'active' | 'resource' | 'trigger';
|
|
321
|
+
/** Attack data if this is an attack ability */
|
|
322
|
+
attack?: Attack;
|
|
323
|
+
/** Tags for filtering (e.g., ['melee', 'damage', 'control']) */
|
|
324
|
+
tags?: string[];
|
|
325
|
+
/** Rarity level this feature appears at */
|
|
326
|
+
minRarity?: EnemyRarity;
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Type guard to check if a value is a valid EnemyCategory
|
|
330
|
+
*/
|
|
331
|
+
export declare function isValidEnemyCategory(value: unknown): value is EnemyCategory;
|
|
332
|
+
/**
|
|
333
|
+
* Type guard to check if a value is a valid EnemyRarity
|
|
334
|
+
*/
|
|
335
|
+
export declare function isValidEnemyRarity(value: unknown): value is EnemyRarity;
|
|
336
|
+
/**
|
|
337
|
+
* Type guard to check if a value is a valid EnemyArchetype
|
|
338
|
+
*/
|
|
339
|
+
export declare function isValidEnemyArchetype(value: unknown): value is EnemyArchetype;
|
|
340
|
+
/**
|
|
341
|
+
* Stat Level Overrides — Allow HP, attack, and defense to scale independently
|
|
342
|
+
*
|
|
343
|
+
* Normally all enemy stats scale together as a unit determined by CR + rarity.
|
|
344
|
+
* StatLevelOverrides allows each axis to be independently set to a different
|
|
345
|
+
* effective level, enabling creative encounter designs:
|
|
346
|
+
* - **Tank**: high HP level, normal attack, high defense
|
|
347
|
+
* - **Glass cannon**: low HP, high attack, low defense
|
|
348
|
+
* - **Brute**: high HP, high attack, low defense
|
|
349
|
+
* - **Standard**: all at CR level (default, no overrides needed)
|
|
350
|
+
*
|
|
351
|
+
* When all three levels match CR, output is identical to current generation
|
|
352
|
+
* (backward compatible). The AI and simulator don't need to know about this —
|
|
353
|
+
* they read the final CharacterSheet stats. This is purely a generation-layer
|
|
354
|
+
* feature.
|
|
355
|
+
*/
|
|
356
|
+
export interface StatLevelOverrides {
|
|
357
|
+
/** Override HP to this effective level (default: CR-derived level) */
|
|
358
|
+
hpLevel?: number;
|
|
359
|
+
/** Override attack scaling to this effective level (damage die + modifier + attack bonus) */
|
|
360
|
+
attackLevel?: number;
|
|
361
|
+
/** Override defense scaling to this effective level (AC) */
|
|
362
|
+
defenseLevel?: number;
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Equipment template for enemy generation
|
|
366
|
+
*
|
|
367
|
+
* Defines equipment options for enemies based on archetype and rarity.
|
|
368
|
+
* Used by EquipmentGenerator to select appropriate weapons/armor for enemies.
|
|
369
|
+
*/
|
|
370
|
+
export interface EquipmentTemplate {
|
|
371
|
+
/** Unique identifier for this equipment template */
|
|
372
|
+
id: string;
|
|
373
|
+
/** Display name of the equipment */
|
|
374
|
+
name: string;
|
|
375
|
+
/** Equipment type: weapon, armor, or shield */
|
|
376
|
+
type: 'weapon' | 'armor' | 'shield';
|
|
377
|
+
/** Archetypes that can use this equipment */
|
|
378
|
+
archetypes: EnemyArchetype[];
|
|
379
|
+
/** Rarity tiers that can spawn this equipment */
|
|
380
|
+
rarities: EnemyRarity[];
|
|
381
|
+
/** Damage dice (for weapons) */
|
|
382
|
+
damage?: string;
|
|
383
|
+
/** AC bonus (for armor/shields) */
|
|
384
|
+
acBonus?: number;
|
|
385
|
+
/** Weapon properties (e.g., ['reach', 'two-handed']) */
|
|
386
|
+
properties?: string[];
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* Equipment configuration for generated enemies
|
|
390
|
+
*
|
|
391
|
+
* Contains the equipment assigned to an enemy during generation.
|
|
392
|
+
*/
|
|
393
|
+
export interface EquipmentConfig {
|
|
394
|
+
/** Primary weapon (if any) */
|
|
395
|
+
weapon?: EquipmentTemplate;
|
|
396
|
+
/** Armor (if any) */
|
|
397
|
+
armor?: EquipmentTemplate;
|
|
398
|
+
/** Shield (if any) */
|
|
399
|
+
shield?: EquipmentTemplate;
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* Type guard to check if a value is a valid EncounterDifficulty
|
|
403
|
+
*/
|
|
404
|
+
export declare function isValidEncounterDifficulty(value: unknown): value is EncounterDifficulty;
|
|
405
|
+
/**
|
|
406
|
+
* Legendary action for boss enemies
|
|
407
|
+
*
|
|
408
|
+
* Legendary actions are special abilities that boss enemies can use at the end
|
|
409
|
+
* of another creature's turn, spending legendary action points.
|
|
410
|
+
*/
|
|
411
|
+
export interface LegendaryAction {
|
|
412
|
+
/** Unique identifier for this action */
|
|
413
|
+
id: string;
|
|
414
|
+
/** Display name shown to players */
|
|
415
|
+
name: string;
|
|
416
|
+
/** Detailed description of what the action does */
|
|
417
|
+
description: string;
|
|
418
|
+
/** Cost in legendary action points (1, 2, or 3) */
|
|
419
|
+
cost: number;
|
|
420
|
+
/** Effect description for combat system */
|
|
421
|
+
effect: string;
|
|
422
|
+
/** Damage dice if this action deals damage */
|
|
423
|
+
damage?: string;
|
|
424
|
+
/** Damage type for damaging actions */
|
|
425
|
+
damageType?: string;
|
|
426
|
+
/** Archetypes this action is appropriate for */
|
|
427
|
+
archetypes: EnemyArchetype[];
|
|
428
|
+
/** Tags for filtering and categorization */
|
|
429
|
+
tags?: string[];
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* Legendary configuration for boss-tier enemies
|
|
433
|
+
*
|
|
434
|
+
* Contains all legendary-specific data for a boss enemy,
|
|
435
|
+
* including legendary resistances per day and available legendary actions.
|
|
436
|
+
*/
|
|
437
|
+
export interface LegendaryConfig {
|
|
438
|
+
/** Number of legendary resistances per day */
|
|
439
|
+
resistances: number;
|
|
440
|
+
/** Legendary actions available to this boss */
|
|
441
|
+
actions: LegendaryAction[];
|
|
442
|
+
/** Optional lair action hint for encounter design */
|
|
443
|
+
lairActionHint?: string;
|
|
444
|
+
}
|
|
445
|
+
export type { LegendaryAction as LegendaryActionFromGenerator, LegendaryConfig as LegendaryConfigFromGenerator } from '../generation/LegendaryGenerator.js';
|
|
446
|
+
export type { InnateSpell, SpellcastingConfig } from '../generation/SpellcastingGenerator.js';
|
|
447
|
+
//# sourceMappingURL=Enemy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Enemy.d.ts","sourceRoot":"","sources":["../../../src/core/types/Enemy.ts"],"names":[],"mappings":"AAAA;;;;;;GAM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,mBAAmB,CAGvF;AAED;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC5B,wCAAwC;IACxC,EAAE,EAAE,MAAM,CAAC;IAEX,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;IAEb,mDAAmD;IACnD,WAAW,EAAE,MAAM,CAAC;IAEpB,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAC;IAEb,2CAA2C;IAC3C,MAAM,EAAE,MAAM,CAAC;IAEf,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,uCAAuC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,gDAAgD;IAChD,UAAU,EAAE,cAAc,EAAE,CAAC;IAE7B,4CAA4C;IAC5C,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC5B,8CAA8C;IAC9C,WAAW,EAAE,MAAM,CAAC;IAEpB,+CAA+C;IAC/C,OAAO,EAAE,eAAe,EAAE,CAAC;IAE3B,qDAAqD;IACrD,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAID,YAAY,EAAE,eAAe,IAAI,4BAA4B,EAAE,eAAe,IAAI,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AAI5J,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC"}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
export type SensorType = 'geolocation' | 'motion' | 'weather';
|
|
2
|
+
/**
|
|
3
|
+
* Performance metrics for API calls
|
|
4
|
+
*/
|
|
5
|
+
export interface PerformanceMetrics {
|
|
6
|
+
/** Number of successful API calls */
|
|
7
|
+
successCount: number;
|
|
8
|
+
/** Number of failed API calls */
|
|
9
|
+
errorCount: number;
|
|
10
|
+
/** Total time spent on successful API calls (milliseconds) */
|
|
11
|
+
totalTime: number;
|
|
12
|
+
/** Time of the fastest API call (milliseconds) */
|
|
13
|
+
minTime: number;
|
|
14
|
+
/** Time of the slowest API call (milliseconds) */
|
|
15
|
+
maxTime: number;
|
|
16
|
+
/** Timestamp of the last API call */
|
|
17
|
+
lastCallTimestamp: number | null;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Detailed performance statistics derived from metrics
|
|
21
|
+
*/
|
|
22
|
+
export interface PerformanceStatistics {
|
|
23
|
+
/** Average API call time in milliseconds */
|
|
24
|
+
average: number;
|
|
25
|
+
/** Minimum API call time in milliseconds */
|
|
26
|
+
min: number;
|
|
27
|
+
/** Maximum API call time in milliseconds */
|
|
28
|
+
max: number;
|
|
29
|
+
/** Total number of API calls */
|
|
30
|
+
totalCalls: number;
|
|
31
|
+
/** Success rate as percentage (0-100) */
|
|
32
|
+
successRate: number;
|
|
33
|
+
}
|
|
34
|
+
export interface SensorPermission {
|
|
35
|
+
type: SensorType;
|
|
36
|
+
granted: boolean;
|
|
37
|
+
timestamp: number;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Health status of a sensor
|
|
41
|
+
*/
|
|
42
|
+
export type SensorHealthStatus = 'healthy' | 'degraded' | 'failed' | 'unknown';
|
|
43
|
+
/**
|
|
44
|
+
* Status information for a single sensor
|
|
45
|
+
*/
|
|
46
|
+
export interface SensorStatus {
|
|
47
|
+
type: SensorType;
|
|
48
|
+
health: SensorHealthStatus;
|
|
49
|
+
lastSuccessTimestamp: number | null;
|
|
50
|
+
lastFailureTimestamp: number | null;
|
|
51
|
+
consecutiveFailures: number;
|
|
52
|
+
totalFailures: number;
|
|
53
|
+
lastError: string | null;
|
|
54
|
+
isRetrying: boolean;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Log entry for a sensor failure event
|
|
58
|
+
*/
|
|
59
|
+
export interface SensorFailureLog {
|
|
60
|
+
sensorType: SensorType;
|
|
61
|
+
timestamp: number;
|
|
62
|
+
error: string;
|
|
63
|
+
retryAttempt: number;
|
|
64
|
+
willRetry: boolean;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Configuration for sensor retry behavior
|
|
68
|
+
*/
|
|
69
|
+
export interface SensorRetryConfig {
|
|
70
|
+
maxRetries: number;
|
|
71
|
+
initialDelayMs: number;
|
|
72
|
+
maxDelayMs: number;
|
|
73
|
+
backoffMultiplier: number;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Notification callback for sensor recovery events
|
|
77
|
+
*/
|
|
78
|
+
export interface SensorRecoveryNotification {
|
|
79
|
+
sensorType: SensorType;
|
|
80
|
+
previousStatus: SensorHealthStatus;
|
|
81
|
+
newStatus: SensorHealthStatus;
|
|
82
|
+
timestamp: number;
|
|
83
|
+
message: string;
|
|
84
|
+
}
|
|
85
|
+
export interface GeolocationData {
|
|
86
|
+
latitude: number;
|
|
87
|
+
longitude: number;
|
|
88
|
+
altitude: number | null;
|
|
89
|
+
accuracy: number;
|
|
90
|
+
heading: number | null;
|
|
91
|
+
speed: number | null;
|
|
92
|
+
timestamp: number;
|
|
93
|
+
}
|
|
94
|
+
export interface MotionData {
|
|
95
|
+
acceleration: {
|
|
96
|
+
x: number | null;
|
|
97
|
+
y: number | null;
|
|
98
|
+
z: number | null;
|
|
99
|
+
};
|
|
100
|
+
accelerationIncludingGravity: {
|
|
101
|
+
x: number;
|
|
102
|
+
y: number;
|
|
103
|
+
z: number;
|
|
104
|
+
};
|
|
105
|
+
rotationRate: {
|
|
106
|
+
alpha: number | null;
|
|
107
|
+
beta: number | null;
|
|
108
|
+
gamma: number | null;
|
|
109
|
+
};
|
|
110
|
+
interval: number;
|
|
111
|
+
timestamp: number;
|
|
112
|
+
}
|
|
113
|
+
export interface WeatherData {
|
|
114
|
+
temperature: number;
|
|
115
|
+
humidity: number;
|
|
116
|
+
pressure: number;
|
|
117
|
+
weatherType: string;
|
|
118
|
+
windSpeed: number;
|
|
119
|
+
windDirection: number;
|
|
120
|
+
isNight: boolean;
|
|
121
|
+
moonPhase: number;
|
|
122
|
+
timestamp: number;
|
|
123
|
+
}
|
|
124
|
+
export interface ForecastData {
|
|
125
|
+
temperature: number;
|
|
126
|
+
humidity: number;
|
|
127
|
+
pressure: number;
|
|
128
|
+
weatherType: string;
|
|
129
|
+
windSpeed: number;
|
|
130
|
+
windDirection: number;
|
|
131
|
+
timestamp: number;
|
|
132
|
+
forecastTime: Date;
|
|
133
|
+
probabilityOfPrecipitation: number;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Day stage categories based on sun position
|
|
137
|
+
*/
|
|
138
|
+
export type DayStage = 'night' | 'dawn' | 'day' | 'dusk';
|
|
139
|
+
/**
|
|
140
|
+
* Twilight type definitions (based on sun angle below horizon)
|
|
141
|
+
* - civil: Sun 6° below horizon (brightest stars visible)
|
|
142
|
+
* - nautical: Sun 12° below horizon (horizon visible at sea)
|
|
143
|
+
* - astronomical: Sun 18° below horizon (full darkness)
|
|
144
|
+
*/
|
|
145
|
+
export type TwilightType = 'astronomical' | 'nautical' | 'civil';
|
|
146
|
+
/**
|
|
147
|
+
* Solar information including sunrise, sunset, and day stage.
|
|
148
|
+
* Works without API key using astronomical calculations.
|
|
149
|
+
*/
|
|
150
|
+
export interface SolarInfo {
|
|
151
|
+
/** Current time */
|
|
152
|
+
currentTime: Date;
|
|
153
|
+
/** Current day stage */
|
|
154
|
+
stage: DayStage;
|
|
155
|
+
/** Sunrise time (when sun first appears above horizon) */
|
|
156
|
+
sunrise: Date;
|
|
157
|
+
/** Sunset time (when sun last appears above horizon) */
|
|
158
|
+
sunset: Date;
|
|
159
|
+
/** Solar noon (when sun is at highest point) */
|
|
160
|
+
solarNoon: Date;
|
|
161
|
+
/** Civil dawn time (sun 6° below horizon, approaching sunrise) */
|
|
162
|
+
civilDawn?: Date;
|
|
163
|
+
/** Civil dusk time (sun 6° below horizon, after sunset) */
|
|
164
|
+
civilDusk?: Date;
|
|
165
|
+
/** Current sun altitude in degrees (negative = below horizon) */
|
|
166
|
+
sunAltitude: number;
|
|
167
|
+
/** Current sun azimuth in degrees (0-360, North = 0) */
|
|
168
|
+
sunAzimuth: number;
|
|
169
|
+
/** Day length in hours */
|
|
170
|
+
dayLengthHours: number;
|
|
171
|
+
/** Whether data came from API (true) or calculated astronomically (false) */
|
|
172
|
+
fromApi: boolean;
|
|
173
|
+
/** Timestamp when this data was generated */
|
|
174
|
+
timestamp: number;
|
|
175
|
+
}
|
|
176
|
+
export type BiomeType = 'urban' | 'forest' | 'desert' | 'mountain' | 'valley' | 'water' | 'tundra' | 'plains' | 'jungle' | 'swamp' | 'taiga' | 'savanna';
|
|
177
|
+
export interface EnvironmentalContext {
|
|
178
|
+
geolocation?: GeolocationData;
|
|
179
|
+
motion?: MotionData;
|
|
180
|
+
weather?: WeatherData;
|
|
181
|
+
biome?: BiomeType;
|
|
182
|
+
timestamp: number;
|
|
183
|
+
environmental_xp_modifier?: number;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* A single source of XP bonus
|
|
187
|
+
*/
|
|
188
|
+
export interface XPBonusSource {
|
|
189
|
+
/** Unique identifier for this bonus type */
|
|
190
|
+
id: string;
|
|
191
|
+
/** Human-readable label for display */
|
|
192
|
+
label: string;
|
|
193
|
+
/** Emoji icon for UI display */
|
|
194
|
+
icon: string;
|
|
195
|
+
/** The bonus multiplier value (e.g., 0.25 for +25%) */
|
|
196
|
+
bonus: number;
|
|
197
|
+
/** Whether this bonus is currently active */
|
|
198
|
+
active: boolean;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Detailed breakdown of the XP modifier calculation
|
|
202
|
+
*/
|
|
203
|
+
export interface XpModifierBreakdown {
|
|
204
|
+
/** Final computed modifier (1.0 - 3.0) */
|
|
205
|
+
total: number;
|
|
206
|
+
/** Base value, always 1.0 */
|
|
207
|
+
baseValue: number;
|
|
208
|
+
/** All possible bonus sources with their active state */
|
|
209
|
+
sources: XPBonusSource[];
|
|
210
|
+
/** Only the currently active bonuses (convenience) */
|
|
211
|
+
activeBonuses: XPBonusSource[];
|
|
212
|
+
}
|
|
213
|
+
//# sourceMappingURL=Environmental.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Environmental.d.ts","sourceRoot":"","sources":["../../../src/core/types/Environmental.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,aAAa,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B,qCAAqC;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,iCAAiC;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,SAAS,EAAE,MAAM,CAAC;IAClB,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB,qCAAqC;IACrC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,4CAA4C;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,4CAA4C;IAC5C,GAAG,EAAE,MAAM,CAAC;IACZ,4CAA4C;IAC5C,GAAG,EAAE,MAAM,CAAC;IACZ,gCAAgC;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,yCAAyC;IACzC,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE/E;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,mBAAm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