@strixit/storyscript 0.0.0-stage → 1.0.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 (370) hide show
  1. package/.env +1 -0
  2. package/CodeSnippets/StoryScriptSnippets.code-snippets +573 -0
  3. package/LICENSE.txt +21 -0
  4. package/LiveTemplates/StoryScript.xml +271 -0
  5. package/README.md +9 -2
  6. package/baseViteConfig.js +112 -0
  7. package/clientFiles/currentGameName.js +1 -0
  8. package/clientFiles/gitignore +12 -0
  9. package/clientFiles/tsconfig.json +34 -0
  10. package/clientFiles/vite.config.ts +14 -0
  11. package/clientFiles/vitest.config.ts +29 -0
  12. package/dist/src/Engine/Actions/index.d.ts +2 -0
  13. package/dist/src/Engine/Actions/open.d.ts +6 -0
  14. package/dist/src/Engine/Actions/openWithKey.d.ts +7 -0
  15. package/dist/src/Engine/EntityCreatorFunctions.d.ts +18 -0
  16. package/dist/src/Engine/Interfaces/action.d.ts +37 -0
  17. package/dist/src/Engine/Interfaces/autoplayStep.d.ts +11 -0
  18. package/dist/src/Engine/Interfaces/barrier.d.ts +16 -0
  19. package/dist/src/Engine/Interfaces/barrierAction.d.ts +19 -0
  20. package/dist/src/Engine/Interfaces/character.d.ts +48 -0
  21. package/dist/src/Engine/Interfaces/combatSetup.d.ts +9 -0
  22. package/dist/src/Engine/Interfaces/combatTurn.d.ts +37 -0
  23. package/dist/src/Engine/Interfaces/combatWinnings.d.ts +6 -0
  24. package/dist/src/Engine/Interfaces/combinations/activeCombination.d.ts +14 -0
  25. package/dist/src/Engine/Interfaces/combinations/combinable.d.ts +18 -0
  26. package/dist/src/Engine/Interfaces/combinations/combinationAction.d.ts +41 -0
  27. package/dist/src/Engine/Interfaces/combinations/combinationMatchResult.d.ts +14 -0
  28. package/dist/src/Engine/Interfaces/combinations/combinations.d.ts +17 -0
  29. package/dist/src/Engine/Interfaces/combinations/combine.d.ts +22 -0
  30. package/dist/src/Engine/Interfaces/combinations/combineResult.d.ts +18 -0
  31. package/dist/src/Engine/Interfaces/combinations/gameCombinations.d.ts +40 -0
  32. package/dist/src/Engine/Interfaces/compiledLocation.d.ts +33 -0
  33. package/dist/src/Engine/Interfaces/conversations/conversation.d.ts +44 -0
  34. package/dist/src/Engine/Interfaces/conversations/conversationLogEntry.d.ts +13 -0
  35. package/dist/src/Engine/Interfaces/conversations/conversationNode.d.ts +22 -0
  36. package/dist/src/Engine/Interfaces/conversations/conversationReply.d.ts +49 -0
  37. package/dist/src/Engine/Interfaces/createCharacter/createCharacter.d.ts +20 -0
  38. package/dist/src/Engine/Interfaces/createCharacter/createCharacterAttribute.d.ts +18 -0
  39. package/dist/src/Engine/Interfaces/createCharacter/createCharacterAttributeEntry.d.ts +18 -0
  40. package/dist/src/Engine/Interfaces/createCharacter/createCharacterQuestion.d.ts +18 -0
  41. package/dist/src/Engine/Interfaces/createCharacter/createCharacterQuestionEntry.d.ts +22 -0
  42. package/dist/src/Engine/Interfaces/createCharacter/createCharacterStep.d.ts +40 -0
  43. package/dist/src/Engine/Interfaces/customCursor.d.ts +8 -0
  44. package/dist/src/Engine/Interfaces/defaultEquipment.d.ts +19 -0
  45. package/dist/src/Engine/Interfaces/definitions.d.ts +40 -0
  46. package/dist/src/Engine/Interfaces/destination.d.ts +31 -0
  47. package/dist/src/Engine/Interfaces/dynamicStyle.d.ts +10 -0
  48. package/dist/src/Engine/Interfaces/enemy.d.ts +46 -0
  49. package/dist/src/Engine/Interfaces/enumerations/actionStatus.d.ts +18 -0
  50. package/dist/src/Engine/Interfaces/enumerations/actionType.d.ts +9 -0
  51. package/dist/src/Engine/Interfaces/enumerations/equipmentType.d.ts +51 -0
  52. package/dist/src/Engine/Interfaces/enumerations/gameState.d.ts +11 -0
  53. package/dist/src/Engine/Interfaces/enumerations/playState.d.ts +10 -0
  54. package/dist/src/Engine/Interfaces/enumerations/targetType.d.ts +9 -0
  55. package/dist/src/Engine/Interfaces/equipment.d.ts +43 -0
  56. package/dist/src/Engine/Interfaces/feature.d.ts +37 -0
  57. package/dist/src/Engine/Interfaces/featureCollection.d.ts +7 -0
  58. package/dist/src/Engine/Interfaces/game.d.ts +148 -0
  59. package/dist/src/Engine/Interfaces/gameEvents.d.ts +7 -0
  60. package/dist/src/Engine/Interfaces/groupableItem.d.ts +32 -0
  61. package/dist/src/Engine/Interfaces/helpers.d.ts +50 -0
  62. package/dist/src/Engine/Interfaces/index.d.ts +78 -0
  63. package/dist/src/Engine/Interfaces/interfaceTexts.d.ts +140 -0
  64. package/dist/src/Engine/Interfaces/item.d.ts +96 -0
  65. package/dist/src/Engine/Interfaces/key.d.ts +16 -0
  66. package/dist/src/Engine/Interfaces/location.d.ts +78 -0
  67. package/dist/src/Engine/Interfaces/maps/map.d.ts +45 -0
  68. package/dist/src/Engine/Interfaces/maps/mapLocation.d.ts +23 -0
  69. package/dist/src/Engine/Interfaces/party.d.ts +33 -0
  70. package/dist/src/Engine/Interfaces/person.d.ts +25 -0
  71. package/dist/src/Engine/Interfaces/quest.d.ts +51 -0
  72. package/dist/src/Engine/Interfaces/rules/characterRules.d.ts +84 -0
  73. package/dist/src/Engine/Interfaces/rules/combatRules.d.ts +46 -0
  74. package/dist/src/Engine/Interfaces/rules/combinationRules.d.ts +15 -0
  75. package/dist/src/Engine/Interfaces/rules/demoMode.d.ts +15 -0
  76. package/dist/src/Engine/Interfaces/rules/encounterRules.d.ts +4 -0
  77. package/dist/src/Engine/Interfaces/rules/explorationRules.d.ts +42 -0
  78. package/dist/src/Engine/Interfaces/rules/generalRules.d.ts +62 -0
  79. package/dist/src/Engine/Interfaces/rules/rules.d.ts +31 -0
  80. package/dist/src/Engine/Interfaces/rules/setupRules.d.ts +56 -0
  81. package/dist/src/Engine/Interfaces/rules/titleScreen.d.ts +16 -0
  82. package/dist/src/Engine/Interfaces/saveGame.d.ts +33 -0
  83. package/dist/src/Engine/Interfaces/scoreEntry.d.ts +13 -0
  84. package/dist/src/Engine/Interfaces/services/autoplayService.d.ts +19 -0
  85. package/dist/src/Engine/Interfaces/services/characterService.d.ts +17 -0
  86. package/dist/src/Engine/Interfaces/services/combatService.d.ts +26 -0
  87. package/dist/src/Engine/Interfaces/services/combinationService.d.ts +9 -0
  88. package/dist/src/Engine/Interfaces/services/commandService.d.ts +64 -0
  89. package/dist/src/Engine/Interfaces/services/conversationService.d.ts +5 -0
  90. package/dist/src/Engine/Interfaces/services/dataSerializer.d.ts +4 -0
  91. package/dist/src/Engine/Interfaces/services/dataService.d.ts +33 -0
  92. package/dist/src/Engine/Interfaces/services/dataSynchronizer.d.ts +3 -0
  93. package/dist/src/Engine/Interfaces/services/gameService.d.ts +10 -0
  94. package/dist/src/Engine/Interfaces/services/index.d.ts +16 -0
  95. package/dist/src/Engine/Interfaces/services/itemService.d.ts +14 -0
  96. package/dist/src/Engine/Interfaces/services/localStorageService.d.ts +6 -0
  97. package/dist/src/Engine/Interfaces/services/locationService.d.ts +8 -0
  98. package/dist/src/Engine/Interfaces/services/soundService.d.ts +5 -0
  99. package/dist/src/Engine/Interfaces/services/tradeService.d.ts +9 -0
  100. package/dist/src/Engine/Interfaces/soundPlayer.d.ts +30 -0
  101. package/dist/src/Engine/Interfaces/sprite.d.ts +23 -0
  102. package/dist/src/Engine/Interfaces/stateList.d.ts +9 -0
  103. package/dist/src/Engine/Interfaces/statistics.d.ts +13 -0
  104. package/dist/src/Engine/Interfaces/stock.d.ts +39 -0
  105. package/dist/src/Engine/Interfaces/trade.d.ts +62 -0
  106. package/dist/src/Engine/ServiceFactory.d.ts +52 -0
  107. package/dist/src/Engine/Services/AutoplayService.d.ts +11 -0
  108. package/dist/src/Engine/Services/CharacterService.d.ts +21 -0
  109. package/dist/src/Engine/Services/CombatService.d.ts +16 -0
  110. package/dist/src/Engine/Services/CombinationService.d.ts +15 -0
  111. package/dist/src/Engine/Services/CommandService.d.ts +24 -0
  112. package/dist/src/Engine/Services/ConversationService.d.ts +26 -0
  113. package/dist/src/Engine/Services/DataSerializer.d.ts +17 -0
  114. package/dist/src/Engine/Services/DataService.d.ts +16 -0
  115. package/dist/src/Engine/Services/DataSynchronizer.d.ts +12 -0
  116. package/dist/src/Engine/Services/GameService.d.ts +28 -0
  117. package/dist/src/Engine/Services/HelperService.d.ts +18 -0
  118. package/dist/src/Engine/Services/ItemService.d.ts +21 -0
  119. package/dist/src/Engine/Services/LocalStorageService.d.ts +7 -0
  120. package/dist/src/Engine/Services/LocationService.d.ts +25 -0
  121. package/dist/src/Engine/Services/SoundService.d.ts +13 -0
  122. package/dist/src/Engine/Services/TradeService.d.ts +17 -0
  123. package/dist/src/Engine/Services/index.d.ts +17 -0
  124. package/dist/src/Engine/Services/serializationData.d.ts +8 -0
  125. package/dist/src/Engine/Services/sharedFunctions.d.ts +21 -0
  126. package/dist/src/Engine/arrayAndFunctionExtensions.d.ts +3 -0
  127. package/dist/src/Engine/defaultTexts.d.ts +7 -0
  128. package/dist/src/Engine/gameEvents.d.ts +10 -0
  129. package/dist/src/Engine/index.d.ts +8 -0
  130. package/dist/src/Engine/stateProperties.d.ts +6 -0
  131. package/dist/src/Engine/utilityFunctions.d.ts +25 -0
  132. package/dist/src/UI/Composables/CustomCursor.d.ts +2 -0
  133. package/dist/src/UI/Composables/LocationMap.d.ts +26 -0
  134. package/dist/src/UI/Composables/Sound.d.ts +7 -0
  135. package/dist/src/UI/Composables/TextFeatures.d.ts +8 -0
  136. package/dist/src/UI/Composables/VisualFeatures.d.ts +7 -0
  137. package/dist/src/UI/Composables/index.d.ts +7 -0
  138. package/dist/src/UI/Composables/playStateWatch.d.ts +2 -0
  139. package/dist/src/UI/StateStore.d.ts +14256 -0
  140. package/dist/src/UI/error.d.ts +6 -0
  141. package/dist/src/UI/helpers.d.ts +3 -0
  142. package/dist/src/UI/index.d.ts +6 -0
  143. package/dist/src/UI/main.d.ts +1 -0
  144. package/dist/src/UI/startup.d.ts +2 -0
  145. package/dist/src/constants.d.ts +17 -0
  146. package/dist/src/index.d.ts +3 -0
  147. package/dist/storyscript.css +9566 -0
  148. package/dist/storyscript.js +9659 -0
  149. package/dist/storyscript.js.map +1 -0
  150. package/dist/storyscript.mjs +9569 -0
  151. package/dist/storyscript.mjs.map +1 -0
  152. package/electron.cjs +44 -0
  153. package/index.html +14 -0
  154. package/package.json +118 -4
  155. package/scripts/cli.js +268 -0
  156. package/scripts/createAsset.js +117 -0
  157. package/scripts/createGame.js +40 -0
  158. package/scripts/helpers.js +21 -0
  159. package/scripts/postbuild.js +179 -0
  160. package/scripts/setupTesting.js +17 -0
  161. package/shims-vue.d.ts +1 -0
  162. package/src/Engine/Actions/index.ts +2 -0
  163. package/src/Engine/Actions/open.ts +12 -0
  164. package/src/Engine/Actions/openWithKey.ts +23 -0
  165. package/src/Engine/EntityCreatorFunctions.ts +602 -0
  166. package/src/Engine/Interfaces/action.ts +43 -0
  167. package/src/Engine/Interfaces/autoplayStep.ts +13 -0
  168. package/src/Engine/Interfaces/barrier.ts +18 -0
  169. package/src/Engine/Interfaces/barrierAction.ts +21 -0
  170. package/src/Engine/Interfaces/character.ts +58 -0
  171. package/src/Engine/Interfaces/combatSetup.ts +10 -0
  172. package/src/Engine/Interfaces/combatTurn.ts +45 -0
  173. package/src/Engine/Interfaces/combatWinnings.ts +7 -0
  174. package/src/Engine/Interfaces/combinations/activeCombination.ts +16 -0
  175. package/src/Engine/Interfaces/combinations/combinable.ts +21 -0
  176. package/src/Engine/Interfaces/combinations/combinationAction.ts +45 -0
  177. package/src/Engine/Interfaces/combinations/combinationMatchResult.ts +16 -0
  178. package/src/Engine/Interfaces/combinations/combinations.ts +19 -0
  179. package/src/Engine/Interfaces/combinations/combine.ts +25 -0
  180. package/src/Engine/Interfaces/combinations/combineResult.ts +21 -0
  181. package/src/Engine/Interfaces/combinations/gameCombinations.ts +48 -0
  182. package/src/Engine/Interfaces/compiledLocation.ts +37 -0
  183. package/src/Engine/Interfaces/conversations/conversation.ts +47 -0
  184. package/src/Engine/Interfaces/conversations/conversationLogEntry.ts +14 -0
  185. package/src/Engine/Interfaces/conversations/conversationNode.ts +26 -0
  186. package/src/Engine/Interfaces/conversations/conversationReply.ts +59 -0
  187. package/src/Engine/Interfaces/createCharacter/createCharacter.ts +23 -0
  188. package/src/Engine/Interfaces/createCharacter/createCharacterAttribute.ts +21 -0
  189. package/src/Engine/Interfaces/createCharacter/createCharacterAttributeEntry.ts +21 -0
  190. package/src/Engine/Interfaces/createCharacter/createCharacterQuestion.ts +21 -0
  191. package/src/Engine/Interfaces/createCharacter/createCharacterQuestionEntry.ts +25 -0
  192. package/src/Engine/Interfaces/createCharacter/createCharacterStep.ts +47 -0
  193. package/src/Engine/Interfaces/customCursor.ts +5 -0
  194. package/src/Engine/Interfaces/defaultEquipment.ts +32 -0
  195. package/src/Engine/Interfaces/definitions.ts +48 -0
  196. package/src/Engine/Interfaces/destination.ts +37 -0
  197. package/src/Engine/Interfaces/dynamicStyle.ts +11 -0
  198. package/src/Engine/Interfaces/enemy.ts +54 -0
  199. package/src/Engine/Interfaces/enumerations/actionStatus.ts +20 -0
  200. package/src/Engine/Interfaces/enumerations/actionType.ts +9 -0
  201. package/src/Engine/Interfaces/enumerations/equipmentType.ts +61 -0
  202. package/src/Engine/Interfaces/enumerations/gameState.ts +11 -0
  203. package/src/Engine/Interfaces/enumerations/playState.ts +10 -0
  204. package/src/Engine/Interfaces/enumerations/targetType.ts +9 -0
  205. package/src/Engine/Interfaces/equipment.ts +44 -0
  206. package/src/Engine/Interfaces/feature.ts +43 -0
  207. package/src/Engine/Interfaces/featureCollection.ts +8 -0
  208. package/src/Engine/Interfaces/game.ts +201 -0
  209. package/src/Engine/Interfaces/gameEvents.ts +11 -0
  210. package/src/Engine/Interfaces/groupableItem.ts +37 -0
  211. package/src/Engine/Interfaces/helpers.ts +55 -0
  212. package/src/Engine/Interfaces/index.ts +158 -0
  213. package/src/Engine/Interfaces/interfaceTexts.ts +142 -0
  214. package/src/Engine/Interfaces/item.ts +111 -0
  215. package/src/Engine/Interfaces/key.ts +18 -0
  216. package/src/Engine/Interfaces/location.ts +92 -0
  217. package/src/Engine/Interfaces/maps/map.ts +55 -0
  218. package/src/Engine/Interfaces/maps/mapLocation.ts +28 -0
  219. package/src/Engine/Interfaces/party.ts +40 -0
  220. package/src/Engine/Interfaces/person.ts +29 -0
  221. package/src/Engine/Interfaces/quest.ts +60 -0
  222. package/src/Engine/Interfaces/rules/characterRules.ts +96 -0
  223. package/src/Engine/Interfaces/rules/combatRules.ts +52 -0
  224. package/src/Engine/Interfaces/rules/combinationRules.ts +17 -0
  225. package/src/Engine/Interfaces/rules/demoMode.ts +18 -0
  226. package/src/Engine/Interfaces/rules/encounterRules.ts +5 -0
  227. package/src/Engine/Interfaces/rules/explorationRules.ts +47 -0
  228. package/src/Engine/Interfaces/rules/generalRules.ts +80 -0
  229. package/src/Engine/Interfaces/rules/rules.ts +46 -0
  230. package/src/Engine/Interfaces/rules/setupRules.ts +65 -0
  231. package/src/Engine/Interfaces/rules/titleScreen.ts +19 -0
  232. package/src/Engine/Interfaces/saveGame.ts +39 -0
  233. package/src/Engine/Interfaces/scoreEntry.ts +14 -0
  234. package/src/Engine/Interfaces/services/autoplayService.ts +23 -0
  235. package/src/Engine/Interfaces/services/characterService.ts +35 -0
  236. package/src/Engine/Interfaces/services/combatService.ts +30 -0
  237. package/src/Engine/Interfaces/services/combinationService.ts +10 -0
  238. package/src/Engine/Interfaces/services/commandService.ts +75 -0
  239. package/src/Engine/Interfaces/services/conversationService.ts +7 -0
  240. package/src/Engine/Interfaces/services/dataSerializer.ts +4 -0
  241. package/src/Engine/Interfaces/services/dataService.ts +39 -0
  242. package/src/Engine/Interfaces/services/dataSynchronizer.ts +9 -0
  243. package/src/Engine/Interfaces/services/gameService.ts +17 -0
  244. package/src/Engine/Interfaces/services/index.ts +33 -0
  245. package/src/Engine/Interfaces/services/itemService.ts +25 -0
  246. package/src/Engine/Interfaces/services/localStorageService.ts +6 -0
  247. package/src/Engine/Interfaces/services/locationService.ts +13 -0
  248. package/src/Engine/Interfaces/services/soundService.ts +7 -0
  249. package/src/Engine/Interfaces/services/tradeService.ts +15 -0
  250. package/src/Engine/Interfaces/soundPlayer.ts +30 -0
  251. package/src/Engine/Interfaces/sprite.ts +27 -0
  252. package/src/Engine/Interfaces/stateList.ts +13 -0
  253. package/src/Engine/Interfaces/statistics.ts +14 -0
  254. package/src/Engine/Interfaces/stock.ts +46 -0
  255. package/src/Engine/Interfaces/trade.ts +72 -0
  256. package/src/Engine/ServiceFactory.ts +167 -0
  257. package/src/Engine/Services/AutoplayService.ts +59 -0
  258. package/src/Engine/Services/CharacterService.ts +291 -0
  259. package/src/Engine/Services/CombatService.ts +266 -0
  260. package/src/Engine/Services/CombinationService.ts +197 -0
  261. package/src/Engine/Services/CommandService.ts +197 -0
  262. package/src/Engine/Services/ConversationService.ts +406 -0
  263. package/src/Engine/Services/DataSerializer.ts +326 -0
  264. package/src/Engine/Services/DataService.ts +93 -0
  265. package/src/Engine/Services/DataSynchronizer.ts +216 -0
  266. package/src/Engine/Services/GameService.ts +554 -0
  267. package/src/Engine/Services/HelperService.ts +94 -0
  268. package/src/Engine/Services/ItemService.ts +294 -0
  269. package/src/Engine/Services/LocalStorageService.ts +24 -0
  270. package/src/Engine/Services/LocationService.ts +380 -0
  271. package/src/Engine/Services/SoundService.ts +54 -0
  272. package/src/Engine/Services/TradeService.ts +176 -0
  273. package/src/Engine/Services/index.ts +17 -0
  274. package/src/Engine/Services/serializationData.ts +8 -0
  275. package/src/Engine/Services/sharedFunctions.ts +296 -0
  276. package/src/Engine/arrayAndFunctionExtensions.ts +269 -0
  277. package/src/Engine/defaultTexts.ts +162 -0
  278. package/src/Engine/gameEvents.ts +51 -0
  279. package/src/Engine/index.ts +9 -0
  280. package/src/Engine/stateProperties.ts +9 -0
  281. package/src/Engine/utilityFunctions.ts +238 -0
  282. package/src/Games/_GameTemplate/character.ts +31 -0
  283. package/src/Games/_GameTemplate/customTexts.ts +8 -0
  284. package/src/Games/_GameTemplate/interfaces/action.ts +5 -0
  285. package/src/Games/_GameTemplate/interfaces/combatSetup.ts +7 -0
  286. package/src/Games/_GameTemplate/interfaces/combatTurn.ts +8 -0
  287. package/src/Games/_GameTemplate/interfaces/destination.ts +5 -0
  288. package/src/Games/_GameTemplate/interfaces/enemy.ts +11 -0
  289. package/src/Games/_GameTemplate/interfaces/equipment.ts +5 -0
  290. package/src/Games/_GameTemplate/interfaces/feature.ts +9 -0
  291. package/src/Games/_GameTemplate/interfaces/game.ts +22 -0
  292. package/src/Games/_GameTemplate/interfaces/interfaceTexts.ts +5 -0
  293. package/src/Games/_GameTemplate/interfaces/item.ts +18 -0
  294. package/src/Games/_GameTemplate/interfaces/key.ts +10 -0
  295. package/src/Games/_GameTemplate/interfaces/location.ts +22 -0
  296. package/src/Games/_GameTemplate/interfaces/map.ts +16 -0
  297. package/src/Games/_GameTemplate/interfaces/party.ts +8 -0
  298. package/src/Games/_GameTemplate/interfaces/person.ts +11 -0
  299. package/src/Games/_GameTemplate/interfaces/quest.ts +9 -0
  300. package/src/Games/_GameTemplate/locations/Start.html +5 -0
  301. package/src/Games/_GameTemplate/locations/start.ts +12 -0
  302. package/src/Games/_GameTemplate/rules.ts +60 -0
  303. package/src/Games/_GameTemplate/types.ts +55 -0
  304. package/src/Games/_GameTemplate/ui/styles/game.css +3 -0
  305. package/src/Games/_GameTemplate/webroot/favicon.ico +0 -0
  306. package/src/Games/_GameTemplate/webroot/gameinfo.json +10 -0
  307. package/src/Games/_GameTemplate/webroot/logo192.png +0 -0
  308. package/src/Games/_GameTemplate/webroot/logo512.png +0 -0
  309. package/src/Tests/Games/_GameTemplate/specs/rules.test.ts +9 -0
  310. package/src/UI/Components/AppShell.vue +43 -0
  311. package/src/UI/Components/Autoplay.vue +32 -0
  312. package/src/UI/Components/Combinations.vue +37 -0
  313. package/src/UI/Components/Common/Collapsible.vue +50 -0
  314. package/src/UI/Components/Common/ModalDialog.vue +54 -0
  315. package/src/UI/Components/Common/Sprite.vue +53 -0
  316. package/src/UI/Components/Description.vue +23 -0
  317. package/src/UI/Components/Encounter/Combat/Combat.vue +89 -0
  318. package/src/UI/Components/Encounter/Combat/CombatActions.vue +26 -0
  319. package/src/UI/Components/Encounter/Combat/CombatParticipant.vue +22 -0
  320. package/src/UI/Components/Encounter/Combat/CombatTargetSelect.vue +55 -0
  321. package/src/UI/Components/Encounter/Combat/CombatWin.vue +33 -0
  322. package/src/UI/Components/Encounter/Conversation.vue +66 -0
  323. package/src/UI/Components/Encounter/Encounter.vue +39 -0
  324. package/src/UI/Components/Encounter/Enemy.vue +30 -0
  325. package/src/UI/Components/Encounter/Trade/Stock.vue +58 -0
  326. package/src/UI/Components/Encounter/Trade/Trade.vue +24 -0
  327. package/src/UI/Components/Exploration/ActionLog.vue +17 -0
  328. package/src/UI/Components/Exploration/Destination.vue +66 -0
  329. package/src/UI/Components/Exploration/Exploration.vue +67 -0
  330. package/src/UI/Components/Exploration/Ground.vue +22 -0
  331. package/src/UI/Components/Exploration/LocationMap.vue +42 -0
  332. package/src/UI/Components/Exploration/LocationText.vue +39 -0
  333. package/src/UI/Components/Exploration/LocationVisual.vue +38 -0
  334. package/src/UI/Components/GameContainer.vue +49 -0
  335. package/src/UI/Components/GameMenu.vue +111 -0
  336. package/src/UI/Components/GameState/GameOver.vue +20 -0
  337. package/src/UI/Components/GameState/HighScores.vue +22 -0
  338. package/src/UI/Components/GameState/Intro.vue +17 -0
  339. package/src/UI/Components/GameState/TitleScreen.vue +42 -0
  340. package/src/UI/Components/GameState/Victory.vue +28 -0
  341. package/src/UI/Components/Navigation.vue +94 -0
  342. package/src/UI/Components/Party/Backpack.vue +68 -0
  343. package/src/UI/Components/Party/BuildCharacter.vue +64 -0
  344. package/src/UI/Components/Party/CharacterSheet.vue +57 -0
  345. package/src/UI/Components/Party/CreateCharacter.vue +46 -0
  346. package/src/UI/Components/Party/Equipment.vue +48 -0
  347. package/src/UI/Components/Party/EquipmentSlot.vue +31 -0
  348. package/src/UI/Components/Party/LevelUp.vue +27 -0
  349. package/src/UI/Components/Party/Party.vue +29 -0
  350. package/src/UI/Components/Party/Quests.vue +48 -0
  351. package/src/UI/Components/Sound.vue +42 -0
  352. package/src/UI/Composables/CustomCursor.ts +60 -0
  353. package/src/UI/Composables/LocationMap.ts +315 -0
  354. package/src/UI/Composables/Sound.ts +111 -0
  355. package/src/UI/Composables/TextFeatures.ts +148 -0
  356. package/src/UI/Composables/VisualFeatures.ts +220 -0
  357. package/src/UI/Composables/index.ts +15 -0
  358. package/src/UI/Composables/playStateWatch.ts +31 -0
  359. package/src/UI/StateStore.ts +237 -0
  360. package/src/UI/error.ts +6 -0
  361. package/src/UI/helpers.ts +62 -0
  362. package/src/UI/index.ts +13 -0
  363. package/src/UI/main.ts +62 -0
  364. package/src/UI/startup.ts +58 -0
  365. package/src/UI/styles/bootstrap-storyscript.scss +31 -0
  366. package/src/UI/styles/empty.css +3 -0
  367. package/src/UI/styles/lookinglass.png +0 -0
  368. package/src/UI/styles/storyscript.css +735 -0
  369. package/typeExtensions.d.ts +25 -0
  370. package/vite-env.d.ts +1 -0
