@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,61 +1,35 @@
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.ShivaEffectRule = void 0;
19
- var rules_api_1 = require("@gamepark/rules-api");
20
- var CustomMoveType_1 = require("../../CustomMoveType");
21
- var PlayerEffectRule_1 = require("../../material/entity/PlayerEffectRule");
22
- var LocationType_1 = require("../../material/LocationType");
23
- var MaterialType_1 = require("../../material/MaterialType");
24
- var Pantheon_1 = require("../../material/Pantheon");
25
- var RuleId_1 = require("../RuleId");
26
- var PermanentEffectsRule_1 = require("./PermanentEffectsRule");
27
- var ShivaEffectRule = (function (_super) {
28
- __extends(ShivaEffectRule, _super);
29
- function ShivaEffectRule() {
30
- var _this = _super !== null && _super.apply(this, arguments) || this;
31
- _this.ruleId = RuleId_1.RuleId.ShivaEffect;
32
- return _this;
33
- }
34
- ShivaEffectRule.prototype.canPlayEffect = function (cardIndex) {
35
- var player = this.material(MaterialType_1.MaterialType.EntityCard).getItem(cardIndex).location.player;
36
- var pantheon = new Pantheon_1.Pantheon(this.game, player);
37
- return pantheon.gems > 0 && this.getPlayerMoves(cardIndex).length > 0;
38
- };
39
- ShivaEffectRule.prototype.onRuleStart = function () {
40
- return [new Pantheon_1.Pantheon(this.game, this.player).spendGems(1)];
41
- };
42
- ShivaEffectRule.prototype.getPlayerMoves = function (cardIndex) {
43
- if (cardIndex === void 0) { cardIndex = this.getEffect().cardIndex; }
44
- var location = this.material(MaterialType_1.MaterialType.EntityCard).getItem(cardIndex).location;
45
- var pantheon = new Pantheon_1.Pantheon(this.game, location.player);
46
- var rule = new PermanentEffectsRule_1.PermanentEffectsRule(this.game);
47
- var piles = pantheon
48
- .getPiles(function (space) { return (0, rules_api_1.areAdjacentSquares)(space, location); })
49
- .filter(function (pile) { return rule.canSacrifice(pile.maxBy(function (item) { return item.location.z; }).getItem()); });
50
- return piles.map(function (pile) { return pile.moveItemsAtOnce({ type: LocationType_1.LocationType.PlayerDiscard, player: location.player }); });
51
- };
52
- ShivaEffectRule.prototype.beforeItemMove = function (move) {
53
- if ((0, rules_api_1.isMoveItemTypeAtOnce)(MaterialType_1.MaterialType.EntityCard)(move) && move.location.type === LocationType_1.LocationType.PlayerDiscard) {
54
- var pantheon = new Pantheon_1.Pantheon(this.game, this.player);
55
- return [pantheon.gainFavor(move.indexes.length), this.customMove(CustomMoveType_1.CustomMoveType.EndEffect)];
56
- }
57
- return [];
58
- };
59
- return ShivaEffectRule;
60
- }(PlayerEffectRule_1.PlayerEffectRule));
61
- exports.ShivaEffectRule = ShivaEffectRule;
1
+ import { areAdjacentSquares, isMoveItemTypeAtOnce } from '@gamepark/rules-api';
2
+ import { CustomMoveType } from '../../CustomMoveType';
3
+ import { PlayerEffectRule } from '../../material/entity/PlayerEffectRule';
4
+ import { LocationType } from '../../material/LocationType';
5
+ import { MaterialType } from '../../material/MaterialType';
6
+ import { Pantheon } from '../../material/Pantheon';
7
+ import { RuleId } from '../RuleId';
8
+ import { PermanentEffectsRule } from './PermanentEffectsRule';
9
+ export class ShivaEffectRule extends PlayerEffectRule {
10
+ ruleId = RuleId.ShivaEffect;
11
+ canPlayEffect(cardIndex) {
12
+ const player = this.material(MaterialType.EntityCard).getItem(cardIndex).location.player;
13
+ const pantheon = new Pantheon(this.game, player);
14
+ return pantheon.gems > 0 && this.getPlayerMoves(cardIndex).length > 0;
15
+ }
16
+ onRuleStart() {
17
+ return [new Pantheon(this.game, this.player).spendGems(1)];
18
+ }
19
+ getPlayerMoves(cardIndex = this.getEffect().cardIndex) {
20
+ const location = this.material(MaterialType.EntityCard).getItem(cardIndex).location;
21
+ const pantheon = new Pantheon(this.game, location.player);
22
+ const rule = new PermanentEffectsRule(this.game);
23
+ const piles = pantheon
24
+ .getPiles((space) => areAdjacentSquares(space, location))
25
+ .filter((pile) => rule.canSacrifice(pile.maxBy((item) => item.location.z).getItem()));
26
+ return piles.map((pile) => pile.moveItemsAtOnce({ type: LocationType.PlayerDiscard, player: location.player }));
27
+ }
28
+ beforeItemMove(move) {
29
+ if (isMoveItemTypeAtOnce(MaterialType.EntityCard)(move) && move.location.type === LocationType.PlayerDiscard) {
30
+ const pantheon = new Pantheon(this.game, this.player);
31
+ return [pantheon.gainFavor(move.indexes.length), this.customMove(CustomMoveType.EndEffect)];
32
+ }
33
+ return [];
34
+ }
35
+ }
@@ -1,10 +1,10 @@
1
- import { Location, Material, MoveItem, XYCoordinates } from '@gamepark/rules-api';
2
- import { MoveEffectRule } from '../../material/entity/MoveEffectRule';
3
- import { RuleId } from '../RuleId';
4
- export declare class SphinxEffectRule extends MoveEffectRule {
5
- ruleId: RuleId;
6
- getMovingCards(): Material;
7
- isLegalDestination(space: XYCoordinates, cardLocation: Location): boolean;
8
- onCardMoved(move: MoveItem): import("@gamepark/rules-api").MaterialMove<number, number, number, number>[];
9
- updateGridAfterMoves(): MoveItem<number, number, number>[];
10
- }
1
+ import { Location, Material, MoveItem, XYCoordinates } from '@gamepark/rules-api';
2
+ import { MoveEffectRule } from '../../material/entity/MoveEffectRule';
3
+ import { RuleId } from '../RuleId';
4
+ export declare class SphinxEffectRule extends MoveEffectRule {
5
+ ruleId: RuleId;
6
+ getMovingCards(): Material;
7
+ isLegalDestination(space: XYCoordinates, cardLocation: Location): boolean;
8
+ onCardMoved(move: MoveItem): import("@gamepark/rules-api").MaterialMove[];
9
+ updateGridAfterMoves(): void;
10
+ }
@@ -1,58 +1,33 @@
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.SphinxEffectRule = void 0;
19
- var CustomMoveType_1 = require("../../CustomMoveType");
20
- var Effect_1 = require("../../material/entity/Effect");
21
- var MoveEffectRule_1 = require("../../material/entity/MoveEffectRule");
22
- var MaterialType_1 = require("../../material/MaterialType");
23
- var Pantheon_1 = require("../../material/Pantheon");
24
- var Memory_1 = require("../../Memory");
25
- var RuleId_1 = require("../RuleId");
26
- var TriggerEffectsRule_1 = require("./TriggerEffectsRule");
27
- var SphinxEffectRule = (function (_super) {
28
- __extends(SphinxEffectRule, _super);
29
- function SphinxEffectRule() {
30
- var _this = _super !== null && _super.apply(this, arguments) || this;
31
- _this.ruleId = RuleId_1.RuleId.SphinxEffect;
32
- return _this;
33
- }
34
- SphinxEffectRule.prototype.getMovingCards = function () {
35
- var _a = this.card.location, x = _a.x, y = _a.y, z = _a.z;
36
- return new Pantheon_1.Pantheon(this.game, this.player).allCards.location(function (l) { return l.x === x && l.y === y && l.z === z - 1; });
37
- };
38
- SphinxEffectRule.prototype.isLegalDestination = function (space, cardLocation) {
39
- return space.x === cardLocation.x;
40
- };
41
- SphinxEffectRule.prototype.onCardMoved = function (move) {
42
- this.memorize(Memory_1.Memory.EntityMoved, move.itemIndex);
43
- var entity = this.material(MaterialType_1.MaterialType.EntityCard).getItem(move.itemIndex).id.front;
44
- var moves = new Pantheon_1.Pantheon(this.game, this.player).getInvokeGains(entity, move.location.y);
45
- moves.push(this.customMove(CustomMoveType_1.CustomMoveType.EndEffect));
46
- return moves;
47
- };
48
- SphinxEffectRule.prototype.updateGridAfterMoves = function () {
49
- var movedCard = this.remind(Memory_1.Memory.EntityMoved);
50
- if (movedCard !== undefined) {
51
- this.forget(Memory_1.Memory.EntityMoved);
52
- new TriggerEffectsRule_1.TriggerEffectsRule(this.game).triggerEffects({ type: Effect_1.TriggerEventType.EntitiesMoved, player: this.player, entities: [movedCard] });
53
- }
54
- return _super.prototype.updateGridAfterMoves.call(this);
55
- };
56
- return SphinxEffectRule;
57
- }(MoveEffectRule_1.MoveEffectRule));
58
- exports.SphinxEffectRule = SphinxEffectRule;
1
+ import { CustomMoveType } from '../../CustomMoveType';
2
+ import { TriggerEventType } from '../../material/entity/Effect';
3
+ import { MoveEffectRule } from '../../material/entity/MoveEffectRule';
4
+ import { MaterialType } from '../../material/MaterialType';
5
+ import { Pantheon } from '../../material/Pantheon';
6
+ import { Memory } from '../../Memory';
7
+ import { RuleId } from '../RuleId';
8
+ import { TriggerEffectsRule } from './TriggerEffectsRule';
9
+ export class SphinxEffectRule extends MoveEffectRule {
10
+ ruleId = RuleId.SphinxEffect;
11
+ getMovingCards() {
12
+ const { x, y, z } = this.card.location;
13
+ return new Pantheon(this.game, this.player).allCards.location((l) => l.x === x && l.y === y && l.z === z - 1);
14
+ }
15
+ isLegalDestination(space, cardLocation) {
16
+ return space.x === cardLocation.x;
17
+ }
18
+ onCardMoved(move) {
19
+ this.memorize(Memory.EntityMoved, move.itemIndex);
20
+ const entity = this.material(MaterialType.EntityCard).getItem(move.itemIndex).id.front;
21
+ const moves = new Pantheon(this.game, this.player).getInvokeGains(entity, move.location.y);
22
+ moves.push(this.customMove(CustomMoveType.EndEffect));
23
+ return moves;
24
+ }
25
+ updateGridAfterMoves() {
26
+ const movedCard = this.remind(Memory.EntityMoved);
27
+ if (movedCard !== undefined) {
28
+ this.forget(Memory.EntityMoved);
29
+ new TriggerEffectsRule(this.game).triggerEffects({ type: TriggerEventType.EntitiesMoved, player: this.player, entities: [movedCard] });
30
+ }
31
+ return super.updateGridAfterMoves();
32
+ }
33
+ }
@@ -1,20 +1,20 @@
1
- import { ItemMove, Material, MaterialMove } from '@gamepark/rules-api';
2
- import { MoveEffectRule } from '../../material/entity/MoveEffectRule';
3
- import { PlayerEffectRule } from '../../material/entity/PlayerEffectRule';
4
- import { SacrificeEffectRule } from '../../material/entity/SacrificeEffectRule';
5
- import { RuleId } from '../RuleId';
6
- export declare class SupayEffectRule extends PlayerEffectRule {
7
- ruleId: RuleId;
8
- playEffect(): MaterialMove[];
9
- getCreaturesInLine(): Material<number, number, number>;
10
- getRules(): (SupayMoveRule | SupaySacrificeRule)[];
11
- getPlayerMoves(): MaterialMove[];
12
- beforeItemMove(move: ItemMove): MaterialMove<number, number, number, number>[];
13
- afterItemMove(move: ItemMove): MaterialMove<number, number, number, number>[];
14
- }
15
- export declare class SupaySacrificeRule extends SacrificeEffectRule {
16
- getCardsToSacrifice(): Material;
17
- }
18
- export declare class SupayMoveRule extends MoveEffectRule {
19
- getMovingCards(): Material;
20
- }
1
+ import { ItemMove, Material, MaterialMove } from '@gamepark/rules-api';
2
+ import { MoveEffectRule } from '../../material/entity/MoveEffectRule';
3
+ import { PlayerEffectRule } from '../../material/entity/PlayerEffectRule';
4
+ import { SacrificeEffectRule } from '../../material/entity/SacrificeEffectRule';
5
+ import { RuleId } from '../RuleId';
6
+ export declare class SupayEffectRule extends PlayerEffectRule {
7
+ ruleId: RuleId;
8
+ playEffect(): MaterialMove[];
9
+ getCreaturesInLine(): Material<number, number, number>;
10
+ getRules(): (SupayMoveRule | SupaySacrificeRule)[];
11
+ getPlayerMoves(): MaterialMove[];
12
+ beforeItemMove(move: ItemMove): MaterialMove[];
13
+ afterItemMove(move: ItemMove): MaterialMove<number, number, number, number>[];
14
+ }
15
+ export declare class SupaySacrificeRule extends SacrificeEffectRule {
16
+ getCardsToSacrifice(): Material;
17
+ }
18
+ export declare class SupayMoveRule extends MoveEffectRule {
19
+ getMovingCards(): Material;
20
+ }
@@ -1,81 +1,44 @@
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.SupayMoveRule = exports.SupaySacrificeRule = exports.SupayEffectRule = void 0;
19
- var Entity_1 = require("../../material/Entity");
20
- var MoveEffectRule_1 = require("../../material/entity/MoveEffectRule");
21
- var PlayerEffectRule_1 = require("../../material/entity/PlayerEffectRule");
22
- var SacrificeEffectRule_1 = require("../../material/entity/SacrificeEffectRule");
23
- var MaterialType_1 = require("../../material/MaterialType");
24
- var Pantheon_1 = require("../../material/Pantheon");
25
- var RuleId_1 = require("../RuleId");
26
- var SupayEffectRule = (function (_super) {
27
- __extends(SupayEffectRule, _super);
28
- function SupayEffectRule() {
29
- var _this = _super !== null && _super.apply(this, arguments) || this;
30
- _this.ruleId = RuleId_1.RuleId.SupayEffect;
31
- return _this;
32
- }
33
- SupayEffectRule.prototype.playEffect = function () {
34
- return this.getCreaturesInLine().length ? _super.prototype.playEffect.call(this) : [];
35
- };
36
- SupayEffectRule.prototype.getCreaturesInLine = function () {
37
- var supayIndex = this.getEffect().cardIndex;
38
- var card = this.material(MaterialType_1.MaterialType.EntityCard).getItem(supayIndex);
39
- var player = card.location.player;
40
- return new Pantheon_1.Pantheon(this.game, player).visibleEntities
41
- .location(function (l) { return l.y === card.location.y; })
42
- .index(function (index) { return index !== supayIndex; })
43
- .id(function (id) { return (0, Entity_1.isCreature)(id.front); });
44
- };
45
- SupayEffectRule.prototype.getRules = function () {
46
- return [new SupayMoveRule(this.game), new SupaySacrificeRule(this.game)];
47
- };
48
- SupayEffectRule.prototype.getPlayerMoves = function () {
49
- return this.getRules().flatMap(function (rule) { return rule.getPlayerMoves(); });
50
- };
51
- SupayEffectRule.prototype.beforeItemMove = function (move) {
52
- return this.getRules().flatMap(function (rule) { return rule.beforeItemMove(move); });
53
- };
54
- SupayEffectRule.prototype.afterItemMove = function (move) {
55
- return this.getRules().flatMap(function (rule) { return rule.afterItemMove(move); });
56
- };
57
- return SupayEffectRule;
58
- }(PlayerEffectRule_1.PlayerEffectRule));
59
- exports.SupayEffectRule = SupayEffectRule;
60
- var SupaySacrificeRule = (function (_super) {
61
- __extends(SupaySacrificeRule, _super);
62
- function SupaySacrificeRule() {
63
- return _super !== null && _super.apply(this, arguments) || this;
64
- }
65
- SupaySacrificeRule.prototype.getCardsToSacrifice = function () {
66
- return new SupayEffectRule(this.game).getCreaturesInLine();
67
- };
68
- return SupaySacrificeRule;
69
- }(SacrificeEffectRule_1.SacrificeEffectRule));
70
- exports.SupaySacrificeRule = SupaySacrificeRule;
71
- var SupayMoveRule = (function (_super) {
72
- __extends(SupayMoveRule, _super);
73
- function SupayMoveRule() {
74
- return _super !== null && _super.apply(this, arguments) || this;
75
- }
76
- SupayMoveRule.prototype.getMovingCards = function () {
77
- return new SupayEffectRule(this.game).getCreaturesInLine();
78
- };
79
- return SupayMoveRule;
80
- }(MoveEffectRule_1.MoveEffectRule));
81
- exports.SupayMoveRule = SupayMoveRule;
1
+ import { isCreature } from '../../material/Entity';
2
+ import { MoveEffectRule } from '../../material/entity/MoveEffectRule';
3
+ import { PlayerEffectRule } from '../../material/entity/PlayerEffectRule';
4
+ import { SacrificeEffectRule } from '../../material/entity/SacrificeEffectRule';
5
+ import { MaterialType } from '../../material/MaterialType';
6
+ import { Pantheon } from '../../material/Pantheon';
7
+ import { RuleId } from '../RuleId';
8
+ export class SupayEffectRule extends PlayerEffectRule {
9
+ ruleId = RuleId.SupayEffect;
10
+ playEffect() {
11
+ return this.getCreaturesInLine().length ? super.playEffect() : [];
12
+ }
13
+ getCreaturesInLine() {
14
+ const supayIndex = this.getEffect().cardIndex;
15
+ const card = this.material(MaterialType.EntityCard).getItem(supayIndex);
16
+ const player = card.location.player;
17
+ return new Pantheon(this.game, player).visibleEntities
18
+ .location((l) => l.y === card.location.y)
19
+ .index((index) => index !== supayIndex)
20
+ .id((id) => isCreature(id.front));
21
+ }
22
+ getRules() {
23
+ return [new SupayMoveRule(this.game), new SupaySacrificeRule(this.game)];
24
+ }
25
+ getPlayerMoves() {
26
+ return this.getRules().flatMap((rule) => rule.getPlayerMoves());
27
+ }
28
+ beforeItemMove(move) {
29
+ return this.getRules().flatMap((rule) => rule.beforeItemMove(move));
30
+ }
31
+ afterItemMove(move) {
32
+ return this.getRules().flatMap((rule) => rule.afterItemMove(move));
33
+ }
34
+ }
35
+ export class SupaySacrificeRule extends SacrificeEffectRule {
36
+ getCardsToSacrifice() {
37
+ return new SupayEffectRule(this.game).getCreaturesInLine();
38
+ }
39
+ }
40
+ export class SupayMoveRule extends MoveEffectRule {
41
+ getMovingCards() {
42
+ return new SupayEffectRule(this.game).getCreaturesInLine();
43
+ }
44
+ }
@@ -1,11 +1,11 @@
1
- import { ItemMove, Material } from '@gamepark/rules-api';
2
- import { SimultaneousSacrificeEffectRule } from '../../material/entity/SimultaneousSacrificeEffectRule';
3
- import { PlayerColor } from '../../PlayerColor';
4
- import { RuleId } from '../RuleId';
5
- export declare class ThorEffectRule extends SimultaneousSacrificeEffectRule {
6
- ruleId: RuleId;
7
- getAffectedPlayers(): PlayerColor[];
8
- getActivePlayerLegalMoves(player: PlayerColor): import("@gamepark/rules-api").MaterialMove<number, number, number, number>[];
9
- getCardsToSacrifice(player: PlayerColor): Material;
10
- beforeItemMove(move: ItemMove): import("@gamepark/rules-api").MaterialMove<number, number, number, number>[];
11
- }
1
+ import { ItemMove, Material } from '@gamepark/rules-api';
2
+ import { SimultaneousSacrificeEffectRule } from '../../material/entity/SimultaneousSacrificeEffectRule';
3
+ import { PlayerColor } from '../../PlayerColor';
4
+ import { RuleId } from '../RuleId';
5
+ export declare class ThorEffectRule extends SimultaneousSacrificeEffectRule {
6
+ ruleId: RuleId;
7
+ getAffectedPlayers(): PlayerColor[];
8
+ getActivePlayerLegalMoves(player: PlayerColor): import("@gamepark/rules-api").MaterialMove[];
9
+ getCardsToSacrifice(player: PlayerColor): Material;
10
+ beforeItemMove(move: ItemMove): import("@gamepark/rules-api").MaterialMove[];
11
+ }
@@ -1,58 +1,32 @@
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.ThorEffectRule = void 0;
19
- var rules_api_1 = require("@gamepark/rules-api");
20
- var Entity_1 = require("../../material/Entity");
21
- var SimultaneousSacrificeEffectRule_1 = require("../../material/entity/SimultaneousSacrificeEffectRule");
22
- var LocationType_1 = require("../../material/LocationType");
23
- var MaterialType_1 = require("../../material/MaterialType");
24
- var Pantheon_1 = require("../../material/Pantheon");
25
- var RuleId_1 = require("../RuleId");
26
- var ThorEffectRule = (function (_super) {
27
- __extends(ThorEffectRule, _super);
28
- function ThorEffectRule() {
29
- var _this = _super !== null && _super.apply(this, arguments) || this;
30
- _this.ruleId = RuleId_1.RuleId.ThorEffect;
31
- return _this;
32
- }
33
- ThorEffectRule.prototype.getAffectedPlayers = function () {
34
- var _this = this;
35
- return this.game.players.filter(function (player) { return _this.isOpponent(player); });
36
- };
37
- ThorEffectRule.prototype.getActivePlayerLegalMoves = function (player) {
38
- var moves = _super.prototype.getActivePlayerLegalMoves.call(this, player);
39
- var favor = this.material(MaterialType_1.MaterialType.FavorToken).location(LocationType_1.LocationType.PlayerFavor).player(player);
40
- if (favor.getQuantity() >= 2 || (favor.getQuantity() === 1 && moves.length === 0)) {
41
- moves.push(favor.deleteItem(2));
42
- }
43
- return moves;
44
- };
45
- ThorEffectRule.prototype.getCardsToSacrifice = function (player) {
46
- return new Pantheon_1.Pantheon(this.game, player).visibleEntities.id(function (id) { return (0, Entity_1.isGod)(id.front); });
47
- };
48
- ThorEffectRule.prototype.beforeItemMove = function (move) {
49
- if ((0, rules_api_1.isDeleteItemType)(MaterialType_1.MaterialType.FavorToken)(move)) {
50
- return [this.endPlayerTurn(this.material(MaterialType_1.MaterialType.FavorToken).getItem(move.itemIndex).location.player)];
51
- }
52
- else {
53
- return _super.prototype.beforeItemMove.call(this, move);
54
- }
55
- };
56
- return ThorEffectRule;
57
- }(SimultaneousSacrificeEffectRule_1.SimultaneousSacrificeEffectRule));
58
- exports.ThorEffectRule = ThorEffectRule;
1
+ import { isDeleteItemType } from '@gamepark/rules-api';
2
+ import { isGod } from '../../material/Entity';
3
+ import { SimultaneousSacrificeEffectRule } from '../../material/entity/SimultaneousSacrificeEffectRule';
4
+ import { LocationType } from '../../material/LocationType';
5
+ import { MaterialType } from '../../material/MaterialType';
6
+ import { Pantheon } from '../../material/Pantheon';
7
+ import { RuleId } from '../RuleId';
8
+ export class ThorEffectRule extends SimultaneousSacrificeEffectRule {
9
+ ruleId = RuleId.ThorEffect;
10
+ getAffectedPlayers() {
11
+ return this.game.players.filter((player) => this.isOpponent(player));
12
+ }
13
+ getActivePlayerLegalMoves(player) {
14
+ const moves = super.getActivePlayerLegalMoves(player);
15
+ const favor = this.material(MaterialType.FavorToken).location(LocationType.PlayerFavor).player(player);
16
+ if (favor.getQuantity() >= 2 || (favor.getQuantity() === 1 && moves.length === 0)) {
17
+ moves.push(favor.deleteItem(2));
18
+ }
19
+ return moves;
20
+ }
21
+ getCardsToSacrifice(player) {
22
+ return new Pantheon(this.game, player).visibleEntities.id((id) => isGod(id.front));
23
+ }
24
+ beforeItemMove(move) {
25
+ if (isDeleteItemType(MaterialType.FavorToken)(move)) {
26
+ return [this.endPlayerTurn(this.material(MaterialType.FavorToken).getItem(move.itemIndex).location.player)];
27
+ }
28
+ else {
29
+ return super.beforeItemMove(move);
30
+ }
31
+ }
32
+ }
@@ -1,17 +1,17 @@
1
- import { MaterialMove, MoveItem, XYCoordinates } from '@gamepark/rules-api';
2
- import { MoveEffectRule } from '../../material/entity/MoveEffectRule';
3
- import { SimultaneousMoveEffectRule } from '../../material/entity/SimultaneousMoveEffectRule';
4
- import { PlayerColor } from '../../PlayerColor';
5
- import { RuleId } from '../RuleId';
6
- export declare class TianlongEffectRule extends MoveEffectRule {
7
- ruleId: RuleId;
8
- getPlayerMoves(): MaterialMove<number, number, number, number>[];
9
- onCardMoved(move: MoveItem): MaterialMove<number, number, number, number>[];
10
- }
11
- export declare class TianlongOpponentsEffectRule extends SimultaneousMoveEffectRule {
12
- ruleId: RuleId;
13
- getAffectedPlayers(): number[];
14
- getMovingCards(player: PlayerColor): import("@gamepark/rules-api").Material<number, number, number>;
15
- isLegalDestination(space: XYCoordinates): boolean;
16
- onRuleEnd(): never[];
17
- }
1
+ import { MaterialMove, MoveItem, XYCoordinates } from '@gamepark/rules-api';
2
+ import { MoveEffectRule } from '../../material/entity/MoveEffectRule';
3
+ import { SimultaneousMoveEffectRule } from '../../material/entity/SimultaneousMoveEffectRule';
4
+ import { PlayerColor } from '../../PlayerColor';
5
+ import { RuleId } from '../RuleId';
6
+ export declare class TianlongEffectRule extends MoveEffectRule {
7
+ ruleId: RuleId;
8
+ getPlayerMoves(): MaterialMove[];
9
+ onCardMoved(move: MoveItem): MaterialMove[];
10
+ }
11
+ export declare class TianlongOpponentsEffectRule extends SimultaneousMoveEffectRule {
12
+ ruleId: RuleId;
13
+ getAffectedPlayers(): number[];
14
+ getMovingCards(player: PlayerColor): import("@gamepark/rules-api").Material<number, number, number>;
15
+ isLegalDestination(space: XYCoordinates): boolean;
16
+ onRuleEnd(): never[];
17
+ }