@gamepark/mythologies 0.9.3 → 0.11.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 (319) 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 +158 -158
  8. package/dist/MythologiesRules.js +216 -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 -51
  26. package/dist/material/Pantheon.js +294 -486
  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 +106 -104
  32. package/dist/material/entity/Effect.js +26 -44
  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 +15 -15
  38. package/dist/material/entity/PlaceCardEffectRule.js +43 -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 +65 -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 +20 -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 +65 -65
  220. package/dist/rules/RuleId.js +66 -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 +24 -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 +36 -95
  237. package/dist/rules/effects/ChimeraEffectRule.d.ts +8 -9
  238. package/dist/rules/effects/ChimeraEffectRule.js +15 -44
  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 -12
  246. package/dist/rules/effects/DraugrEffectRule.js +32 -63
  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 -11
  268. package/dist/rules/effects/ImpunduluEffectRule.js +39 -81
  269. package/dist/rules/effects/InkosazanaEffectRule.d.ts +7 -7
  270. package/dist/rules/effects/InkosazanaEffectRule.js +21 -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 +14 -13
  280. package/dist/rules/effects/MultipleSimultaneousMoveEffectRule.js +71 -125
  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 +12 -12
  294. package/dist/rules/effects/ResolveEffectsRule.js +87 -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 +11 -11
  308. package/dist/rules/effects/TriggerEffectsRule.js +65 -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/WerehyenaEffectRule.d.ts +8 -8
  316. package/dist/rules/effects/WerehyenaEffectRule.js +37 -98
  317. package/dist/rules/effects/YanluoWangEffectRule.d.ts +9 -9
  318. package/dist/rules/effects/YanluoWangEffectRule.js +46 -104
  319. package/package.json +7 -8