@@ -0,0 +1,62 @@
1
+ import { IItem } from './item';
2
+ import { IStock } from './stock';
3
+ import { IGame } from './game';
4
+ /**
5
+ * The base properties to configure a trader of or a container for items in the game.
6
+ */
7
+ export interface ITrade {
8
+ /**
9
+ * The id of the trade, set at runtime.
10
+ */
11
+ id?: string;
12
+ /**
13
+ * The title as shown to the player in the trade dialog. If the trade is defined
14
+ * for a person, omitting the name will have StoryScript use the person name for
15
+ * the trade.
16
+ */
17
+ name?: string;
18
+ /**
19
+ * The description text of the trade as shown to the player.
20
+ */
21
+ text?: string;
22
+ /**
23
+ * The amount of credits the trader has in whatever credits are used in the game. When the trader is a person,
24
+ * the person's currency property will be used to set this value.
25
+ */
26
+ currency?: number;
27
+ /**
28
+ * True if the items for sale by a person are selected from the items the person is carrying, false if other
29
+ * items in the game are also included in the collection the items are to be selected from. The selection of
30
+ * items is done using the initCollection function.
31
+ */
32
+ ownItemsOnly?: boolean;
33
+ /**
34
+ * This function is executed when the player has bought an item from the trader.
35
+ * @param game The game object
36
+ * @param item The item bought
37
+ */
38
+ onBuy?(game: IGame, item: IItem): void;
39
+ /**
40
+ * This function is executed when the player has sold an item to the trader.
41
+ * @param game The game object
42
+ * @param item The item sold
43
+ */
44
+ onSell?(game: IGame, item: IItem): void;
45
+ /**
46
+ * The collection of items the trader will buy or that can be put in the store.
47
+ */
48
+ sell?: IStock;
49
+ /**
50
+ * The collection of items the trader has to offer or that can be taken from the store.
51
+ */
52
+ buy?: IStock & {
53
+ /**
54
+ * This function runs when initiating trade and determines whether the list of items
55
+ * available for buying should be refreshed. Return true to refresh the lists, false
56
+ * to keep them as they were.
57
+ * @param game The game object
58
+ * @param trade The trader for which to refresh the item lists
59
+ */
60
+ initCollection?(game: IGame, trade: ITrade): boolean;
61
+ };
62
+ }
@@ -0,0 +1,52 @@
1
+ import { IAutoplayService, ICharacterService, ICombatService, ICombinationService, ICommandService, IConversationService, IDataSerializer, IDataService, IDataSynchronizer, IDefinitions, IGame, IGameService, IInterfaceTexts, IItemService, IRules, ISoundService, ITradeService } from '..';
2
+ export declare class ServiceFactory {
3
+ private static _instance;
4
+ private static _initialized;
5
+ private readonly _texts;
6
+ private readonly _rules;
7
+ private readonly _definitions;
8
+ private readonly _registeredEntities;
9
+ private readonly _dataSerializer;
10
+ private readonly _dataSynchronizer;
11
+ private readonly _dataService;
12
+ private _game;
13
+ private _gameService;
14
+ private _conversationService;
15
+ private _combinationService;
16
+ private _combatService;
17
+ private _soundService;
18
+ private _characterService;
19
+ private _itemService;
20
+ private _tradeService;
21
+ private _autoPlayService;
22
+ private _commandService;
23
+ constructor(nameSpace: string, definitions: IDefinitions, registeredEntities: Record<string, Record<string, any>>, rules: IRules, texts: IInterfaceTexts);
24
+ get AvailableLocations(): {
25
+ id: any;
26
+ name: any;
27
+ }[];
28
+ static readonly GetInstance: () => ServiceFactory;
29
+ /**
30
+ * Initialize the game object and the services. Pass in a game object when it should be controlled
31
+ * by the UI framework. Vue needs this.
32
+ * @param game The game object.
33
+ */
34
+ init: (game?: IGame) => void;
35
+ GetGame: () => IGame;
36
+ GetRules: () => IRules;
37
+ GetTexts: () => IInterfaceTexts;
38
+ GetGameService: () => IGameService;
39
+ GetTradeService: () => ITradeService;
40
+ GetConversationService: () => IConversationService;
41
+ GetCharacterService: () => ICharacterService;
42
+ GetCombinationService: () => ICombinationService;
43
+ GetDataService: () => IDataService;
44
+ GetDataSerializer: () => IDataSerializer;
45
+ GetDataSynchronizer: () => IDataSynchronizer;
46
+ GetCombatService: () => ICombatService;
47
+ GetSoundService: () => ISoundService;
48
+ GetItemService: () => IItemService;
49
+ GetAutoplayService: () => IAutoplayService;
50
+ GetCommandService: () => ICommandService;
51
+ private Get;
52
+ }
@@ -0,0 +1,11 @@
1
+ import { IAutoplayService, IAutoplayStep, IDemoMode, IGame, IRules } from '../..';
2
+ export declare class AutoplayService implements IAutoplayService {
3
+ private _game;
4
+ private _rules;
5
+ private _demoTimer;
6
+ constructor(_game: IGame, _rules: IRules);
7
+ start: (steps: IAutoplayStep[], callback?: () => void) => void;
8
+ stop: () => void;
9
+ startDemoMode: (demoConfig: IDemoMode, restartCallback: () => void) => void;
10
+ private runAutoplayStep;
11
+ }
@@ -0,0 +1,21 @@
1
+ import { ICharacter, ICharacterService, ICreateCharacter, ICreateCharacterAttribute, ICreateCharacterAttributeEntry, ICreateCharacterStep, IDataService, IGame, IQuest, IRules } from '../..';
2
+ export declare class CharacterService implements ICharacterService {
3
+ private readonly _dataService;
4
+ private readonly _game;
5
+ private readonly _rules;
6
+ constructor(_dataService: IDataService, _game: IGame, _rules: IRules);
7
+ getSheetAttributes: () => string[];
8
+ setupCharacter: () => ICreateCharacter;
9
+ limitSheetInput: (value: number, attribute: ICreateCharacterAttribute, entry: ICreateCharacterAttributeEntry) => void;
10
+ distributionDone: (sheet: ICreateCharacter, step?: ICreateCharacterStep) => boolean;
11
+ createCharacter: (game: IGame, characterData: ICreateCharacter) => ICharacter;
12
+ setupLevelUp: () => ICreateCharacter;
13
+ levelUp: (character: ICharacter) => ICharacter;
14
+ isSlotUsed: (character: ICharacter, slot: string) => boolean;
15
+ questStatus: (quest: IQuest) => string;
16
+ checkEquipment: () => void;
17
+ private readonly prepareSheet;
18
+ private readonly checkStep;
19
+ private readonly processDefaultSettings;
20
+ private readonly setFinish;
21
+ }
@@ -0,0 +1,16 @@
1
+ import { ICharacter, ICombatService, ICombatSetup, ICombatTurn, IEnemy, IGame, IInterfaceTexts, IItem, IRules } from '../..';
2
+ export declare class CombatService implements ICombatService {
3
+ private readonly _game;
4
+ private readonly _rules;
5
+ private readonly _texts;
6
+ constructor(_game: IGame, _rules: IRules, _texts: IInterfaceTexts);
7
+ initCombat: () => void;
8
+ fight: (combat: ICombatSetup<ICombatTurn>, retaliate?: boolean) => Promise<void> | void;
9
+ isSelectable: (item: IItem) => boolean;
10
+ canTarget: (item: IItem, target: IEnemy | ICharacter, character: ICharacter) => boolean;
11
+ private readonly initCombatRound;
12
+ private readonly getItems;
13
+ private readonly getTarget;
14
+ private readonly getTargetName;
15
+ private readonly enemyDefeated;
16
+ }
@@ -0,0 +1,15 @@
1
+ import { ICombinable, ICombinationAction, ICombinationService, ICombineResult, IGame, IInterfaceTexts, IRules } from '../..';
2
+ export declare class CombinationService implements ICombinationService {
3
+ private readonly _game;
4
+ private readonly _rules;
5
+ private readonly _texts;
6
+ private readonly _combinationActions;
7
+ constructor(_game: IGame, _rules: IRules, _texts: IInterfaceTexts);
8
+ get combinationActions(): ICombinationAction[];
9
+ getCombineClass: (tool: ICombinable) => string;
10
+ setActiveCombination: (combination: ICombinationAction) => void;
11
+ tryCombination: (target: ICombinable) => ICombineResult;
12
+ private readonly performCombination;
13
+ private readonly isMatch;
14
+ private readonly removeFeature;
15
+ }
@@ -0,0 +1,24 @@
1
+ import { IAction, IBarrier, IBarrierAction, ICombinationService, ICommandService, IConversationService, IDataService, IDestination, IFeature, IGame, IItem, ILocation, ILocationService, IPerson, ITradeService } from '../..';
2
+ export declare class CommandService implements ICommandService {
3
+ private _locationService;
4
+ private _conversationService;
5
+ private _tradeService;
6
+ private _combinationService;
7
+ private _dataService;
8
+ private _game;
9
+ private _combinationActions;
10
+ constructor(_locationService: ILocationService, _conversationService: IConversationService, _tradeService: ITradeService, _combinationService: ICombinationService, _dataService: IDataService, _game: IGame);
11
+ go: (location: (() => ILocation) | string, saveProgress?: boolean) => void;
12
+ talk: (person: () => IPerson) => void;
13
+ answer: (node: string, reply?: string) => void;
14
+ selectCombination: (combination: string) => void;
15
+ setTool: (feature: (() => IFeature) | string) => void;
16
+ combine: (combination: string, target: (() => IFeature) | string, tool?: (() => IFeature) | string) => void;
17
+ useAction: (action: string | [string, IAction]) => void;
18
+ useBarrierAction: (destination: string | IDestination, barrier: string | [string, IBarrier], action: string | [string, IBarrierAction]) => void;
19
+ trade: (trade: string | (() => IPerson)) => void;
20
+ buy: (item: (() => IItem)) => void;
21
+ sell: (item: (() => IItem)) => void;
22
+ private getFeature;
23
+ private getCombination;
24
+ }
@@ -0,0 +1,26 @@
1
+ import { IConversationNode, IConversationReply, IConversationService, IGame, IPerson, IRules } from '../..';
2
+ export declare class ConversationService implements IConversationService {
3
+ private readonly _game;
4
+ private readonly _rules;
5
+ constructor(_game: IGame, _rules: IRules);
6
+ talk: (person: IPerson) => void;
7
+ answer: (node: IConversationNode, reply: IConversationReply) => void;
8
+ private readonly loadConversation;
9
+ private readonly initConversation;
10
+ private readonly getDefaultReply;
11
+ private readonly processConversationNodes;
12
+ private readonly getNewNode;
13
+ private readonly processReplyNodes;
14
+ private readonly buildReplies;
15
+ private readonly checkNodes;
16
+ private readonly GetNodeValue;
17
+ private readonly getActiveNode;
18
+ private readonly initReplies;
19
+ private readonly processReply;
20
+ private readonly executeAction;
21
+ private readonly checkReplyAvailability;
22
+ private readonly checkReplyRequirements;
23
+ private readonly setReplyStatus;
24
+ private readonly questProgress;
25
+ private readonly getReplyId;
26
+ }
@@ -0,0 +1,17 @@
1
+ import { IDataSerializer } from '../..';
2
+ export declare class DataSerializer implements IDataSerializer {
3
+ private readonly _pristineEntities;
4
+ private conversationPropertiesToSerialize;
5
+ constructor(_pristineEntities: Record<string, Record<string, any>>);
6
+ createSerializableClone: (original: any) => any;
7
+ restoreObjects: (loaded: any) => any;
8
+ private readonly buildStructureForSerialization;
9
+ private processArrayDeletedValuesAndProperties;
10
+ private readonly restoreArray;
11
+ private readonly createClone;
12
+ private readonly getClonedValue;
13
+ private readonly processDataRecord;
14
+ private readonly processArray;
15
+ private readonly skipProperty;
16
+ private readonly isKeyProperty;
17
+ }
@@ -0,0 +1,16 @@
1
+ import { IDataSerializer, IDataService, IDataSynchronizer, IGame, ILocalStorageService, IRules } from '../..';
2
+ export declare class DataService implements IDataService {
3
+ private _localStorageService;
4
+ private serializer;
5
+ private synchronizer;
6
+ private _rules;
7
+ private _gameNameSpace;
8
+ constructor(_localStorageService: ILocalStorageService, serializer: IDataSerializer, synchronizer: IDataSynchronizer, _rules: IRules, _gameNameSpace: string);
9
+ save: <T>(key: string, value: T) => void;
10
+ load: <T>(key: string) => T;
11
+ remove: (key: string) => void;
12
+ saveGame: (game: IGame, name?: string) => void;
13
+ getSaveKeys: () => string[];
14
+ hasGameState: () => boolean;
15
+ private getKey;
16
+ }
@@ -0,0 +1,12 @@
1
+ import { IDataSynchronizer } from '../..';
2
+ export declare class DataSynchronizer implements IDataSynchronizer {
3
+ private _pristineEntities;
4
+ constructor(_pristineEntities: Record<string, Record<string, any>>);
5
+ synchronizeEntityData: (entity: any, pristineEntity?: any, parentEntity?: any, pristineParentEntity?: any, parentProperty?: string) => void;
6
+ private updateDataRecord;
7
+ private updateArray;
8
+ private updateArrayElement;
9
+ private isEntity;
10
+ private markEntriesAsDeleted;
11
+ private deleteRemovedEntities;
12
+ }
@@ -0,0 +1,28 @@
1
+ import { ICharacterService, ICombinationService, ICreateCharacter, IDataService, IDemoMode, IGame, IGameService, IInterfaceTexts, ILocationService, IRules, ISoundService, PlayState } from '../..';
2
+ export declare class GameService implements IGameService {
3
+ private readonly _dataService;
4
+ private readonly _locationService;
5
+ private readonly _characterService;
6
+ private readonly _combinationService;
7
+ private readonly _soundService;
8
+ private readonly _rules;
9
+ private readonly _game;
10
+ private readonly _texts;
11
+ constructor(_dataService: IDataService, _locationService: ILocationService, _characterService: ICharacterService, _combinationService: ICombinationService, _soundService: ISoundService, _rules: IRules, _game: IGame, _texts: IInterfaceTexts);
12
+ initDemo: (demoConfig: IDemoMode) => void;
13
+ init: (restart?: boolean, skipIntro?: boolean) => void;
14
+ reset: () => void;
15
+ startNewGame: (characterData: ICreateCharacter) => void;
16
+ restart: (skipIntro?: boolean) => void;
17
+ loadGame: (name: string) => void;
18
+ watchPlayState(callBack: (game: IGame, newPlayState: PlayState, oldPlayState: PlayState) => void): void;
19
+ private readonly resume;
20
+ private watchState;
21
+ private readonly initTexts;
22
+ private readonly createCharacter;
23
+ private readonly initGame;
24
+ private readonly setInterceptors;
25
+ private readonly initLogs;
26
+ private readonly initCombinations;
27
+ private readonly updateHighScore;
28
+ }
@@ -0,0 +1,18 @@
1
+ import { IDefinitions, IEnemy, IGame, IHelpers, IItem } from '../..';
2
+ export declare class HelperService implements IHelpers {
3
+ private _game;
4
+ private _definitions;
5
+ constructor(_game: IGame, _definitions: IDefinitions);
6
+ randomEnemy: (selector?: (enemy: IEnemy) => boolean) => IEnemy;
7
+ randomItem: (selector?: (item: IItem) => boolean) => IItem;
8
+ getItem: (selector: string) => IItem;
9
+ getEnemy: (selector: string) => IEnemy;
10
+ rollDice: (compositeOrSides: string | number, dieNumber?: number, bonus?: number) => number;
11
+ calculateBonus: (person: {
12
+ items?: IItem[];
13
+ equipment?: {};
14
+ }, type: string) => number;
15
+ getItemFromParty: (item: string | (() => IItem)) => IItem;
16
+ removeItemFromParty: (item: IItem | (() => IItem)) => void;
17
+ private find;
18
+ }
@@ -0,0 +1,21 @@
1
+ import { ICharacter, IEnemy, IGame, IGroupableItem, IInterfaceTexts, IItem, IItemService, IRules } from '../..';
2
+ export declare class ItemService implements IItemService {
3
+ private _game;
4
+ private _rules;
5
+ private _texts;
6
+ constructor(_game: IGame, _rules: IRules, _texts: IInterfaceTexts);
7
+ getItemName: (item: IItem) => string;
8
+ pickupItem: (character: ICharacter, item: IItem) => boolean;
9
+ canGroupItem: (character: ICharacter, group: IGroupableItem<IItem>, item: IGroupableItem<IItem>) => boolean;
10
+ groupItem: (character: ICharacter, group: IGroupableItem<IItem>, item: IGroupableItem<IItem>) => boolean;
11
+ splitItemGroup: (character: ICharacter, item: IGroupableItem<IItem>) => void;
12
+ useItem: (character: ICharacter, item: IItem, target?: IEnemy) => Promise<void> | void;
13
+ isEquippable: (item: IItem, character?: ICharacter) => boolean;
14
+ equipItem: (character: ICharacter, item: IItem) => boolean;
15
+ unequipItem: (character: ICharacter, item: IItem) => boolean;
16
+ canDrop: (item: IItem) => boolean;
17
+ dropItem: (character: ICharacter, item: IItem) => void;
18
+ private makeSlotAvailable;
19
+ private findAvailableSlot;
20
+ private unequip;
21
+ }
@@ -0,0 +1,7 @@
1
+ import { ILocalStorageService } from '../..';
2
+ export declare class LocalStorageService implements ILocalStorageService {
3
+ get: (key: string) => any;
4
+ set: (key: string, value: any) => void;
5
+ remove: (key: string) => void;
6
+ getKeys: (prefix: string) => string[];
7
+ }
@@ -0,0 +1,25 @@
1
+ import { IAction, ICompiledLocation, IDefinitions, IGame, IGameEvents, ILocation, ILocationService, IRules } from '../..';
2
+ export declare class LocationService implements ILocationService {
3
+ private readonly _definitions;
4
+ private readonly _rules;
5
+ private readonly _game;
6
+ private readonly _gameEvents;
7
+ constructor(_definitions: IDefinitions, _rules: IRules, _game: IGame, _gameEvents: IGameEvents);
8
+ init: () => void;
9
+ changeLocation: (location: string | (() => ILocation), travel: boolean, game: IGame) => void;
10
+ executeAction: (action: [string, IAction]) => void;
11
+ loadLocationDescriptions: (game: IGame) => void;
12
+ initDestinations: (location: ICompiledLocation) => void;
13
+ processDestinations: (game: IGame) => void;
14
+ private readonly setupLocations;
15
+ private readonly addLocationGet;
16
+ private readonly switchLocation;
17
+ private readonly markCurrentLocationAsVisited;
18
+ private readonly initTrade;
19
+ private readonly addDestination;
20
+ private readonly playEvents;
21
+ private readonly processTextFeatures;
22
+ private readonly selectLocationDescription;
23
+ private readonly addKeyAction;
24
+ private getActionIndex;
25
+ }
@@ -0,0 +1,13 @@
1
+ import { IGame, IRules, ISoundPlayer, ISoundService } from '../..';
2
+ export declare class SoundService implements ISoundService {
3
+ private _game;
4
+ private _rules;
5
+ private _musicStopped;
6
+ constructor(_game: IGame, _rules: IRules);
7
+ getSounds: () => ISoundPlayer;
8
+ getCurrentMusic: () => string;
9
+ private startMusic;
10
+ private stopMusic;
11
+ private playSound;
12
+ private createHash;
13
+ }
@@ -0,0 +1,17 @@
1
+ import { ICharacter, IDefinitions, IGame, IInterfaceTexts, IItem, IItemService, IPerson, IRules, ITrade, ITradeService } from '../..';
2
+ export declare class TradeService implements ITradeService {
3
+ private readonly _itemService;
4
+ private readonly _game;
5
+ private readonly _rules;
6
+ private readonly _texts;
7
+ private readonly _definitions;
8
+ private _activeTrader;
9
+ constructor(_itemService: IItemService, _game: IGame, _rules: IRules, _texts: IInterfaceTexts, _definitions: IDefinitions);
10
+ trade: (trade: IPerson | ITrade) => void;
11
+ canPay: (item: IItem, buyer: ITrade | ICharacter, seller: ITrade | ICharacter) => boolean;
12
+ actualPrice: (item: IItem, buyer: ITrade | ICharacter, seller: ITrade | ICharacter) => number;
13
+ displayPrice: (item: IItem, actualPrice: number) => string;
14
+ buy: (item: IItem, trade: ITrade) => boolean;
15
+ sell: (item: IItem, trade: ITrade) => boolean;
16
+ private initTrade;
17
+ }
@@ -0,0 +1,17 @@
1
+ export { AutoplayService } from './AutoplayService';
2
+ export { CharacterService } from './CharacterService';
3
+ export { CombatService } from './CombatService';
4
+ export { CombinationService } from './CombinationService';
5
+ export { CommandService } from './CommandService';
6
+ export { ConversationService } from './ConversationService';
7
+ export { DataSerializer } from './DataSerializer';
8
+ export { DataService } from './DataService';
9
+ export { DataSynchronizer } from './DataSynchronizer';
10
+ export { GameService } from './GameService';
11
+ export { HelperService } from './HelperService';
12
+ export { ItemService } from './ItemService';
13
+ export { LocalStorageService } from './LocalStorageService';
14
+ export { LocationService } from './LocationService';
15
+ export { SoundService } from './SoundService';
16
+ export { TradeService } from './TradeService';
17
+ export * from './sharedFunctions';
@@ -0,0 +1,8 @@
1
+ export interface SerializationData {
2
+ clone: any;
3
+ key: string;
4
+ original: any;
5
+ originalValue: any;
6
+ pristine: any;
7
+ pristineValue: any;
8
+ }
@@ -0,0 +1,21 @@
1
+ import { ICharacter, IDefinitions, IGame, IItem, IParty, StateList } from '../..';
2
+ export declare function hasDescription(entity: {
3
+ id?: string;
4
+ description?: string;
5
+ }): boolean;
6
+ export declare function random<T>(type: string, definitions: IDefinitions, selector?: (item: T) => boolean): T;
7
+ export declare function randomList<T>(collection: T[] | ([() => T]), count: number, selector?: (item: T) => boolean): T[];
8
+ export declare function parseFunction<T extends Function>(text: string): T;
9
+ /**
10
+ * This function creates a new function with the callback embedded. This makes the new function safe for serialization.
11
+ * @param functionDefinition The main function to make safe for serialization.
12
+ * @param callback The callback function to embed.
13
+ * @returns The main function with the callback embedded.
14
+ */
15
+ export declare function makeSerializeSafe<T extends Function>(functionDefinition: T, callback: Function): T;
16
+ export declare function serializeFunction(value: Function): string;
17
+ export declare function parseGamePropertiesInTemplate(lines: string, game?: IGame): string;
18
+ export declare function selectStateListEntry(game: IGame, stateList: StateList): any;
19
+ export declare function getItemFromParty(party: IParty, item: string | (() => IItem)): IItem;
20
+ export declare function removeItemFromParty(party: IParty, item: IItem | (() => IItem)): void;
21
+ export declare function removeItemFromItemsAndEquipment(character: ICharacter, item: IItem | (() => IItem)): boolean;
@@ -0,0 +1,3 @@
1
+ export declare function addFunctionExtensions(): void;
2
+ export declare function addUniqueId(entity: any): void;
3
+ export declare function addArrayExtensions(): void;
@@ -0,0 +1,7 @@
1
+ import { IInterfaceTexts } from '..';
2
+ export declare class DefaultTexts {
3
+ texts: IInterfaceTexts;
4
+ format: typeof format;
5
+ titleCase: (text: string) => string;
6
+ }
7
+ export declare function format(template: string, tokens: string | string[]): string;
@@ -0,0 +1,10 @@
1
+ import { IGame, IGameEvents } from '..';
2
+ export declare class GameEvents implements IGameEvents {
3
+ private readonly _eventHandlers;
4
+ private _game;
5
+ register: (eventName: string) => void;
6
+ subscribe: (eventName: string | string[], handler: (game: IGame, eventArguments: any) => void, throwIfUnknown?: boolean) => void;
7
+ publish: (eventName: string, eventData?: any) => void;
8
+ setGame: (game: IGame) => void;
9
+ }
10
+ export declare const gameEvents: GameEvents;
@@ -0,0 +1,8 @@
1
+ import { addArrayExtensions, addFunctionExtensions } from './arrayAndFunctionExtensions';
2
+ import { ServiceFactory } from './ServiceFactory';
3
+ export { addArrayExtensions, addFunctionExtensions, ServiceFactory };
4
+ export * from './Interfaces/index';
5
+ export { gameEvents } from './gameEvents';
6
+ export * from './defaultTexts';
7
+ export * from './Services/sharedFunctions';
8
+ export * from './utilityFunctions';
@@ -0,0 +1,6 @@
1
+ export declare const enum StateProperties {
2
+ Id = "ss_uniqueId",
3
+ Added = "ss_added",
4
+ Deleted = "ss_deleted",
5
+ Triggered = "ss_triggered"
6
+ }
@@ -0,0 +1,25 @@
1
+ import { EquipmentType, IItem, ILocation, IParty } from '..';
2
+ export declare function compareString(left: string, right: string): boolean;
3
+ export declare function getId(id: Function | string): string;
4
+ export declare function isDataRecord(item: any[]): boolean;
5
+ export declare function getKeyPropertyNames(item: any, includeUniqueIds?: boolean): {
6
+ first: string;
7
+ second: string;
8
+ };
9
+ export declare function propertyMatch(first: any, second: any): boolean;
10
+ export declare function getPlural(name: string): string;
11
+ export declare function getSingular(name: string): string;
12
+ export declare function parseHtmlDocumentFromString(document: string): Document;
13
+ export declare function addHtmlSpaces(text: string): string;
14
+ export declare function isEmpty(object: any, property?: string): boolean;
15
+ export declare function equals<T extends {
16
+ id?: string;
17
+ } | ILocation>(entity: T | string, definition: () => T): boolean;
18
+ export declare function hasItem(party: IParty, item: IItem | string): boolean;
19
+ export declare function createPromiseForCallback<T>(callBack: Function): {
20
+ promise: Promise<T>;
21
+ promiseCallback: () => void;
22
+ };
23
+ export declare function wait(timeInMs: number, callBack: Function): Promise<void>;
24
+ export declare function interval(intervalTimeInMs: number, repeat: number, intervalCallback: Function, finalCallback?: Function): Promise<void>;
25
+ export declare function getEquipmentType(slot: EquipmentType | string): string;
@@ -0,0 +1,2 @@
1
+ import { Ref } from 'vue';
2
+ export declare function useCustomCursor(uiRoot: Ref<HTMLElement>): void;
@@ -0,0 +1,26 @@
1
+ import { Ref } from 'vue';
2
+ import { IMap } from '../..';
3
+ export declare function useLocationMap(mapImageRef: Ref<HTMLImageElement>, mapDialogRef: Ref<HTMLDialogElement>): {
4
+ map: import('vue').ComputedRef<{
5
+ name: string;
6
+ mapImage: string;
7
+ locations: {
8
+ location: (() => import('../..').ILocation) | string;
9
+ coords?: string;
10
+ markerImage?: string;
11
+ textLabel?: string;
12
+ markerElement?: HTMLElement;
13
+ }[];
14
+ avatarImage?: string;
15
+ locationNamesAsTextMarkers: boolean;
16
+ locationMarkerImage?: string;
17
+ transitionTime?: number;
18
+ clickable?: boolean;
19
+ showMarkersOnKeyPress?: string;
20
+ toggleFullScreen?: boolean;
21
+ }>;
22
+ prepareMap: (newMap: IMap, cleanup: boolean) => void;
23
+ showMap: () => void;
24
+ toggleFullScreen: () => void;
25
+ toggleTouchMarkersVisible: () => void;
26
+ };
@@ -0,0 +1,7 @@
1
+ import { Ref } from 'vue';
2
+ export declare function useSound(musicPlayerRef: Ref<HTMLAudioElement>): {
3
+ canPlay: Ref<boolean, boolean>;
4
+ getSoundQueue: () => [number, string][];
5
+ getCurrentMusic: () => string;
6
+ soundCompleted: (soundKey: number) => void;
7
+ };
@@ -0,0 +1,8 @@
1
+ import { Ref } from 'vue';
2
+ export declare function useTextFeatures(descriptionRef: Ref<HTMLDivElement>): {
3
+ description: Ref<HTMLDivElement, HTMLDivElement>;
4
+ refreshFeatures: () => void;
5
+ click: (ev: PointerEvent) => void;
6
+ mouseOver: (ev: MouseEvent) => void;
7
+ mouseOut: (ev: MouseEvent) => void;
8
+ };
@@ -0,0 +1,7 @@
1
+ import { Ref } from 'vue';
2
+ export declare function useVisualFeatures(imageRef: Ref<HTMLDivElement>): {
3
+ locationFeatures: Ref<HTMLDivElement, HTMLDivElement>;
4
+ factor: Ref<number, number>;
5
+ initFeatures: () => void;
6
+ prepareFeatures: () => void;
7
+ };
@@ -0,0 +1,7 @@
1
+ import { useCustomCursor } from './CustomCursor';
2
+ import { useLocationMap } from './LocationMap';
3
+ import { usePlayStateWatch } from './playStateWatch';
4
+ import { useSound } from './Sound';
5
+ import { useTextFeatures } from './TextFeatures';
6
+ import { useVisualFeatures } from './VisualFeatures';
7
+ export { useCustomCursor, useLocationMap, usePlayStateWatch, useSound, useTextFeatures, useVisualFeatures };
@@ -0,0 +1,2 @@
1
+ import { Ref } from 'vue';
2
+ export declare function usePlayStateWatch(uiRoot: Ref<HTMLElement>): void;