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.
Files changed (345) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +352 -0
  3. package/dist/__vite-browser-external-DYxpcVy9.js +4 -0
  4. package/dist/constants/DefaultClasses.d.ts +46 -0
  5. package/dist/constants/DefaultClasses.d.ts.map +1 -0
  6. package/dist/constants/DefaultEnchantments.d.ts +337 -0
  7. package/dist/constants/DefaultEnchantments.d.ts.map +1 -0
  8. package/dist/constants/DefaultEnemies.d.ts +83 -0
  9. package/dist/constants/DefaultEnemies.d.ts.map +1 -0
  10. package/dist/constants/DefaultEquipment.d.ts +23 -0
  11. package/dist/constants/DefaultEquipment.d.ts.map +1 -0
  12. package/dist/constants/DefaultFeatures.d.ts +22 -0
  13. package/dist/constants/DefaultFeatures.d.ts.map +1 -0
  14. package/dist/constants/DefaultRaces.d.ts +102 -0
  15. package/dist/constants/DefaultRaces.d.ts.map +1 -0
  16. package/dist/constants/DefaultSkills.d.ts +26 -0
  17. package/dist/constants/DefaultSkills.d.ts.map +1 -0
  18. package/dist/constants/DefaultSpells.d.ts +41 -0
  19. package/dist/constants/DefaultSpells.d.ts.map +1 -0
  20. package/dist/constants/EncounterBalance.d.ts +208 -0
  21. package/dist/constants/EncounterBalance.d.ts.map +1 -0
  22. package/dist/constants/EnemyEquipment.d.ts +71 -0
  23. package/dist/constants/EnemyEquipment.d.ts.map +1 -0
  24. package/dist/constants/EnemyRarity.d.ts +79 -0
  25. package/dist/constants/EnemyRarity.d.ts.map +1 -0
  26. package/dist/constants/EnemyTemplates/Construct.d.ts +63 -0
  27. package/dist/constants/EnemyTemplates/Construct.d.ts.map +1 -0
  28. package/dist/constants/EnemyTemplates/Dragon.d.ts +68 -0
  29. package/dist/constants/EnemyTemplates/Dragon.d.ts.map +1 -0
  30. package/dist/constants/EnemyTemplates/Elemental.d.ts +64 -0
  31. package/dist/constants/EnemyTemplates/Elemental.d.ts.map +1 -0
  32. package/dist/constants/EnemyTemplates/Fiend.d.ts +62 -0
  33. package/dist/constants/EnemyTemplates/Fiend.d.ts.map +1 -0
  34. package/dist/constants/EnemyTemplates/Monstrosity.d.ts +63 -0
  35. package/dist/constants/EnemyTemplates/Monstrosity.d.ts.map +1 -0
  36. package/dist/constants/EnemyTemplates/Undead.d.ts +61 -0
  37. package/dist/constants/EnemyTemplates/Undead.d.ts.map +1 -0
  38. package/dist/constants/ItemTemplates.d.ts +40 -0
  39. package/dist/constants/ItemTemplates.d.ts.map +1 -0
  40. package/dist/constants/MagicItems.d.ts +30 -0
  41. package/dist/constants/MagicItems.d.ts.map +1 -0
  42. package/dist/constants/SpellSlots.d.ts +30 -0
  43. package/dist/constants/SpellSlots.d.ts.map +1 -0
  44. package/dist/constants/StatScaling.d.ts +113 -0
  45. package/dist/constants/StatScaling.d.ts.map +1 -0
  46. package/dist/core/analysis/AudioAnalyzer.d.ts +599 -0
  47. package/dist/core/analysis/AudioAnalyzer.d.ts.map +1 -0
  48. package/dist/core/analysis/ColorExtractor.d.ts +64 -0
  49. package/dist/core/analysis/ColorExtractor.d.ts.map +1 -0
  50. package/dist/core/analysis/EssentiaPitchDetector.d.ts +282 -0
  51. package/dist/core/analysis/EssentiaPitchDetector.d.ts.map +1 -0
  52. package/dist/core/analysis/LevelSerializer.d.ts +265 -0
  53. package/dist/core/analysis/LevelSerializer.d.ts.map +1 -0
  54. package/dist/core/analysis/MelodyContourAnalyzer.d.ts +283 -0
  55. package/dist/core/analysis/MelodyContourAnalyzer.d.ts.map +1 -0
  56. package/dist/core/analysis/MultiBandAnalyzer.d.ts +214 -0
  57. package/dist/core/analysis/MultiBandAnalyzer.d.ts.map +1 -0
  58. package/dist/core/analysis/MusicClassifier.d.ts +524 -0
  59. package/dist/core/analysis/MusicClassifier.d.ts.map +1 -0
  60. package/dist/core/analysis/PitchAnalyzer.d.ts +266 -0
  61. package/dist/core/analysis/PitchAnalyzer.d.ts.map +1 -0
  62. package/dist/core/analysis/PitchDetector.d.ts +251 -0
  63. package/dist/core/analysis/PitchDetector.d.ts.map +1 -0
  64. package/dist/core/analysis/SpectrumScanner.d.ts +52 -0
  65. package/dist/core/analysis/SpectrumScanner.d.ts.map +1 -0
  66. package/dist/core/analysis/beat/BeatInterpolator.d.ts +477 -0
  67. package/dist/core/analysis/beat/BeatInterpolator.d.ts.map +1 -0
  68. package/dist/core/analysis/beat/BeatMapGenerator.d.ts +170 -0
  69. package/dist/core/analysis/beat/BeatMapGenerator.d.ts.map +1 -0
  70. package/dist/core/analysis/beat/BeatStream.d.ts +316 -0
  71. package/dist/core/analysis/beat/BeatStream.d.ts.map +1 -0
  72. package/dist/core/analysis/beat/BeatSubdivider.d.ts +205 -0
  73. package/dist/core/analysis/beat/BeatSubdivider.d.ts.map +1 -0
  74. package/dist/core/analysis/beat/BeatTracker.d.ts +137 -0
  75. package/dist/core/analysis/beat/BeatTracker.d.ts.map +1 -0
  76. package/dist/core/analysis/beat/CompositeStreamGenerator.d.ts +180 -0
  77. package/dist/core/analysis/beat/CompositeStreamGenerator.d.ts.map +1 -0
  78. package/dist/core/analysis/beat/DensityAnalyzer.d.ts +246 -0
  79. package/dist/core/analysis/beat/DensityAnalyzer.d.ts.map +1 -0
  80. package/dist/core/analysis/beat/DifficultyVariantGenerator.d.ts +1082 -0
  81. package/dist/core/analysis/beat/DifficultyVariantGenerator.d.ts.map +1 -0
  82. package/dist/core/analysis/beat/GrooveAnalyzer.d.ts +192 -0
  83. package/dist/core/analysis/beat/GrooveAnalyzer.d.ts.map +1 -0
  84. package/dist/core/analysis/beat/OnsetStrengthEnvelope.d.ts +133 -0
  85. package/dist/core/analysis/beat/OnsetStrengthEnvelope.d.ts.map +1 -0
  86. package/dist/core/analysis/beat/PhraseAnalyzer.d.ts +230 -0
  87. package/dist/core/analysis/beat/PhraseAnalyzer.d.ts.map +1 -0
  88. package/dist/core/analysis/beat/RhythmQuantizer.d.ts +399 -0
  89. package/dist/core/analysis/beat/RhythmQuantizer.d.ts.map +1 -0
  90. package/dist/core/analysis/beat/RhythmicBalancer.d.ts +262 -0
  91. package/dist/core/analysis/beat/RhythmicBalancer.d.ts.map +1 -0
  92. package/dist/core/analysis/beat/StreamScorer.d.ts +275 -0
  93. package/dist/core/analysis/beat/StreamScorer.d.ts.map +1 -0
  94. package/dist/core/analysis/beat/TempoAwareQuantizer.d.ts +256 -0
  95. package/dist/core/analysis/beat/TempoAwareQuantizer.d.ts.map +1 -0
  96. package/dist/core/analysis/beat/TempoDetector.d.ts +220 -0
  97. package/dist/core/analysis/beat/TempoDetector.d.ts.map +1 -0
  98. package/dist/core/analysis/beat/TransientDetector.d.ts +303 -0
  99. package/dist/core/analysis/beat/TransientDetector.d.ts.map +1 -0
  100. package/dist/core/analysis/beat/beatKeyHelpers.d.ts +180 -0
  101. package/dist/core/analysis/beat/beatKeyHelpers.d.ts.map +1 -0
  102. package/dist/core/analysis/beat/index.d.ts +41 -0
  103. package/dist/core/analysis/beat/index.d.ts.map +1 -0
  104. package/dist/core/analysis/beat/utils/audioUtils.d.ts +204 -0
  105. package/dist/core/analysis/beat/utils/audioUtils.d.ts.map +1 -0
  106. package/dist/core/analysis/beat/utils/beatInterpolationDebug.d.ts +404 -0
  107. package/dist/core/analysis/beat/utils/beatInterpolationDebug.d.ts.map +1 -0
  108. package/dist/core/analysis/beat/utils/subdivideBeatMap.d.ts +61 -0
  109. package/dist/core/analysis/beat/utils/subdivideBeatMap.d.ts.map +1 -0
  110. package/dist/core/analysis/beat/utils/unifyBeatMap.d.ts +33 -0
  111. package/dist/core/analysis/beat/utils/unifyBeatMap.d.ts.map +1 -0
  112. package/dist/core/analysis/index.d.ts +18 -0
  113. package/dist/core/analysis/index.d.ts.map +1 -0
  114. package/dist/core/combat/AI/AICombatRunner.d.ts +108 -0
  115. package/dist/core/combat/AI/AICombatRunner.d.ts.map +1 -0
  116. package/dist/core/combat/AI/CombatAI.d.ts +179 -0
  117. package/dist/core/combat/AI/CombatAI.d.ts.map +1 -0
  118. package/dist/core/combat/AI/CombatMetricsTracker.d.ts +30 -0
  119. package/dist/core/combat/AI/CombatMetricsTracker.d.ts.map +1 -0
  120. package/dist/core/combat/Analysis/BalanceValidator.d.ts +170 -0
  121. package/dist/core/combat/Analysis/BalanceValidator.d.ts.map +1 -0
  122. package/dist/core/combat/Analysis/ComparativeAnalyzer.d.ts +231 -0
  123. package/dist/core/combat/Analysis/ComparativeAnalyzer.d.ts.map +1 -0
  124. package/dist/core/combat/Analysis/DifficultyCalculator.d.ts +203 -0
  125. package/dist/core/combat/Analysis/DifficultyCalculator.d.ts.map +1 -0
  126. package/dist/core/combat/Analysis/ParameterSweep.d.ts +201 -0
  127. package/dist/core/combat/Analysis/ParameterSweep.d.ts.map +1 -0
  128. package/dist/core/combat/AttackResolver.d.ts +220 -0
  129. package/dist/core/combat/AttackResolver.d.ts.map +1 -0
  130. package/dist/core/combat/CombatEngine.d.ts +388 -0
  131. package/dist/core/combat/CombatEngine.d.ts.map +1 -0
  132. package/dist/core/combat/DiceRoller.d.ts +115 -0
  133. package/dist/core/combat/DiceRoller.d.ts.map +1 -0
  134. package/dist/core/combat/InitiativeRoller.d.ts +62 -0
  135. package/dist/core/combat/InitiativeRoller.d.ts.map +1 -0
  136. package/dist/core/combat/PartyAnalyzer.d.ts +215 -0
  137. package/dist/core/combat/PartyAnalyzer.d.ts.map +1 -0
  138. package/dist/core/combat/SeededDiceRoller.d.ts +120 -0
  139. package/dist/core/combat/SeededDiceRoller.d.ts.map +1 -0
  140. package/dist/core/combat/Simulation/CombatSimulator.d.ts +366 -0
  141. package/dist/core/combat/Simulation/CombatSimulator.d.ts.map +1 -0
  142. package/dist/core/combat/SpellCaster.d.ts +113 -0
  143. package/dist/core/combat/SpellCaster.d.ts.map +1 -0
  144. package/dist/core/config/index.d.ts +24 -0
  145. package/dist/core/config/index.d.ts.map +1 -0
  146. package/dist/core/config/progressionConfig.d.ts +73 -0
  147. package/dist/core/config/progressionConfig.d.ts.map +1 -0
  148. package/dist/core/config/sensorConfig.d.ts +134 -0
  149. package/dist/core/config/sensorConfig.d.ts.map +1 -0
  150. package/dist/core/equipment/BoxOpener.d.ts +175 -0
  151. package/dist/core/equipment/BoxOpener.d.ts.map +1 -0
  152. package/dist/core/equipment/EquipmentEffectApplier.d.ts +189 -0
  153. package/dist/core/equipment/EquipmentEffectApplier.d.ts.map +1 -0
  154. package/dist/core/equipment/EquipmentModifier.d.ts +327 -0
  155. package/dist/core/equipment/EquipmentModifier.d.ts.map +1 -0
  156. package/dist/core/equipment/EquipmentSpawnHelper.d.ts +246 -0
  157. package/dist/core/equipment/EquipmentSpawnHelper.d.ts.map +1 -0
  158. package/dist/core/equipment/EquipmentValidator.d.ts +173 -0
  159. package/dist/core/equipment/EquipmentValidator.d.ts.map +1 -0
  160. package/dist/core/extensions/ExtensionManager.d.ts +517 -0
  161. package/dist/core/extensions/ExtensionManager.d.ts.map +1 -0
  162. package/dist/core/extensions/WeightedSelector.d.ts +156 -0
  163. package/dist/core/extensions/WeightedSelector.d.ts.map +1 -0
  164. package/dist/core/extensions/index.d.ts +11 -0
  165. package/dist/core/extensions/index.d.ts.map +1 -0
  166. package/dist/core/extensions/initializeDefaults.d.ts +170 -0
  167. package/dist/core/extensions/initializeDefaults.d.ts.map +1 -0
  168. package/dist/core/features/FeatureEffectApplier.d.ts +102 -0
  169. package/dist/core/features/FeatureEffectApplier.d.ts.map +1 -0
  170. package/dist/core/features/FeatureQuery.d.ts +368 -0
  171. package/dist/core/features/FeatureQuery.d.ts.map +1 -0
  172. package/dist/core/features/FeatureTypes.d.ts +199 -0
  173. package/dist/core/features/FeatureTypes.d.ts.map +1 -0
  174. package/dist/core/features/FeatureValidator.d.ts +149 -0
  175. package/dist/core/features/FeatureValidator.d.ts.map +1 -0
  176. package/dist/core/features/index.d.ts +12 -0
  177. package/dist/core/features/index.d.ts.map +1 -0
  178. package/dist/core/generation/AbilityScoreCalculator.d.ts +83 -0
  179. package/dist/core/generation/AbilityScoreCalculator.d.ts.map +1 -0
  180. package/dist/core/generation/AppearanceGenerator.d.ts +32 -0
  181. package/dist/core/generation/AppearanceGenerator.d.ts.map +1 -0
  182. package/dist/core/generation/BeatConverter.d.ts +127 -0
  183. package/dist/core/generation/BeatConverter.d.ts.map +1 -0
  184. package/dist/core/generation/ButtonMapper.d.ts +346 -0
  185. package/dist/core/generation/ButtonMapper.d.ts.map +1 -0
  186. package/dist/core/generation/ButtonPatternLibrary.d.ts +92 -0
  187. package/dist/core/generation/ButtonPatternLibrary.d.ts.map +1 -0
  188. package/dist/core/generation/CRLevelConverter.d.ts +242 -0
  189. package/dist/core/generation/CRLevelConverter.d.ts.map +1 -0
  190. package/dist/core/generation/CharacterGenerator.d.ts +194 -0
  191. package/dist/core/generation/CharacterGenerator.d.ts.map +1 -0
  192. package/dist/core/generation/ClassSuggester.d.ts +184 -0
  193. package/dist/core/generation/ClassSuggester.d.ts.map +1 -0
  194. package/dist/core/generation/EnemyEquipmentGenerator.d.ts +151 -0
  195. package/dist/core/generation/EnemyEquipmentGenerator.d.ts.map +1 -0
  196. package/dist/core/generation/EnemyGenerator.d.ts +595 -0
  197. package/dist/core/generation/EnemyGenerator.d.ts.map +1 -0
  198. package/dist/core/generation/EquipmentGenerator.d.ts +204 -0
  199. package/dist/core/generation/EquipmentGenerator.d.ts.map +1 -0
  200. package/dist/core/generation/LegendaryGenerator.d.ts +213 -0
  201. package/dist/core/generation/LegendaryGenerator.d.ts.map +1 -0
  202. package/dist/core/generation/LevelGenerator.d.ts +390 -0
  203. package/dist/core/generation/LevelGenerator.d.ts.map +1 -0
  204. package/dist/core/generation/NamingEngine.d.ts +136 -0
  205. package/dist/core/generation/NamingEngine.d.ts.map +1 -0
  206. package/dist/core/generation/PitchBeatLinker.d.ts +150 -0
  207. package/dist/core/generation/PitchBeatLinker.d.ts.map +1 -0
  208. package/dist/core/generation/RaceSelector.d.ts +58 -0
  209. package/dist/core/generation/RaceSelector.d.ts.map +1 -0
  210. package/dist/core/generation/RhythmGenerator.d.ts +597 -0
  211. package/dist/core/generation/RhythmGenerator.d.ts.map +1 -0
  212. package/dist/core/generation/SkillAssigner.d.ts +78 -0
  213. package/dist/core/generation/SkillAssigner.d.ts.map +1 -0
  214. package/dist/core/generation/SpellManager.d.ts +132 -0
  215. package/dist/core/generation/SpellManager.d.ts.map +1 -0
  216. package/dist/core/generation/SpellcastingGenerator.d.ts +255 -0
  217. package/dist/core/generation/SpellcastingGenerator.d.ts.map +1 -0
  218. package/dist/core/generation/index.d.ts +41 -0
  219. package/dist/core/generation/index.d.ts.map +1 -0
  220. package/dist/core/parser/MetadataExtractor.d.ts +66 -0
  221. package/dist/core/parser/MetadataExtractor.d.ts.map +1 -0
  222. package/dist/core/parser/PlaylistParser.d.ts +45 -0
  223. package/dist/core/parser/PlaylistParser.d.ts.map +1 -0
  224. package/dist/core/playback/SubdivisionPlaybackController.d.ts +333 -0
  225. package/dist/core/playback/SubdivisionPlaybackController.d.ts.map +1 -0
  226. package/dist/core/playback/index.d.ts +5 -0
  227. package/dist/core/playback/index.d.ts.map +1 -0
  228. package/dist/core/progression/CharacterUpdater.d.ts +203 -0
  229. package/dist/core/progression/CharacterUpdater.d.ts.map +1 -0
  230. package/dist/core/progression/LevelUpProcessor.d.ts +234 -0
  231. package/dist/core/progression/LevelUpProcessor.d.ts.map +1 -0
  232. package/dist/core/progression/PrestigeSystem.d.ts +217 -0
  233. package/dist/core/progression/PrestigeSystem.d.ts.map +1 -0
  234. package/dist/core/progression/RhythmXPCalculator.d.ts +182 -0
  235. package/dist/core/progression/RhythmXPCalculator.d.ts.map +1 -0
  236. package/dist/core/progression/SessionTracker.d.ts +169 -0
  237. package/dist/core/progression/SessionTracker.d.ts.map +1 -0
  238. package/dist/core/progression/XPCalculator.d.ts +128 -0
  239. package/dist/core/progression/XPCalculator.d.ts.map +1 -0
  240. package/dist/core/progression/stat/StatIncreaseStrategy.d.ts +97 -0
  241. package/dist/core/progression/stat/StatIncreaseStrategy.d.ts.map +1 -0
  242. package/dist/core/progression/stat/StatManager.d.ts +179 -0
  243. package/dist/core/progression/stat/StatManager.d.ts.map +1 -0
  244. package/dist/core/sensors/EnvironmentalSensors.d.ts +301 -0
  245. package/dist/core/sensors/EnvironmentalSensors.d.ts.map +1 -0
  246. package/dist/core/sensors/GamingPlatformSensors.d.ts +162 -0
  247. package/dist/core/sensors/GamingPlatformSensors.d.ts.map +1 -0
  248. package/dist/core/sensors/GeolocationProvider.d.ts +156 -0
  249. package/dist/core/sensors/GeolocationProvider.d.ts.map +1 -0
  250. package/dist/core/sensors/MotionDetector.d.ts +58 -0
  251. package/dist/core/sensors/MotionDetector.d.ts.map +1 -0
  252. package/dist/core/sensors/SteamAPIClient.d.ts +108 -0
  253. package/dist/core/sensors/SteamAPIClient.d.ts.map +1 -0
  254. package/dist/core/sensors/WeatherAPIClient.d.ts +360 -0
  255. package/dist/core/sensors/WeatherAPIClient.d.ts.map +1 -0
  256. package/dist/core/sensors/schemas/weather.schema.d.ts +144 -0
  257. package/dist/core/sensors/schemas/weather.schema.d.ts.map +1 -0
  258. package/dist/core/skills/SkillQuery.d.ts +159 -0
  259. package/dist/core/skills/SkillQuery.d.ts.map +1 -0
  260. package/dist/core/skills/SkillTypes.d.ts +233 -0
  261. package/dist/core/skills/SkillTypes.d.ts.map +1 -0
  262. package/dist/core/skills/SkillValidator.d.ts +146 -0
  263. package/dist/core/skills/SkillValidator.d.ts.map +1 -0
  264. package/dist/core/skills/index.d.ts +11 -0
  265. package/dist/core/skills/index.d.ts.map +1 -0
  266. package/dist/core/spells/SpellQuery.d.ts +194 -0
  267. package/dist/core/spells/SpellQuery.d.ts.map +1 -0
  268. package/dist/core/spells/SpellTypes.d.ts +71 -0
  269. package/dist/core/spells/SpellTypes.d.ts.map +1 -0
  270. package/dist/core/spells/SpellValidator.d.ts +129 -0
  271. package/dist/core/spells/SpellValidator.d.ts.map +1 -0
  272. package/dist/core/spells/index.d.ts +11 -0
  273. package/dist/core/spells/index.d.ts.map +1 -0
  274. package/dist/core/types/AudioProfile.d.ts +143 -0
  275. package/dist/core/types/AudioProfile.d.ts.map +1 -0
  276. package/dist/core/types/BeatMap.d.ts +1825 -0
  277. package/dist/core/types/BeatMap.d.ts.map +1 -0
  278. package/dist/core/types/ButtonMapping.d.ts +345 -0
  279. package/dist/core/types/ButtonMapping.d.ts.map +1 -0
  280. package/dist/core/types/Character.d.ts +397 -0
  281. package/dist/core/types/Character.d.ts.map +1 -0
  282. package/dist/core/types/ChartedBeatMap.d.ts +169 -0
  283. package/dist/core/types/ChartedBeatMap.d.ts.map +1 -0
  284. package/dist/core/types/Combat.d.ts +268 -0
  285. package/dist/core/types/Combat.d.ts.map +1 -0
  286. package/dist/core/types/CombatAI.d.ts +143 -0
  287. package/dist/core/types/CombatAI.d.ts.map +1 -0
  288. package/dist/core/types/Enemy.d.ts +447 -0
  289. package/dist/core/types/Enemy.d.ts.map +1 -0
  290. package/dist/core/types/Environmental.d.ts +213 -0
  291. package/dist/core/types/Environmental.d.ts.map +1 -0
  292. package/dist/core/types/Equipment.d.ts +309 -0
  293. package/dist/core/types/Equipment.d.ts.map +1 -0
  294. package/dist/core/types/ISessionTracker.d.ts +48 -0
  295. package/dist/core/types/ISessionTracker.d.ts.map +1 -0
  296. package/dist/core/types/LevelExport.d.ts +366 -0
  297. package/dist/core/types/LevelExport.d.ts.map +1 -0
  298. package/dist/core/types/Playlist.d.ts +70 -0
  299. package/dist/core/types/Playlist.d.ts.map +1 -0
  300. package/dist/core/types/Prestige.d.ts +94 -0
  301. package/dist/core/types/Prestige.d.ts.map +1 -0
  302. package/dist/core/types/Progression.d.ts +214 -0
  303. package/dist/core/types/Progression.d.ts.map +1 -0
  304. package/dist/core/types/RhythmXP.d.ts +398 -0
  305. package/dist/core/types/RhythmXP.d.ts.map +1 -0
  306. package/dist/core/utils/AbilityConstants.d.ts +31 -0
  307. package/dist/core/utils/AbilityConstants.d.ts.map +1 -0
  308. package/dist/core/utils/EffectApplierUtils.d.ts +56 -0
  309. package/dist/core/utils/EffectApplierUtils.d.ts.map +1 -0
  310. package/dist/core/utils/ImageValidator.d.ts +66 -0
  311. package/dist/core/utils/ImageValidator.d.ts.map +1 -0
  312. package/dist/core/utils/PrerequisiteValidator.d.ts +88 -0
  313. package/dist/core/utils/PrerequisiteValidator.d.ts.map +1 -0
  314. package/dist/essentia-wasm.es-BUEnKUts.js +2990 -0
  315. package/dist/essentia.js-model.es-CGA0xotH.js +306 -0
  316. package/dist/index.d.ts +176 -0
  317. package/dist/index.d.ts.map +1 -0
  318. package/dist/playlist-data-engine.js +124 -0
  319. package/dist/playlist-data-engine.mjs +49251 -0
  320. package/dist/utils/EnchantmentLibrary.d.ts +378 -0
  321. package/dist/utils/EnchantmentLibrary.d.ts.map +1 -0
  322. package/dist/utils/arweaveGatewayManager.d.ts +485 -0
  323. package/dist/utils/arweaveGatewayManager.d.ts.map +1 -0
  324. package/dist/utils/arweaveUtils.d.ts +118 -0
  325. package/dist/utils/arweaveUtils.d.ts.map +1 -0
  326. package/dist/utils/constants.d.ts +439 -0
  327. package/dist/utils/constants.d.ts.map +1 -0
  328. package/dist/utils/equipmentConstants.d.ts +60 -0
  329. package/dist/utils/equipmentConstants.d.ts.map +1 -0
  330. package/dist/utils/hash.d.ts +33 -0
  331. package/dist/utils/hash.d.ts.map +1 -0
  332. package/dist/utils/logger.d.ts +192 -0
  333. package/dist/utils/logger.d.ts.map +1 -0
  334. package/dist/utils/magicItemExamples.d.ts +46 -0
  335. package/dist/utils/magicItemExamples.d.ts.map +1 -0
  336. package/dist/utils/playlistUtils.d.ts +149 -0
  337. package/dist/utils/playlistUtils.d.ts.map +1 -0
  338. package/dist/utils/random.d.ts +34 -0
  339. package/dist/utils/random.d.ts.map +1 -0
  340. package/dist/utils/sensorDashboard.d.ts +60 -0
  341. package/dist/utils/sensorDashboard.d.ts.map +1 -0
  342. package/dist/utils/validators.d.ts +189 -0
  343. package/dist/utils/validators.d.ts.map +1 -0
  344. package/dist/vite.svg +1 -0
  345. package/package.json +82 -0
