@gamepark/mythologies 0.1.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 (269) hide show
  1. package/dist/CustomMoveType.d.ts +13 -0
  2. package/dist/CustomMoveType.js +13 -0
  3. package/dist/Memory.d.ts +13 -0
  4. package/dist/Memory.js +17 -0
  5. package/dist/MythologiesOptions.d.ts +12 -0
  6. package/dist/MythologiesOptions.js +14 -0
  7. package/dist/MythologiesRules.d.ts +111 -0
  8. package/dist/MythologiesRules.js +218 -0
  9. package/dist/MythologiesSetup.d.ts +17 -0
  10. package/dist/MythologiesSetup.js +161 -0
  11. package/dist/PlayerColor.d.ts +10 -0
  12. package/dist/PlayerColor.js +10 -0
  13. package/dist/index.d.ts +3 -0
  14. package/dist/index.js +9 -0
  15. package/dist/material/Destiny.d.ts +9 -0
  16. package/dist/material/Destiny.js +87 -0
  17. package/dist/material/Entity.d.ts +98 -0
  18. package/dist/material/Entity.js +99 -0
  19. package/dist/material/LocationType.d.ts +26 -0
  20. package/dist/material/LocationType.js +31 -0
  21. package/dist/material/MaterialType.d.ts +12 -0
  22. package/dist/material/MaterialType.js +16 -0
  23. package/dist/material/Mythology.d.ts +19 -0
  24. package/dist/material/Mythology.js +21 -0
  25. package/dist/material/Pantheon.d.ts +36 -0
  26. package/dist/material/Pantheon.js +357 -0
  27. package/dist/material/Trial.d.ts +22 -0
  28. package/dist/material/Trial.js +184 -0
  29. package/dist/material/entity/Effect.d.ts +91 -0
  30. package/dist/material/entity/Effect.js +115 -0
  31. package/dist/material/entity/EntityDescription.d.ts +13 -0
  32. package/dist/material/entity/EntityDescription.js +173 -0
  33. package/dist/material/entity/MoveEffectRule.d.ts +15 -0
  34. package/dist/material/entity/MoveEffectRule.js +86 -0
  35. package/dist/material/entity/PlaceCardEffectRule.d.ts +15 -0
  36. package/dist/material/entity/PlaceCardEffectRule.js +75 -0
  37. package/dist/material/entity/SacrificeEffectRule.d.ts +9 -0
  38. package/dist/material/entity/SacrificeEffectRule.js +58 -0
  39. package/dist/material/entity/SimultaneousMoveEffectRule.d.ts +13 -0
  40. package/dist/material/entity/SimultaneousMoveEffectRule.js +124 -0
  41. package/dist/material/entity/SimultaneousSacrificeEffectRule.d.ts +10 -0
  42. package/dist/material/entity/SimultaneousSacrificeEffectRule.js +57 -0
  43. package/dist/material/entity/celtic/Banshee.d.ts +2 -0
  44. package/dist/material/entity/celtic/Banshee.js +6 -0
  45. package/dist/material/entity/celtic/Brigid.d.ts +2 -0
  46. package/dist/material/entity/celtic/Brigid.js +6 -0
  47. package/dist/material/entity/celtic/Cernunnos.d.ts +2 -0
  48. package/dist/material/entity/celtic/Cernunnos.js +6 -0
  49. package/dist/material/entity/celtic/Dagda.d.ts +2 -0
  50. package/dist/material/entity/celtic/Dagda.js +6 -0
  51. package/dist/material/entity/celtic/Dryad.d.ts +2 -0
  52. package/dist/material/entity/celtic/Dryad.js +6 -0
  53. package/dist/material/entity/celtic/Dullahan.d.ts +2 -0
  54. package/dist/material/entity/celtic/Dullahan.js +6 -0
  55. package/dist/material/entity/celtic/Kelpie.d.ts +2 -0
  56. package/dist/material/entity/celtic/Kelpie.js +6 -0
  57. package/dist/material/entity/celtic/Leprechaun.d.ts +2 -0
  58. package/dist/material/entity/celtic/Leprechaun.js +6 -0
  59. package/dist/material/entity/celtic/Morrigan.d.ts +2 -0
  60. package/dist/material/entity/celtic/Morrigan.js +6 -0
  61. package/dist/material/entity/celtic/Selkie.d.ts +2 -0
  62. package/dist/material/entity/celtic/Selkie.js +6 -0
  63. package/dist/material/entity/chinese/ChangE.d.ts +2 -0
  64. package/dist/material/entity/chinese/ChangE.js +6 -0
  65. package/dist/material/entity/chinese/Fenghuang.d.ts +2 -0
  66. package/dist/material/entity/chinese/Fenghuang.js +6 -0
  67. package/dist/material/entity/chinese/Jiangshi.d.ts +2 -0
  68. package/dist/material/entity/chinese/Jiangshi.js +6 -0
  69. package/dist/material/entity/chinese/Mogwai.d.ts +2 -0
  70. package/dist/material/entity/chinese/Mogwai.js +6 -0
  71. package/dist/material/entity/chinese/Nian.d.ts +2 -0
  72. package/dist/material/entity/chinese/Nian.js +6 -0
  73. package/dist/material/entity/chinese/Nuwa.d.ts +2 -0
  74. package/dist/material/entity/chinese/Nuwa.js +6 -0
  75. package/dist/material/entity/chinese/Qilin.d.ts +2 -0
  76. package/dist/material/entity/chinese/Qilin.js +6 -0
  77. package/dist/material/entity/chinese/SunWukong.d.ts +2 -0
  78. package/dist/material/entity/chinese/SunWukong.js +6 -0
  79. package/dist/material/entity/chinese/Tianlong.d.ts +2 -0
  80. package/dist/material/entity/chinese/Tianlong.js +6 -0
  81. package/dist/material/entity/chinese/YanluoWang.d.ts +2 -0
  82. package/dist/material/entity/chinese/YanluoWang.js +6 -0
  83. package/dist/material/entity/egyptian/Anubis.d.ts +2 -0
  84. package/dist/material/entity/egyptian/Anubis.js +12 -0
  85. package/dist/material/entity/egyptian/Babai.d.ts +2 -0
  86. package/dist/material/entity/egyptian/Babai.js +12 -0
  87. package/dist/material/entity/egyptian/Beetle.d.ts +2 -0
  88. package/dist/material/entity/egyptian/Beetle.js +36 -0
  89. package/dist/material/entity/egyptian/Bennu.d.ts +2 -0
  90. package/dist/material/entity/egyptian/Bennu.js +12 -0
  91. package/dist/material/entity/egyptian/Cobra.d.ts +2 -0
  92. package/dist/material/entity/egyptian/Cobra.js +12 -0
  93. package/dist/material/entity/egyptian/Isis.d.ts +2 -0
  94. package/dist/material/entity/egyptian/Isis.js +39 -0
  95. package/dist/material/entity/egyptian/Mummy.d.ts +2 -0
  96. package/dist/material/entity/egyptian/Mummy.js +39 -0
  97. package/dist/material/entity/egyptian/Osiris.d.ts +2 -0
  98. package/dist/material/entity/egyptian/Osiris.js +71 -0
  99. package/dist/material/entity/egyptian/Ra.d.ts +2 -0
  100. package/dist/material/entity/egyptian/Ra.js +12 -0
  101. package/dist/material/entity/egyptian/Sphinx.d.ts +2 -0
  102. package/dist/material/entity/egyptian/Sphinx.js +12 -0
  103. package/dist/material/entity/greek/Athena.d.ts +2 -0
  104. package/dist/material/entity/greek/Athena.js +12 -0
  105. package/dist/material/entity/greek/Centaur.d.ts +2 -0
  106. package/dist/material/entity/greek/Centaur.js +12 -0
  107. package/dist/material/entity/greek/Chimera.d.ts +2 -0
  108. package/dist/material/entity/greek/Chimera.js +12 -0
  109. package/dist/material/entity/greek/Cyclops.d.ts +2 -0
  110. package/dist/material/entity/greek/Cyclops.js +21 -0
  111. package/dist/material/entity/greek/Gorgon.d.ts +2 -0
  112. package/dist/material/entity/greek/Gorgon.js +12 -0
  113. package/dist/material/entity/greek/Griffin.d.ts +2 -0
  114. package/dist/material/entity/greek/Griffin.js +12 -0
  115. package/dist/material/entity/greek/Hades.d.ts +2 -0
  116. package/dist/material/entity/greek/Hades.js +12 -0
  117. package/dist/material/entity/greek/Minotaur.d.ts +2 -0
  118. package/dist/material/entity/greek/Minotaur.js +12 -0
  119. package/dist/material/entity/greek/Poseidon.d.ts +2 -0
  120. package/dist/material/entity/greek/Poseidon.js +44 -0
  121. package/dist/material/entity/greek/Zeus.d.ts +2 -0
  122. package/dist/material/entity/greek/Zeus.js +39 -0
  123. package/dist/material/entity/hindu/Asura.d.ts +2 -0
  124. package/dist/material/entity/hindu/Asura.js +66 -0
  125. package/dist/material/entity/hindu/Brahma.d.ts +2 -0
  126. package/dist/material/entity/hindu/Brahma.js +36 -0
  127. package/dist/material/entity/hindu/Ganesh.d.ts +2 -0
  128. package/dist/material/entity/hindu/Ganesh.js +44 -0
  129. package/dist/material/entity/hindu/Garuda.d.ts +2 -0
  130. package/dist/material/entity/hindu/Garuda.js +12 -0
  131. package/dist/material/entity/hindu/Kinnara.d.ts +2 -0
  132. package/dist/material/entity/hindu/Kinnara.js +12 -0
  133. package/dist/material/entity/hindu/Naga.d.ts +2 -0
  134. package/dist/material/entity/hindu/Naga.js +68 -0
  135. package/dist/material/entity/hindu/Rakshasa.d.ts +2 -0
  136. package/dist/material/entity/hindu/Rakshasa.js +12 -0
  137. package/dist/material/entity/hindu/Shiva.d.ts +2 -0
  138. package/dist/material/entity/hindu/Shiva.js +12 -0
  139. package/dist/material/entity/hindu/Vetala.d.ts +2 -0
  140. package/dist/material/entity/hindu/Vetala.js +12 -0
  141. package/dist/material/entity/hindu/Vishnu.d.ts +2 -0
  142. package/dist/material/entity/hindu/Vishnu.js +71 -0
  143. package/dist/material/entity/inca/Amaru.d.ts +2 -0
  144. package/dist/material/entity/inca/Amaru.js +6 -0
  145. package/dist/material/entity/inca/Caiman.d.ts +2 -0
  146. package/dist/material/entity/inca/Caiman.js +6 -0
  147. package/dist/material/entity/inca/Condor.d.ts +2 -0
  148. package/dist/material/entity/inca/Condor.js +6 -0
  149. package/dist/material/entity/inca/Illapa.d.ts +2 -0
  150. package/dist/material/entity/inca/Illapa.js +6 -0
  151. package/dist/material/entity/inca/Inti.d.ts +2 -0
  152. package/dist/material/entity/inca/Inti.js +6 -0
  153. package/dist/material/entity/inca/MamaQucha.d.ts +2 -0
  154. package/dist/material/entity/inca/MamaQucha.js +6 -0
  155. package/dist/material/entity/inca/Pumapunku.d.ts +2 -0
  156. package/dist/material/entity/inca/Pumapunku.js +6 -0
  157. package/dist/material/entity/inca/Supay.d.ts +2 -0
  158. package/dist/material/entity/inca/Supay.js +6 -0
  159. package/dist/material/entity/inca/Ukuku.d.ts +2 -0
  160. package/dist/material/entity/inca/Ukuku.js +6 -0
  161. package/dist/material/entity/inca/Viracocha.d.ts +2 -0
  162. package/dist/material/entity/inca/Viracocha.js +6 -0
  163. package/dist/material/entity/norse/Alf.d.ts +2 -0
  164. package/dist/material/entity/norse/Alf.js +12 -0
  165. package/dist/material/entity/norse/Draugr.d.ts +2 -0
  166. package/dist/material/entity/norse/Draugr.js +12 -0
  167. package/dist/material/entity/norse/Fenrir.d.ts +2 -0
  168. package/dist/material/entity/norse/Fenrir.js +12 -0
  169. package/dist/material/entity/norse/Freya.d.ts +2 -0
  170. package/dist/material/entity/norse/Freya.js +39 -0
  171. package/dist/material/entity/norse/Jotunn.d.ts +2 -0
  172. package/dist/material/entity/norse/Jotunn.js +36 -0
  173. package/dist/material/entity/norse/Loki.d.ts +2 -0
  174. package/dist/material/entity/norse/Loki.js +36 -0
  175. package/dist/material/entity/norse/Odin.d.ts +2 -0
  176. package/dist/material/entity/norse/Odin.js +6 -0
  177. package/dist/material/entity/norse/Thor.d.ts +2 -0
  178. package/dist/material/entity/norse/Thor.js +12 -0
  179. package/dist/material/entity/norse/Troll.d.ts +2 -0
  180. package/dist/material/entity/norse/Troll.js +6 -0
  181. package/dist/material/entity/norse/Valkyrie.d.ts +2 -0
  182. package/dist/material/entity/norse/Valkyrie.js +72 -0
  183. package/dist/material/entity/zulu/Idlozi.d.ts +2 -0
  184. package/dist/material/entity/zulu/Idlozi.js +6 -0
  185. package/dist/material/entity/zulu/Impundulu.d.ts +2 -0
  186. package/dist/material/entity/zulu/Impundulu.js +6 -0
  187. package/dist/material/entity/zulu/Inkanyamba.d.ts +2 -0
  188. package/dist/material/entity/zulu/Inkanyamba.js +6 -0
  189. package/dist/material/entity/zulu/Inkosazana.d.ts +2 -0
  190. package/dist/material/entity/zulu/Inkosazana.js +6 -0
  191. package/dist/material/entity/zulu/Shembe.d.ts +2 -0
  192. package/dist/material/entity/zulu/Shembe.js +6 -0
  193. package/dist/material/entity/zulu/Tokoloshe.d.ts +2 -0
  194. package/dist/material/entity/zulu/Tokoloshe.js +6 -0
  195. package/dist/material/entity/zulu/Umvelinqangi.d.ts +2 -0
  196. package/dist/material/entity/zulu/Umvelinqangi.js +6 -0
  197. package/dist/material/entity/zulu/Unkulunkulu.d.ts +2 -0
  198. package/dist/material/entity/zulu/Unkulunkulu.js +6 -0
  199. package/dist/material/entity/zulu/Unwabu.d.ts +2 -0
  200. package/dist/material/entity/zulu/Unwabu.js +6 -0
  201. package/dist/material/entity/zulu/Werehyena.d.ts +2 -0
  202. package/dist/material/entity/zulu/Werehyena.js +6 -0
  203. package/dist/rules/ChooseDraftTokenRule.d.ts +15 -0
  204. package/dist/rules/ChooseDraftTokenRule.js +103 -0
  205. package/dist/rules/DrawDestinyCardRule.d.ts +7 -0
  206. package/dist/rules/DrawDestinyCardRule.js +116 -0
  207. package/dist/rules/EndGameRule.d.ts +5 -0
  208. package/dist/rules/EndGameRule.js +44 -0
  209. package/dist/rules/PlaceCardsRule.d.ts +13 -0
  210. package/dist/rules/PlaceCardsRule.js +192 -0
  211. package/dist/rules/PlaceTokenRule.d.ts +13 -0
  212. package/dist/rules/PlaceTokenRule.js +139 -0
  213. package/dist/rules/RuleId.d.ts +36 -0
  214. package/dist/rules/RuleId.js +40 -0
  215. package/dist/rules/UpkeepRule.d.ts +9 -0
  216. package/dist/rules/UpkeepRule.js +140 -0
  217. package/dist/rules/effects/AlfEffectRule.d.ts +10 -0
  218. package/dist/rules/effects/AlfEffectRule.js +59 -0
  219. package/dist/rules/effects/AnubisEffectRule.d.ts +9 -0
  220. package/dist/rules/effects/AnubisEffectRule.js +49 -0
  221. package/dist/rules/effects/AthenaEffectRule.d.ts +9 -0
  222. package/dist/rules/effects/AthenaEffectRule.js +104 -0
  223. package/dist/rules/effects/BabaiEffectRule.d.ts +6 -0
  224. package/dist/rules/effects/BabaiEffectRule.js +40 -0
  225. package/dist/rules/effects/BennuEffectRule.d.ts +6 -0
  226. package/dist/rules/effects/BennuEffectRule.js +35 -0
  227. package/dist/rules/effects/CentaurEffectRule.d.ts +15 -0
  228. package/dist/rules/effects/CentaurEffectRule.js +77 -0
  229. package/dist/rules/effects/ChimeraEffectRule.d.ts +8 -0
  230. package/dist/rules/effects/ChimeraEffectRule.js +51 -0
  231. package/dist/rules/effects/CobraEffectRule.d.ts +12 -0
  232. package/dist/rules/effects/CobraEffectRule.js +55 -0
  233. package/dist/rules/effects/CyclopsEffectRule.d.ts +8 -0
  234. package/dist/rules/effects/CyclopsEffectRule.js +87 -0
  235. package/dist/rules/effects/DraugrEffectRule.d.ts +11 -0
  236. package/dist/rules/effects/DraugrEffectRule.js +56 -0
  237. package/dist/rules/effects/FenrirEffectRule.d.ts +15 -0
  238. package/dist/rules/effects/FenrirEffectRule.js +132 -0
  239. package/dist/rules/effects/GarudaEffectRule.d.ts +9 -0
  240. package/dist/rules/effects/GarudaEffectRule.js +84 -0
  241. package/dist/rules/effects/GorgonEffectRule.d.ts +11 -0
  242. package/dist/rules/effects/GorgonEffectRule.js +78 -0
  243. package/dist/rules/effects/GriffinEffectRule.d.ts +9 -0
  244. package/dist/rules/effects/GriffinEffectRule.js +41 -0
  245. package/dist/rules/effects/HadesEffectRule.d.ts +5 -0
  246. package/dist/rules/effects/HadesEffectRule.js +87 -0
  247. package/dist/rules/effects/KinnaraEffectRule.d.ts +12 -0
  248. package/dist/rules/effects/KinnaraEffectRule.js +84 -0
  249. package/dist/rules/effects/MinotaurEffectRule.d.ts +9 -0
  250. package/dist/rules/effects/MinotaurEffectRule.js +39 -0
  251. package/dist/rules/effects/OdinEffectRule.d.ts +11 -0
  252. package/dist/rules/effects/OdinEffectRule.js +52 -0
  253. package/dist/rules/effects/RaEffectRule.d.ts +5 -0
  254. package/dist/rules/effects/RaEffectRule.js +87 -0
  255. package/dist/rules/effects/RakshasaEffectRule.d.ts +13 -0
  256. package/dist/rules/effects/RakshasaEffectRule.js +48 -0
  257. package/dist/rules/effects/ResolveEffectsRule.d.ts +6 -0
  258. package/dist/rules/effects/ResolveEffectsRule.js +73 -0
  259. package/dist/rules/effects/ShivaEffectRule.d.ts +10 -0
  260. package/dist/rules/effects/ShivaEffectRule.js +82 -0
  261. package/dist/rules/effects/SphinxEffectRule.d.ts +9 -0
  262. package/dist/rules/effects/SphinxEffectRule.js +47 -0
  263. package/dist/rules/effects/ThorEffectRule.d.ts +11 -0
  264. package/dist/rules/effects/ThorEffectRule.js +56 -0
  265. package/dist/rules/effects/TriggerEffectsRule.d.ts +11 -0
  266. package/dist/rules/effects/TriggerEffectsRule.js +159 -0
  267. package/dist/rules/effects/VetalaEffectRule.d.ts +11 -0
  268. package/dist/rules/effects/VetalaEffectRule.js +59 -0
  269. package/package.json +33 -0
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Impundulu = void 0;
4
+ exports.Impundulu = {
5
+ invoke: [{ favor: 1 }, {}, {}]
6
+ };
@@ -0,0 +1,2 @@
1
+ import { EntityDescription } from '../EntityDescription';
2
+ export declare const Inkanyamba: EntityDescription;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Inkanyamba = void 0;
4
+ exports.Inkanyamba = {
5
+ invoke: [{}, { favor: 1 }, { gem: 1 }]
6
+ };
@@ -0,0 +1,2 @@
1
+ import { EntityDescription } from '../EntityDescription';
2
+ export declare const Inkosazana: EntityDescription;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Inkosazana = void 0;
4
+ exports.Inkosazana = {
5
+ invoke: [{}, { gem: 1, favor: 1 }, { favor: 1 }]
6
+ };
@@ -0,0 +1,2 @@
1
+ import { EntityDescription } from '../EntityDescription';
2
+ export declare const Shembe: EntityDescription;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Shembe = void 0;
4
+ exports.Shembe = {
5
+ invoke: [{ gem: 1 }, { gem: 2 }, {}]
6
+ };
@@ -0,0 +1,2 @@
1
+ import { EntityDescription } from '../EntityDescription';
2
+ export declare const Tokoloshe: EntityDescription;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Tokoloshe = void 0;
4
+ exports.Tokoloshe = {
5
+ invoke: [{}, { gem: 3 }, { favor: 2 }]
6
+ };
@@ -0,0 +1,2 @@
1
+ import { EntityDescription } from '../EntityDescription';
2
+ export declare const Umvelinqangi: EntityDescription;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Umvelinqangi = void 0;
4
+ exports.Umvelinqangi = {
5
+ invoke: [{ gem: 1, favor: 1 }, { gem: 1 }, {}]
6
+ };
@@ -0,0 +1,2 @@
1
+ import { EntityDescription } from '../EntityDescription';
2
+ export declare const Unkulunkulu: EntityDescription;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Unkulunkulu = void 0;
4
+ exports.Unkulunkulu = {
5
+ invoke: [{ favor: 1 }, { favor: 2 }, {}]
6
+ };
@@ -0,0 +1,2 @@
1
+ import { EntityDescription } from '../EntityDescription';
2
+ export declare const Unwabu: EntityDescription;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Unwabu = void 0;
4
+ exports.Unwabu = {
5
+ invoke: [{ gem: 2 }, { favor: 1 }, {}]
6
+ };
@@ -0,0 +1,2 @@
1
+ import { EntityDescription } from '../EntityDescription';
2
+ export declare const Werehyena: EntityDescription;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Werehyena = void 0;
4
+ exports.Werehyena = {
5
+ invoke: [{}, { gem: 1 }, { gem: 2 }]
6
+ };
@@ -0,0 +1,15 @@
1
+ import { ItemMove, SimultaneousRule } from '@gamepark/rules-api';
2
+ import { LocationType } from '../material/LocationType';
3
+ import { PlayerColor } from '../PlayerColor';
4
+ import { RuleId } from './RuleId';
5
+ export declare class ChooseDraftTokenRule extends SimultaneousRule {
6
+ onRuleStart(): import("@gamepark/rules-api").MoveItem<number, number, number>[];
7
+ getActivePlayerLegalMoves(player: PlayerColor): import("@gamepark/rules-api").MoveItem<number, number, number>[];
8
+ getTokenDestination(player: PlayerColor): {
9
+ type: LocationType;
10
+ parent: number;
11
+ rotation: boolean;
12
+ };
13
+ afterItemMove(move: ItemMove): import("@gamepark/rules-api").Shuffle<number>[] | import("@gamepark/rules-api").EndPlayerTurn<PlayerColor>[] | (import("@gamepark/rules-api").MoveItem<number, number, number> | import("@gamepark/rules-api").StartRule<RuleId.DrawDestinyCard> | import("@gamepark/rules-api").StartSimultaneousRule<PlayerColor, RuleId.PlaceToken>)[];
14
+ getMovesAfterPlayersDone(): import("@gamepark/rules-api").MoveItemsAtOnce<number, number, number>[];
15
+ }
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __read = (this && this.__read) || function (o, n) {
18
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
19
+ if (!m) return o;
20
+ var i = m.call(o), r, ar = [], e;
21
+ try {
22
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
23
+ }
24
+ catch (error) { e = { error: error }; }
25
+ finally {
26
+ try {
27
+ if (r && !r.done && (m = i["return"])) m.call(i);
28
+ }
29
+ finally { if (e) throw e.error; }
30
+ }
31
+ return ar;
32
+ };
33
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
34
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
35
+ if (ar || !(i in from)) {
36
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
37
+ ar[i] = from[i];
38
+ }
39
+ }
40
+ return to.concat(ar || Array.prototype.slice.call(from));
41
+ };
42
+ Object.defineProperty(exports, "__esModule", { value: true });
43
+ exports.ChooseDraftTokenRule = void 0;
44
+ var rules_api_1 = require("@gamepark/rules-api");
45
+ var Destiny_1 = require("../material/Destiny");
46
+ var LocationType_1 = require("../material/LocationType");
47
+ var MaterialType_1 = require("../material/MaterialType");
48
+ var RuleId_1 = require("./RuleId");
49
+ var ChooseDraftTokenRule = (function (_super) {
50
+ __extends(ChooseDraftTokenRule, _super);
51
+ function ChooseDraftTokenRule() {
52
+ return _super !== null && _super.apply(this, arguments) || this;
53
+ }
54
+ ChooseDraftTokenRule.prototype.onRuleStart = function () {
55
+ var _this = this;
56
+ var destinyLeft = this.material(MaterialType_1.MaterialType.DestinyCard).location(LocationType_1.LocationType.DestinyDeck).length;
57
+ var takeTokens = this.material(MaterialType_1.MaterialType.DraftToken)
58
+ .location(LocationType_1.LocationType.PlayerHand)
59
+ .id(function (id) { return id.front === true; });
60
+ var playersHavingToTake = this.game.players.filter(function (player) { return takeTokens.player(player).length > destinyLeft; });
61
+ return playersHavingToTake.map(function (player) { return takeTokens.player(player).deck().dealOne(_this.getTokenDestination(player)); });
62
+ };
63
+ ChooseDraftTokenRule.prototype.getActivePlayerLegalMoves = function (player) {
64
+ return this.material(MaterialType_1.MaterialType.DraftToken).location(LocationType_1.LocationType.PlayerHand).player(player).moveItems(this.getTokenDestination(player));
65
+ };
66
+ ChooseDraftTokenRule.prototype.getTokenDestination = function (player) {
67
+ var mythologyBoard = new Destiny_1.Destiny(this.game).getMythologyBoard(player);
68
+ return {
69
+ type: LocationType_1.LocationType.PlayedTokenSpot,
70
+ parent: mythologyBoard.getIndex(),
71
+ rotation: true
72
+ };
73
+ };
74
+ ChooseDraftTokenRule.prototype.afterItemMove = function (move) {
75
+ if ((0, rules_api_1.isMoveItemType)(MaterialType_1.MaterialType.DraftToken)(move)) {
76
+ if (move.location.type === LocationType_1.LocationType.PlayedTokenSpot) {
77
+ return [this.endPlayerTurn(this.material(MaterialType_1.MaterialType.DraftToken).getItem(move.itemIndex).id.back)];
78
+ }
79
+ else if (move.location.type === LocationType_1.LocationType.PlayerHand) {
80
+ return [this.material(MaterialType_1.MaterialType.DraftToken).location(LocationType_1.LocationType.PlayerHand).player(move.location.player).shuffle()];
81
+ }
82
+ }
83
+ else if ((0, rules_api_1.isMoveItemTypeAtOnce)(MaterialType_1.MaterialType.DraftToken)(move)) {
84
+ var playedTokens = this.material(MaterialType_1.MaterialType.DraftToken).location(LocationType_1.LocationType.PlayedTokenSpot);
85
+ var takeBackPassTokens = playedTokens
86
+ .id(function (id) { return id.front === false; })
87
+ .moveItems(function (item) { return ({ type: LocationType_1.LocationType.PlayerHand, player: item.id.back }); });
88
+ var playersTaking = playedTokens
89
+ .id(function (id) { return id.front === true; })
90
+ .getItems()
91
+ .map(function (item) { return item.id.back; });
92
+ return __spreadArray(__spreadArray([], __read(takeBackPassTokens), false), [
93
+ playersTaking.length ? this.startSimultaneousRule(RuleId_1.RuleId.PlaceToken, playersTaking) : this.startRule(RuleId_1.RuleId.DrawDestinyCard)
94
+ ], false);
95
+ }
96
+ return [];
97
+ };
98
+ ChooseDraftTokenRule.prototype.getMovesAfterPlayersDone = function () {
99
+ return [this.material(MaterialType_1.MaterialType.DraftToken).location(LocationType_1.LocationType.PlayedTokenSpot).moveItemsAtOnce({ rotation: false })];
100
+ };
101
+ return ChooseDraftTokenRule;
102
+ }(rules_api_1.SimultaneousRule));
103
+ exports.ChooseDraftTokenRule = ChooseDraftTokenRule;
@@ -0,0 +1,7 @@
1
+ import { ItemMove, MaterialMove, MaterialRulesPart } from '@gamepark/rules-api';
2
+ import { RuleId } from './RuleId';
3
+ export declare class DrawDestinyCardRule extends MaterialRulesPart {
4
+ onRuleStart(): (import("@gamepark/rules-api").MoveItem<number, number, number> | import("@gamepark/rules-api").StartSimultaneousRule<number, RuleId.ChooseDraftToken>)[];
5
+ afterItemMove(move: ItemMove): MaterialMove<number, number, number, number>[];
6
+ exileCards(): MaterialMove<number, number, number, number>[];
7
+ }
@@ -0,0 +1,116 @@
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
+ var __read = (this && this.__read) || function (o, n) {
29
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
30
+ if (!m) return o;
31
+ var i = m.call(o), r, ar = [], e;
32
+ try {
33
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
34
+ }
35
+ catch (error) { e = { error: error }; }
36
+ finally {
37
+ try {
38
+ if (r && !r.done && (m = i["return"])) m.call(i);
39
+ }
40
+ finally { if (e) throw e.error; }
41
+ }
42
+ return ar;
43
+ };
44
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
45
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
46
+ if (ar || !(i in from)) {
47
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
48
+ ar[i] = from[i];
49
+ }
50
+ }
51
+ return to.concat(ar || Array.prototype.slice.call(from));
52
+ };
53
+ Object.defineProperty(exports, "__esModule", { value: true });
54
+ exports.DrawDestinyCardRule = void 0;
55
+ var rules_api_1 = require("@gamepark/rules-api");
56
+ var lodash_1 = require("lodash");
57
+ var Destiny_1 = require("../material/Destiny");
58
+ var LocationType_1 = require("../material/LocationType");
59
+ var MaterialType_1 = require("../material/MaterialType");
60
+ var RuleId_1 = require("./RuleId");
61
+ var DrawDestinyCardRule = (function (_super) {
62
+ __extends(DrawDestinyCardRule, _super);
63
+ function DrawDestinyCardRule() {
64
+ return _super !== null && _super.apply(this, arguments) || this;
65
+ }
66
+ DrawDestinyCardRule.prototype.onRuleStart = function () {
67
+ var playersWithDraftToken = (0, lodash_1.uniq)(this.material(MaterialType_1.MaterialType.DraftToken)
68
+ .location(LocationType_1.LocationType.PlayerHand)
69
+ .id(function (id) { return id.front === true; })
70
+ .getItems()
71
+ .map(function (item) { return item.location.player; }));
72
+ return [
73
+ this.material(MaterialType_1.MaterialType.DestinyCard).location(LocationType_1.LocationType.DestinyDeck).deck().dealOne({ type: LocationType_1.LocationType.CurrentDestiny }),
74
+ this.startSimultaneousRule(RuleId_1.RuleId.ChooseDraftToken, playersWithDraftToken)
75
+ ];
76
+ };
77
+ DrawDestinyCardRule.prototype.afterItemMove = function (move) {
78
+ if (this.game.players.length === 2 && (0, rules_api_1.isMoveItemType)(MaterialType_1.MaterialType.DestinyCard)(move)) {
79
+ return this.exileCards();
80
+ }
81
+ return [];
82
+ };
83
+ DrawDestinyCardRule.prototype.exileCards = function () {
84
+ var e_1, _a;
85
+ var moves = [];
86
+ var boards = new Destiny_1.Destiny(this.game).getBoardsWithoutPlayer();
87
+ var count = this.material(MaterialType_1.MaterialType.DestinyCard).location(LocationType_1.LocationType.CurrentDestiny).length;
88
+ var tokensOnCards = this.material(MaterialType_1.MaterialType.DraftToken).location(LocationType_1.LocationType.OnEntityCard).getItems();
89
+ var cardsWithToken = tokensOnCards.map(function (item) { return item.location.parent; });
90
+ var entities = this.material(MaterialType_1.MaterialType.EntityCard).index(function (index) { return !cardsWithToken.includes(index); });
91
+ var creatures = entities.location(LocationType_1.LocationType.SanctuaryCreatureSpot);
92
+ var gods = entities.location(LocationType_1.LocationType.SanctuaryGodSpot);
93
+ try {
94
+ for (var _b = __values(boards.getIndexes()), _c = _b.next(); !_c.done; _c = _b.next()) {
95
+ var index = _c.value;
96
+ var creature = creatures.parent(index).location(function (l) { return l.x === count - 1; });
97
+ if (creature.length) {
98
+ moves.push(creature.deleteItem());
99
+ }
100
+ else {
101
+ moves.push.apply(moves, __spreadArray([], __read(gods.parent(index).deleteItems()), false));
102
+ }
103
+ }
104
+ }
105
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
106
+ finally {
107
+ try {
108
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
109
+ }
110
+ finally { if (e_1) throw e_1.error; }
111
+ }
112
+ return moves;
113
+ };
114
+ return DrawDestinyCardRule;
115
+ }(rules_api_1.MaterialRulesPart));
116
+ exports.DrawDestinyCardRule = DrawDestinyCardRule;
@@ -0,0 +1,5 @@
1
+ import { PlayerTurnRule } from '@gamepark/rules-api';
2
+ import { RuleId } from './RuleId';
3
+ export declare class EndGameRule extends PlayerTurnRule {
4
+ onRuleStart(): import("@gamepark/rules-api").StartPlayerTurn<number, RuleId.ResolveEffects>[] | import("@gamepark/rules-api").EndGame[];
5
+ }
@@ -0,0 +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.EndGameRule = void 0;
19
+ var rules_api_1 = require("@gamepark/rules-api");
20
+ var Effect_1 = require("../material/entity/Effect");
21
+ var MaterialType_1 = require("../material/MaterialType");
22
+ var Memory_1 = require("../Memory");
23
+ var TriggerEffectsRule_1 = require("./effects/TriggerEffectsRule");
24
+ var RuleId_1 = require("./RuleId");
25
+ var EndGameRule = (function (_super) {
26
+ __extends(EndGameRule, _super);
27
+ function EndGameRule() {
28
+ return _super !== null && _super.apply(this, arguments) || this;
29
+ }
30
+ EndGameRule.prototype.onRuleStart = function () {
31
+ new TriggerEffectsRule_1.TriggerEffectsRule(this.game).triggerEffects({ type: Effect_1.TriggerEventType.EndOfGame });
32
+ var pendingEffects = this.remind(Memory_1.Memory.PendingEffects);
33
+ if (pendingEffects.length) {
34
+ var cardIndex = pendingEffects[0][0].cardIndex;
35
+ var player = this.material(MaterialType_1.MaterialType.EntityCard).getItem(cardIndex).location.player;
36
+ return [this.startPlayerTurn(RuleId_1.RuleId.ResolveEffects, player)];
37
+ }
38
+ else {
39
+ return [this.endGame()];
40
+ }
41
+ };
42
+ return EndGameRule;
43
+ }(rules_api_1.PlayerTurnRule));
44
+ exports.EndGameRule = EndGameRule;
@@ -0,0 +1,13 @@
1
+ import { CustomMove, ItemMove, MaterialMove, PlayerTurnRule } from '@gamepark/rules-api';
2
+ import { RuleId } from './RuleId';
3
+ export declare class PlaceCardsRule extends PlayerTurnRule {
4
+ isInvoke: boolean;
5
+ getPlayerMoves(): MaterialMove<number, number, number, number>[];
6
+ get infiniteEffects(): import("../material/entity/Effect").PendingEffect<import("../material/entity/Effect").TriggerEvent>[];
7
+ get tokens(): import("@gamepark/rules-api").Material<number, number, number>;
8
+ afterItemMove(move: ItemMove): MaterialMove<number, number, number, number>[];
9
+ onCustomMove(move: CustomMove): MaterialMove<number, number, number, number>[];
10
+ onPass(): MaterialMove<number, number, number, number>[];
11
+ get nextRule(): import("@gamepark/rules-api").StartPlayerTurn<number, RuleId.PlaceCards> | import("@gamepark/rules-api").StartPlayerTurn<number, RuleId.Upkeep> | import("@gamepark/rules-api").StartPlayerTurn<number, RuleId.EndGame>;
12
+ get round(): number;
13
+ }
@@ -0,0 +1,192 @@
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
+ var __read = (this && this.__read) || function (o, n) {
29
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
30
+ if (!m) return o;
31
+ var i = m.call(o), r, ar = [], e;
32
+ try {
33
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
34
+ }
35
+ catch (error) { e = { error: error }; }
36
+ finally {
37
+ try {
38
+ if (r && !r.done && (m = i["return"])) m.call(i);
39
+ }
40
+ finally { if (e) throw e.error; }
41
+ }
42
+ return ar;
43
+ };
44
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
45
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
46
+ if (ar || !(i in from)) {
47
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
48
+ ar[i] = from[i];
49
+ }
50
+ }
51
+ return to.concat(ar || Array.prototype.slice.call(from));
52
+ };
53
+ Object.defineProperty(exports, "__esModule", { value: true });
54
+ exports.PlaceCardsRule = void 0;
55
+ var rules_api_1 = require("@gamepark/rules-api");
56
+ var CustomMoveType_1 = require("../CustomMoveType");
57
+ var Entity_1 = require("../material/Entity");
58
+ var Effect_1 = require("../material/entity/Effect");
59
+ var EntityDescription_1 = require("../material/entity/EntityDescription");
60
+ var LocationType_1 = require("../material/LocationType");
61
+ var MaterialType_1 = require("../material/MaterialType");
62
+ var Pantheon_1 = require("../material/Pantheon");
63
+ var Trial_1 = require("../material/Trial");
64
+ var Memory_1 = require("../Memory");
65
+ var ResolveEffectsRule_1 = require("./effects/ResolveEffectsRule");
66
+ var TriggerEffectsRule_1 = require("./effects/TriggerEffectsRule");
67
+ var RuleId_1 = require("./RuleId");
68
+ var PlaceCardsRule = (function (_super) {
69
+ __extends(PlaceCardsRule, _super);
70
+ function PlaceCardsRule() {
71
+ var _this = _super !== null && _super.apply(this, arguments) || this;
72
+ _this.isInvoke = true;
73
+ return _this;
74
+ }
75
+ PlaceCardsRule.prototype.getPlayerMoves = function () {
76
+ var e_1, _a;
77
+ var _this = this;
78
+ var moves = this.infiniteEffects.map(function (effect) { return _this.customMove(CustomMoveType_1.CustomMoveType.PlayEffect, effect); });
79
+ var tokens = this.tokens.getItems();
80
+ var cards = this.material(MaterialType_1.MaterialType.EntityCard).index(tokens.map(function (token) { return token.location.parent; }));
81
+ if (cards.length) {
82
+ var cardsICanInvoke = new Pantheon_1.Pantheon(this.game, this.player).gems < 4 ? cards.id(function (id) { return !(0, Entity_1.isGod)(id.front); }) : cards;
83
+ try {
84
+ for (var _b = __values(new Pantheon_1.Pantheon(this.game, this.player).legalSpacesToInvoke), _c = _b.next(); !_c.done; _c = _b.next()) {
85
+ var _d = _c.value, x = _d.x, y = _d.y;
86
+ moves.push.apply(moves, __spreadArray([], __read(cardsICanInvoke.moveItems({ type: LocationType_1.LocationType.Pantheon, x: x, y: y, player: this.player })), false));
87
+ }
88
+ }
89
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
90
+ finally {
91
+ try {
92
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
93
+ }
94
+ finally { if (e_1) throw e_1.error; }
95
+ }
96
+ moves.push.apply(moves, __spreadArray([], __read(cards.moveItems({ type: LocationType_1.LocationType.PlayerDiscard, player: this.player })), false));
97
+ }
98
+ else {
99
+ moves.push(this.customMove(CustomMoveType_1.CustomMoveType.Pass));
100
+ }
101
+ return moves;
102
+ };
103
+ Object.defineProperty(PlaceCardsRule.prototype, "infiniteEffects", {
104
+ get: function () {
105
+ var _this = this;
106
+ var _a, _b;
107
+ var pendingRule = (_a = this.remind(Memory_1.Memory.PendingRule)) !== null && _a !== void 0 ? _a : this.game.rule;
108
+ if ((pendingRule === null || pendingRule === void 0 ? void 0 : pendingRule.id) !== RuleId_1.RuleId.PlaceCards || pendingRule.player !== this.player)
109
+ return [];
110
+ var pendingEffect = new TriggerEffectsRule_1.TriggerEffectsRule(this.game).getPlayerEffects(this.player, { type: Effect_1.TriggerEventType.Infinite });
111
+ var oncePerTurnUsed = (_b = this.remind(Memory_1.Memory.OncePerTurn)) !== null && _b !== void 0 ? _b : [];
112
+ return pendingEffect.filter(function (pendingEffect) {
113
+ var card = _this.material(MaterialType_1.MaterialType.EntityCard).getItem(pendingEffect.cardIndex);
114
+ var effect = (0, EntityDescription_1.getEffects)(card.id.front)[pendingEffect.effectIndex];
115
+ return !oncePerTurnUsed.includes(pendingEffect.cardIndex) && new effect.rule(_this.game).canPlayEffect(pendingEffect.cardIndex);
116
+ });
117
+ },
118
+ enumerable: false,
119
+ configurable: true
120
+ });
121
+ Object.defineProperty(PlaceCardsRule.prototype, "tokens", {
122
+ get: function () {
123
+ var _this = this;
124
+ return this.material(MaterialType_1.MaterialType.DraftToken)
125
+ .location(LocationType_1.LocationType.OnEntityCard)
126
+ .id(function (id) { return id.back === _this.player; });
127
+ },
128
+ enumerable: false,
129
+ configurable: true
130
+ });
131
+ PlaceCardsRule.prototype.afterItemMove = function (move) {
132
+ var moves = [];
133
+ if ((0, rules_api_1.isMoveItemType)(MaterialType_1.MaterialType.EntityCard)(move)) {
134
+ var token = this.tokens.parent(move.itemIndex);
135
+ if (token.length) {
136
+ moves.push(token.moveItem({ type: LocationType_1.LocationType.PlayerHand, player: this.player }));
137
+ var pantheon = new Pantheon_1.Pantheon(this.game, this.player);
138
+ if (move.location.type === LocationType_1.LocationType.PlayerDiscard) {
139
+ moves.push(pantheon.gainGems(2));
140
+ }
141
+ }
142
+ }
143
+ else if ((0, rules_api_1.isMoveItemType)(MaterialType_1.MaterialType.DraftToken)(move) && this.tokens.length === 0) {
144
+ moves.push(this.material(MaterialType_1.MaterialType.DraftToken).location(LocationType_1.LocationType.PlayerHand).player(this.player).shuffle());
145
+ }
146
+ return moves;
147
+ };
148
+ PlaceCardsRule.prototype.onCustomMove = function (move) {
149
+ if (move.type === CustomMoveType_1.CustomMoveType.Pass) {
150
+ return this.onPass();
151
+ }
152
+ else if (move.type === CustomMoveType_1.CustomMoveType.TrialSuccess) {
153
+ var reward = move.data.reward;
154
+ return [new Pantheon_1.Pantheon(this.game, this.player).gainFavor(reward)];
155
+ }
156
+ else if (move.type === CustomMoveType_1.CustomMoveType.TrialFailure) {
157
+ this.memorize(Memory_1.Memory.TrialFailure, true, this.player);
158
+ }
159
+ else if (move.type === CustomMoveType_1.CustomMoveType.PlayEffect) {
160
+ this.memorize(Memory_1.Memory.PendingRule, this.game.rule);
161
+ return new ResolveEffectsRule_1.ResolveEffectsRule(this.game).onCustomMove(move);
162
+ }
163
+ return [];
164
+ };
165
+ PlaceCardsRule.prototype.onPass = function () {
166
+ return __spreadArray(__spreadArray([], __read(new Trial_1.Trial(this.game).passTrials(this.player)), false), [this.nextRule], false);
167
+ };
168
+ Object.defineProperty(PlaceCardsRule.prototype, "nextRule", {
169
+ get: function () {
170
+ if (this.material(MaterialType_1.MaterialType.DraftToken).location(LocationType_1.LocationType.OnEntityCard).length > 0) {
171
+ return this.startPlayerTurn(RuleId_1.RuleId.PlaceCards, this.nextPlayer);
172
+ }
173
+ else if (this.round < 4) {
174
+ return this.startPlayerTurn(RuleId_1.RuleId.Upkeep, this.nextPlayer);
175
+ }
176
+ else {
177
+ return this.startPlayerTurn(RuleId_1.RuleId.EndGame, this.nextPlayer);
178
+ }
179
+ },
180
+ enumerable: false,
181
+ configurable: true
182
+ });
183
+ Object.defineProperty(PlaceCardsRule.prototype, "round", {
184
+ get: function () {
185
+ return this.material(MaterialType_1.MaterialType.RoundToken).getItem().location.id;
186
+ },
187
+ enumerable: false,
188
+ configurable: true
189
+ });
190
+ return PlaceCardsRule;
191
+ }(rules_api_1.PlayerTurnRule));
192
+ exports.PlaceCardsRule = PlaceCardsRule;
@@ -0,0 +1,13 @@
1
+ import { ItemMove, MaterialMove, SimultaneousRule } from '@gamepark/rules-api';
2
+ import { Mythology } from '../material/Mythology';
3
+ import { PlayerColor } from '../PlayerColor';
4
+ import { RuleId } from './RuleId';
5
+ export declare class PlaceTokenRule extends SimultaneousRule {
6
+ onRuleStart(): MaterialMove<number, number, number, number>[];
7
+ getActivePlayerLegalMoves(player: PlayerColor): import("@gamepark/rules-api").MoveItem<number, number, number>[];
8
+ getAvailableCards(player: PlayerColor): number[];
9
+ getTopDeckCreature(mythology: Mythology): number;
10
+ afterItemMove(move: ItemMove): import("@gamepark/rules-api").EndPlayerTurn<PlayerColor>[];
11
+ getMovesAfterPlayersDone(): import("@gamepark/rules-api").StartRule<RuleId.DrawDestinyCard>[] | (import("@gamepark/rules-api").MoveItem<number, number, number> | import("@gamepark/rules-api").StartPlayerTurn<number, RuleId.PlaceCards>)[];
12
+ onRuleEnd(): never[];
13
+ }