@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,22 +1,22 @@
1
- import { MaterialMove, MaterialRulesPart, XYCoordinates } from '@gamepark/rules-api';
2
- import { PlayerColor } from '../PlayerColor';
3
- import { Mythology } from './Mythology';
4
- import { Pantheon } from './Pantheon';
5
- export declare class Trial extends MaterialRulesPart {
6
- passTrials(player: PlayerColor): MaterialMove<number, number, number, number>[];
7
- passTrial(player: PlayerColor, [mythology1, mythology2]: Mythology[]): boolean;
8
- passTrialOnLocation(player: PlayerColor, mythology: Mythology, searchLocation: (location: Partial<XYCoordinates>) => boolean): boolean;
9
- getPantheon(player: PlayerColor): Pantheon;
10
- getVisibleEntities(player: PlayerColor, searchLocation?: (location: Partial<XYCoordinates>) => boolean): import("@gamepark/rules-api").Material<number, number, number>;
11
- haveMoreInvokeFavorThanNeighbor(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): boolean;
12
- getInvokeGains(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): import("./entity/EntityDescription").InvokeGain[];
13
- getInvokeFavorGain(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): number;
14
- getInvokeGemsGain(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): number;
15
- noEmptySpace(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): boolean;
16
- countGods(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): number;
17
- countCreatures(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): number;
18
- getMythologies(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): Mythology[];
19
- getTrialReward([mythology1, mythology2]: Mythology[]): number;
20
- getTrialLeftReward(mythology: Mythology): 1 | 2;
21
- getTrialRightReward(mythology: Mythology): 1 | 2;
22
- }
1
+ import { MaterialMove, MaterialRulesPart, XYCoordinates } from '@gamepark/rules-api';
2
+ import { PlayerColor } from '../PlayerColor';
3
+ import { Mythology } from './Mythology';
4
+ import { Pantheon } from './Pantheon';
5
+ export declare class Trial extends MaterialRulesPart {
6
+ passTrials(player: PlayerColor): MaterialMove[];
7
+ passTrial(player: PlayerColor, [mythology1, mythology2]: Mythology[]): boolean;
8
+ passTrialOnLocation(player: PlayerColor, mythology: Mythology, searchLocation: (location: Partial<XYCoordinates>) => boolean): boolean;
9
+ getPantheon(player: PlayerColor): Pantheon;
10
+ getVisibleEntities(player: PlayerColor, searchLocation?: (location: Partial<XYCoordinates>) => boolean): import("@gamepark/rules-api").Material<number, number, number>;
11
+ haveMoreInvokeFavorThanNeighbor(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): boolean;
12
+ getInvokeGains(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): import("./entity/EntityDescription").InvokeGain[];
13
+ getInvokeFavorGain(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): number;
14
+ getInvokeGemsGain(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): number;
15
+ noEmptySpace(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): boolean;
16
+ countGods(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): number;
17
+ countCreatures(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): number;
18
+ getMythologies(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): Mythology[];
19
+ getTrialReward([mythology1, mythology2]: Mythology[]): number;
20
+ getTrialLeftReward(mythology: Mythology): 1 | 2;
21
+ getTrialRightReward(mythology: Mythology): 1 | 2;
22
+ }
@@ -1,183 +1,139 @@
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
- Object.defineProperty(exports, "__esModule", { value: true });
34
- exports.Trial = void 0;
35
- var rules_api_1 = require("@gamepark/rules-api");
36
- var lodash_1 = require("lodash");
37
- var CustomMoveType_1 = require("../CustomMoveType");
38
- var Memory_1 = require("../Memory");
39
- var Entity_1 = require("./Entity");
40
- var EntityDescription_1 = require("./entity/EntityDescription");
41
- var MaterialType_1 = require("./MaterialType");
42
- var Mythology_1 = require("./Mythology");
43
- var Pantheon_1 = require("./Pantheon");
44
- var Trial = (function (_super) {
45
- __extends(Trial, _super);
46
- function Trial() {
47
- return _super !== null && _super.apply(this, arguments) || this;
48
- }
49
- Trial.prototype.passTrials = function (player) {
50
- var moves = [];
51
- var mythologyBoards = this.material(MaterialType_1.MaterialType.MythologyBoard);
52
- var round = this.material(MaterialType_1.MaterialType.RoundToken).getItem().location.id;
53
- if (round === 3 || (round === 4 && this.remind(Memory_1.Memory.TrialFailure, player))) {
54
- var firstTrialBoards = mythologyBoards.location(function (l) { return l.y === 0; }).sort(function (item) { return item.location.x; });
55
- var firstTrialMythologies = firstTrialBoards.getItems().map(function (item) { return item.id.mythology; });
56
- if (this.passTrial(player, firstTrialMythologies)) {
57
- var reward = this.getTrialReward(firstTrialMythologies);
58
- moves.push(this.customMove(CustomMoveType_1.CustomMoveType.TrialSuccess, { trial: 1, reward: round === 3 ? reward : reward - 1 }));
59
- }
60
- else {
61
- moves.push(this.customMove(CustomMoveType_1.CustomMoveType.TrialFailure, 1));
62
- }
63
- }
64
- if (round === 4) {
65
- var secondTrialBoards = mythologyBoards.location(function (l) { return l.y === 1; }).sort(function (item) { return item.location.x; });
66
- var secondTrialMythologies = secondTrialBoards.getItems().map(function (item) { return item.id.mythology; });
67
- if (this.passTrial(player, secondTrialMythologies)) {
68
- var reward = this.getTrialReward(secondTrialMythologies);
69
- moves.push(this.customMove(CustomMoveType_1.CustomMoveType.TrialSuccess, { trial: 2, reward: reward }));
70
- }
71
- else {
72
- moves.push(this.customMove(CustomMoveType_1.CustomMoveType.TrialFailure, 2));
73
- }
74
- }
75
- return moves;
76
- };
77
- Trial.prototype.passTrial = function (player, _a) {
78
- var _this = this;
79
- var _b = __read(_a, 2), mythology1 = _b[0], mythology2 = _b[1];
80
- switch (mythology2) {
81
- case Mythology_1.Mythology.Greek:
82
- return this.passTrialOnLocation(player, mythology1, function (location) { return location.y === 0; });
83
- case Mythology_1.Mythology.Norse:
84
- return this.passTrialOnLocation(player, mythology1, function (location) { return location.y === 1; });
85
- case Mythology_1.Mythology.Egyptian:
86
- return this.passTrialOnLocation(player, mythology1, function (location) { return location.x === 1; });
87
- case Mythology_1.Mythology.Hindu:
88
- return this.passTrialOnLocation(player, mythology1, function (location) { return location.y === 2; });
89
- case Mythology_1.Mythology.Inca:
90
- return this.passTrialOnLocation(player, mythology1, function (location) { return location.x === 0; });
91
- case Mythology_1.Mythology.Chinese:
92
- return (this.passTrialOnLocation(player, mythology1, function (location) { return location.x === location.y; }) ||
93
- this.passTrialOnLocation(player, mythology1, function (location) { return location.x === 2 - location.y; }));
94
- case Mythology_1.Mythology.Zulu:
95
- return this.passTrialOnLocation(player, mythology1, function (location) { return location.x === 2; });
96
- case Mythology_1.Mythology.Celtic:
97
- return (0, lodash_1.range)(0, 3).some(function (y) { return _this.passTrialOnLocation(player, mythology1, function (location) { return location.y === y; }); });
98
- }
99
- };
100
- Trial.prototype.passTrialOnLocation = function (player, mythology, searchLocation) {
101
- switch (mythology) {
102
- case Mythology_1.Mythology.Greek:
103
- return this.haveMoreInvokeFavorThanNeighbor(player, searchLocation);
104
- case Mythology_1.Mythology.Norse:
105
- return this.noEmptySpace(player, searchLocation) && this.countGods(player, searchLocation) >= 1;
106
- case Mythology_1.Mythology.Egyptian:
107
- return this.getPantheon(player).coveredEntities.location(searchLocation).length >= 2;
108
- case Mythology_1.Mythology.Hindu:
109
- return this.countGods(player, searchLocation) >= 2;
110
- case Mythology_1.Mythology.Inca:
111
- return this.countCreatures(player, searchLocation) === 0;
112
- case Mythology_1.Mythology.Chinese:
113
- return this.noEmptySpace(player, searchLocation) && this.getVisibleEntities(player).length <= 6;
114
- case Mythology_1.Mythology.Zulu:
115
- return (0, lodash_1.uniq)(this.getMythologies(player, searchLocation)).length >= 3;
116
- case Mythology_1.Mythology.Celtic:
117
- return this.getInvokeGemsGain(player, searchLocation) >= 3;
118
- }
119
- };
120
- Trial.prototype.getPantheon = function (player) {
121
- return new Pantheon_1.Pantheon(this.game, player);
122
- };
123
- Trial.prototype.getVisibleEntities = function (player, searchLocation) {
124
- var visibleEntities = this.getPantheon(player).visibleEntities;
125
- return searchLocation ? visibleEntities.location(searchLocation) : visibleEntities;
126
- };
127
- Trial.prototype.haveMoreInvokeFavorThanNeighbor = function (player, searchLocation) {
128
- var _this = this;
129
- var favor = this.getInvokeFavorGain(player, searchLocation);
130
- return (0, rules_api_1.getNeighbors)(player, this.game.players).some(function (neighbor) { return _this.getInvokeFavorGain(neighbor, searchLocation) < favor; });
131
- };
132
- Trial.prototype.getInvokeGains = function (player, searchLocation) {
133
- return this.getVisibleEntities(player, searchLocation)
134
- .getItems()
135
- .map(function (item) { return EntityDescription_1.entities[item.id.front].invoke[item.location.y]; });
136
- };
137
- Trial.prototype.getInvokeFavorGain = function (player, searchLocation) {
138
- return (0, lodash_1.sumBy)(this.getInvokeGains(player, searchLocation), function (gain) { var _a; return (_a = gain.favor) !== null && _a !== void 0 ? _a : 0; });
139
- };
140
- Trial.prototype.getInvokeGemsGain = function (player, searchLocation) {
141
- return (0, lodash_1.sumBy)(this.getInvokeGains(player, searchLocation), function (gain) { var _a; return (_a = gain.gem) !== null && _a !== void 0 ? _a : 0; });
142
- };
143
- Trial.prototype.noEmptySpace = function (player, searchLocation) {
144
- return this.getPantheon(player).grid.every(function (line, y) { return line.every(function (space, x) { return space !== undefined || !searchLocation({ x: x, y: y }); }); });
145
- };
146
- Trial.prototype.countGods = function (player, searchLocation) {
147
- return this.getVisibleEntities(player, searchLocation).id(function (id) { return (0, Entity_1.isGod)(id.front); }).length;
148
- };
149
- Trial.prototype.countCreatures = function (player, searchLocation) {
150
- return this.getVisibleEntities(player, searchLocation).id(function (id) { return (0, Entity_1.isCreature)(id.front); }).length;
151
- };
152
- Trial.prototype.getMythologies = function (player, searchLocation) {
153
- return this.getVisibleEntities(player, searchLocation)
154
- .getItems()
155
- .map(function (item) { return (0, Entity_1.entityMythology)(item.id.front); });
156
- };
157
- Trial.prototype.getTrialReward = function (_a) {
158
- var _b = __read(_a, 2), mythology1 = _b[0], mythology2 = _b[1];
159
- return this.getTrialLeftReward(mythology1) + this.getTrialRightReward(mythology2);
160
- };
161
- Trial.prototype.getTrialLeftReward = function (mythology) {
162
- switch (mythology) {
163
- case Mythology_1.Mythology.Greek:
164
- case Mythology_1.Mythology.Norse:
165
- case Mythology_1.Mythology.Egyptian:
166
- case Mythology_1.Mythology.Inca:
167
- return 1;
168
- default:
169
- return 2;
170
- }
171
- };
172
- Trial.prototype.getTrialRightReward = function (mythology) {
173
- switch (mythology) {
174
- case Mythology_1.Mythology.Chinese:
175
- case Mythology_1.Mythology.Celtic:
176
- return 1;
177
- default:
178
- return 2;
179
- }
180
- };
181
- return Trial;
182
- }(rules_api_1.MaterialRulesPart));
183
- exports.Trial = Trial;
1
+ import { getNeighbors, MaterialRulesPart } from '@gamepark/rules-api';
2
+ import { range, sumBy, uniq } from 'es-toolkit';
3
+ import { CustomMoveType } from '../CustomMoveType';
4
+ import { Memory } from '../Memory';
5
+ import { entityMythology, isCreature, isGod } from './Entity';
6
+ import { entities } from './entity/EntityDescription';
7
+ import { MaterialType } from './MaterialType';
8
+ import { Mythology } from './Mythology';
9
+ import { Pantheon } from './Pantheon';
10
+ export class Trial extends MaterialRulesPart {
11
+ passTrials(player) {
12
+ const moves = [];
13
+ const mythologyBoards = this.material(MaterialType.MythologyBoard);
14
+ const round = this.material(MaterialType.RoundToken).getItem().location.id;
15
+ if (round === 3 || (round === 4 && this.remind(Memory.TrialFailure, player))) {
16
+ const firstTrialBoards = mythologyBoards.location((l) => l.y === 0).sort((item) => item.location.x);
17
+ const firstTrialMythologies = firstTrialBoards.getItems().map((item) => item.id.mythology);
18
+ if (this.passTrial(player, firstTrialMythologies)) {
19
+ const reward = this.getTrialReward(firstTrialMythologies);
20
+ moves.push(this.customMove(CustomMoveType.TrialSuccess, { trial: 1, reward: round === 3 ? reward : reward - 1 }));
21
+ }
22
+ else {
23
+ moves.push(this.customMove(CustomMoveType.TrialFailure, 1));
24
+ }
25
+ }
26
+ if (round === 4) {
27
+ const secondTrialBoards = mythologyBoards.location((l) => l.y === 1).sort((item) => item.location.x);
28
+ const secondTrialMythologies = secondTrialBoards.getItems().map((item) => item.id.mythology);
29
+ if (this.passTrial(player, secondTrialMythologies)) {
30
+ const reward = this.getTrialReward(secondTrialMythologies);
31
+ moves.push(this.customMove(CustomMoveType.TrialSuccess, { trial: 2, reward }));
32
+ }
33
+ else {
34
+ moves.push(this.customMove(CustomMoveType.TrialFailure, 2));
35
+ }
36
+ }
37
+ return moves;
38
+ }
39
+ passTrial(player, [mythology1, mythology2]) {
40
+ switch (mythology2) {
41
+ case Mythology.Greek:
42
+ return this.passTrialOnLocation(player, mythology1, (location) => location.y === 0);
43
+ case Mythology.Norse:
44
+ return this.passTrialOnLocation(player, mythology1, (location) => location.y === 1);
45
+ case Mythology.Egyptian:
46
+ return this.passTrialOnLocation(player, mythology1, (location) => location.x === 1);
47
+ case Mythology.Hindu:
48
+ return this.passTrialOnLocation(player, mythology1, (location) => location.y === 2);
49
+ case Mythology.Inca:
50
+ return this.passTrialOnLocation(player, mythology1, (location) => location.x === 0);
51
+ case Mythology.Chinese:
52
+ return (this.passTrialOnLocation(player, mythology1, (location) => location.x === location.y) ||
53
+ this.passTrialOnLocation(player, mythology1, (location) => location.x === 2 - location.y));
54
+ case Mythology.Zulu:
55
+ return this.passTrialOnLocation(player, mythology1, (location) => location.x === 2);
56
+ case Mythology.Celtic:
57
+ return range(0, 3).some((y) => this.passTrialOnLocation(player, mythology1, (location) => location.y === y));
58
+ }
59
+ }
60
+ passTrialOnLocation(player, mythology, searchLocation) {
61
+ switch (mythology) {
62
+ case Mythology.Greek:
63
+ return this.haveMoreInvokeFavorThanNeighbor(player, searchLocation);
64
+ case Mythology.Norse:
65
+ return this.noEmptySpace(player, searchLocation) && this.countGods(player, searchLocation) >= 1;
66
+ case Mythology.Egyptian:
67
+ return this.getPantheon(player).coveredEntities.location(searchLocation).length >= 2;
68
+ case Mythology.Hindu:
69
+ return this.countGods(player, searchLocation) >= 2;
70
+ case Mythology.Inca:
71
+ return this.countCreatures(player, searchLocation) === 0;
72
+ case Mythology.Chinese:
73
+ return this.noEmptySpace(player, searchLocation) && this.getVisibleEntities(player).length <= 6;
74
+ case Mythology.Zulu:
75
+ return uniq(this.getMythologies(player, searchLocation)).length >= 3;
76
+ case Mythology.Celtic:
77
+ return this.getInvokeGemsGain(player, searchLocation) >= 3;
78
+ }
79
+ }
80
+ getPantheon(player) {
81
+ return new Pantheon(this.game, player);
82
+ }
83
+ getVisibleEntities(player, searchLocation) {
84
+ const visibleEntities = this.getPantheon(player).visibleEntities;
85
+ return searchLocation ? visibleEntities.location(searchLocation) : visibleEntities;
86
+ }
87
+ haveMoreInvokeFavorThanNeighbor(player, searchLocation) {
88
+ const favor = this.getInvokeFavorGain(player, searchLocation);
89
+ return getNeighbors(player, this.game.players).some((neighbor) => this.getInvokeFavorGain(neighbor, searchLocation) < favor);
90
+ }
91
+ getInvokeGains(player, searchLocation) {
92
+ return this.getVisibleEntities(player, searchLocation)
93
+ .getItems()
94
+ .map((item) => entities[item.id.front].invoke[item.location.y]);
95
+ }
96
+ getInvokeFavorGain(player, searchLocation) {
97
+ return sumBy(this.getInvokeGains(player, searchLocation), (gain) => gain.favor ?? 0);
98
+ }
99
+ getInvokeGemsGain(player, searchLocation) {
100
+ return sumBy(this.getInvokeGains(player, searchLocation), (gain) => gain.gem ?? 0);
101
+ }
102
+ noEmptySpace(player, searchLocation) {
103
+ return this.getPantheon(player).grid.every((line, y) => line.every((space, x) => space !== undefined || !searchLocation({ x, y })));
104
+ }
105
+ countGods(player, searchLocation) {
106
+ return this.getVisibleEntities(player, searchLocation).id((id) => isGod(id.front)).length;
107
+ }
108
+ countCreatures(player, searchLocation) {
109
+ return this.getVisibleEntities(player, searchLocation).id((id) => isCreature(id.front)).length;
110
+ }
111
+ getMythologies(player, searchLocation) {
112
+ return this.getVisibleEntities(player, searchLocation)
113
+ .getItems()
114
+ .map((item) => entityMythology(item.id.front));
115
+ }
116
+ getTrialReward([mythology1, mythology2]) {
117
+ return this.getTrialLeftReward(mythology1) + this.getTrialRightReward(mythology2);
118
+ }
119
+ getTrialLeftReward(mythology) {
120
+ switch (mythology) {
121
+ case Mythology.Greek:
122
+ case Mythology.Norse:
123
+ case Mythology.Egyptian:
124
+ case Mythology.Inca:
125
+ return 1;
126
+ default:
127
+ return 2;
128
+ }
129
+ }
130
+ getTrialRightReward(mythology) {
131
+ switch (mythology) {
132
+ case Mythology.Chinese:
133
+ case Mythology.Celtic:
134
+ return 1;
135
+ default:
136
+ return 2;
137
+ }
138
+ }
139
+ }
@@ -1,11 +1,11 @@
1
- import { MaterialMove, MaterialRulesPart } from '@gamepark/rules-api';
2
- import { PlayerColor } from '../../PlayerColor';
3
- import { EntityId } from '../Entity';
4
- import { EffectRule, PendingEffect, TriggerEvent } from './Effect';
5
- export declare abstract class AutoEffectRule extends MaterialRulesPart implements EffectRule {
6
- canPlayEffect: () => boolean;
7
- abstract playEffect(): MaterialMove[];
8
- getEffect<Event extends TriggerEvent>(): PendingEffect<Event>;
9
- get card(): import("@gamepark/rules-api").MaterialItem<number, number, EntityId>;
10
- get player(): PlayerColor;
11
- }
1
+ import { MaterialMove, MaterialRulesPart } from '@gamepark/rules-api';
2
+ import { PlayerColor } from '../../PlayerColor';
3
+ import { EntityId } from '../Entity';
4
+ import { CardEffect, EffectRule, TriggerEvent } from './Effect';
5
+ export declare abstract class AutoEffectRule extends MaterialRulesPart implements EffectRule {
6
+ canPlayEffect: () => boolean;
7
+ abstract playEffect(): MaterialMove[];
8
+ getEffect<Event extends TriggerEvent>(): CardEffect<Event>;
9
+ get card(): import("@gamepark/rules-api").MaterialItem<number, number, EntityId>;
10
+ get player(): PlayerColor;
11
+ }
@@ -1,49 +1,16 @@
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
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.AutoEffectRule = void 0;
19
- var rules_api_1 = require("@gamepark/rules-api");
20
- var Memory_1 = require("../../Memory");
21
- var MaterialType_1 = require("../MaterialType");
22
- var AutoEffectRule = (function (_super) {
23
- __extends(AutoEffectRule, _super);
24
- function AutoEffectRule() {
25
- var _this = _super !== null && _super.apply(this, arguments) || this;
26
- _this.canPlayEffect = function () { return true; };
27
- return _this;
28
- }
29
- AutoEffectRule.prototype.getEffect = function () {
30
- return this.remind(Memory_1.Memory.OngoingEffect);
31
- };
32
- Object.defineProperty(AutoEffectRule.prototype, "card", {
33
- get: function () {
34
- var index = this.getEffect().cardIndex;
35
- return this.material(MaterialType_1.MaterialType.EntityCard).getItem(index);
36
- },
37
- enumerable: false,
38
- configurable: true
39
- });
40
- Object.defineProperty(AutoEffectRule.prototype, "player", {
41
- get: function () {
42
- return this.card.location.player;
43
- },
44
- enumerable: false,
45
- configurable: true
46
- });
47
- return AutoEffectRule;
48
- }(rules_api_1.MaterialRulesPart));
49
- exports.AutoEffectRule = AutoEffectRule;
1
+ import { MaterialRulesPart } from '@gamepark/rules-api';
2
+ import { Memory } from '../../Memory';
3
+ import { MaterialType } from '../MaterialType';
4
+ export class AutoEffectRule extends MaterialRulesPart {
5
+ canPlayEffect = () => true;
6
+ getEffect() {
7
+ return this.remind(Memory.OngoingEffect);
8
+ }
9
+ get card() {
10
+ const index = this.getEffect().cardIndex;
11
+ return this.material(MaterialType.EntityCard).getItem(index);
12
+ }
13
+ get player() {
14
+ return this.card.location.player;
15
+ }
16
+ }