@@ -0,0 +1,595 @@
1
+ /**
2
+ * EnemyGenerator - Generates enemy characters from templates
3
+ *
4
+ * Provides deterministic enemy generation based on:
5
+ * - Enemy templates (base stats, signature abilities)
6
+ * - Rarity tiers (stat scaling, ability scaling)
7
+ * - Audio profiles (template selection influence)
8
+ *
9
+ * All generation is seeded for reproducibility.
10
+ */
11
+ import type { CharacterSheet } from '../types/Character.js';
12
+ import type { EnemyTemplate, EnemyGenerationOptions, EncounterGenerationOptions } from '../types/Enemy.js';
13
+ /**
14
+ * EnemyGenerator - Static class for enemy generation
15
+ *
16
+ * Generates enemy CharacterSheet instances from templates with:
17
+ * - Deterministic seeded randomness
18
+ * - Rarity-based stat scaling
19
+ * - Signature ability dice scaling
20
+ * - Audio-influenced template selection
21
+ *
22
+ * @example
23
+ * ```typescript
24
+ * // Generate a specific elite orc
25
+ * const orc = EnemyGenerator.generate({
26
+ * seed: 'my-encounter',
27
+ * templateId: 'orc',
28
+ * rarity: 'elite'
29
+ * });
30
+ *
31
+ * // Generate a random humanoid brute
32
+ * const enemy = EnemyGenerator.generate({
33
+ * seed: 'random-1',
34
+ * category: 'humanoid',
35
+ * archetype: 'brute',
36
+ * rarity: 'common'
37
+ * });
38
+ * ```
39
+ */
40
+ export declare class EnemyGenerator {
41
+ /**
42
+ * Archetype tag mappings for feature selection
43
+ *
44
+ * Maps each enemy archetype to feature tags that are appropriate
45
+ * for selecting extra abilities from FeatureQuery.
46
+ *
47
+ * Brutes benefit from durability and melee damage abilities
48
+ * Archers benefit from accuracy and mobility abilities
49
+ * Support enemies benefit from healing and buff abilities
50
+ */
51
+ private static readonly ARCHETYPE_TAGS;
52
+ /**
53
+ * Maximum stat increase from audio influence
54
+ *
55
+ * This prevents extreme stat values from audio profiles.
56
+ * Audio influence is additive to rarity scaling, not multiplicative.
57
+ */
58
+ private static readonly MAX_AUDIO_INFLUENCE;
59
+ /**
60
+ * Get a seeded RNG instance with optional index offset
61
+ *
62
+ * Creates a deterministic RNG from seed. When index is provided,
63
+ * appends it to the seed for unique sequences per enemy.
64
+ *
65
+ * @param seed - Base seed string
66
+ * @param index - Optional index for unique sequences
67
+ * @returns Seeded RNG instance
68
+ */
69
+ private static getSeededRNG;
70
+ /**
71
+ * Apply audio influence to ability scores
72
+ *
73
+ * Applies subtle stat adjustments based on audio profile characteristics.
74
+ * This is additive to rarity scaling, providing flavor rather than major power shifts.
75
+ *
76
+ * Frequency band → stat mapping:
77
+ * - Bass dominance → +1 to STR and CON
78
+ * - Treble dominance → +1 to DEX
79
+ * - Mid dominance → +1 to WIS and CHA
80
+ * - Balanced → +1 to all (smaller bonus)
81
+ *
82
+ * Maximum total increase from audio influence is capped at +2 per stat
83
+ * to prevent extreme values.
84
+ *
85
+ * @param stats - Base ability scores to modify
86
+ * @param audioProfile - Audio profile for influence calculation
87
+ * @returns Modified ability scores with audio influence applied
88
+ *
89
+ * @example
90
+ * ```typescript
91
+ * const stats = { STR: 16, DEX: 12, CON: 14, INT: 10, WIS: 8, CHA: 8 };
92
+ * const audioProfile = { bass_dominance: 0.8, mid_dominance: 0.1, treble_dominance: 0.1 };
93
+ * const modified = applyAudioStatInfluence(stats, audioProfile);
94
+ * // Returns: { STR: 17, DEX: 12, CON: 15, INT: 10, WIS: 8, CHA: 8 } (bass → STR, CON)
95
+ * ```
96
+ */
97
+ private static applyAudioStatInfluence;
98
+ /**
99
+ * Scale ability scores based on rarity tier and optional CR
100
+ *
101
+ * Applies the rarity multiplier to each ability score.
102
+ * If CR is provided, also applies fractional CR reduction for sub-level enemies.
103
+ * Results are rounded to nearest integer.
104
+ *
105
+ * The multipliers are applied in order:
106
+ * 1. Fractional CR multiplier (if CR < 1) - reduces stats for sub-level enemies
107
+ * 2. Rarity multiplier - minor complexity-based stat adjustment (max 12%)
108
+ *
109
+ * DESIGN PRINCIPLE: Rarity affects complexity, CR affects power.
110
+ * The rarity statMultiplier is intentionally small (1.0-1.12) to avoid
111
+ * overpowering enemies. CR handles the primary power scaling.
112
+ *
113
+ * @param baseStats - Base ability scores from template
114
+ * @param rarity - Rarity tier for scaling
115
+ * @param cr - Optional Challenge Rating for fractional CR stat reduction
116
+ * @returns Scaled ability scores
117
+ *
118
+ * @example
119
+ * ```typescript
120
+ * // Rarity only (backward compatible)
121
+ * scaleStatsForRarity({ STR: 16, DEX: 12, CON: 14 }, 'elite');
122
+ * // Returns: { STR: 17, DEX: 13, CON: 15 } (1.07x multiplier - minor complexity boost)
123
+ *
124
+ * // With fractional CR (CR 0.25 = 75% stats before rarity)
125
+ * scaleStatsForRarity({ STR: 16, DEX: 12, CON: 14 }, 'elite', 0.25);
126
+ * // Returns: { STR: 13, DEX: 10, CON: 11 } (0.75 * 1.07 = 0.8025x multiplier)
127
+ * ```
128
+ */
129
+ private static scaleStatsForRarity;
130
+ /**
131
+ * Get an enemy template by ID
132
+ *
133
+ * Searches the default enemy templates for a matching ID.
134
+ *
135
+ * @param id - Template ID (e.g., 'orc', 'goblin-archer')
136
+ * @returns Template if found, undefined otherwise
137
+ *
138
+ * @example
139
+ * ```typescript
140
+ * const orc = getTemplateById('orc');
141
+ * if (orc) {
142
+ * console.log(orc.name); // 'Orc'
143
+ * }
144
+ * ```
145
+ */
146
+ static getTemplateById(id: string): EnemyTemplate | undefined;
147
+ /**
148
+ * Select a template based on filters and audio profile
149
+ *
150
+ * Filters templates by category/archetype if specified.
151
+ * If audio profile is provided, weights selection by audio preference.
152
+ *
153
+ * @param rng - Seeded RNG for deterministic selection
154
+ * @param category - Optional category filter
155
+ * @param archetype - Optional archetype filter
156
+ * @param audioProfile - Optional audio profile for weighting
157
+ * @returns Selected enemy template
158
+ */
159
+ private static selectTemplate;
160
+ /**
161
+ * Select template using audio profile for weighting
162
+ *
163
+ * Calculates weight for each template based on audio preference match:
164
+ * - bass_dominance → bass weight
165
+ * - mid_dominance → mid weight
166
+ * - treble_dominance → treble weight
167
+ *
168
+ * Simple dot product approach: multiply audio values by template weights.
169
+ *
170
+ * @param templates - Candidate templates
171
+ * @param audioProfile - Audio profile for weighting
172
+ * @param rng - RNG for final selection
173
+ * @returns Selected template
174
+ */
175
+ private static weightedSelectionByAudio;
176
+ /**
177
+ * Generate a signature ability with rarity-scaled damage die
178
+ *
179
+ * Creates a Feature-compatible object from the template's signature ability,
180
+ * scaling the damage die based on rarity tier and computing damage modifier
181
+ * from actual scaled ability scores.
182
+ *
183
+ * @param signatureAbility - Base signature ability from template
184
+ * @param rarity - Rarity tier for die scaling
185
+ * @param scaledStats - Scaled ability scores for damage modifier computation
186
+ * @param level - Effective level for damage modifier scaling
187
+ * @param archetype - Enemy archetype for determining primary stat
188
+ * @returns Scaled signature ability as a feature object
189
+ */
190
+ private static scaleSignatureAbility;
191
+ /**
192
+ * Boss title suffixes for name generation
193
+ *
194
+ * Used to add epic titles to boss enemies.
195
+ */
196
+ private static readonly BOSS_TITLES;
197
+ /**
198
+ * Boss title prefixes for name generation
199
+ *
200
+ * Alternative title format for boss enemies.
201
+ */
202
+ private static readonly BOSS_PREFIXES;
203
+ /**
204
+ * Generate boss-specific name enhancements
205
+ *
206
+ * Adds epic title or prefix to boss name for flavor.
207
+ * Format options:
208
+ * - "{name}, {title}" (e.g., "Orc, the Destroyer")
209
+ * - "{prefix} {name}" (e.g., "Great Orc")
210
+ * - "{name} of {realm}" (e.g., "Orc of the Void")
211
+ *
212
+ * @param baseName - Base enemy name from template
213
+ * @param rng - Seeded RNG for deterministic selection
214
+ * @returns Enhanced boss name
215
+ *
216
+ * @example
217
+ * ```typescript
218
+ * generateBossName('Orc', rng); // "Orc, the Destroyer"
219
+ * generateBossName('Bear', rng); // "Great Bear"
220
+ * generateBossName('Dragon', rng); // "Dragon of the Void"
221
+ * ```
222
+ */
223
+ private static generateBossName;
224
+ /**
225
+ * Generate boss-specific ability enhancements
226
+ *
227
+ * For boss rarity, enhances the signature ability and adds an ultimate ability:
228
+ * - Signature ability damage dice are doubled (d12 → 2d12)
229
+ * - Ultimate ability: One powerful ability usable once per encounter
230
+ *
231
+ * @param template - Enemy template
232
+ * @param signatureAbility - Already scaled signature ability
233
+ * @param rng - Seeded RNG for deterministic selection
234
+ * @returns Array of boss-enhanced abilities
235
+ *
236
+ * @example
237
+ * ```typescript
238
+ * const bossFeatures = generateBossFeatures(orcTemplate, scaledSignature, rng);
239
+ * // Returns: [enhancedSignatureAbility, ultimateAbility]
240
+ * ```
241
+ */
242
+ private static generateBossFeatures;
243
+ /**
244
+ * Generate an ultimate ability for boss enemies
245
+ *
246
+ * Creates a powerful ability usable once per encounter.
247
+ * Each archetype has its own pool of ultimate abilities.
248
+ *
249
+ * @param archetype - Enemy archetype for ability selection
250
+ * @param rng - Seeded RNG for deterministic selection
251
+ * @returns Ultimate ability as a feature object
252
+ */
253
+ private static generateUltimateAbility;
254
+ /**
255
+ * Generate all abilities for an enemy
256
+ *
257
+ * Returns an array containing:
258
+ * 1. The signature ability (scaled by rarity)
259
+ * 2. Extra abilities selected from FeatureQuery based on archetype
260
+ *
261
+ * @param template - Enemy template
262
+ * @param rarity - Enemy rarity tier
263
+ * @param rng - Seeded RNG for deterministic selection
264
+ * @param scaledStats - Scaled ability scores for damage modifier computation
265
+ * @param level - Effective level for damage modifier scaling
266
+ * @returns Array of ability objects compatible with CharacterSheet
267
+ *
268
+ * @example
269
+ * ```typescript
270
+ * const abilities = generateAbilities(orcTemplate, 'elite', rng, undefined, scaledStats, level);
271
+ * // Returns: [scaledSignatureAbility, extraFeature1, extraFeature2]
272
+ * ```
273
+ */
274
+ private static generateAbilities;
275
+ /**
276
+ * Select extra abilities from FeatureQuery based on archetype
277
+ *
278
+ * Filters class features by archetype-appropriate tags and randomly
279
+ * selects the requested number of abilities.
280
+ *
281
+ * @param archetype - Enemy archetype for tag filtering
282
+ * @param count - Number of abilities to select
283
+ * @param rng - Seeded RNG for deterministic selection
284
+ * @returns Array of selected feature objects
285
+ */
286
+ private static selectExtraAbilities;
287
+ /**
288
+ * Generate a single enemy character
289
+ *
290
+ * Creates a CharacterSheet representing an enemy with:
291
+ * - Template-based stats scaled by rarity
292
+ * - Audio-influenced stat adjustments (when audioProfile provided)
293
+ * - Signature ability with scaled damage die
294
+ * - Extra abilities from FeatureQuery (for higher rarities)
295
+ * - Resistances for Elite+ tiers
296
+ *
297
+ * Audio influence applies subtle stat bonuses based on frequency dominance:
298
+ * - Bass → STR/CON, Treble → DEX, Mid → WIS/CHA, Balanced → +1 to all
299
+ * - Maximum +2 increase per stat from audio (capped)
300
+ *
301
+ * @param options - Generation options
302
+ * @returns Enemy character sheet
303
+ *
304
+ * @throws Error if templateId not found
305
+ * @throws Error if audioProfile provided without track
306
+ *
307
+ * @example
308
+ * ```typescript
309
+ * // Generate a specific elite orc
310
+ * const orc = EnemyGenerator.generate({
311
+ * seed: 'my-encounter',
312
+ * templateId: 'orc',
313
+ * rarity: 'elite'
314
+ * });
315
+ *
316
+ * // Generate with audio influence (bass-heavy audio → stronger STR/CON)
317
+ * const enemy = EnemyGenerator.generate({
318
+ * seed: 'battle-1',
319
+ * audioProfile: { bass_dominance: 0.8, mid_dominance: 0.1, treble_dominance: 0.1 },
320
+ * track: trackData,
321
+ * rarity: 'uncommon'
322
+ * });
323
+ * ```
324
+ */
325
+ static generate(options: EnemyGenerationOptions): CharacterSheet;
326
+ /**
327
+ * Get character level based on Challenge Rating
328
+ *
329
+ * In D&D 5e, CR is approximately equal to level for most creatures.
330
+ * A CR 5 enemy is roughly equivalent to a level 5 character.
331
+ *
332
+ * This method uses CRLevelConverter.crToLevel() for the conversion,
333
+ * which handles:
334
+ * - CR 0.25 → level 0.25 (sub-level enemy, reduced base stats)
335
+ * - CR 0.5 → level 0.5 (sub-level enemy, reduced base stats)
336
+ * - CR 1+ → level = CR (standard mapping)
337
+ *
338
+ * Fractional CRs represent "sub-level" enemies that are weaker than
339
+ * a level 1 character. These should have reduced stats applied via
340
+ * getStatMultiplierForFractionalCR().
341
+ *
342
+ * @param cr - Challenge Rating (supports fractional values like 0.25, 0.5)
343
+ * @returns Character level (may be fractional for sub-level enemies)
344
+ *
345
+ * @example
346
+ * ```typescript
347
+ * getLevelFromCR(0.25); // 0.25 (sub-level)
348
+ * getLevelFromCR(0.5); // 0.5 (sub-level)
349
+ * getLevelFromCR(1); // 1
350
+ * getLevelFromCR(5); // 5
351
+ * getLevelFromCR(10); // 10
352
+ * ```
353
+ */
354
+ private static getLevelFromCR;
355
+ /**
356
+ * Get stat multiplier for fractional CR enemies
357
+ *
358
+ * Sub-level enemies (CR < 1) have reduced base stats to represent
359
+ * their weaker nature. Uses the continuous formula from StatScaling:
360
+ * - CR 0.125: ~0.56x
361
+ * - CR 0.25: ~0.63x
362
+ * - CR 0.5: ~0.75x
363
+ * - CR 1.0: 1.0x
364
+ *
365
+ * @param cr - Challenge Rating (supports fractional values)
366
+ * @returns Stat multiplier
367
+ */
368
+ private static getStatMultiplierForFractionalCR;
369
+ /**
370
+ * Get damage die notation for rarity
371
+ *
372
+ * Returns the die size used for damage based on rarity tier.
373
+ *
374
+ * @param rarity - Enemy rarity tier
375
+ * @returns Die notation (e.g., 'd6', 'd8')
376
+ */
377
+ private static getDamageDieForRarity;
378
+ /**
379
+ * Generate a CR from rarity for encounter calculations
380
+ *
381
+ * Maps rarity tiers to approximate Challenge Rating values.
382
+ * Common: CR 1/4, Uncommon: CR 1/2, Elite: CR 1, Boss: CR 2
383
+ *
384
+ * @param rarity - Enemy rarity tier
385
+ * @returns Approximate CR value
386
+ */
387
+ private static getCRForRarity;
388
+ /**
389
+ * Estimate DPR from weapon damage stats.
390
+ *
391
+ * Simple estimate used for HP/DPR ratio enforcement.
392
+ * Computes average damage per round assuming one attack against AC 15.
393
+ */
394
+ private static estimateWeaponDPR;
395
+ /**
396
+ * Get the minimum HP/DPR ratio for a given CR.
397
+ *
398
+ * Smoothly increases so higher-CR enemies survive more rounds:
399
+ * - CR 1: 3.0x (3 rounds)
400
+ * - CR 10: ~3.9x
401
+ * - CR 15: ~4.5x
402
+ * - CR 20: ~5.0x
403
+ * - CR 30: 6.0x (6 rounds)
404
+ */
405
+ private static getMinHPRatio;
406
+ /**
407
+ * Generate a balanced encounter for a party
408
+ *
409
+ * Uses PartyAnalyzer to determine appropriate enemy strength based on party level
410
+ * and desired difficulty. Supports leader promotion for larger groups.
411
+ *
412
+ * @param party - Array of party members' character sheets
413
+ * @param options - Encounter generation options
414
+ * @returns Array of generated enemies
415
+ *
416
+ * @throws Error if baseRarity='boss' and count > 1 (boss encounters must be single enemy)
417
+ *
418
+ * @example
419
+ * ```typescript
420
+ * const enemies = EnemyGenerator.generateEncounter(party, {
421
+ * seed: 'dungeon-1',
422
+ * difficulty: 'medium',
423
+ * count: 5
424
+ * });
425
+ * // Returns 5 enemies balanced for the party's level
426
+ * // One enemy will be promoted to uncommon as leader
427
+ * ```
428
+ *
429
+ * @example
430
+ * ```typescript
431
+ * // Boss encounters must be single enemy (1vparty design)
432
+ * const boss = EnemyGenerator.generateEncounter(party, {
433
+ * seed: 'boss-fight',
434
+ * difficulty: 'deadly',
435
+ * count: 1,
436
+ * baseRarity: 'boss'
437
+ * });
438
+ * // Returns 1 boss enemy designed for solo encounter
439
+ * ```
440
+ */
441
+ static generateEncounter(party: CharacterSheet[], options: EncounterGenerationOptions): CharacterSheet[];
442
+ /**
443
+ * Generate an encounter based on target CR (no party needed)
444
+ *
445
+ * Creates enemies at a specific Challenge Rating, independent of any party.
446
+ * Useful for pre-planned encounters or when the party strength is unknown.
447
+ *
448
+ * @param options - Encounter generation options (must include targetCR)
449
+ * @returns Array of generated enemies
450
+ *
451
+ * @throws Error if baseRarity='boss' and count > 1 (boss encounters must be single enemy)
452
+ *
453
+ * @example
454
+ * ```typescript
455
+ * const enemies = EnemyGenerator.generateEncounterByCR({
456
+ * seed: 'cr5-encounter',
457
+ * targetCR: 5,
458
+ * count: 3
459
+ * });
460
+ * // Returns 3 enemies at approximately CR 5 each
461
+ * ```
462
+ *
463
+ * @example
464
+ * ```typescript
465
+ * // Boss encounters must be single enemy (1vparty design)
466
+ * const boss = EnemyGenerator.generateEncounterByCR({
467
+ * seed: 'boss-fight',
468
+ * targetCR: 10,
469
+ * count: 1,
470
+ * baseRarity: 'boss'
471
+ * });
472
+ * // Returns 1 boss enemy designed for solo encounter
473
+ * ```
474
+ */
475
+ static generateEncounterByCR(options: EncounterGenerationOptions): CharacterSheet[];
476
+ /**
477
+ * Select templates for each enemy in an encounter based on mix mode
478
+ *
479
+ * Handles uniform, custom, category, and random mix modes.
480
+ *
481
+ * @param count - Number of enemies to generate
482
+ * @param rng - Seeded RNG for deterministic selection
483
+ * @param enemyMix - Mix mode to use
484
+ * @param templates - Custom template list for 'custom' mode
485
+ * @param category - Category filter for 'category' mode
486
+ * @param archetype - Archetype filter
487
+ * @param audioProfile - Optional audio profile for weighting
488
+ * @returns Array of selected templates (one per enemy)
489
+ */
490
+ private static selectTemplatesForMix;
491
+ /**
492
+ * Apply leader promotion to a group of enemies
493
+ *
494
+ * Promotes one or more enemies to higher rarity tiers based on group size.
495
+ * This creates "leader" enemies that are stronger than their followers.
496
+ *
497
+ * Promotion rules:
498
+ * - 4-6 enemies: 1 enemy promoted +1 tier
499
+ * - 7-9 enemies: 1 enemy promoted +2 tiers
500
+ * - 10+ enemies: 2 enemies promoted (1 one tier, 1 two tiers)
501
+ *
502
+ * @param enemies - Array of generated enemies (will be modified in place)
503
+ * @param rng - Seeded RNG for deterministic selection
504
+ * @param baseRarity - The base rarity before promotion
505
+ */
506
+ private static applyLeaderPromotion;
507
+ /**
508
+ * Promote a rarity by a number of tiers
509
+ *
510
+ * Increases rarity tier by specified amount, capped at 'boss'.
511
+ *
512
+ * @param currentRarity - Starting rarity
513
+ * @param tiers - Number of tiers to promote
514
+ * @returns Promoted rarity (capped at 'boss')
515
+ *
516
+ * @example
517
+ // =========================================
518
+ // CR-Based Gradual Rarity Scaling (Task 2.3)
519
+ // =========================================
520
+
521
+ /**
522
+ * CR tier definitions for gradual rarity scaling
523
+ *
524
+ * When scaleRarityWithCR is enabled, higher CR encounters
525
+ * automatically include upgraded rarities to match difficulty.
526
+ */
527
+ private static readonly CR_TIERS;
528
+ /**
529
+ * Calculate the number of rarity upgrade points based on CR
530
+ *
531
+ * Higher CR encounters get more upgrade points to distribute
532
+ * across enemies, creating more challenging encounters.
533
+ *
534
+ * @param cr - Challenge Rating
535
+ * @returns Number of upgrade points to distribute
536
+ *
537
+ * @example
538
+ * ```typescript
539
+ * calculateUpgradePoints(1); // 0 (Low tier)
540
+ * calculateUpgradePoints(4); // 1 (Low-Medium tier)
541
+ * calculateUpgradePoints(8); // 2 (Medium tier)
542
+ * calculateUpgradePoints(18); // 4 (High tier)
543
+ * calculateUpgradePoints(35); // 6 (Epic tier)
544
+ * ```
545
+ */
546
+ private static calculateUpgradePoints;
547
+ /**
548
+ * Upgrade rarity by one step, capped at elite
549
+ *
550
+ * CR-based scaling caps at 'elite' to preserve 'boss' for
551
+ * explicit boss encounters only.
552
+ *
553
+ * @param rarity - Current rarity
554
+ * @returns Upgraded rarity (capped at elite)
555
+ */
556
+ private static upgradeRarity;
557
+ /**
558
+ * Calculate rarity distribution for enemies based on CR
559
+ *
560
+ * Distributes upgrade points across enemies one at a time,
561
+ * ensuring even distribution of upgraded enemies.
562
+ *
563
+ * @param enemyCount - Number of enemies in the encounter
564
+ * @param cr - Challenge Rating
565
+ * @returns Array of rarities (one per enemy)
566
+ *
567
+ * @example
568
+ * ```typescript
569
+ * getRarityDistribution(3, 1); // [common, common, common]
570
+ * getRarityDistribution(3, 4); // [uncommon, common, common]
571
+ * getRarityDistribution(3, 8); // [uncommon, uncommon, common]
572
+ * getRarityDistribution(3, 18); // [elite, uncommon, uncommon]
573
+ * getRarityDistribution(3, 35); // [elite, elite, elite]
574
+ * ```
575
+ */
576
+ private static getRarityDistribution;
577
+ /**
578
+ * Promote rarity by a number of tiers
579
+ *
580
+ * Used by leader promotion system. Caps at boss tier.
581
+ *
582
+ * @param currentRarity - Starting rarity
583
+ * @param tiers - Number of tiers to promote
584
+ * @returns Promoted rarity
585
+ *
586
+ * @example
587
+ * ```typescript
588
+ * promoteRarity('common', 1); // 'uncommon'
589
+ * promoteRarity('uncommon', 2); // 'boss'
590
+ * promoteRarity('elite', 5); // 'boss' (capped)
591
+ * ```
592
+ */
593
+ private static promoteRarity;
594
+ }
595
+ //# sourceMappingURL=EnemyGenerator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnemyGenerator.d.ts","sourceRoot":"","sources":["../../../src/core/generation/EnemyGenerator.ts"],"names":[],"mappings":"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"}