@@ -1,37 +1,14 @@
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.Loki = void 0;
19
- var UpkeepRule_1 = require("../../../rules/UpkeepRule");
20
- var Effect_1 = require("../Effect");
21
- var PlayerEffectRule_1 = require("../PlayerEffectRule");
22
- exports.Loki = {
23
- invoke: [{}, { gem: 2 }, { gem: 1, favor: 2 }],
24
- effect: {
25
- trigger: Effect_1.isPlaced,
26
- rule: (function (_super) {
27
- __extends(LokiEffectRule, _super);
28
- function LokiEffectRule() {
29
- return _super !== null && _super.apply(this, arguments) || this;
30
- }
31
- LokiEffectRule.prototype.playEffect = function () {
32
- return new UpkeepRule_1.UpkeepRule(this.game).completeSanctuary(this.player);
33
- };
34
- return LokiEffectRule;
35
- }(PlayerEffectRule_1.PlayerEffectRule))
36
- }
37
- };
1
+ import { UpkeepRule } from '../../../rules/UpkeepRule';
2
+ import { isPlaced } from '../Effect';
3
+ import { PlayerEffectRule } from '../PlayerEffectRule';
4
+ export const Loki = {
5
+ invoke: [{}, { gem: 2 }, { gem: 1, favor: 2 }],
6
+ effect: {
7
+ trigger: isPlaced,
8
+ rule: class LokiEffectRule extends PlayerEffectRule {
9
+ playEffect() {
10
+ return new UpkeepRule(this.game).completeSanctuary(this.player);
11
+ }
12
+ }
13
+ }
14
+ };
@@ -1,2 +1,2 @@
1
- import { EntityDescription } from '../EntityDescription';
2
- export declare const Odin: EntityDescription;
1
+ import { EntityDescription } from '../EntityDescription';
2
+ export declare const Odin: EntityDescription;
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Odin = void 0;
4
- exports.Odin = {
5
- invoke: [{ favor: 1 }, { favor: 2 }, { favor: 1 }]
6
- };
1
+ export const Odin = {
2
+ invoke: [{ favor: 1 }, { favor: 2 }, { favor: 1 }]
3
+ };
@@ -1,2 +1,2 @@
1
- import { EntityDescription } from '../EntityDescription';
2
- export declare const Thor: EntityDescription;
1
+ import { EntityDescription } from '../EntityDescription';
2
+ export declare const Thor: EntityDescription;
@@ -1,12 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Thor = void 0;
4
- var ThorEffectRule_1 = require("../../../rules/effects/ThorEffectRule");
5
- var Effect_1 = require("../Effect");
6
- exports.Thor = {
7
- invoke: [{ favor: 2 }, {}, {}],
8
- effect: {
9
- trigger: Effect_1.isPlaced,
10
- rule: ThorEffectRule_1.ThorEffectRule
11
- }
12
- };
1
+ import { ThorEffectRule } from '../../../rules/effects/ThorEffectRule';
2
+ import { isPlaced } from '../Effect';
3
+ export const Thor = {
4
+ invoke: [{ favor: 2 }, {}, {}],
5
+ effect: {
6
+ trigger: isPlaced,
7
+ rule: ThorEffectRule
8
+ }
9
+ };
@@ -1,2 +1,2 @@
1
- import { EntityDescription } from '../EntityDescription';
2
- export declare const Troll: EntityDescription;
1
+ import { EntityDescription } from '../EntityDescription';
2
+ export declare const Troll: EntityDescription;
@@ -1,9 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Troll = void 0;
4
- exports.Troll = {
5
- invoke: [{}, { gem: 1 }, { favor: 1 }],
6
- effect: {
7
- favorTax: function (space, troll) { return (space.x === troll.location.x && space.y === troll.location.y ? 1 : 0); }
8
- }
9
- };
1
+ export const Troll = {
2
+ invoke: [{}, { gem: 1 }, { favor: 1 }],
3
+ effect: {
4
+ favorTax: (space, troll) => (space.x === troll.location.x && space.y === troll.location.y ? 1 : 0)
5
+ }
6
+ };
@@ -1,2 +1,2 @@
1
- import { EntityDescription } from '../EntityDescription';
2
- export declare const Valkyrie: EntityDescription;
1
+ import { EntityDescription } from '../EntityDescription';
2
+ export declare const Valkyrie: EntityDescription;
@@ -1,73 +1,27 @@
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 __values = (this && this.__values) || function(o) {
18
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
19
- if (m) return m.call(o);
20
- if (o && typeof o.length === "number") return {
21
- next: function () {
22
- if (o && i >= o.length) o = void 0;
23
- return { value: o && o[i++], done: !o };
24
- }
25
- };
26
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.Valkyrie = void 0;
30
- var Entity_1 = require("../../Entity");
31
- var LocationType_1 = require("../../LocationType");
32
- var MaterialType_1 = require("../../MaterialType");
33
- var Pantheon_1 = require("../../Pantheon");
34
- var Effect_1 = require("../Effect");
35
- var PlayerEffectRule_1 = require("../PlayerEffectRule");
36
- exports.Valkyrie = {
37
- invoke: [{ gem: 1 }, { gem: 2 }, {}],
38
- effect: {
39
- trigger: Effect_1.isPlaced,
40
- rule: (function (_super) {
41
- __extends(ValkyrieEffectRule, _super);
42
- function ValkyrieEffectRule() {
43
- return _super !== null && _super.apply(this, arguments) || this;
44
- }
45
- ValkyrieEffectRule.prototype.playEffect = function () {
46
- var e_1, _a;
47
- var _this = this;
48
- var moves = [];
49
- var opponents = this.game.players.filter(function (player) { return player !== _this.player; });
50
- try {
51
- for (var opponents_1 = __values(opponents), opponents_1_1 = opponents_1.next(); !opponents_1_1.done; opponents_1_1 = opponents_1.next()) {
52
- var opponent = opponents_1_1.value;
53
- var favor = this.material(MaterialType_1.MaterialType.FavorToken).location(LocationType_1.LocationType.PlayerFavor).player(opponent);
54
- var pantheon = new Pantheon_1.Pantheon(this.game, opponent);
55
- var gods = pantheon.visibleEntities.id(function (id) { return (0, Entity_1.isGod)(id.front); }).length;
56
- if (gods && favor.getQuantity()) {
57
- moves.push(favor.deleteItem(Math.min(favor.getQuantity(), gods)));
58
- }
59
- }
60
- }
61
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
62
- finally {
63
- try {
64
- if (opponents_1_1 && !opponents_1_1.done && (_a = opponents_1.return)) _a.call(opponents_1);
65
- }
66
- finally { if (e_1) throw e_1.error; }
67
- }
68
- return moves;
69
- };
70
- return ValkyrieEffectRule;
71
- }(PlayerEffectRule_1.PlayerEffectRule))
72
- }
73
- };
1
+ import { isGod } from '../../Entity';
2
+ import { LocationType } from '../../LocationType';
3
+ import { MaterialType } from '../../MaterialType';
4
+ import { Pantheon } from '../../Pantheon';
5
+ import { isPlaced } from '../Effect';
6
+ import { PlayerEffectRule } from '../PlayerEffectRule';
7
+ export const Valkyrie = {
8
+ invoke: [{ gem: 1 }, { gem: 2 }, {}],
9
+ effect: {
10
+ trigger: isPlaced,
11
+ rule: class ValkyrieEffectRule extends PlayerEffectRule {
12
+ playEffect() {
13
+ const moves = [];
14
+ const opponents = this.game.players.filter((player) => player !== this.player);
15
+ for (const opponent of opponents) {
16
+ const favor = this.material(MaterialType.FavorToken).location(LocationType.PlayerFavor).player(opponent);
17
+ const pantheon = new Pantheon(this.game, opponent);
18
+ const gods = pantheon.visibleEntities.id((id) => isGod(id.front)).length;
19
+ if (gods && favor.getQuantity()) {
20
+ moves.push(favor.deleteItem(Math.min(favor.getQuantity(), gods)));
21
+ }
22
+ }
23
+ return moves;
24
+ }
25
+ }
26
+ }
27
+ };
@@ -1,2 +1,2 @@
1
- import { EntityDescription } from '../EntityDescription';
2
- export declare const Idlozi: EntityDescription;
1
+ import { EntityDescription } from '../EntityDescription';
2
+ export declare const Idlozi: EntityDescription;
@@ -1,12 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Idlozi = void 0;
4
- var IdloziEffectRule_1 = require("../../../rules/effects/IdloziEffectRule");
5
- var Effect_1 = require("../Effect");
6
- exports.Idlozi = {
7
- invoke: [{ gem: 1 }, {}, { gem: 1 }],
8
- effect: {
9
- trigger: Effect_1.isPlaced,
10
- rule: IdloziEffectRule_1.IdloziEffectRule
11
- }
12
- };
1
+ import { IdloziEffectRule } from '../../../rules/effects/IdloziEffectRule';
2
+ import { isPlaced } from '../Effect';
3
+ export const Idlozi = {
4
+ invoke: [{ gem: 1 }, {}, { gem: 1 }],
5
+ effect: {
6
+ trigger: isPlaced,
7
+ rule: IdloziEffectRule
8
+ }
9
+ };
@@ -1,2 +1,2 @@
1
- import { EntityDescription } from '../EntityDescription';
2
- export declare const Impundulu: EntityDescription;
1
+ import { EntityDescription } from '../EntityDescription';
2
+ export declare const Impundulu: EntityDescription;
@@ -1,12 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Impundulu = void 0;
4
- var ImpunduluEffectRule_1 = require("../../../rules/effects/ImpunduluEffectRule");
5
- var Effect_1 = require("../Effect");
6
- exports.Impundulu = {
7
- invoke: [{ favor: 1 }, {}, {}],
8
- effect: {
9
- trigger: Effect_1.isPlaced,
10
- rule: ImpunduluEffectRule_1.ImpunduluEffectRule
11
- }
12
- };
1
+ import { ImpunduluEffectRule } from '../../../rules/effects/ImpunduluEffectRule';
2
+ import { isPlacedCrush } from '../Effect';
3
+ export const Impundulu = {
4
+ invoke: [{ favor: 1 }, {}, {}],
5
+ effect: {
6
+ trigger: isPlacedCrush,
7
+ rule: ImpunduluEffectRule
8
+ }
9
+ };
@@ -1,2 +1,2 @@
1
- import { EntityDescription } from '../EntityDescription';
2
- export declare const Inkanyamba: EntityDescription;
1
+ import { EntityDescription } from '../EntityDescription';
2
+ export declare const Inkanyamba: EntityDescription;
@@ -1,42 +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.Inkanyamba = void 0;
19
- var Pantheon_1 = require("../../Pantheon");
20
- var AutoEffectRule_1 = require("../AutoEffectRule");
21
- var Effect_1 = require("../Effect");
22
- exports.Inkanyamba = {
23
- invoke: [{}, { favor: 1 }, { gem: 1 }],
24
- effect: {
25
- trigger: function (effect, _a) {
26
- var cardIndex = _a.cardIndex;
27
- return effect.type === Effect_1.TriggerEventType.EntitiesMoved && effect.entities.includes(cardIndex);
28
- },
29
- rule: (function (_super) {
30
- __extends(InkanyambaEffectRule, _super);
31
- function InkanyambaEffectRule() {
32
- return _super !== null && _super.apply(this, arguments) || this;
33
- }
34
- InkanyambaEffectRule.prototype.playEffect = function () {
35
- var player = this.card.location.player;
36
- return [new Pantheon_1.Pantheon(this.game, player).gainGems(1)];
37
- };
38
- return InkanyambaEffectRule;
39
- }(AutoEffectRule_1.AutoEffectRule)),
40
- auto: true
41
- }
42
- };
1
+ import { Pantheon } from '../../Pantheon';
2
+ import { AutoEffectRule } from '../AutoEffectRule';
3
+ import { TriggerEventType } from '../Effect';
4
+ export const Inkanyamba = {
5
+ invoke: [{}, { favor: 1 }, { gem: 1 }],
6
+ effect: {
7
+ trigger: (effect, { cardIndex }) => effect.type === TriggerEventType.EntitiesMoved && effect.entities.includes(cardIndex),
8
+ rule: class InkanyambaEffectRule extends AutoEffectRule {
9
+ playEffect() {
10
+ const player = this.card.location.player;
11
+ return [new Pantheon(this.game, player).gainGems(1)];
12
+ }
13
+ },
14
+ auto: true
15
+ }
16
+ };
@@ -1,2 +1,2 @@
1
- import { EntityDescription } from '../EntityDescription';
2
- export declare const Inkosazana: EntityDescription;
1
+ import { EntityDescription } from '../EntityDescription';
2
+ export declare const Inkosazana: EntityDescription;
@@ -1,12 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Inkosazana = void 0;
4
- var InkosazanaEffectRule_1 = require("../../../rules/effects/InkosazanaEffectRule");
5
- var Effect_1 = require("../Effect");
6
- exports.Inkosazana = {
7
- invoke: [{}, { gem: 1, favor: 1 }, { favor: 1 }],
8
- effect: {
9
- trigger: Effect_1.isPlaced,
10
- rule: InkosazanaEffectRule_1.InkosazanaEffectRule
11
- }
12
- };
1
+ import { InkosazanaEffectRule } from '../../../rules/effects/InkosazanaEffectRule';
2
+ import { isPlaced } from '../Effect';
3
+ export const Inkosazana = {
4
+ invoke: [{}, { gem: 1, favor: 1 }, { favor: 1 }],
5
+ effect: {
6
+ trigger: isPlaced,
7
+ rule: InkosazanaEffectRule
8
+ }
9
+ };
@@ -1,2 +1,2 @@
1
- import { EntityDescription } from '../EntityDescription';
2
- export declare const Shembe: EntityDescription;
1
+ import { EntityDescription } from '../EntityDescription';
2
+ export declare const Shembe: EntityDescription;
@@ -1,44 +1,19 @@
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.Shembe = void 0;
19
- var Entity_1 = require("../../Entity");
20
- var Mythology_1 = require("../../Mythology");
21
- var Pantheon_1 = require("../../Pantheon");
22
- var Effect_1 = require("../Effect");
23
- var PlayerEffectRule_1 = require("../PlayerEffectRule");
24
- exports.Shembe = {
25
- invoke: [{ gem: 1 }, { gem: 2 }, {}],
26
- effect: {
27
- trigger: Effect_1.isEndOfGame,
28
- rule: (function (_super) {
29
- __extends(ShembeEffectRule, _super);
30
- function ShembeEffectRule() {
31
- return _super !== null && _super.apply(this, arguments) || this;
32
- }
33
- ShembeEffectRule.prototype.playEffect = function () {
34
- var pantheon = new Pantheon_1.Pantheon(this.game, this.player);
35
- var mythologies = pantheon.mythologies.filter(function (mythology) {
36
- return mythology !== Mythology_1.Mythology.Zulu &&
37
- pantheon.visibleEntities.id(function (id) { return (0, Entity_1.isCreature)(id.front) && (0, Entity_1.entityMythology)(id.front) === mythology; }).length >= 2;
38
- });
39
- return mythologies.length > 0 ? [pantheon.gainFavor(mythologies.length * 2)] : [];
40
- };
41
- return ShembeEffectRule;
42
- }(PlayerEffectRule_1.PlayerEffectRule))
43
- }
44
- };
1
+ import { entityMythology, isCreature } from '../../Entity';
2
+ import { Mythology } from '../../Mythology';
3
+ import { Pantheon } from '../../Pantheon';
4
+ import { isEndOfGame } from '../Effect';
5
+ import { PlayerEffectRule } from '../PlayerEffectRule';
6
+ export const Shembe = {
7
+ invoke: [{ gem: 1 }, { gem: 2 }, {}],
8
+ effect: {
9
+ trigger: isEndOfGame,
10
+ rule: class ShembeEffectRule extends PlayerEffectRule {
11
+ playEffect() {
12
+ const pantheon = new Pantheon(this.game, this.player);
13
+ const mythologies = pantheon.mythologies.filter((mythology) => mythology !== Mythology.Zulu &&
14
+ pantheon.visibleEntities.id((id) => isCreature(id.front) && entityMythology(id.front) === mythology).length >= 2);
15
+ return mythologies.length > 0 ? [pantheon.gainFavor(mythologies.length * 2)] : [];
16
+ }
17
+ }
18
+ }
19
+ };
@@ -1,2 +1,2 @@
1
- import { EntityDescription } from '../EntityDescription';
2
- export declare const Tokoloshe: EntityDescription;
1
+ import { EntityDescription } from '../EntityDescription';
2
+ export declare const Tokoloshe: EntityDescription;
@@ -1,47 +1,24 @@
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.Tokoloshe = void 0;
19
- var Entity_1 = require("../../Entity");
20
- var Pantheon_1 = require("../../Pantheon");
21
- var AutoEffectRule_1 = require("../AutoEffectRule");
22
- var Effect_1 = require("../Effect");
23
- exports.Tokoloshe = {
24
- invoke: [{}, { gem: 3 }, { favor: 2 }],
25
- effects: [
26
- {
27
- trigger: Effect_1.isEndOfMyTurn,
28
- rule: (function (_super) {
29
- __extends(TokolosheEffectRule, _super);
30
- function TokolosheEffectRule() {
31
- return _super !== null && _super.apply(this, arguments) || this;
32
- }
33
- TokolosheEffectRule.prototype.playEffect = function () {
34
- var _a = this.card.location, x = _a.x, y = _a.y, player = _a.player;
35
- var pantheon = new Pantheon_1.Pantheon(this.game, player);
36
- var creatures = pantheon.visibleEntities.location(function (l) { return l.y === y && l.x !== x; }).id(function (id) { return (0, Entity_1.isCreature)(id.front); });
37
- var loss = Math.min(pantheon.favor, creatures.length);
38
- return loss ? [pantheon.loseFavor(loss)] : [];
39
- };
40
- return TokolosheEffectRule;
41
- }(AutoEffectRule_1.AutoEffectRule))
42
- },
43
- {
44
- preventCrush: function (card) { return card.id.front === Entity_1.Entity.Tokoloshe; }
45
- }
46
- ]
47
- };
1
+ import { Entity, isCreature } from '../../Entity';
2
+ import { Pantheon } from '../../Pantheon';
3
+ import { AutoEffectRule } from '../AutoEffectRule';
4
+ import { isEndOfMyTurn } from '../Effect';
5
+ export const Tokoloshe = {
6
+ invoke: [{}, { gem: 3 }, { favor: 2 }],
7
+ effects: [
8
+ {
9
+ trigger: isEndOfMyTurn,
10
+ rule: class TokolosheEffectRule extends AutoEffectRule {
11
+ playEffect() {
12
+ const { x, y, player } = this.card.location;
13
+ const pantheon = new Pantheon(this.game, player);
14
+ const creatures = pantheon.visibleEntities.location((l) => l.y === y && l.x !== x).id((id) => isCreature(id.front));
15
+ const loss = Math.min(pantheon.favor, creatures.length);
16
+ return loss ? [pantheon.loseFavor(loss)] : [];
17
+ }
18
+ }
19
+ },
20
+ {
21
+ preventCrush: (card) => card.id.front === Entity.Tokoloshe
22
+ }
23
+ ]
24
+ };
@@ -1,2 +1,2 @@
1
- import { EntityDescription } from '../EntityDescription';
2
- export declare const Umvelinqangi: EntityDescription;
1
+ import { EntityDescription } from '../EntityDescription';
2
+ export declare const Umvelinqangi: EntityDescription;
@@ -1,45 +1,22 @@
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.Umvelinqangi = void 0;
19
- var lodash_1 = require("lodash");
20
- var Entity_1 = require("../../Entity");
21
- var Mythology_1 = require("../../Mythology");
22
- var Pantheon_1 = require("../../Pantheon");
23
- var Effect_1 = require("../Effect");
24
- var PlayerEffectRule_1 = require("../PlayerEffectRule");
25
- exports.Umvelinqangi = {
26
- invoke: [{ gem: 1, favor: 1 }, { gem: 1 }, {}],
27
- effect: {
28
- trigger: Effect_1.isEndOfGame,
29
- rule: (function (_super) {
30
- __extends(UmvelinqangiEffectRule, _super);
31
- function UmvelinqangiEffectRule() {
32
- return _super !== null && _super.apply(this, arguments) || this;
33
- }
34
- UmvelinqangiEffectRule.prototype.playEffect = function () {
35
- var pantheon = new Pantheon_1.Pantheon(this.game, this.player);
36
- var _a = this.card.location, x = _a.x, y = _a.y;
37
- var covered = pantheon.coveredEntities.location(function (l) { return l.x === x && l.y === y; }).getItems();
38
- var mythologies = (0, lodash_1.uniq)(covered.map(function (card) { return (0, Entity_1.entityMythology)(card.id.front); })).filter(function (mythology) { return mythology !== Mythology_1.Mythology.Zulu; });
39
- var gain = mythologies.length === 3 ? 4 : mythologies.length;
40
- return gain > 0 ? [pantheon.gainFavor(gain)] : [];
41
- };
42
- return UmvelinqangiEffectRule;
43
- }(PlayerEffectRule_1.PlayerEffectRule))
44
- }
45
- };
1
+ import { uniq } from 'es-toolkit';
2
+ import { entityMythology } from '../../Entity';
3
+ import { Mythology } from '../../Mythology';
4
+ import { Pantheon } from '../../Pantheon';
5
+ import { isEndOfGame } from '../Effect';
6
+ import { PlayerEffectRule } from '../PlayerEffectRule';
7
+ export const Umvelinqangi = {
8
+ invoke: [{ gem: 1, favor: 1 }, { gem: 1 }, {}],
9
+ effect: {
10
+ trigger: isEndOfGame,
11
+ rule: class UmvelinqangiEffectRule extends PlayerEffectRule {
12
+ playEffect() {
13
+ const pantheon = new Pantheon(this.game, this.player);
14
+ const { x, y } = this.card.location;
15
+ const covered = pantheon.coveredEntities.location((l) => l.x === x && l.y === y).getItems();
16
+ const mythologies = uniq(covered.map((card) => entityMythology(card.id.front))).filter((mythology) => mythology !== Mythology.Zulu);
17
+ const gain = mythologies.length === 3 ? 4 : mythologies.length;
18
+ return gain > 0 ? [pantheon.gainFavor(gain)] : [];
19
+ }
20
+ }
21
+ }
22
+ };
@@ -1,2 +1,2 @@
1
- import { EntityDescription } from '../EntityDescription';
2
- export declare const Unkulunkulu: EntityDescription;
1
+ import { EntityDescription } from '../EntityDescription';
2
+ export declare const Unkulunkulu: EntityDescription;