@gamepark/mythologies 0.10.0 → 0.12.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 (321) hide show
  1. package/dist/CustomMoveType.d.ts +14 -14
  2. package/dist/CustomMoveType.js +11 -14
  3. package/dist/Memory.d.ts +14 -14
  4. package/dist/Memory.js +15 -18
  5. package/dist/MythologiesOptions.d.ts +12 -12
  6. package/dist/MythologiesOptions.js +22 -25
  7. package/dist/MythologiesRules.d.ts +160 -158
  8. package/dist/MythologiesRules.js +220 -244
  9. package/dist/MythologiesSetup.d.ts +17 -17
  10. package/dist/MythologiesSetup.js +84 -161
  11. package/dist/PlayerColor.d.ts +10 -10
  12. package/dist/PlayerColor.js +7 -10
  13. package/dist/index.d.ts +3 -3
  14. package/dist/index.js +3 -9
  15. package/dist/material/Destiny.d.ts +15 -15
  16. package/dist/material/Destiny.js +91 -130
  17. package/dist/material/Entity.d.ts +102 -102
  18. package/dist/material/Entity.js +92 -99
  19. package/dist/material/LocationType.d.ts +28 -28
  20. package/dist/material/LocationType.js +29 -33
  21. package/dist/material/MaterialType.d.ts +13 -13
  22. package/dist/material/MaterialType.js +14 -17
  23. package/dist/material/Mythology.d.ts +18 -18
  24. package/dist/material/Mythology.js +16 -19
  25. package/dist/material/Pantheon.d.ts +50 -50
  26. package/dist/material/Pantheon.js +303 -484
  27. package/dist/material/Trial.d.ts +22 -22
  28. package/dist/material/Trial.js +139 -183
  29. package/dist/material/entity/AutoEffectRule.d.ts +11 -11
  30. package/dist/material/entity/AutoEffectRule.js +16 -49
  31. package/dist/material/entity/Effect.d.ts +130 -106
  32. package/dist/material/entity/Effect.js +32 -46
  33. package/dist/material/entity/EntityDescription.d.ts +13 -13
  34. package/dist/material/entity/EntityDescription.js +165 -170
  35. package/dist/material/entity/MoveEffectRule.d.ts +18 -18
  36. package/dist/material/entity/MoveEffectRule.js +73 -129
  37. package/dist/material/entity/PlaceCardEffectRule.d.ts +17 -15
  38. package/dist/material/entity/PlaceCardEffectRule.js +58 -78
  39. package/dist/material/entity/PlayerEffectRule.d.ts +14 -14
  40. package/dist/material/entity/PlayerEffectRule.js +36 -63
  41. package/dist/material/entity/SacrificeEffectRule.d.ts +11 -11
  42. package/dist/material/entity/SacrificeEffectRule.js +40 -64
  43. package/dist/material/entity/SimultaneousEffectRule.d.ts +18 -18
  44. package/dist/material/entity/SimultaneousEffectRule.js +64 -149
  45. package/dist/material/entity/SimultaneousMoveEffectRule.d.ts +17 -17
  46. package/dist/material/entity/SimultaneousMoveEffectRule.js +64 -141
  47. package/dist/material/entity/SimultaneousSacrificeEffectRule.d.ts +10 -10
  48. package/dist/material/entity/SimultaneousSacrificeEffectRule.js +31 -55
  49. package/dist/material/entity/celtic/Banshee.d.ts +2 -2
  50. package/dist/material/entity/celtic/Banshee.js +23 -46
  51. package/dist/material/entity/celtic/Brigid.d.ts +2 -2
  52. package/dist/material/entity/celtic/Brigid.js +17 -40
  53. package/dist/material/entity/celtic/Cernunnos.d.ts +2 -2
  54. package/dist/material/entity/celtic/Cernunnos.js +19 -43
  55. package/dist/material/entity/celtic/Dagda.d.ts +2 -2
  56. package/dist/material/entity/celtic/Dagda.js +26 -50
  57. package/dist/material/entity/celtic/Dullahan.d.ts +2 -2
  58. package/dist/material/entity/celtic/Dullahan.js +9 -12
  59. package/dist/material/entity/celtic/Fairy.d.ts +2 -2
  60. package/dist/material/entity/celtic/Fairy.js +9 -12
  61. package/dist/material/entity/celtic/Kelpie.d.ts +2 -2
  62. package/dist/material/entity/celtic/Kelpie.js +16 -39
  63. package/dist/material/entity/celtic/Leprechaun.d.ts +2 -2
  64. package/dist/material/entity/celtic/Leprechaun.js +9 -12
  65. package/dist/material/entity/celtic/Morrigan.d.ts +2 -2
  66. package/dist/material/entity/celtic/Morrigan.js +8 -11
  67. package/dist/material/entity/celtic/Selkie.d.ts +2 -2
  68. package/dist/material/entity/celtic/Selkie.js +14 -17
  69. package/dist/material/entity/chinese/ChangE.d.ts +2 -2
  70. package/dist/material/entity/chinese/ChangE.js +6 -9
  71. package/dist/material/entity/chinese/Fenghuang.d.ts +2 -2
  72. package/dist/material/entity/chinese/Fenghuang.js +10 -15
  73. package/dist/material/entity/chinese/Jiangshi.d.ts +2 -2
  74. package/dist/material/entity/chinese/Jiangshi.js +9 -12
  75. package/dist/material/entity/chinese/Mogwai.d.ts +2 -2
  76. package/dist/material/entity/chinese/Mogwai.js +18 -44
  77. package/dist/material/entity/chinese/Nian.d.ts +2 -2
  78. package/dist/material/entity/chinese/Nian.js +19 -42
  79. package/dist/material/entity/chinese/Nuwa.d.ts +2 -2
  80. package/dist/material/entity/chinese/Nuwa.js +9 -12
  81. package/dist/material/entity/chinese/Qilin.d.ts +2 -2
  82. package/dist/material/entity/chinese/Qilin.js +9 -12
  83. package/dist/material/entity/chinese/SunWukong.d.ts +2 -2
  84. package/dist/material/entity/chinese/SunWukong.js +17 -43
  85. package/dist/material/entity/chinese/Tianlong.d.ts +2 -2
  86. package/dist/material/entity/chinese/Tianlong.js +9 -12
  87. package/dist/material/entity/chinese/YanluoWang.d.ts +2 -2
  88. package/dist/material/entity/chinese/YanluoWang.js +9 -12
  89. package/dist/material/entity/egyptian/Ammit.d.ts +2 -2
  90. package/dist/material/entity/egyptian/Ammit.js +9 -12
  91. package/dist/material/entity/egyptian/Anubis.d.ts +2 -2
  92. package/dist/material/entity/egyptian/Anubis.js +9 -12
  93. package/dist/material/entity/egyptian/Beetle.d.ts +2 -2
  94. package/dist/material/entity/egyptian/Beetle.js +20 -43
  95. package/dist/material/entity/egyptian/Bennu.d.ts +2 -2
  96. package/dist/material/entity/egyptian/Bennu.js +9 -12
  97. package/dist/material/entity/egyptian/Cobra.d.ts +2 -2
  98. package/dist/material/entity/egyptian/Cobra.js +9 -12
  99. package/dist/material/entity/egyptian/Isis.d.ts +2 -2
  100. package/dist/material/entity/egyptian/Isis.js +15 -41
  101. package/dist/material/entity/egyptian/Mummy.d.ts +2 -2
  102. package/dist/material/entity/egyptian/Mummy.js +17 -40
  103. package/dist/material/entity/egyptian/Osiris.d.ts +2 -2
  104. package/dist/material/entity/egyptian/Osiris.js +24 -72
  105. package/dist/material/entity/egyptian/Ra.d.ts +2 -2
  106. package/dist/material/entity/egyptian/Ra.js +9 -12
  107. package/dist/material/entity/egyptian/Sphinx.d.ts +2 -2
  108. package/dist/material/entity/egyptian/Sphinx.js +9 -12
  109. package/dist/material/entity/greek/Athena.d.ts +2 -2
  110. package/dist/material/entity/greek/Athena.js +9 -12
  111. package/dist/material/entity/greek/Centaur.d.ts +2 -2
  112. package/dist/material/entity/greek/Centaur.js +9 -12
  113. package/dist/material/entity/greek/Chimera.d.ts +2 -2
  114. package/dist/material/entity/greek/Chimera.js +9 -12
  115. package/dist/material/entity/greek/Cyclops.d.ts +2 -2
  116. package/dist/material/entity/greek/Cyclops.js +15 -19
  117. package/dist/material/entity/greek/Gorgon.d.ts +2 -2
  118. package/dist/material/entity/greek/Gorgon.js +9 -12
  119. package/dist/material/entity/greek/Griffin.d.ts +2 -2
  120. package/dist/material/entity/greek/Griffin.js +9 -12
  121. package/dist/material/entity/greek/Hades.d.ts +2 -2
  122. package/dist/material/entity/greek/Hades.js +9 -12
  123. package/dist/material/entity/greek/Minotaur.d.ts +2 -2
  124. package/dist/material/entity/greek/Minotaur.js +9 -12
  125. package/dist/material/entity/greek/Poseidon.d.ts +2 -2
  126. package/dist/material/entity/greek/Poseidon.js +20 -46
  127. package/dist/material/entity/greek/Zeus.d.ts +2 -2
  128. package/dist/material/entity/greek/Zeus.js +17 -40
  129. package/dist/material/entity/hindu/Asura.d.ts +2 -2
  130. package/dist/material/entity/hindu/Asura.js +19 -67
  131. package/dist/material/entity/hindu/Brahma.d.ts +2 -2
  132. package/dist/material/entity/hindu/Brahma.js +14 -37
  133. package/dist/material/entity/hindu/Ganesh.d.ts +2 -2
  134. package/dist/material/entity/hindu/Ganesh.js +18 -41
  135. package/dist/material/entity/hindu/Garuda.d.ts +2 -2
  136. package/dist/material/entity/hindu/Garuda.js +9 -12
  137. package/dist/material/entity/hindu/Kinnara.d.ts +2 -2
  138. package/dist/material/entity/hindu/Kinnara.js +9 -12
  139. package/dist/material/entity/hindu/Naga.d.ts +2 -2
  140. package/dist/material/entity/hindu/Naga.js +29 -75
  141. package/dist/material/entity/hindu/Rakshasa.d.ts +2 -2
  142. package/dist/material/entity/hindu/Rakshasa.js +9 -12
  143. package/dist/material/entity/hindu/Shiva.d.ts +2 -2
  144. package/dist/material/entity/hindu/Shiva.js +9 -12
  145. package/dist/material/entity/hindu/Vetala.d.ts +2 -2
  146. package/dist/material/entity/hindu/Vetala.js +9 -12
  147. package/dist/material/entity/hindu/Vishnu.d.ts +2 -2
  148. package/dist/material/entity/hindu/Vishnu.js +9 -68
  149. package/dist/material/entity/inca/Amaru.d.ts +2 -2
  150. package/dist/material/entity/inca/Amaru.js +15 -38
  151. package/dist/material/entity/inca/Caiman.d.ts +2 -2
  152. package/dist/material/entity/inca/Caiman.js +9 -12
  153. package/dist/material/entity/inca/Condor.d.ts +2 -2
  154. package/dist/material/entity/inca/Condor.js +9 -12
  155. package/dist/material/entity/inca/Illapa.d.ts +2 -2
  156. package/dist/material/entity/inca/Illapa.js +9 -12
  157. package/dist/material/entity/inca/Inti.d.ts +2 -2
  158. package/dist/material/entity/inca/Inti.js +16 -39
  159. package/dist/material/entity/inca/MamaQucha.d.ts +2 -2
  160. package/dist/material/entity/inca/MamaQucha.js +20 -43
  161. package/dist/material/entity/inca/Puma.d.ts +2 -2
  162. package/dist/material/entity/inca/Puma.js +14 -40
  163. package/dist/material/entity/inca/Supay.d.ts +2 -2
  164. package/dist/material/entity/inca/Supay.js +9 -12
  165. package/dist/material/entity/inca/Ukuku.d.ts +2 -2
  166. package/dist/material/entity/inca/Ukuku.js +14 -18
  167. package/dist/material/entity/inca/Viracocha.d.ts +2 -2
  168. package/dist/material/entity/inca/Viracocha.js +9 -12
  169. package/dist/material/entity/norse/Alf.d.ts +2 -2
  170. package/dist/material/entity/norse/Alf.js +9 -12
  171. package/dist/material/entity/norse/Draugr.d.ts +2 -2
  172. package/dist/material/entity/norse/Draugr.js +9 -12
  173. package/dist/material/entity/norse/Fenrir.d.ts +2 -2
  174. package/dist/material/entity/norse/Fenrir.js +9 -12
  175. package/dist/material/entity/norse/Freya.d.ts +2 -2
  176. package/dist/material/entity/norse/Freya.js +17 -40
  177. package/dist/material/entity/norse/Jotunn.d.ts +2 -2
  178. package/dist/material/entity/norse/Jotunn.js +15 -38
  179. package/dist/material/entity/norse/Loki.d.ts +2 -2
  180. package/dist/material/entity/norse/Loki.js +14 -37
  181. package/dist/material/entity/norse/Odin.d.ts +2 -2
  182. package/dist/material/entity/norse/Odin.js +3 -6
  183. package/dist/material/entity/norse/Thor.d.ts +2 -2
  184. package/dist/material/entity/norse/Thor.js +9 -12
  185. package/dist/material/entity/norse/Troll.d.ts +2 -2
  186. package/dist/material/entity/norse/Troll.js +6 -9
  187. package/dist/material/entity/norse/Valkyrie.d.ts +2 -2
  188. package/dist/material/entity/norse/Valkyrie.js +27 -73
  189. package/dist/material/entity/zulu/Idlozi.d.ts +2 -2
  190. package/dist/material/entity/zulu/Idlozi.js +9 -12
  191. package/dist/material/entity/zulu/Impundulu.d.ts +2 -2
  192. package/dist/material/entity/zulu/Impundulu.js +9 -12
  193. package/dist/material/entity/zulu/Inkanyamba.d.ts +2 -2
  194. package/dist/material/entity/zulu/Inkanyamba.js +16 -42
  195. package/dist/material/entity/zulu/Inkosazana.d.ts +2 -2
  196. package/dist/material/entity/zulu/Inkosazana.js +9 -12
  197. package/dist/material/entity/zulu/Shembe.d.ts +2 -2
  198. package/dist/material/entity/zulu/Shembe.js +19 -44
  199. package/dist/material/entity/zulu/Tokoloshe.d.ts +2 -2
  200. package/dist/material/entity/zulu/Tokoloshe.js +24 -47
  201. package/dist/material/entity/zulu/Umvelinqangi.d.ts +2 -2
  202. package/dist/material/entity/zulu/Umvelinqangi.js +22 -45
  203. package/dist/material/entity/zulu/Unkulunkulu.d.ts +2 -2
  204. package/dist/material/entity/zulu/Unkulunkulu.js +20 -43
  205. package/dist/material/entity/zulu/Unwabu.d.ts +2 -2
  206. package/dist/material/entity/zulu/Unwabu.js +25 -49
  207. package/dist/material/entity/zulu/Werehyena.d.ts +2 -2
  208. package/dist/material/entity/zulu/Werehyena.js +9 -12
  209. package/dist/rules/ChooseDraftTokenRule.d.ts +15 -15
  210. package/dist/rules/ChooseDraftTokenRule.js +54 -103
  211. package/dist/rules/DrawDestinyCardRule.d.ts +7 -7
  212. package/dist/rules/DrawDestinyCardRule.js +44 -115
  213. package/dist/rules/EndGameRule.d.ts +5 -5
  214. package/dist/rules/EndGameRule.js +34 -105
  215. package/dist/rules/PlaceCardsRule.d.ts +14 -14
  216. package/dist/rules/PlaceCardsRule.js +107 -206
  217. package/dist/rules/PlaceTokenRule.d.ts +12 -12
  218. package/dist/rules/PlaceTokenRule.js +75 -151
  219. package/dist/rules/RuleId.d.ts +66 -65
  220. package/dist/rules/RuleId.js +67 -69
  221. package/dist/rules/UpkeepRule.d.ts +9 -9
  222. package/dist/rules/UpkeepRule.js +56 -154
  223. package/dist/rules/effects/AlfEffectRule.d.ts +10 -10
  224. package/dist/rules/effects/AlfEffectRule.js +33 -59
  225. package/dist/rules/effects/AmmitEffectRule.d.ts +6 -6
  226. package/dist/rules/effects/AmmitEffectRule.js +15 -40
  227. package/dist/rules/effects/AnubisEffectRule.d.ts +9 -9
  228. package/dist/rules/effects/AnubisEffectRule.js +14 -49
  229. package/dist/rules/effects/AthenaEffectRule.d.ts +10 -10
  230. package/dist/rules/effects/AthenaEffectRule.js +48 -150
  231. package/dist/rules/effects/BennuEffectRule.d.ts +6 -6
  232. package/dist/rules/effects/BennuEffectRule.js +10 -35
  233. package/dist/rules/effects/CaimanEffectRule.d.ts +7 -7
  234. package/dist/rules/effects/CaimanEffectRule.js +23 -72
  235. package/dist/rules/effects/CentaurEffectRule.d.ts +15 -15
  236. package/dist/rules/effects/CentaurEffectRule.js +33 -95
  237. package/dist/rules/effects/ChimeraEffectRule.d.ts +8 -8
  238. package/dist/rules/effects/ChimeraEffectRule.js +15 -40
  239. package/dist/rules/effects/CobraEffectRule.d.ts +13 -13
  240. package/dist/rules/effects/CobraEffectRule.js +30 -61
  241. package/dist/rules/effects/CondorEffectRule.d.ts +8 -8
  242. package/dist/rules/effects/CondorEffectRule.js +20 -45
  243. package/dist/rules/effects/CyclopsEffectRule.d.ts +11 -11
  244. package/dist/rules/effects/CyclopsEffectRule.js +50 -106
  245. package/dist/rules/effects/DraugrEffectRule.d.ts +11 -11
  246. package/dist/rules/effects/DraugrEffectRule.js +32 -58
  247. package/dist/rules/effects/DullahanEffectRule.d.ts +11 -11
  248. package/dist/rules/effects/DullahanEffectRule.js +48 -73
  249. package/dist/rules/effects/FairyEffectRule.d.ts +10 -10
  250. package/dist/rules/effects/FairyEffectRule.js +33 -55
  251. package/dist/rules/effects/FenghuangEffectRule.d.ts +8 -8
  252. package/dist/rules/effects/FenghuangEffectRule.js +18 -48
  253. package/dist/rules/effects/FenrirEffectRule.d.ts +16 -16
  254. package/dist/rules/effects/FenrirEffectRule.js +85 -139
  255. package/dist/rules/effects/GarudaEffectRule.d.ts +16 -16
  256. package/dist/rules/effects/GarudaEffectRule.js +55 -113
  257. package/dist/rules/effects/GorgonEffectRule.d.ts +7 -7
  258. package/dist/rules/effects/GorgonEffectRule.js +15 -40
  259. package/dist/rules/effects/GriffinEffectRule.d.ts +9 -9
  260. package/dist/rules/effects/GriffinEffectRule.js +16 -41
  261. package/dist/rules/effects/HadesEffectRule.d.ts +9 -9
  262. package/dist/rules/effects/HadesEffectRule.js +14 -39
  263. package/dist/rules/effects/IdloziEffectRule.d.ts +9 -9
  264. package/dist/rules/effects/IdloziEffectRule.js +21 -46
  265. package/dist/rules/effects/IllapaEffectRule.d.ts +16 -16
  266. package/dist/rules/effects/IllapaEffectRule.js +43 -76
  267. package/dist/rules/effects/ImpunduluEffectRule.d.ts +10 -10
  268. package/dist/rules/effects/ImpunduluEffectRule.js +39 -77
  269. package/dist/rules/effects/InkosazanaEffectRule.d.ts +7 -7
  270. package/dist/rules/effects/InkosazanaEffectRule.js +11 -46
  271. package/dist/rules/effects/JiangshiEffectRule.d.ts +8 -8
  272. package/dist/rules/effects/JiangshiEffectRule.js +25 -51
  273. package/dist/rules/effects/KinnaraEffectRule.d.ts +13 -13
  274. package/dist/rules/effects/KinnaraEffectRule.js +42 -95
  275. package/dist/rules/effects/LeprechaunEffectRule.d.ts +9 -9
  276. package/dist/rules/effects/LeprechaunEffectRule.js +23 -49
  277. package/dist/rules/effects/MinotaurEffectRule.d.ts +11 -11
  278. package/dist/rules/effects/MinotaurEffectRule.js +23 -49
  279. package/dist/rules/effects/MultipleSimultaneousMoveEffectRule.d.ts +15 -14
  280. package/dist/rules/effects/MultipleSimultaneousMoveEffectRule.js +96 -144
  281. package/dist/rules/effects/NuwaEffectRule.d.ts +14 -14
  282. package/dist/rules/effects/NuwaEffectRule.js +57 -106
  283. package/dist/rules/effects/OdinEffectRule.d.ts +11 -11
  284. package/dist/rules/effects/OdinEffectRule.js +27 -52
  285. package/dist/rules/effects/PermanentEffectsRule.d.ts +7 -7
  286. package/dist/rules/effects/PermanentEffectsRule.js +21 -54
  287. package/dist/rules/effects/QilinEffectRule.d.ts +8 -8
  288. package/dist/rules/effects/QilinEffectRule.js +40 -115
  289. package/dist/rules/effects/RaEffectRule.d.ts +9 -9
  290. package/dist/rules/effects/RaEffectRule.js +14 -39
  291. package/dist/rules/effects/RakshasaEffectRule.d.ts +13 -13
  292. package/dist/rules/effects/RakshasaEffectRule.js +23 -48
  293. package/dist/rules/effects/ResolveEffectsRule.d.ts +15 -12
  294. package/dist/rules/effects/ResolveEffectsRule.js +154 -141
  295. package/dist/rules/effects/SelkieEffectRule.d.ts +8 -8
  296. package/dist/rules/effects/SelkieEffectRule.js +19 -44
  297. package/dist/rules/effects/ShivaEffectRule.d.ts +10 -10
  298. package/dist/rules/effects/ShivaEffectRule.js +35 -61
  299. package/dist/rules/effects/SphinxEffectRule.d.ts +10 -10
  300. package/dist/rules/effects/SphinxEffectRule.js +33 -58
  301. package/dist/rules/effects/SupayEffectRule.d.ts +20 -20
  302. package/dist/rules/effects/SupayEffectRule.js +44 -81
  303. package/dist/rules/effects/ThorEffectRule.d.ts +11 -11
  304. package/dist/rules/effects/ThorEffectRule.js +32 -58
  305. package/dist/rules/effects/TianlongEffectRule.d.ts +17 -17
  306. package/dist/rules/effects/TianlongEffectRule.js +47 -105
  307. package/dist/rules/effects/TriggerEffectsRule.d.ts +12 -11
  308. package/dist/rules/effects/TriggerEffectsRule.js +67 -183
  309. package/dist/rules/effects/UkukuEffectRule.d.ts +14 -14
  310. package/dist/rules/effects/UkukuEffectRule.js +35 -66
  311. package/dist/rules/effects/VetalaEffectRule.d.ts +12 -12
  312. package/dist/rules/effects/VetalaEffectRule.js +37 -62
  313. package/dist/rules/effects/ViracochaEffectRule.d.ts +7 -7
  314. package/dist/rules/effects/ViracochaEffectRule.js +15 -40
  315. package/dist/rules/effects/VishnuEffectRule.d.ts +10 -0
  316. package/dist/rules/effects/VishnuEffectRule.js +44 -0
  317. package/dist/rules/effects/WerehyenaEffectRule.d.ts +8 -8
  318. package/dist/rules/effects/WerehyenaEffectRule.js +37 -98
  319. package/dist/rules/effects/YanluoWangEffectRule.d.ts +9 -9
  320. package/dist/rules/effects/YanluoWangEffectRule.js +46 -104
  321. package/package.json +7 -8
