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,203 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DifficultyCalculator — Suggests enemy configurations for a target difficulty
|
|
3
|
+
* using simulation-driven binary search.
|
|
4
|
+
*
|
|
5
|
+
* Given a party and a desired difficulty, this class iteratively runs
|
|
6
|
+
* simulations at different CR values, adjusting up or down until the
|
|
7
|
+
* player win rate converges on the expected win rate range for the
|
|
8
|
+
* target difficulty.
|
|
9
|
+
*
|
|
10
|
+
* The search uses a two-phase approach:
|
|
11
|
+
* 1. **XP Budget Estimate** — `getCRFromXP()` provides the initial CR guess
|
|
12
|
+
* based on D&D 5e encounter building math.
|
|
13
|
+
* 2. **Simulation-Driven Refinement** — binary search over CR values, running
|
|
14
|
+
* simulations at each step to measure actual win rate, adjusting until
|
|
15
|
+
* the win rate falls within the target range.
|
|
16
|
+
*
|
|
17
|
+
* Returns a `DifficultySuggestion` with the recommended CR, confidence
|
|
18
|
+
* interval, and the simulation data backing the recommendation.
|
|
19
|
+
*
|
|
20
|
+
* Usage:
|
|
21
|
+
* ```ts
|
|
22
|
+
* const calculator = new DifficultyCalculator();
|
|
23
|
+
* const suggestion = calculator.suggest(
|
|
24
|
+
* party,
|
|
25
|
+
* { rarity: 'elite', category: 'humanoid', archetype: 'brute' },
|
|
26
|
+
* 'medium',
|
|
27
|
+
* { aiConfig: { playerStyle: 'normal', enemyStyle: 'aggressive' }, baseSeed: 'my-search' },
|
|
28
|
+
* );
|
|
29
|
+
* console.log(suggestion.recommendedCR); // e.g., 3
|
|
30
|
+
* console.log(suggestion.winRate); // e.g., 0.73
|
|
31
|
+
* console.log(suggestion.confidenceInterval); // e.g., '72% ± 5%'
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
import type { CharacterSheet } from '../../types/Character.js';
|
|
35
|
+
import type { AIConfig } from '../../types/CombatAI.js';
|
|
36
|
+
import type { CombatConfig } from '../../types/Combat.js';
|
|
37
|
+
import type { EncounterDifficulty, EnemyRarity, EnemyCategory, EnemyArchetype, StatLevelOverrides } from '../../types/Enemy.js';
|
|
38
|
+
/**
|
|
39
|
+
* Configuration for the difficulty calculation search.
|
|
40
|
+
*/
|
|
41
|
+
export interface DifficultyCalculatorOptions {
|
|
42
|
+
/** AI configuration for all simulations */
|
|
43
|
+
aiConfig: AIConfig;
|
|
44
|
+
/** Optional combat engine configuration */
|
|
45
|
+
combatConfig?: CombatConfig;
|
|
46
|
+
/** Base seed — each simulation iteration gets a derived seed */
|
|
47
|
+
baseSeed?: string;
|
|
48
|
+
/** Number of simulations to run per CR probe (default: 200) */
|
|
49
|
+
simulationsPerProbe?: number;
|
|
50
|
+
/**
|
|
51
|
+
* Maximum number of binary search iterations (default: 10).
|
|
52
|
+
* Each iteration runs a full simulation at one CR value.
|
|
53
|
+
*/
|
|
54
|
+
maxIterations?: number;
|
|
55
|
+
/** Number of enemies in the encounter (default: 1) */
|
|
56
|
+
enemyCount?: number;
|
|
57
|
+
/** AbortSignal for cancellation */
|
|
58
|
+
abortSignal?: AbortSignal;
|
|
59
|
+
/** Progress callback: (iteration, maxIterations, currentCR) */
|
|
60
|
+
onProgress?: (iteration: number, maxIterations: number, currentCR: number) => void;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Enemy template configuration for generating enemies during the search.
|
|
64
|
+
*
|
|
65
|
+
* The CR field is set automatically by the search — all other fields
|
|
66
|
+
* define the "template" enemy that gets generated at each CR level.
|
|
67
|
+
*/
|
|
68
|
+
export interface DifficultyEnemyTemplate {
|
|
69
|
+
/** Rarity tier (default: 'elite') */
|
|
70
|
+
rarity?: EnemyRarity;
|
|
71
|
+
/** Enemy category (default: 'humanoid') */
|
|
72
|
+
category?: EnemyCategory;
|
|
73
|
+
/** Combat archetype (default: 'brute') */
|
|
74
|
+
archetype?: EnemyArchetype;
|
|
75
|
+
/** Template ID for deterministic generation */
|
|
76
|
+
templateId?: string;
|
|
77
|
+
/** Stat level overrides */
|
|
78
|
+
statLevels?: StatLevelOverrides;
|
|
79
|
+
/** Difficulty multiplier */
|
|
80
|
+
difficultyMultiplier?: number;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* A single probe point from the binary search.
|
|
84
|
+
* Records the CR tested and the simulation outcome.
|
|
85
|
+
*/
|
|
86
|
+
export interface DifficultyProbe {
|
|
87
|
+
/** CR value tested */
|
|
88
|
+
cr: number;
|
|
89
|
+
/** Player win rate from simulation */
|
|
90
|
+
winRate: number;
|
|
91
|
+
/** Total simulation runs */
|
|
92
|
+
totalRuns: number;
|
|
93
|
+
/** Average rounds to combat resolution */
|
|
94
|
+
averageRounds: number;
|
|
95
|
+
/** Average player HP remaining percent on winning runs */
|
|
96
|
+
averageHPRemaining: number;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Complete difficulty suggestion result.
|
|
100
|
+
*
|
|
101
|
+
* Contains the recommended CR, the simulation data backing it,
|
|
102
|
+
* confidence information, and the search history.
|
|
103
|
+
*/
|
|
104
|
+
export interface DifficultySuggestion {
|
|
105
|
+
/** The target difficulty */
|
|
106
|
+
targetDifficulty: EncounterDifficulty;
|
|
107
|
+
/**
|
|
108
|
+
* Recommended CR for a single enemy.
|
|
109
|
+
* For multi-enemy encounters, divide this by enemy count (approximately).
|
|
110
|
+
*/
|
|
111
|
+
recommendedCR: number;
|
|
112
|
+
/** Player win rate at the recommended CR */
|
|
113
|
+
winRate: number;
|
|
114
|
+
/** Expected win rate range for the target difficulty */
|
|
115
|
+
expectedWinRateRange: {
|
|
116
|
+
min: number;
|
|
117
|
+
max: number;
|
|
118
|
+
};
|
|
119
|
+
/** Human-readable confidence interval string, e.g., "72% ± 5%" */
|
|
120
|
+
confidenceInterval: string;
|
|
121
|
+
/** Statistical margin of error (±) for the win rate */
|
|
122
|
+
marginOfError: number;
|
|
123
|
+
/** Whether the search converged on the target range */
|
|
124
|
+
converged: boolean;
|
|
125
|
+
/** Total simulations run across all probes */
|
|
126
|
+
totalSimulationsRun: number;
|
|
127
|
+
/** Number of search iterations performed */
|
|
128
|
+
iterationsUsed: number;
|
|
129
|
+
/** All probe points from the search (CR, winRate, etc.) */
|
|
130
|
+
probes: DifficultyProbe[];
|
|
131
|
+
/** XP-budget-based initial CR estimate (before simulation refinement) */
|
|
132
|
+
initialCREstimate: number;
|
|
133
|
+
/** The generated enemy CharacterSheet at the recommended CR */
|
|
134
|
+
suggestedEnemy: CharacterSheet;
|
|
135
|
+
/** Was the search cancelled before convergence? */
|
|
136
|
+
wasCancelled: boolean;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* DifficultyCalculator — Suggests enemy CR for a target difficulty using
|
|
140
|
+
* simulation-driven binary search.
|
|
141
|
+
*
|
|
142
|
+
* Stateless between `suggest()` calls. Each call produces an independent
|
|
143
|
+
* `DifficultySuggestion`.
|
|
144
|
+
*
|
|
145
|
+
* The search works as follows:
|
|
146
|
+
* 1. Calculate XP budget for the party at the target difficulty
|
|
147
|
+
* 2. Adjust for encounter multiplier (enemy count)
|
|
148
|
+
* 3. Convert to CR estimate via `getCRFromXP()`
|
|
149
|
+
* 4. Run simulations at the estimated CR
|
|
150
|
+
* 5. If win rate is too high → increase CR; too low → decrease CR
|
|
151
|
+
* 6. Repeat until win rate is within target range or max iterations reached
|
|
152
|
+
*/
|
|
153
|
+
export declare class DifficultyCalculator {
|
|
154
|
+
private static readonly DEFAULT_SIMULATIONS_PER_PROBE;
|
|
155
|
+
private static readonly DEFAULT_MAX_ITERATIONS;
|
|
156
|
+
private static readonly CR_STEP_MIN;
|
|
157
|
+
private static readonly CR_FLOOR;
|
|
158
|
+
private static readonly CR_CEILING;
|
|
159
|
+
/**
|
|
160
|
+
* Suggest an enemy CR for the given party and target difficulty.
|
|
161
|
+
*
|
|
162
|
+
* @param players - Player character sheets
|
|
163
|
+
* @param enemyTemplate - Template for generating enemies (rarity, category, etc.)
|
|
164
|
+
* @param targetDifficulty - The desired encounter difficulty
|
|
165
|
+
* @param options - Calculator options (AI config, seed, probe count, etc.)
|
|
166
|
+
* @returns Complete difficulty suggestion with recommended CR and simulation data
|
|
167
|
+
*/
|
|
168
|
+
suggest(players: CharacterSheet[], enemyTemplate: DifficultyEnemyTemplate, targetDifficulty: EncounterDifficulty, options: DifficultyCalculatorOptions): DifficultySuggestion;
|
|
169
|
+
/**
|
|
170
|
+
* Run a simulation probe at a given CR and return the summary.
|
|
171
|
+
*/
|
|
172
|
+
private runProbe;
|
|
173
|
+
/**
|
|
174
|
+
* Generate enemies from the template at the given CR.
|
|
175
|
+
*/
|
|
176
|
+
private generateEnemies;
|
|
177
|
+
/**
|
|
178
|
+
* Generate a single enemy from the template at the given CR.
|
|
179
|
+
*/
|
|
180
|
+
private generateEnemy;
|
|
181
|
+
/**
|
|
182
|
+
* Calculate margin of error for a proportion using the normal approximation.
|
|
183
|
+
*
|
|
184
|
+
* MOE = z * sqrt(p * (1 - p) / n) at 95% confidence (z = 1.96)
|
|
185
|
+
*/
|
|
186
|
+
private calculateMarginOfError;
|
|
187
|
+
/**
|
|
188
|
+
* Format a confidence interval as a human-readable string.
|
|
189
|
+
*
|
|
190
|
+
* Example: "72% ± 5%"
|
|
191
|
+
*/
|
|
192
|
+
private formatConfidenceInterval;
|
|
193
|
+
/**
|
|
194
|
+
* Round CR to a standard D&D value (0.125, 0.25, 0.5, or integer).
|
|
195
|
+
*
|
|
196
|
+
* Maps fractional CRs to the nearest standard step:
|
|
197
|
+
* - < 0.25 → 0.125
|
|
198
|
+
* - < 0.75 → 0.5
|
|
199
|
+
* - otherwise → nearest integer
|
|
200
|
+
*/
|
|
201
|
+
private roundCR;
|
|
202
|
+
}
|
|
203
|
+
//# sourceMappingURL=DifficultyCalculator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DifficultyCalculator.d.ts","sourceRoot":"","sources":["../../../../src/core/combat/Analysis/DifficultyCalculator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAehI;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,2CAA2C;IAC3C,QAAQ,EAAE,QAAQ,CAAC;IAEnB,2CAA2C;IAC3C,YAAY,CAAC,EAAE,YAAY,CAAC;IAE5B,gEAAgE;IAChE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,+DAA+D;IAC/D,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,sDAAsD;IACtD,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,mCAAmC;IACnC,WAAW,CAAC,EAAE,WAAW,CAAC;IAE1B,+DAA+D;IAC/D,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CACpF;AAED;;;;;GAK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iBAAiB,EAAE,MAAM,CAAC;IAE1B,+DAA+D;IAC/D,cAAc,EAAE,cAAc,CAAC;IAE/B,mDAAmD;IACnD,YAAY,EAAE,OAAO,CAAC;CACvB;AAID;;;;;;;;;;;;;;GAcG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,6BAA6B,CAAO;IAC5D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,sBAAsB,CAAM;IACpD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAQ;IAC3C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAS;IACzC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAM;IAExC;;;;;;;;OAQG;IACH,OAAO,CACL,OAAO,EAAE,cAAc,EAAE,EACzB,aAAa,EAAE,uBAAuB,EACtC,gBAAgB,EAAE,mBAAmB,EACrC,OAAO,EAAE,2BAA2B,GACnC,oBAAoB;IAqIvB;;OAEG;IACH,OAAO,CAAC,QAAQ;IA4ChB;;OAEG;IACH,OAAO,CAAC,eAAe;IAavB;;OAEG;IACH,OAAO,CAAC,aAAa;IAiBrB;;;;OAIG;IACH,OAAO,CAAC,sBAAsB;IAO9B;;;;OAIG;IACH,OAAO,CAAC,wBAAwB;IAMhC;;;;;;;OAOG;IACH,OAAO,CAAC,OAAO;CAOhB"}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ParameterSweep — Systematically vary a single encounter parameter and
|
|
3
|
+
* collect simulation results at each data point.
|
|
4
|
+
*
|
|
5
|
+
* Answers questions like: "What CR makes this a Medium encounter?" or
|
|
6
|
+
* "How does adding more enemies change the win rate curve?"
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* ```ts
|
|
10
|
+
* const sweeper = new ParameterSweep();
|
|
11
|
+
* const results = sweeper.sweep(
|
|
12
|
+
* party,
|
|
13
|
+
* { cr: 3, rarity: 'elite', category: 'humanoid', archetype: 'brute' },
|
|
14
|
+
* {
|
|
15
|
+
* variable: 'cr',
|
|
16
|
+
* range: { min: 1, max: 10, step: 1 },
|
|
17
|
+
* simulationsPerPoint: 200,
|
|
18
|
+
* aiConfig: { playerStyle: 'normal', enemyStyle: 'aggressive' },
|
|
19
|
+
* },
|
|
20
|
+
* (point, total) => console.log(`Sweep ${point}/${total}`)
|
|
21
|
+
* );
|
|
22
|
+
* // results.dataPoints[i].parameterValue → CR value
|
|
23
|
+
* // results.dataPoints[i].playerWinRate → win rate at that CR
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
import type { CharacterSheet } from '../../types/Character.js';
|
|
27
|
+
import type { AIConfig } from '../../types/CombatAI.js';
|
|
28
|
+
import type { EnemyRarity, EnemyArchetype, EnemyCategory, StatLevelOverrides } from '../../types/Enemy.js';
|
|
29
|
+
/**
|
|
30
|
+
* Which encounter parameter to vary across the sweep.
|
|
31
|
+
*
|
|
32
|
+
* Each variable modifies either the enemy generation options or the party
|
|
33
|
+
* configuration before running simulations at that data point.
|
|
34
|
+
*/
|
|
35
|
+
export type SweepVariable = 'cr' | 'enemyCount' | 'partyLevel' | 'difficultyMultiplier' | 'rarity' | 'hpLevel' | 'attackLevel' | 'defenseLevel';
|
|
36
|
+
/**
|
|
37
|
+
* Range configuration for the sweep variable.
|
|
38
|
+
*
|
|
39
|
+
* Generates data points from `min` to `max` (inclusive) at `step` intervals.
|
|
40
|
+
* For example: `{ min: 1, max: 10, step: 1 }` produces 10 data points.
|
|
41
|
+
*/
|
|
42
|
+
export interface SweepRange {
|
|
43
|
+
/** Starting value of the parameter */
|
|
44
|
+
min: number;
|
|
45
|
+
/** Ending value of the parameter (inclusive) */
|
|
46
|
+
max: number;
|
|
47
|
+
/** Step size between data points */
|
|
48
|
+
step: number;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Configuration for a parameter sweep.
|
|
52
|
+
*
|
|
53
|
+
* Defines which parameter to vary, over what range, and with how many
|
|
54
|
+
* simulations per data point.
|
|
55
|
+
*/
|
|
56
|
+
export interface SweepParams {
|
|
57
|
+
/** Which parameter to vary */
|
|
58
|
+
variable: SweepVariable;
|
|
59
|
+
/** Range of values to sweep across */
|
|
60
|
+
range: SweepRange;
|
|
61
|
+
/** Number of simulations to run at each data point */
|
|
62
|
+
simulationsPerPoint: number;
|
|
63
|
+
/** AI configuration for all simulations */
|
|
64
|
+
aiConfig: AIConfig;
|
|
65
|
+
/** Optional combat engine configuration */
|
|
66
|
+
combatConfig?: import('../../types/Combat.js').CombatConfig;
|
|
67
|
+
/** Base seed — each data point gets baseSeed + '-' + parameterValue */
|
|
68
|
+
baseSeed?: string;
|
|
69
|
+
/** AbortSignal for cancelling the sweep */
|
|
70
|
+
abortSignal?: AbortSignal;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* A single data point in the sweep results.
|
|
74
|
+
*
|
|
75
|
+
* Maps a parameter value to the simulation summary at that value.
|
|
76
|
+
*/
|
|
77
|
+
export interface SweepDataPoint {
|
|
78
|
+
/** The value of the sweep parameter at this data point */
|
|
79
|
+
parameterValue: number;
|
|
80
|
+
/** Player win rate (0.0–1.0) at this parameter value */
|
|
81
|
+
playerWinRate: number;
|
|
82
|
+
/** Average number of rounds to combat resolution */
|
|
83
|
+
averageRounds: number;
|
|
84
|
+
/** Average player HP remaining percent on winning runs */
|
|
85
|
+
averageHPRemaining: number;
|
|
86
|
+
/** Total player deaths across all simulations at this point */
|
|
87
|
+
totalPlayerDeaths: number;
|
|
88
|
+
/** Total enemy deaths across all simulations at this point */
|
|
89
|
+
totalEnemyDeaths: number;
|
|
90
|
+
/** Median rounds to combat resolution */
|
|
91
|
+
medianRounds: number;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Complete results from a parameter sweep.
|
|
95
|
+
*
|
|
96
|
+
* Contains one `SweepDataPoint` per value in the sweep range, ordered
|
|
97
|
+
* from lowest parameter value to highest.
|
|
98
|
+
*/
|
|
99
|
+
export interface SweepResults {
|
|
100
|
+
/** Which parameter was swept */
|
|
101
|
+
variable: SweepVariable;
|
|
102
|
+
/** The range that was swept */
|
|
103
|
+
range: SweepRange;
|
|
104
|
+
/** Number of simulations run at each data point */
|
|
105
|
+
simulationsPerPoint: number;
|
|
106
|
+
/** Data points mapping parameter value → simulation summary */
|
|
107
|
+
dataPoints: SweepDataPoint[];
|
|
108
|
+
/** Whether the sweep was cancelled before completing all data points */
|
|
109
|
+
wasCancelled: boolean;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Base enemy configuration for the sweep.
|
|
113
|
+
*
|
|
114
|
+
* Defines the "template" enemy that gets modified by the sweep variable.
|
|
115
|
+
*/
|
|
116
|
+
export interface SweepEnemyConfig {
|
|
117
|
+
/** Challenge Rating (used as default, overridden when variable='cr') */
|
|
118
|
+
cr?: number;
|
|
119
|
+
/** Rarity tier */
|
|
120
|
+
rarity?: EnemyRarity;
|
|
121
|
+
/** Enemy category */
|
|
122
|
+
category?: EnemyCategory;
|
|
123
|
+
/** Combat archetype */
|
|
124
|
+
archetype?: EnemyArchetype;
|
|
125
|
+
/** Template ID for deterministic generation */
|
|
126
|
+
templateId?: string;
|
|
127
|
+
/** Stat level overrides */
|
|
128
|
+
statLevels?: StatLevelOverrides;
|
|
129
|
+
/** Difficulty multiplier */
|
|
130
|
+
difficultyMultiplier?: number;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* ParameterSweep — Varies a single encounter parameter across a range
|
|
134
|
+
* and runs simulations at each data point.
|
|
135
|
+
*
|
|
136
|
+
* Stateless between `sweep()` calls. Each sweep produces an independent
|
|
137
|
+
* set of results.
|
|
138
|
+
*/
|
|
139
|
+
export declare class ParameterSweep {
|
|
140
|
+
/**
|
|
141
|
+
* Run a parameter sweep.
|
|
142
|
+
*
|
|
143
|
+
* For each value in the sweep range, generates enemies (or modifies party)
|
|
144
|
+
* with that parameter value, runs simulations, and collects the summary.
|
|
145
|
+
*
|
|
146
|
+
* @param players - Player character sheets (original, unmodified)
|
|
147
|
+
* @param baseEncounter - Base enemy configuration (modified per data point)
|
|
148
|
+
* @param params - Sweep configuration (variable, range, simulations per point)
|
|
149
|
+
* @param onProgress - Optional callback: (completedPoints, totalPoints)
|
|
150
|
+
* @returns SweepResults with one data point per value in the range
|
|
151
|
+
*/
|
|
152
|
+
sweep(players: CharacterSheet[], baseEncounter: SweepEnemyConfig, params: SweepParams, onProgress?: (completed: number, total: number) => void): SweepResults;
|
|
153
|
+
/**
|
|
154
|
+
* Generate the list of parameter values from a range.
|
|
155
|
+
*/
|
|
156
|
+
private generateValues;
|
|
157
|
+
/**
|
|
158
|
+
* Apply a parameter value to the base party/encounter configuration.
|
|
159
|
+
*
|
|
160
|
+
* Returns modified copies — the originals are never mutated.
|
|
161
|
+
*/
|
|
162
|
+
private applyParameter;
|
|
163
|
+
/**
|
|
164
|
+
* Sweep CR: generate enemies at the given CR.
|
|
165
|
+
*/
|
|
166
|
+
private applyCR;
|
|
167
|
+
/**
|
|
168
|
+
* Sweep enemy count: generate N enemies with the base config.
|
|
169
|
+
*/
|
|
170
|
+
private applyEnemyCount;
|
|
171
|
+
/**
|
|
172
|
+
* Sweep party level: scale all player character levels to the given value.
|
|
173
|
+
*
|
|
174
|
+
* Creates shallow copies with adjusted level and derives reasonable stat changes.
|
|
175
|
+
* Note: this is a simplified scaling — real level-up involves class-specific features.
|
|
176
|
+
*/
|
|
177
|
+
private applyPartyLevel;
|
|
178
|
+
/**
|
|
179
|
+
* Sweep difficulty multiplier: generate enemies with the given multiplier.
|
|
180
|
+
*/
|
|
181
|
+
private applyDifficultyMultiplier;
|
|
182
|
+
/**
|
|
183
|
+
* Sweep rarity: map numeric value to rarity tier (0=common, 1=uncommon, 2=elite, 3=boss).
|
|
184
|
+
*/
|
|
185
|
+
private applyRarity;
|
|
186
|
+
/**
|
|
187
|
+
* Sweep a stat level override (hpLevel, attackLevel, or defenseLevel).
|
|
188
|
+
*/
|
|
189
|
+
private applyStatLevel;
|
|
190
|
+
/**
|
|
191
|
+
* Generate enemies from the encounter config.
|
|
192
|
+
*
|
|
193
|
+
* Generates `count` enemies, each with a unique seed derived from the config.
|
|
194
|
+
*/
|
|
195
|
+
private generateEnemies;
|
|
196
|
+
/**
|
|
197
|
+
* Extract a SweepDataPoint from a SimulationSummary.
|
|
198
|
+
*/
|
|
199
|
+
private summarizeToPoint;
|
|
200
|
+
}
|
|
201
|
+
//# sourceMappingURL=ParameterSweep.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ParameterSweep.d.ts","sourceRoot":"","sources":["../../../../src/core/combat/Analysis/ParameterSweep.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAO3G;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GACrB,IAAI,GACJ,YAAY,GACZ,YAAY,GACZ,sBAAsB,GACtB,QAAQ,GACR,SAAS,GACT,aAAa,GACb,cAAc,CAAC;AAEnB;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,sCAAsC;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,gDAAgD;IAChD,GAAG,EAAE,MAAM,CAAC;IACZ,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,8BAA8B;IAC9B,QAAQ,EAAE,aAAa,CAAC;IAExB,sCAAsC;IACtC,KAAK,EAAE,UAAU,CAAC;IAElB,sDAAsD;IACtD,mBAAmB,EAAE,MAAM,CAAC;IAE5B,2CAA2C;IAC3C,QAAQ,EA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,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAID;;;;;;GAMG;AACH,qBAAa,cAAc;IACzB;;;;;;;;;;;OAWG;IACH,KAAK,CACH,OAAO,EAAE,cAAc,EAAE,EACzB,aAAa,EAAE,gBAAgB,EAC/B,MAAM,EAAE,WAAW,EACnB,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GACtD,YAAY;IAuFf;;OAEG;IACH,OAAO,CAAC,cAAc;IAWtB;;;;OAIG;IACH,OAAO,CAAC,cAAc;IAoCtB;;OAEG;IACH,OAAO,CAAC,OAAO;IASf;;OAEG;IACH,OAAO,CAAC,eAAe;IASvB;;;;;OAKG;IACH,OAAO,CAAC,eAAe;IAuBvB;;OAEG;IACH,OAAO,CAAC,yBAAyB;IASjC;;OAEG;IACH,OAAO,CAAC,WAAW;IAWnB;;OAEG;IACH,OAAO,CAAC,cAAc;IAYtB;;;;OAIG;IACH,OAAO,CAAC,eAAe;IAsBvB;;OAEG;IACH,OAAO,CAAC,gBAAgB;CAWzB"}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AttackResolver - Handles melee and ranged attack resolution
|
|
3
|
+
* D&D 5e: d20 + attack bonus vs target AC
|
|
4
|
+
* Critical hits (natural 20) double damage dice
|
|
5
|
+
* Critical misses (natural 1) always miss
|
|
6
|
+
*/
|
|
7
|
+
import type { Combatant, AttackRoll, DamageRoll, DiceRollerAPI, HitMode } from '../types/Combat';
|
|
8
|
+
import type { Attack, CharacterSheet, AbilityScores } from '../types/Character';
|
|
9
|
+
/**
|
|
10
|
+
* Result of a complete attack action
|
|
11
|
+
*/
|
|
12
|
+
export interface AttackResult {
|
|
13
|
+
attacker: Combatant;
|
|
14
|
+
target: Combatant;
|
|
15
|
+
attack: Attack;
|
|
16
|
+
attackRoll: AttackRoll;
|
|
17
|
+
damageRoll?: DamageRoll;
|
|
18
|
+
hpAfterDamage?: number;
|
|
19
|
+
description: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Result of simulating multiple attack rolls
|
|
23
|
+
*/
|
|
24
|
+
export interface AttackSimulationResult {
|
|
25
|
+
iterations: number;
|
|
26
|
+
totalHits: number;
|
|
27
|
+
totalMisses: number;
|
|
28
|
+
totalCrits: number;
|
|
29
|
+
hitRate: number;
|
|
30
|
+
critRate: number;
|
|
31
|
+
missRate: number;
|
|
32
|
+
averageDamage: number;
|
|
33
|
+
maxDamage: number;
|
|
34
|
+
/** Sorted array of { damage, count, percentage } from 0 (misses) upward */
|
|
35
|
+
distribution: Array<{
|
|
36
|
+
damage: number;
|
|
37
|
+
count: number;
|
|
38
|
+
percentage: number;
|
|
39
|
+
}>;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* AttackResolver - D&D 5e attack and damage calculation
|
|
43
|
+
*/
|
|
44
|
+
export declare class AttackResolver {
|
|
45
|
+
private diceRoller?;
|
|
46
|
+
private hitMode;
|
|
47
|
+
constructor(diceRoller?: DiceRollerAPI, hitMode?: HitMode);
|
|
48
|
+
/**
|
|
49
|
+
* Compute scaled mode damage from raw stats.
|
|
50
|
+
*
|
|
51
|
+
* Formula: max(1, levelBase + weaponBonus)
|
|
52
|
+
* - levelBase = max(1, floor(level * 2 + (STR - AC) * 0.3))
|
|
53
|
+
* - weaponBonus = getWeaponBonus(damageDice)
|
|
54
|
+
* - Crits multiply levelBase by 1.5x (weapon bonus unaffected).
|
|
55
|
+
*
|
|
56
|
+
* NOTE: Always uses STR, even for finesse weapons (by design).
|
|
57
|
+
*/
|
|
58
|
+
static computeScaledDamage(level: number, str: number, targetAC: number, damageDice: string, isCritical: boolean): number;
|
|
59
|
+
/**
|
|
60
|
+
* Compute the damage scale factor for a below-AC roll in scaled mode.
|
|
61
|
+
*
|
|
62
|
+
* Returns 1.0 if totalRoll >= targetAC (full damage).
|
|
63
|
+
* Otherwise returns max(0.10, 1 - deficit * 0.10).
|
|
64
|
+
*/
|
|
65
|
+
static computeDamageScale(totalRoll: number, targetAC: number): number;
|
|
66
|
+
/**
|
|
67
|
+
* Compute the attack bonus for a weapon.
|
|
68
|
+
*
|
|
69
|
+
* DEX for ranged or finesse weapons, STR otherwise.
|
|
70
|
+
* Matches CombatEngine.buildWeaponAttack.
|
|
71
|
+
*/
|
|
72
|
+
static computeAttackBonus(abilityScores: AbilityScores, weaponProperties: string[], proficiency: number): number;
|
|
73
|
+
/**
|
|
74
|
+
* Resolve an attack action
|
|
75
|
+
* 1. Roll d20 + attack bonus
|
|
76
|
+
* 2. Compare to target AC
|
|
77
|
+
* 3. If hit, roll damage
|
|
78
|
+
*/
|
|
79
|
+
resolveAttack(attacker: Combatant, target: Combatant, attack: Attack): AttackResult;
|
|
80
|
+
/**
|
|
81
|
+
* Roll an attack (d20 + attack bonus vs AC)
|
|
82
|
+
* Attack bonus = ability modifier + proficiency bonus (if proficient)
|
|
83
|
+
*
|
|
84
|
+
* Hit modes:
|
|
85
|
+
* - 'dnd': Classic — totalRoll >= AC to hit. Nat 1 miss, nat 20 crit.
|
|
86
|
+
* - 'scaled': AC reduces damage. Only nat 1 misses, nat 20 crits.
|
|
87
|
+
* Each point below AC reduces damage by 10% (min 10%).
|
|
88
|
+
*/
|
|
89
|
+
private rollAttack;
|
|
90
|
+
/**
|
|
91
|
+
* Roll damage for an attack.
|
|
92
|
+
*
|
|
93
|
+
* Hit mode determines the damage system:
|
|
94
|
+
*
|
|
95
|
+
* 'dnd' — Traditional dice-based damage (D&D 5e style).
|
|
96
|
+
* Rolls weapon dice + ability modifier. Crits double the dice.
|
|
97
|
+
*
|
|
98
|
+
* 'scaled' — Formula-based damage (Pokemon/Earthbound style).
|
|
99
|
+
* No dice rolls. Damage = max(1, floor(attackerLevel * 2 + (STR - AC) * 0.3)).
|
|
100
|
+
* Crits multiply by 1.5x. Scales smoothly with level — starts low (1-2 at
|
|
101
|
+
* level 1) and grows with stat gaps at higher levels.
|
|
102
|
+
*/
|
|
103
|
+
private rollDamage;
|
|
104
|
+
/**
|
|
105
|
+
* Extracts the ability modifier to apply to damage rolls.
|
|
106
|
+
*
|
|
107
|
+
* - Ranged attacks use DEX modifier.
|
|
108
|
+
* - Finesse melee weapons use max(STR, DEX).
|
|
109
|
+
* - Other melee attacks use STR modifier.
|
|
110
|
+
* - Spells return 0 (ability mod not added to damage dice).
|
|
111
|
+
*/
|
|
112
|
+
private getDamageModifier;
|
|
113
|
+
/**
|
|
114
|
+
* DND mode: traditional dice-based damage.
|
|
115
|
+
* Rolls weapon dice + ability modifier (STR for melee, DEX for finesse/ranged).
|
|
116
|
+
* Crits double the dice (not the modifier).
|
|
117
|
+
*/
|
|
118
|
+
private rollDamageDND;
|
|
119
|
+
/**
|
|
120
|
+
* Scaled mode: formula-based damage (no dice rolls).
|
|
121
|
+
*
|
|
122
|
+
* Formula: max(1, levelBase + weaponBonus)
|
|
123
|
+
* - levelBase = max(1, floor(attackerLevel * 2 + (STR - AC) * 0.3))
|
|
124
|
+
* - weaponBonus = round(avgDiceRoll / 2.5)
|
|
125
|
+
*
|
|
126
|
+
* Level is the primary driver. The weapon's die size provides a flat bonus
|
|
127
|
+
* based on its tier (d4→1, d6→1, d8→2, d10→2, d12→3) so weapon choice
|
|
128
|
+
* matters without dice variance. Crits multiply levelBase by 1.5x.
|
|
129
|
+
*/
|
|
130
|
+
private rollDamageScaled;
|
|
131
|
+
/**
|
|
132
|
+
* Convert a damage dice string to a flat weapon bonus.
|
|
133
|
+
* Uses the dice average divided by 2.5, giving clean tiers:
|
|
134
|
+
* d4→1, d6→1, d8→2, d10→2, d12→3, 2d6→3, 2d8→4
|
|
135
|
+
*/
|
|
136
|
+
static getWeaponBonus(damageDice?: string): number;
|
|
137
|
+
/**
|
|
138
|
+
* Format weapon damage for display based on the damage display mode.
|
|
139
|
+
*
|
|
140
|
+
* 'scaled': Shows flat damage bonus derived from the dice (e.g. "+2 piercing")
|
|
141
|
+
* 'dnd': Shows the raw dice string (e.g. "1d8 piercing")
|
|
142
|
+
*/
|
|
143
|
+
static formatWeaponDamage(dice: string, damageType: string, damageDisplay: 'dnd' | 'scaled'): string;
|
|
144
|
+
/**
|
|
145
|
+
* Estimate average damage per hit for a given hitMode.
|
|
146
|
+
*
|
|
147
|
+
* This mirrors the actual combat damage formulas so pre-simulation
|
|
148
|
+
* estimates match what the simulator produces.
|
|
149
|
+
*
|
|
150
|
+
* - 'scaled': `max(1, floor(level * 2 + (STR - targetAC) * 0.3)) + weaponBonus`
|
|
151
|
+
* NOTE: Scaled mode always uses STR (matches rollDamageScaled).
|
|
152
|
+
* - 'dnd': dice average + ability modifier (caller picks STR or DEX)
|
|
153
|
+
*/
|
|
154
|
+
static estimateDamagePerHit(opts: {
|
|
155
|
+
hitMode: HitMode;
|
|
156
|
+
level: number;
|
|
157
|
+
abilityScore: number;
|
|
158
|
+
targetAC: number;
|
|
159
|
+
damageDice: string;
|
|
160
|
+
proficiencyBonus?: number;
|
|
161
|
+
}): number;
|
|
162
|
+
/**
|
|
163
|
+
* Estimate Damage Per Round including hit rate.
|
|
164
|
+
*
|
|
165
|
+
* Iterates over all 20 d20 outcomes to compute the true average,
|
|
166
|
+
* matching the actual combat mechanics exactly:
|
|
167
|
+
*
|
|
168
|
+
* - 'scaled': Only nat 1 misses. Rolls below AC deal scaled damage
|
|
169
|
+
* (max(10%, 1 - deficit * 10%)). Always uses STR for the damage
|
|
170
|
+
* formula (matches rollDamageScaled).
|
|
171
|
+
* - 'dnd': `max(5%, (21 - (targetAC - attackBonus)) / 20)` hit rate.
|
|
172
|
+
*/
|
|
173
|
+
static estimateDPR(opts: {
|
|
174
|
+
hitMode: HitMode;
|
|
175
|
+
level: number;
|
|
176
|
+
abilityScore: number;
|
|
177
|
+
targetAC: number;
|
|
178
|
+
damageDice: string;
|
|
179
|
+
proficiencyBonus?: number;
|
|
180
|
+
attackBonus?: number;
|
|
181
|
+
attackCount?: number;
|
|
182
|
+
}): number;
|
|
183
|
+
/**
|
|
184
|
+
* Check if an attack is within range
|
|
185
|
+
* Melee attacks: must be adjacent (5 ft)
|
|
186
|
+
* Ranged attacks: must be within attack range
|
|
187
|
+
*/
|
|
188
|
+
isInRange(attacker: Combatant, target: Combatant, attack: Attack): boolean;
|
|
189
|
+
/**
|
|
190
|
+
* Calculate attack bonus for a character
|
|
191
|
+
* Ability modifier + proficiency bonus (if proficient with weapon)
|
|
192
|
+
*/
|
|
193
|
+
calculateAttackBonus(character: CharacterSheet, _attackName: string, abilityModifier: number, isProficient?: boolean): number;
|
|
194
|
+
/**
|
|
195
|
+
* Check if attack hits with advantage or disadvantage
|
|
196
|
+
* D&D 5e rules: With advantage, critical if EITHER die is a 20
|
|
197
|
+
*/
|
|
198
|
+
attackWithAdvantage(attacker: Combatant, target: Combatant, attack: Attack): AttackResult;
|
|
199
|
+
/**
|
|
200
|
+
* Attack with disadvantage
|
|
201
|
+
* D&D 5e rules: Roll twice, take lower. If EITHER die is a 1, it's a critical miss
|
|
202
|
+
*/
|
|
203
|
+
attackWithDisadvantage(attacker: Combatant, target: Combatant, attack: Attack): AttackResult;
|
|
204
|
+
/**
|
|
205
|
+
* Simulate N attack rolls using the full engine attack resolution pipeline.
|
|
206
|
+
*
|
|
207
|
+
* Creates fresh Combatant wrappers each iteration so the target's HP is never
|
|
208
|
+
* permanently mutated. Uses the same resolveAttack logic as live combat
|
|
209
|
+
* (d20 + attack bonus vs AC, crit on nat 20, fumble on nat 1, doubled dice
|
|
210
|
+
* on crits, ability-modifier-based damage calculation).
|
|
211
|
+
*
|
|
212
|
+
* @param attacker Character sheet of the attacking hero/enemy
|
|
213
|
+
* @param target Character sheet of the defender
|
|
214
|
+
* @param attack Attack object (weapon or spell) with damage_dice and attack_bonus
|
|
215
|
+
* @param iterations Number of attacks to simulate (default 1000)
|
|
216
|
+
* @param diceRoller Optional seeded/custom dice roller
|
|
217
|
+
*/
|
|
218
|
+
static simulateAttacks(attacker: CharacterSheet, target: CharacterSheet, attack: Attack, iterations?: number, diceRoller?: DiceRollerAPI, hitMode?: HitMode): AttackSimulationResult;
|
|
219
|
+
}
|
|
220
|
+
//# sourceMappingURL=AttackResolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttackResolver.d.ts","sourceRoot":"","sources":["../../../src/core/combat/AttackResolver.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACjG,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGhF;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,EAAE,SAAS,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,UAAU,CAAC;IACvB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,2EAA2E;IAC3E,YAAY,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC5E;AAED;;GAEG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,UAAU,CAAC,CAAgB;IACnC,OAAO,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