@@ -1,170 +1,165 @@
1
- "use strict";
2
- var _a;
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.entities = exports.getEffects = void 0;
5
- var Entity_1 = require("../Entity");
6
- var Banshee_1 = require("./celtic/Banshee");
7
- var Brigid_1 = require("./celtic/Brigid");
8
- var Cernunnos_1 = require("./celtic/Cernunnos");
9
- var Dagda_1 = require("./celtic/Dagda");
10
- var Fairy_1 = require("./celtic/Fairy");
11
- var Dullahan_1 = require("./celtic/Dullahan");
12
- var Kelpie_1 = require("./celtic/Kelpie");
13
- var Leprechaun_1 = require("./celtic/Leprechaun");
14
- var Morrigan_1 = require("./celtic/Morrigan");
15
- var Selkie_1 = require("./celtic/Selkie");
16
- var ChangE_1 = require("./chinese/ChangE");
17
- var Fenghuang_1 = require("./chinese/Fenghuang");
18
- var Jiangshi_1 = require("./chinese/Jiangshi");
19
- var Mogwai_1 = require("./chinese/Mogwai");
20
- var Nian_1 = require("./chinese/Nian");
21
- var Nuwa_1 = require("./chinese/Nuwa");
22
- var Qilin_1 = require("./chinese/Qilin");
23
- var SunWukong_1 = require("./chinese/SunWukong");
24
- var Tianlong_1 = require("./chinese/Tianlong");
25
- var YanluoWang_1 = require("./chinese/YanluoWang");
26
- var Anubis_1 = require("./egyptian/Anubis");
27
- var Ammit_1 = require("./egyptian/Ammit");
28
- var Beetle_1 = require("./egyptian/Beetle");
29
- var Bennu_1 = require("./egyptian/Bennu");
30
- var Cobra_1 = require("./egyptian/Cobra");
31
- var Isis_1 = require("./egyptian/Isis");
32
- var Mummy_1 = require("./egyptian/Mummy");
33
- var Osiris_1 = require("./egyptian/Osiris");
34
- var Ra_1 = require("./egyptian/Ra");
35
- var Sphinx_1 = require("./egyptian/Sphinx");
36
- var Athena_1 = require("./greek/Athena");
37
- var Centaur_1 = require("./greek/Centaur");
38
- var Chimera_1 = require("./greek/Chimera");
39
- var Cyclops_1 = require("./greek/Cyclops");
40
- var Gorgon_1 = require("./greek/Gorgon");
41
- var Griffin_1 = require("./greek/Griffin");
42
- var Hades_1 = require("./greek/Hades");
43
- var Minotaur_1 = require("./greek/Minotaur");
44
- var Poseidon_1 = require("./greek/Poseidon");
45
- var Zeus_1 = require("./greek/Zeus");
46
- var Asura_1 = require("./hindu/Asura");
47
- var Brahma_1 = require("./hindu/Brahma");
48
- var Ganesh_1 = require("./hindu/Ganesh");
49
- var Garuda_1 = require("./hindu/Garuda");
50
- var Kinnara_1 = require("./hindu/Kinnara");
51
- var Naga_1 = require("./hindu/Naga");
52
- var Rakshasa_1 = require("./hindu/Rakshasa");
53
- var Shiva_1 = require("./hindu/Shiva");
54
- var Vetala_1 = require("./hindu/Vetala");
55
- var Vishnu_1 = require("./hindu/Vishnu");
56
- var Amaru_1 = require("./inca/Amaru");
57
- var Caiman_1 = require("./inca/Caiman");
58
- var Condor_1 = require("./inca/Condor");
59
- var Illapa_1 = require("./inca/Illapa");
60
- var Inti_1 = require("./inca/Inti");
61
- var MamaQucha_1 = require("./inca/MamaQucha");
62
- var Puma_1 = require("./inca/Puma");
63
- var Supay_1 = require("./inca/Supay");
64
- var Ukuku_1 = require("./inca/Ukuku");
65
- var Viracocha_1 = require("./inca/Viracocha");
66
- var Alf_1 = require("./norse/Alf");
67
- var Draugr_1 = require("./norse/Draugr");
68
- var Fenrir_1 = require("./norse/Fenrir");
69
- var Freya_1 = require("./norse/Freya");
70
- var Jotunn_1 = require("./norse/Jotunn");
71
- var Loki_1 = require("./norse/Loki");
72
- var Odin_1 = require("./norse/Odin");
73
- var Thor_1 = require("./norse/Thor");
74
- var Troll_1 = require("./norse/Troll");
75
- var Valkyrie_1 = require("./norse/Valkyrie");
76
- var Idlozi_1 = require("./zulu/Idlozi");
77
- var Impundulu_1 = require("./zulu/Impundulu");
78
- var Inkanyamba_1 = require("./zulu/Inkanyamba");
79
- var Inkosazana_1 = require("./zulu/Inkosazana");
80
- var Shembe_1 = require("./zulu/Shembe");
81
- var Tokoloshe_1 = require("./zulu/Tokoloshe");
82
- var Umvelinqangi_1 = require("./zulu/Umvelinqangi");
83
- var Unkulunkulu_1 = require("./zulu/Unkulunkulu");
84
- var Unwabu_1 = require("./zulu/Unwabu");
85
- var Werehyena_1 = require("./zulu/Werehyena");
86
- var getEffects = function (entity) { return (entity ? getDescriptionEffects(exports.entities[entity]) : []); };
87
- exports.getEffects = getEffects;
88
- var getDescriptionEffects = function (description) { var _a; return (description.effect ? [description.effect] : ((_a = description.effects) !== null && _a !== void 0 ? _a : [])); };
89
- exports.entities = (_a = {},
90
- _a[Entity_1.Entity.Zeus] = Zeus_1.Zeus,
91
- _a[Entity_1.Entity.Poseidon] = Poseidon_1.Poseidon,
92
- _a[Entity_1.Entity.Athena] = Athena_1.Athena,
93
- _a[Entity_1.Entity.Hades] = Hades_1.Hades,
94
- _a[Entity_1.Entity.Minotaur] = Minotaur_1.Minotaur,
95
- _a[Entity_1.Entity.Centaur] = Centaur_1.Centaur,
96
- _a[Entity_1.Entity.Gorgon] = Gorgon_1.Gorgon,
97
- _a[Entity_1.Entity.Cyclops] = Cyclops_1.Cyclops,
98
- _a[Entity_1.Entity.Griffin] = Griffin_1.Griffin,
99
- _a[Entity_1.Entity.Chimera] = Chimera_1.Chimera,
100
- _a[Entity_1.Entity.Odin] = Odin_1.Odin,
101
- _a[Entity_1.Entity.Thor] = Thor_1.Thor,
102
- _a[Entity_1.Entity.Loki] = Loki_1.Loki,
103
- _a[Entity_1.Entity.Freya] = Freya_1.Freya,
104
- _a[Entity_1.Entity.Draugr] = Draugr_1.Draugr,
105
- _a[Entity_1.Entity.Jotunn] = Jotunn_1.Jotunn,
106
- _a[Entity_1.Entity.Valkyrie] = Valkyrie_1.Valkyrie,
107
- _a[Entity_1.Entity.Troll] = Troll_1.Troll,
108
- _a[Entity_1.Entity.Fenrir] = Fenrir_1.Fenrir,
109
- _a[Entity_1.Entity.Alf] = Alf_1.Alf,
110
- _a[Entity_1.Entity.Ra] = Ra_1.Ra,
111
- _a[Entity_1.Entity.Osiris] = Osiris_1.Osiris,
112
- _a[Entity_1.Entity.Anubis] = Anubis_1.Anubis,
113
- _a[Entity_1.Entity.Isis] = Isis_1.Isis,
114
- _a[Entity_1.Entity.Beetle] = Beetle_1.Beetle,
115
- _a[Entity_1.Entity.Mummy] = Mummy_1.Mummy,
116
- _a[Entity_1.Entity.Sphinx] = Sphinx_1.Sphinx,
117
- _a[Entity_1.Entity.Cobra] = Cobra_1.Cobra,
118
- _a[Entity_1.Entity.Ammit] = Ammit_1.Ammit,
119
- _a[Entity_1.Entity.Bennu] = Bennu_1.Bennu,
120
- _a[Entity_1.Entity.Brahma] = Brahma_1.Brahma,
121
- _a[Entity_1.Entity.Vishnu] = Vishnu_1.Vishnu,
122
- _a[Entity_1.Entity.Shiva] = Shiva_1.Shiva,
123
- _a[Entity_1.Entity.Ganesh] = Ganesh_1.Ganesh,
124
- _a[Entity_1.Entity.Asura] = Asura_1.Asura,
125
- _a[Entity_1.Entity.Naga] = Naga_1.Naga,
126
- _a[Entity_1.Entity.Rakshasa] = Rakshasa_1.Rakshasa,
127
- _a[Entity_1.Entity.Garuda] = Garuda_1.Garuda,
128
- _a[Entity_1.Entity.Vetala] = Vetala_1.Vetala,
129
- _a[Entity_1.Entity.Kinnara] = Kinnara_1.Kinnara,
130
- _a[Entity_1.Entity.Viracocha] = Viracocha_1.Viracocha,
131
- _a[Entity_1.Entity.MamaQucha] = MamaQucha_1.MamaQucha,
132
- _a[Entity_1.Entity.Illapa] = Illapa_1.Illapa,
133
- _a[Entity_1.Entity.Inti] = Inti_1.Inti,
134
- _a[Entity_1.Entity.Puma] = Puma_1.Puma,
135
- _a[Entity_1.Entity.Amaru] = Amaru_1.Amaru,
136
- _a[Entity_1.Entity.Caiman] = Caiman_1.Caiman,
137
- _a[Entity_1.Entity.Condor] = Condor_1.Condor,
138
- _a[Entity_1.Entity.Supay] = Supay_1.Supay,
139
- _a[Entity_1.Entity.Ukuku] = Ukuku_1.Ukuku,
140
- _a[Entity_1.Entity.YanluoWang] = YanluoWang_1.YanluoWang,
141
- _a[Entity_1.Entity.SunWukong] = SunWukong_1.SunWukong,
142
- _a[Entity_1.Entity.Nuwa] = Nuwa_1.Nuwa,
143
- _a[Entity_1.Entity.ChangE] = ChangE_1.ChangE,
144
- _a[Entity_1.Entity.Tianlong] = Tianlong_1.Tianlong,
145
- _a[Entity_1.Entity.Qilin] = Qilin_1.Qilin,
146
- _a[Entity_1.Entity.Fenghuang] = Fenghuang_1.Fenghuang,
147
- _a[Entity_1.Entity.Mogwai] = Mogwai_1.Mogwai,
148
- _a[Entity_1.Entity.Jiangshi] = Jiangshi_1.Jiangshi,
149
- _a[Entity_1.Entity.Nian] = Nian_1.Nian,
150
- _a[Entity_1.Entity.Unkulunkulu] = Unkulunkulu_1.Unkulunkulu,
151
- _a[Entity_1.Entity.Inkosazana] = Inkosazana_1.Inkosazana,
152
- _a[Entity_1.Entity.Shembe] = Shembe_1.Shembe,
153
- _a[Entity_1.Entity.Umvelinqangi] = Umvelinqangi_1.Umvelinqangi,
154
- _a[Entity_1.Entity.Inkanyamba] = Inkanyamba_1.Inkanyamba,
155
- _a[Entity_1.Entity.Unwabu] = Unwabu_1.Unwabu,
156
- _a[Entity_1.Entity.Tokoloshe] = Tokoloshe_1.Tokoloshe,
157
- _a[Entity_1.Entity.Impundulu] = Impundulu_1.Impundulu,
158
- _a[Entity_1.Entity.Werehyena] = Werehyena_1.Werehyena,
159
- _a[Entity_1.Entity.Idlozi] = Idlozi_1.Idlozi,
160
- _a[Entity_1.Entity.Dagda] = Dagda_1.Dagda,
161
- _a[Entity_1.Entity.Brigid] = Brigid_1.Brigid,
162
- _a[Entity_1.Entity.Cernunnos] = Cernunnos_1.Cernunnos,
163
- _a[Entity_1.Entity.Morrigan] = Morrigan_1.Morrigan,
164
- _a[Entity_1.Entity.Kelpie] = Kelpie_1.Kelpie,
165
- _a[Entity_1.Entity.Banshee] = Banshee_1.Banshee,
166
- _a[Entity_1.Entity.Fairy] = Fairy_1.Fairy,
167
- _a[Entity_1.Entity.Leprechaun] = Leprechaun_1.Leprechaun,
168
- _a[Entity_1.Entity.Selkie] = Selkie_1.Selkie,
169
- _a[Entity_1.Entity.Dullahan] = Dullahan_1.Dullahan,
170
- _a);
1
+ import { Entity } from '../Entity';
2
+ import { Banshee } from './celtic/Banshee';
3
+ import { Brigid } from './celtic/Brigid';
4
+ import { Cernunnos } from './celtic/Cernunnos';
5
+ import { Dagda } from './celtic/Dagda';
6
+ import { Fairy } from './celtic/Fairy';
7
+ import { Dullahan } from './celtic/Dullahan';
8
+ import { Kelpie } from './celtic/Kelpie';
9
+ import { Leprechaun } from './celtic/Leprechaun';
10
+ import { Morrigan } from './celtic/Morrigan';
11
+ import { Selkie } from './celtic/Selkie';
12
+ import { ChangE } from './chinese/ChangE';
13
+ import { Fenghuang } from './chinese/Fenghuang';
14
+ import { Jiangshi } from './chinese/Jiangshi';
15
+ import { Mogwai } from './chinese/Mogwai';
16
+ import { Nian } from './chinese/Nian';
17
+ import { Nuwa } from './chinese/Nuwa';
18
+ import { Qilin } from './chinese/Qilin';
19
+ import { SunWukong } from './chinese/SunWukong';
20
+ import { Tianlong } from './chinese/Tianlong';
21
+ import { YanluoWang } from './chinese/YanluoWang';
22
+ import { Anubis } from './egyptian/Anubis';
23
+ import { Ammit } from './egyptian/Ammit';
24
+ import { Beetle } from './egyptian/Beetle';
25
+ import { Bennu } from './egyptian/Bennu';
26
+ import { Cobra } from './egyptian/Cobra';
27
+ import { Isis } from './egyptian/Isis';
28
+ import { Mummy } from './egyptian/Mummy';
29
+ import { Osiris } from './egyptian/Osiris';
30
+ import { Ra } from './egyptian/Ra';
31
+ import { Sphinx } from './egyptian/Sphinx';
32
+ import { Athena } from './greek/Athena';
33
+ import { Centaur } from './greek/Centaur';
34
+ import { Chimera } from './greek/Chimera';
35
+ import { Cyclops } from './greek/Cyclops';
36
+ import { Gorgon } from './greek/Gorgon';
37
+ import { Griffin } from './greek/Griffin';
38
+ import { Hades } from './greek/Hades';
39
+ import { Minotaur } from './greek/Minotaur';
40
+ import { Poseidon } from './greek/Poseidon';
41
+ import { Zeus } from './greek/Zeus';
42
+ import { Asura } from './hindu/Asura';
43
+ import { Brahma } from './hindu/Brahma';
44
+ import { Ganesh } from './hindu/Ganesh';
45
+ import { Garuda } from './hindu/Garuda';
46
+ import { Kinnara } from './hindu/Kinnara';
47
+ import { Naga } from './hindu/Naga';
48
+ import { Rakshasa } from './hindu/Rakshasa';
49
+ import { Shiva } from './hindu/Shiva';
50
+ import { Vetala } from './hindu/Vetala';
51
+ import { Vishnu } from './hindu/Vishnu';
52
+ import { Amaru } from './inca/Amaru';
53
+ import { Caiman } from './inca/Caiman';
54
+ import { Condor } from './inca/Condor';
55
+ import { Illapa } from './inca/Illapa';
56
+ import { Inti } from './inca/Inti';
57
+ import { MamaQucha } from './inca/MamaQucha';
58
+ import { Puma } from './inca/Puma';
59
+ import { Supay } from './inca/Supay';
60
+ import { Ukuku } from './inca/Ukuku';
61
+ import { Viracocha } from './inca/Viracocha';
62
+ import { Alf } from './norse/Alf';
63
+ import { Draugr } from './norse/Draugr';
64
+ import { Fenrir } from './norse/Fenrir';
65
+ import { Freya } from './norse/Freya';
66
+ import { Jotunn } from './norse/Jotunn';
67
+ import { Loki } from './norse/Loki';
68
+ import { Odin } from './norse/Odin';
69
+ import { Thor } from './norse/Thor';
70
+ import { Troll } from './norse/Troll';
71
+ import { Valkyrie } from './norse/Valkyrie';
72
+ import { Idlozi } from './zulu/Idlozi';
73
+ import { Impundulu } from './zulu/Impundulu';
74
+ import { Inkanyamba } from './zulu/Inkanyamba';
75
+ import { Inkosazana } from './zulu/Inkosazana';
76
+ import { Shembe } from './zulu/Shembe';
77
+ import { Tokoloshe } from './zulu/Tokoloshe';
78
+ import { Umvelinqangi } from './zulu/Umvelinqangi';
79
+ import { Unkulunkulu } from './zulu/Unkulunkulu';
80
+ import { Unwabu } from './zulu/Unwabu';
81
+ import { Werehyena } from './zulu/Werehyena';
82
+ export const getEffects = (entity) => (entity ? getDescriptionEffects(entities[entity]) : []);
83
+ const getDescriptionEffects = (description) => (description.effect ? [description.effect] : (description.effects ?? []));
84
+ export const entities = {
85
+ [Entity.Zeus]: Zeus,
86
+ [Entity.Poseidon]: Poseidon,
87
+ [Entity.Athena]: Athena,
88
+ [Entity.Hades]: Hades,
89
+ [Entity.Minotaur]: Minotaur,
90
+ [Entity.Centaur]: Centaur,
91
+ [Entity.Gorgon]: Gorgon,
92
+ [Entity.Cyclops]: Cyclops,
93
+ [Entity.Griffin]: Griffin,
94
+ [Entity.Chimera]: Chimera,
95
+ [Entity.Odin]: Odin,
96
+ [Entity.Thor]: Thor,
97
+ [Entity.Loki]: Loki,
98
+ [Entity.Freya]: Freya,
99
+ [Entity.Draugr]: Draugr,
100
+ [Entity.Jotunn]: Jotunn,
101
+ [Entity.Valkyrie]: Valkyrie,
102
+ [Entity.Troll]: Troll,
103
+ [Entity.Fenrir]: Fenrir,
104
+ [Entity.Alf]: Alf,
105
+ [Entity.Ra]: Ra,
106
+ [Entity.Osiris]: Osiris,
107
+ [Entity.Anubis]: Anubis,
108
+ [Entity.Isis]: Isis,
109
+ [Entity.Beetle]: Beetle,
110
+ [Entity.Mummy]: Mummy,
111
+ [Entity.Sphinx]: Sphinx,
112
+ [Entity.Cobra]: Cobra,
113
+ [Entity.Ammit]: Ammit,
114
+ [Entity.Bennu]: Bennu,
115
+ [Entity.Brahma]: Brahma,
116
+ [Entity.Vishnu]: Vishnu,
117
+ [Entity.Shiva]: Shiva,
118
+ [Entity.Ganesh]: Ganesh,
119
+ [Entity.Asura]: Asura,
120
+ [Entity.Naga]: Naga,
121
+ [Entity.Rakshasa]: Rakshasa,
122
+ [Entity.Garuda]: Garuda,
123
+ [Entity.Vetala]: Vetala,
124
+ [Entity.Kinnara]: Kinnara,
125
+ [Entity.Viracocha]: Viracocha,
126
+ [Entity.MamaQucha]: MamaQucha,
127
+ [Entity.Illapa]: Illapa,
128
+ [Entity.Inti]: Inti,
129
+ [Entity.Puma]: Puma,
130
+ [Entity.Amaru]: Amaru,
131
+ [Entity.Caiman]: Caiman,
132
+ [Entity.Condor]: Condor,
133
+ [Entity.Supay]: Supay,
134
+ [Entity.Ukuku]: Ukuku,
135
+ [Entity.YanluoWang]: YanluoWang,
136
+ [Entity.SunWukong]: SunWukong,
137
+ [Entity.Nuwa]: Nuwa,
138
+ [Entity.ChangE]: ChangE,
139
+ [Entity.Tianlong]: Tianlong,
140
+ [Entity.Qilin]: Qilin,
141
+ [Entity.Fenghuang]: Fenghuang,
142
+ [Entity.Mogwai]: Mogwai,
143
+ [Entity.Jiangshi]: Jiangshi,
144
+ [Entity.Nian]: Nian,
145
+ [Entity.Unkulunkulu]: Unkulunkulu,
146
+ [Entity.Inkosazana]: Inkosazana,
147
+ [Entity.Shembe]: Shembe,
148
+ [Entity.Umvelinqangi]: Umvelinqangi,
149
+ [Entity.Inkanyamba]: Inkanyamba,
150
+ [Entity.Unwabu]: Unwabu,
151
+ [Entity.Tokoloshe]: Tokoloshe,
152
+ [Entity.Impundulu]: Impundulu,
153
+ [Entity.Werehyena]: Werehyena,
154
+ [Entity.Idlozi]: Idlozi,
155
+ [Entity.Dagda]: Dagda,
156
+ [Entity.Brigid]: Brigid,
157
+ [Entity.Cernunnos]: Cernunnos,
158
+ [Entity.Morrigan]: Morrigan,
159
+ [Entity.Kelpie]: Kelpie,
160
+ [Entity.Banshee]: Banshee,
161
+ [Entity.Fairy]: Fairy,
162
+ [Entity.Leprechaun]: Leprechaun,
163
+ [Entity.Selkie]: Selkie,
164
+ [Entity.Dullahan]: Dullahan
165
+ };
@@ -1,18 +1,18 @@
1
- import { ItemMove, Location, Material, MaterialItem, MaterialMove, MoveItem, XYCoordinates } from '@gamepark/rules-api';
2
- import { PlayerEffectRule } from './PlayerEffectRule';
3
- export declare abstract class MoveEffectRule extends PlayerEffectRule {
4
- canPlayEffect(cardIndex: number): boolean;
5
- playEffect(): MaterialMove[];
6
- getPlayerMoves(): MaterialMove[];
7
- getSacrificeToPreventMove(): MoveItem<number, number, number>[];
8
- getMoveCardsMoves(effectCardIndex?: number): MoveItem<number, number, number>[];
9
- getCardsAbleToMove(effectCardIndex: number): Material<number, number, number>;
10
- getMovingCards(effectCardIndex: number): Material;
11
- getAvailableDestinations(card: MaterialItem, _cardIndex: number): XYCoordinates[];
12
- isLegalDestination(_space: XYCoordinates, _cardLocation: Location): boolean;
13
- beforeItemMove(move: ItemMove): MaterialMove<number, number, number, number>[];
14
- onCardMoved(_move: MoveItem): MaterialMove[];
15
- onCardSacrificed(move: MoveItem): MaterialMove[];
16
- onEndEffect(): MaterialMove<number, number, number, number>[];
17
- updateGridAfterMoves(): MoveItem<number, number, number>[];
18
- }
1
+ import { ItemMove, Location, Material, MaterialItem, MaterialMove, MoveItem, XYCoordinates } from '@gamepark/rules-api';
2
+ import { PlayerEffectRule } from './PlayerEffectRule';
3
+ export declare abstract class MoveEffectRule extends PlayerEffectRule {
4
+ canPlayEffect(cardIndex: number): boolean;
5
+ playEffect(): MaterialMove[];
6
+ getPlayerMoves(): MaterialMove[];
7
+ getSacrificeToPreventMove(): MoveItem<number, number, number>[];
8
+ getMoveCardsMoves(effectCardIndex?: number): MoveItem<number, number, number>[];
9
+ getCardsAbleToMove(effectCardIndex: number): Material<number, number, number>;
10
+ getMovingCards(effectCardIndex: number): Material;
11
+ getAvailableDestinations(card: MaterialItem, _cardIndex: number): XYCoordinates[];
12
+ isLegalDestination(_space: XYCoordinates, _cardLocation: Location): boolean;
13
+ beforeItemMove(move: ItemMove): MaterialMove[];
14
+ onCardMoved(_move: MoveItem): MaterialMove[];
15
+ onCardSacrificed(move: MoveItem): MaterialMove[];
16
+ onEndEffect(): MaterialMove[];
17
+ updateGridAfterMoves(): void;
18
+ }
@@ -1,129 +1,73 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- var __read = (this && this.__read) || function (o, n) {
18
- var m = typeof Symbol === "function" && o[Symbol.iterator];
19
- if (!m) return o;
20
- var i = m.call(o), r, ar = [], e;
21
- try {
22
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
23
- }
24
- catch (error) { e = { error: error }; }
25
- finally {
26
- try {
27
- if (r && !r.done && (m = i["return"])) m.call(i);
28
- }
29
- finally { if (e) throw e.error; }
30
- }
31
- return ar;
32
- };
33
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
34
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
35
- if (ar || !(i in from)) {
36
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
37
- ar[i] = from[i];
38
- }
39
- }
40
- return to.concat(ar || Array.prototype.slice.call(from));
41
- };
42
- Object.defineProperty(exports, "__esModule", { value: true });
43
- exports.MoveEffectRule = void 0;
44
- var rules_api_1 = require("@gamepark/rules-api");
45
- var lodash_1 = require("lodash");
46
- var CustomMoveType_1 = require("../../CustomMoveType");
47
- var TriggerEffectsRule_1 = require("../../rules/effects/TriggerEffectsRule");
48
- var LocationType_1 = require("../LocationType");
49
- var MaterialType_1 = require("../MaterialType");
50
- var Pantheon_1 = require("../Pantheon");
51
- var PlayerEffectRule_1 = require("./PlayerEffectRule");
52
- var MoveEffectRule = (function (_super) {
53
- __extends(MoveEffectRule, _super);
54
- function MoveEffectRule() {
55
- return _super !== null && _super.apply(this, arguments) || this;
56
- }
57
- MoveEffectRule.prototype.canPlayEffect = function (cardIndex) {
58
- return this.getMoveCardsMoves(cardIndex).length > 0;
59
- };
60
- MoveEffectRule.prototype.playEffect = function () {
61
- if (!this.getMoveCardsMoves().length)
62
- return [];
63
- return _super.prototype.playEffect.call(this);
64
- };
65
- MoveEffectRule.prototype.getPlayerMoves = function () {
66
- return this.getMoveCardsMoves().concat(this.getSacrificeToPreventMove());
67
- };
68
- MoveEffectRule.prototype.getSacrificeToPreventMove = function () {
69
- return new Pantheon_1.Pantheon(this.game, this.player).sacrificeToPreventMove();
70
- };
71
- MoveEffectRule.prototype.getMoveCardsMoves = function (effectCardIndex) {
72
- var _this = this;
73
- if (effectCardIndex === void 0) { effectCardIndex = this.getEffect().cardIndex; }
74
- var cards = this.getCardsAbleToMove(effectCardIndex);
75
- return cards.getIndexes().flatMap(function (cardIndex) {
76
- var card = cards.index(cardIndex);
77
- return _this.getAvailableDestinations(card.getItem(), cardIndex).map(function (_a) {
78
- var x = _a.x, y = _a.y;
79
- return card.moveItem({ type: LocationType_1.LocationType.Pantheon, player: _this.player, x: x, y: y });
80
- });
81
- });
82
- };
83
- MoveEffectRule.prototype.getCardsAbleToMove = function (effectCardIndex) {
84
- var pantheon = new Pantheon_1.Pantheon(this.game, this.player);
85
- return this.getMovingCards(effectCardIndex).filter(function (item) { return pantheon.isAbleToMove(item); });
86
- };
87
- MoveEffectRule.prototype.getMovingCards = function (effectCardIndex) {
88
- var player = this.material(MaterialType_1.MaterialType.EntityCard).getItem(effectCardIndex).location.player;
89
- return new Pantheon_1.Pantheon(this.game, player).visibleEntities;
90
- };
91
- MoveEffectRule.prototype.getAvailableDestinations = function (card, _cardIndex) {
92
- var _this = this;
93
- return new Pantheon_1.Pantheon(this.game, this.player).legalSpaces.filter(function (space) { return (space.y !== card.location.y || space.x !== card.location.x) && _this.isLegalDestination(space, card.location); });
94
- };
95
- MoveEffectRule.prototype.isLegalDestination = function (_space, _cardLocation) {
96
- return true;
97
- };
98
- MoveEffectRule.prototype.beforeItemMove = function (move) {
99
- if ((0, rules_api_1.isMoveItemType)(MaterialType_1.MaterialType.EntityCard)(move)) {
100
- if (move.location.type === LocationType_1.LocationType.Pantheon) {
101
- return this.onCardMoved(move);
102
- }
103
- else if (move.location.type === LocationType_1.LocationType.PlayerDiscard) {
104
- return this.onCardSacrificed(move);
105
- }
106
- }
107
- return [];
108
- };
109
- MoveEffectRule.prototype.onCardMoved = function (_move) {
110
- return [this.customMove(CustomMoveType_1.CustomMoveType.EndEffect)];
111
- };
112
- MoveEffectRule.prototype.onCardSacrificed = function (move) {
113
- if (this.getSacrificeToPreventMove().some(function (sacrificeMove) { return (0, lodash_1.isEqual)(move, sacrificeMove); })) {
114
- return [this.customMove(CustomMoveType_1.CustomMoveType.EndEffect)];
115
- }
116
- return [];
117
- };
118
- MoveEffectRule.prototype.onEndEffect = function () {
119
- return __spreadArray(__spreadArray([], __read(this.updateGridAfterMoves()), false), __read(_super.prototype.onEndEffect.call(this)), false);
120
- };
121
- MoveEffectRule.prototype.updateGridAfterMoves = function () {
122
- var _a;
123
- var pantheon = new Pantheon_1.Pantheon(this.game, this.player);
124
- (_a = new TriggerEffectsRule_1.TriggerEffectsRule(this.game)).triggerEffects.apply(_a, __spreadArray([], __read(pantheon.updateGrid()), false));
125
- return pantheon.gainBonus();
126
- };
127
- return MoveEffectRule;
128
- }(PlayerEffectRule_1.PlayerEffectRule));
129
- exports.MoveEffectRule = MoveEffectRule;
1
+ import { isMoveItemType } from '@gamepark/rules-api';
2
+ import { isEqual } from 'es-toolkit';
3
+ import { CustomMoveType } from '../../CustomMoveType';
4
+ import { TriggerEffectsRule } from '../../rules/effects/TriggerEffectsRule';
5
+ import { LocationType } from '../LocationType';
6
+ import { MaterialType } from '../MaterialType';
7
+ import { Pantheon } from '../Pantheon';
8
+ import { PlayerEffectRule } from './PlayerEffectRule';
9
+ export class MoveEffectRule extends PlayerEffectRule {
10
+ canPlayEffect(cardIndex) {
11
+ return this.getMoveCardsMoves(cardIndex).length > 0;
12
+ }
13
+ playEffect() {
14
+ if (!this.getMoveCardsMoves().length)
15
+ return [];
16
+ return super.playEffect();
17
+ }
18
+ getPlayerMoves() {
19
+ return this.getMoveCardsMoves().concat(this.getSacrificeToPreventMove());
20
+ }
21
+ getSacrificeToPreventMove() {
22
+ return new Pantheon(this.game, this.player).sacrificeToPreventMove();
23
+ }
24
+ getMoveCardsMoves(effectCardIndex = this.getEffect().cardIndex) {
25
+ const cards = this.getCardsAbleToMove(effectCardIndex);
26
+ return cards.getIndexes().flatMap((cardIndex) => {
27
+ const card = cards.index(cardIndex);
28
+ return this.getAvailableDestinations(card.getItem(), cardIndex).map(({ x, y }) => card.moveItem({ type: LocationType.Pantheon, player: this.player, x, y }));
29
+ });
30
+ }
31
+ getCardsAbleToMove(effectCardIndex) {
32
+ const pantheon = new Pantheon(this.game, this.player);
33
+ return this.getMovingCards(effectCardIndex).filter((item) => pantheon.isAbleToMove(item));
34
+ }
35
+ getMovingCards(effectCardIndex) {
36
+ const player = this.material(MaterialType.EntityCard).getItem(effectCardIndex).location.player;
37
+ return new Pantheon(this.game, player).visibleEntities;
38
+ }
39
+ getAvailableDestinations(card, _cardIndex) {
40
+ return new Pantheon(this.game, this.player).legalSpaces.filter((space) => (space.y !== card.location.y || space.x !== card.location.x) && this.isLegalDestination(space, card.location));
41
+ }
42
+ isLegalDestination(_space, _cardLocation) {
43
+ return true;
44
+ }
45
+ beforeItemMove(move) {
46
+ if (isMoveItemType(MaterialType.EntityCard)(move)) {
47
+ if (move.location.type === LocationType.Pantheon) {
48
+ return this.onCardMoved(move);
49
+ }
50
+ else if (move.location.type === LocationType.PlayerDiscard) {
51
+ return this.onCardSacrificed(move);
52
+ }
53
+ }
54
+ return [];
55
+ }
56
+ onCardMoved(_move) {
57
+ return [this.customMove(CustomMoveType.EndEffect)];
58
+ }
59
+ onCardSacrificed(move) {
60
+ if (this.getSacrificeToPreventMove().some((sacrificeMove) => isEqual(move, sacrificeMove))) {
61
+ return [this.customMove(CustomMoveType.EndEffect)];
62
+ }
63
+ return [];
64
+ }
65
+ onEndEffect() {
66
+ this.updateGridAfterMoves();
67
+ return super.onEndEffect();
68
+ }
69
+ updateGridAfterMoves() {
70
+ const pantheon = new Pantheon(this.game, this.player);
71
+ new TriggerEffectsRule(this.game).triggerEffects(...pantheon.updateGrid());
72
+ }
73
+ }