@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.
- package/dist/CustomMoveType.d.ts +14 -14
- package/dist/CustomMoveType.js +11 -14
- package/dist/Memory.d.ts +14 -14
- package/dist/Memory.js +15 -18
- package/dist/MythologiesOptions.d.ts +12 -12
- package/dist/MythologiesOptions.js +22 -25
- package/dist/MythologiesRules.d.ts +160 -158
- package/dist/MythologiesRules.js +220 -244
- package/dist/MythologiesSetup.d.ts +17 -17
- package/dist/MythologiesSetup.js +84 -161
- package/dist/PlayerColor.d.ts +10 -10
- package/dist/PlayerColor.js +7 -10
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -9
- package/dist/material/Destiny.d.ts +15 -15
- package/dist/material/Destiny.js +91 -130
- package/dist/material/Entity.d.ts +102 -102
- package/dist/material/Entity.js +92 -99
- package/dist/material/LocationType.d.ts +28 -28
- package/dist/material/LocationType.js +29 -33
- package/dist/material/MaterialType.d.ts +13 -13
- package/dist/material/MaterialType.js +14 -17
- package/dist/material/Mythology.d.ts +18 -18
- package/dist/material/Mythology.js +16 -19
- package/dist/material/Pantheon.d.ts +50 -50
- package/dist/material/Pantheon.js +303 -484
- package/dist/material/Trial.d.ts +22 -22
- package/dist/material/Trial.js +139 -183
- package/dist/material/entity/AutoEffectRule.d.ts +11 -11
- package/dist/material/entity/AutoEffectRule.js +16 -49
- package/dist/material/entity/Effect.d.ts +130 -106
- package/dist/material/entity/Effect.js +32 -46
- package/dist/material/entity/EntityDescription.d.ts +13 -13
- package/dist/material/entity/EntityDescription.js +165 -170
- package/dist/material/entity/MoveEffectRule.d.ts +18 -18
- package/dist/material/entity/MoveEffectRule.js +73 -129
- package/dist/material/entity/PlaceCardEffectRule.d.ts +17 -15
- package/dist/material/entity/PlaceCardEffectRule.js +58 -78
- package/dist/material/entity/PlayerEffectRule.d.ts +14 -14
- package/dist/material/entity/PlayerEffectRule.js +36 -63
- package/dist/material/entity/SacrificeEffectRule.d.ts +11 -11
- package/dist/material/entity/SacrificeEffectRule.js +40 -64
- package/dist/material/entity/SimultaneousEffectRule.d.ts +18 -18
- package/dist/material/entity/SimultaneousEffectRule.js +64 -149
- package/dist/material/entity/SimultaneousMoveEffectRule.d.ts +17 -17
- package/dist/material/entity/SimultaneousMoveEffectRule.js +64 -141
- package/dist/material/entity/SimultaneousSacrificeEffectRule.d.ts +10 -10
- package/dist/material/entity/SimultaneousSacrificeEffectRule.js +31 -55
- package/dist/material/entity/celtic/Banshee.d.ts +2 -2
- package/dist/material/entity/celtic/Banshee.js +23 -46
- package/dist/material/entity/celtic/Brigid.d.ts +2 -2
- package/dist/material/entity/celtic/Brigid.js +17 -40
- package/dist/material/entity/celtic/Cernunnos.d.ts +2 -2
- package/dist/material/entity/celtic/Cernunnos.js +19 -43
- package/dist/material/entity/celtic/Dagda.d.ts +2 -2
- package/dist/material/entity/celtic/Dagda.js +26 -50
- package/dist/material/entity/celtic/Dullahan.d.ts +2 -2
- package/dist/material/entity/celtic/Dullahan.js +9 -12
- package/dist/material/entity/celtic/Fairy.d.ts +2 -2
- package/dist/material/entity/celtic/Fairy.js +9 -12
- package/dist/material/entity/celtic/Kelpie.d.ts +2 -2
- package/dist/material/entity/celtic/Kelpie.js +16 -39
- package/dist/material/entity/celtic/Leprechaun.d.ts +2 -2
- package/dist/material/entity/celtic/Leprechaun.js +9 -12
- package/dist/material/entity/celtic/Morrigan.d.ts +2 -2
- package/dist/material/entity/celtic/Morrigan.js +8 -11
- package/dist/material/entity/celtic/Selkie.d.ts +2 -2
- package/dist/material/entity/celtic/Selkie.js +14 -17
- package/dist/material/entity/chinese/ChangE.d.ts +2 -2
- package/dist/material/entity/chinese/ChangE.js +6 -9
- package/dist/material/entity/chinese/Fenghuang.d.ts +2 -2
- package/dist/material/entity/chinese/Fenghuang.js +10 -15
- package/dist/material/entity/chinese/Jiangshi.d.ts +2 -2
- package/dist/material/entity/chinese/Jiangshi.js +9 -12
- package/dist/material/entity/chinese/Mogwai.d.ts +2 -2
- package/dist/material/entity/chinese/Mogwai.js +18 -44
- package/dist/material/entity/chinese/Nian.d.ts +2 -2
- package/dist/material/entity/chinese/Nian.js +19 -42
- package/dist/material/entity/chinese/Nuwa.d.ts +2 -2
- package/dist/material/entity/chinese/Nuwa.js +9 -12
- package/dist/material/entity/chinese/Qilin.d.ts +2 -2
- package/dist/material/entity/chinese/Qilin.js +9 -12
- package/dist/material/entity/chinese/SunWukong.d.ts +2 -2
- package/dist/material/entity/chinese/SunWukong.js +17 -43
- package/dist/material/entity/chinese/Tianlong.d.ts +2 -2
- package/dist/material/entity/chinese/Tianlong.js +9 -12
- package/dist/material/entity/chinese/YanluoWang.d.ts +2 -2
- package/dist/material/entity/chinese/YanluoWang.js +9 -12
- package/dist/material/entity/egyptian/Ammit.d.ts +2 -2
- package/dist/material/entity/egyptian/Ammit.js +9 -12
- package/dist/material/entity/egyptian/Anubis.d.ts +2 -2
- package/dist/material/entity/egyptian/Anubis.js +9 -12
- package/dist/material/entity/egyptian/Beetle.d.ts +2 -2
- package/dist/material/entity/egyptian/Beetle.js +20 -43
- package/dist/material/entity/egyptian/Bennu.d.ts +2 -2
- package/dist/material/entity/egyptian/Bennu.js +9 -12
- package/dist/material/entity/egyptian/Cobra.d.ts +2 -2
- package/dist/material/entity/egyptian/Cobra.js +9 -12
- package/dist/material/entity/egyptian/Isis.d.ts +2 -2
- package/dist/material/entity/egyptian/Isis.js +15 -41
- package/dist/material/entity/egyptian/Mummy.d.ts +2 -2
- package/dist/material/entity/egyptian/Mummy.js +17 -40
- package/dist/material/entity/egyptian/Osiris.d.ts +2 -2
- package/dist/material/entity/egyptian/Osiris.js +24 -72
- package/dist/material/entity/egyptian/Ra.d.ts +2 -2
- package/dist/material/entity/egyptian/Ra.js +9 -12
- package/dist/material/entity/egyptian/Sphinx.d.ts +2 -2
- package/dist/material/entity/egyptian/Sphinx.js +9 -12
- package/dist/material/entity/greek/Athena.d.ts +2 -2
- package/dist/material/entity/greek/Athena.js +9 -12
- package/dist/material/entity/greek/Centaur.d.ts +2 -2
- package/dist/material/entity/greek/Centaur.js +9 -12
- package/dist/material/entity/greek/Chimera.d.ts +2 -2
- package/dist/material/entity/greek/Chimera.js +9 -12
- package/dist/material/entity/greek/Cyclops.d.ts +2 -2
- package/dist/material/entity/greek/Cyclops.js +15 -19
- package/dist/material/entity/greek/Gorgon.d.ts +2 -2
- package/dist/material/entity/greek/Gorgon.js +9 -12
- package/dist/material/entity/greek/Griffin.d.ts +2 -2
- package/dist/material/entity/greek/Griffin.js +9 -12
- package/dist/material/entity/greek/Hades.d.ts +2 -2
- package/dist/material/entity/greek/Hades.js +9 -12
- package/dist/material/entity/greek/Minotaur.d.ts +2 -2
- package/dist/material/entity/greek/Minotaur.js +9 -12
- package/dist/material/entity/greek/Poseidon.d.ts +2 -2
- package/dist/material/entity/greek/Poseidon.js +20 -46
- package/dist/material/entity/greek/Zeus.d.ts +2 -2
- package/dist/material/entity/greek/Zeus.js +17 -40
- package/dist/material/entity/hindu/Asura.d.ts +2 -2
- package/dist/material/entity/hindu/Asura.js +19 -67
- package/dist/material/entity/hindu/Brahma.d.ts +2 -2
- package/dist/material/entity/hindu/Brahma.js +14 -37
- package/dist/material/entity/hindu/Ganesh.d.ts +2 -2
- package/dist/material/entity/hindu/Ganesh.js +18 -41
- package/dist/material/entity/hindu/Garuda.d.ts +2 -2
- package/dist/material/entity/hindu/Garuda.js +9 -12
- package/dist/material/entity/hindu/Kinnara.d.ts +2 -2
- package/dist/material/entity/hindu/Kinnara.js +9 -12
- package/dist/material/entity/hindu/Naga.d.ts +2 -2
- package/dist/material/entity/hindu/Naga.js +29 -75
- package/dist/material/entity/hindu/Rakshasa.d.ts +2 -2
- package/dist/material/entity/hindu/Rakshasa.js +9 -12
- package/dist/material/entity/hindu/Shiva.d.ts +2 -2
- package/dist/material/entity/hindu/Shiva.js +9 -12
- package/dist/material/entity/hindu/Vetala.d.ts +2 -2
- package/dist/material/entity/hindu/Vetala.js +9 -12
- package/dist/material/entity/hindu/Vishnu.d.ts +2 -2
- package/dist/material/entity/hindu/Vishnu.js +9 -68
- package/dist/material/entity/inca/Amaru.d.ts +2 -2
- package/dist/material/entity/inca/Amaru.js +15 -38
- package/dist/material/entity/inca/Caiman.d.ts +2 -2
- package/dist/material/entity/inca/Caiman.js +9 -12
- package/dist/material/entity/inca/Condor.d.ts +2 -2
- package/dist/material/entity/inca/Condor.js +9 -12
- package/dist/material/entity/inca/Illapa.d.ts +2 -2
- package/dist/material/entity/inca/Illapa.js +9 -12
- package/dist/material/entity/inca/Inti.d.ts +2 -2
- package/dist/material/entity/inca/Inti.js +16 -39
- package/dist/material/entity/inca/MamaQucha.d.ts +2 -2
- package/dist/material/entity/inca/MamaQucha.js +20 -43
- package/dist/material/entity/inca/Puma.d.ts +2 -2
- package/dist/material/entity/inca/Puma.js +14 -40
- package/dist/material/entity/inca/Supay.d.ts +2 -2
- package/dist/material/entity/inca/Supay.js +9 -12
- package/dist/material/entity/inca/Ukuku.d.ts +2 -2
- package/dist/material/entity/inca/Ukuku.js +14 -18
- package/dist/material/entity/inca/Viracocha.d.ts +2 -2
- package/dist/material/entity/inca/Viracocha.js +9 -12
- package/dist/material/entity/norse/Alf.d.ts +2 -2
- package/dist/material/entity/norse/Alf.js +9 -12
- package/dist/material/entity/norse/Draugr.d.ts +2 -2
- package/dist/material/entity/norse/Draugr.js +9 -12
- package/dist/material/entity/norse/Fenrir.d.ts +2 -2
- package/dist/material/entity/norse/Fenrir.js +9 -12
- package/dist/material/entity/norse/Freya.d.ts +2 -2
- package/dist/material/entity/norse/Freya.js +17 -40
- package/dist/material/entity/norse/Jotunn.d.ts +2 -2
- package/dist/material/entity/norse/Jotunn.js +15 -38
- package/dist/material/entity/norse/Loki.d.ts +2 -2
- package/dist/material/entity/norse/Loki.js +14 -37
- package/dist/material/entity/norse/Odin.d.ts +2 -2
- package/dist/material/entity/norse/Odin.js +3 -6
- package/dist/material/entity/norse/Thor.d.ts +2 -2
- package/dist/material/entity/norse/Thor.js +9 -12
- package/dist/material/entity/norse/Troll.d.ts +2 -2
- package/dist/material/entity/norse/Troll.js +6 -9
- package/dist/material/entity/norse/Valkyrie.d.ts +2 -2
- package/dist/material/entity/norse/Valkyrie.js +27 -73
- package/dist/material/entity/zulu/Idlozi.d.ts +2 -2
- package/dist/material/entity/zulu/Idlozi.js +9 -12
- package/dist/material/entity/zulu/Impundulu.d.ts +2 -2
- package/dist/material/entity/zulu/Impundulu.js +9 -12
- package/dist/material/entity/zulu/Inkanyamba.d.ts +2 -2
- package/dist/material/entity/zulu/Inkanyamba.js +16 -42
- package/dist/material/entity/zulu/Inkosazana.d.ts +2 -2
- package/dist/material/entity/zulu/Inkosazana.js +9 -12
- package/dist/material/entity/zulu/Shembe.d.ts +2 -2
- package/dist/material/entity/zulu/Shembe.js +19 -44
- package/dist/material/entity/zulu/Tokoloshe.d.ts +2 -2
- package/dist/material/entity/zulu/Tokoloshe.js +24 -47
- package/dist/material/entity/zulu/Umvelinqangi.d.ts +2 -2
- package/dist/material/entity/zulu/Umvelinqangi.js +22 -45
- package/dist/material/entity/zulu/Unkulunkulu.d.ts +2 -2
- package/dist/material/entity/zulu/Unkulunkulu.js +20 -43
- package/dist/material/entity/zulu/Unwabu.d.ts +2 -2
- package/dist/material/entity/zulu/Unwabu.js +25 -49
- package/dist/material/entity/zulu/Werehyena.d.ts +2 -2
- package/dist/material/entity/zulu/Werehyena.js +9 -12
- package/dist/rules/ChooseDraftTokenRule.d.ts +15 -15
- package/dist/rules/ChooseDraftTokenRule.js +54 -103
- package/dist/rules/DrawDestinyCardRule.d.ts +7 -7
- package/dist/rules/DrawDestinyCardRule.js +44 -115
- package/dist/rules/EndGameRule.d.ts +5 -5
- package/dist/rules/EndGameRule.js +34 -105
- package/dist/rules/PlaceCardsRule.d.ts +14 -14
- package/dist/rules/PlaceCardsRule.js +107 -206
- package/dist/rules/PlaceTokenRule.d.ts +12 -12
- package/dist/rules/PlaceTokenRule.js +75 -151
- package/dist/rules/RuleId.d.ts +66 -65
- package/dist/rules/RuleId.js +67 -69
- package/dist/rules/UpkeepRule.d.ts +9 -9
- package/dist/rules/UpkeepRule.js +56 -154
- package/dist/rules/effects/AlfEffectRule.d.ts +10 -10
- package/dist/rules/effects/AlfEffectRule.js +33 -59
- package/dist/rules/effects/AmmitEffectRule.d.ts +6 -6
- package/dist/rules/effects/AmmitEffectRule.js +15 -40
- package/dist/rules/effects/AnubisEffectRule.d.ts +9 -9
- package/dist/rules/effects/AnubisEffectRule.js +14 -49
- package/dist/rules/effects/AthenaEffectRule.d.ts +10 -10
- package/dist/rules/effects/AthenaEffectRule.js +48 -150
- package/dist/rules/effects/BennuEffectRule.d.ts +6 -6
- package/dist/rules/effects/BennuEffectRule.js +10 -35
- package/dist/rules/effects/CaimanEffectRule.d.ts +7 -7
- package/dist/rules/effects/CaimanEffectRule.js +23 -72
- package/dist/rules/effects/CentaurEffectRule.d.ts +15 -15
- package/dist/rules/effects/CentaurEffectRule.js +33 -95
- package/dist/rules/effects/ChimeraEffectRule.d.ts +8 -8
- package/dist/rules/effects/ChimeraEffectRule.js +15 -40
- package/dist/rules/effects/CobraEffectRule.d.ts +13 -13
- package/dist/rules/effects/CobraEffectRule.js +30 -61
- package/dist/rules/effects/CondorEffectRule.d.ts +8 -8
- package/dist/rules/effects/CondorEffectRule.js +20 -45
- package/dist/rules/effects/CyclopsEffectRule.d.ts +11 -11
- package/dist/rules/effects/CyclopsEffectRule.js +50 -106
- package/dist/rules/effects/DraugrEffectRule.d.ts +11 -11
- package/dist/rules/effects/DraugrEffectRule.js +32 -58
- package/dist/rules/effects/DullahanEffectRule.d.ts +11 -11
- package/dist/rules/effects/DullahanEffectRule.js +48 -73
- package/dist/rules/effects/FairyEffectRule.d.ts +10 -10
- package/dist/rules/effects/FairyEffectRule.js +33 -55
- package/dist/rules/effects/FenghuangEffectRule.d.ts +8 -8
- package/dist/rules/effects/FenghuangEffectRule.js +18 -48
- package/dist/rules/effects/FenrirEffectRule.d.ts +16 -16
- package/dist/rules/effects/FenrirEffectRule.js +85 -139
- package/dist/rules/effects/GarudaEffectRule.d.ts +16 -16
- package/dist/rules/effects/GarudaEffectRule.js +55 -113
- package/dist/rules/effects/GorgonEffectRule.d.ts +7 -7
- package/dist/rules/effects/GorgonEffectRule.js +15 -40
- package/dist/rules/effects/GriffinEffectRule.d.ts +9 -9
- package/dist/rules/effects/GriffinEffectRule.js +16 -41
- package/dist/rules/effects/HadesEffectRule.d.ts +9 -9
- package/dist/rules/effects/HadesEffectRule.js +14 -39
- package/dist/rules/effects/IdloziEffectRule.d.ts +9 -9
- package/dist/rules/effects/IdloziEffectRule.js +21 -46
- package/dist/rules/effects/IllapaEffectRule.d.ts +16 -16
- package/dist/rules/effects/IllapaEffectRule.js +43 -76
- package/dist/rules/effects/ImpunduluEffectRule.d.ts +10 -10
- package/dist/rules/effects/ImpunduluEffectRule.js +39 -77
- package/dist/rules/effects/InkosazanaEffectRule.d.ts +7 -7
- package/dist/rules/effects/InkosazanaEffectRule.js +11 -46
- package/dist/rules/effects/JiangshiEffectRule.d.ts +8 -8
- package/dist/rules/effects/JiangshiEffectRule.js +25 -51
- package/dist/rules/effects/KinnaraEffectRule.d.ts +13 -13
- package/dist/rules/effects/KinnaraEffectRule.js +42 -95
- package/dist/rules/effects/LeprechaunEffectRule.d.ts +9 -9
- package/dist/rules/effects/LeprechaunEffectRule.js +23 -49
- package/dist/rules/effects/MinotaurEffectRule.d.ts +11 -11
- package/dist/rules/effects/MinotaurEffectRule.js +23 -49
- package/dist/rules/effects/MultipleSimultaneousMoveEffectRule.d.ts +15 -14
- package/dist/rules/effects/MultipleSimultaneousMoveEffectRule.js +96 -144
- package/dist/rules/effects/NuwaEffectRule.d.ts +14 -14
- package/dist/rules/effects/NuwaEffectRule.js +57 -106
- package/dist/rules/effects/OdinEffectRule.d.ts +11 -11
- package/dist/rules/effects/OdinEffectRule.js +27 -52
- package/dist/rules/effects/PermanentEffectsRule.d.ts +7 -7
- package/dist/rules/effects/PermanentEffectsRule.js +21 -54
- package/dist/rules/effects/QilinEffectRule.d.ts +8 -8
- package/dist/rules/effects/QilinEffectRule.js +40 -115
- package/dist/rules/effects/RaEffectRule.d.ts +9 -9
- package/dist/rules/effects/RaEffectRule.js +14 -39
- package/dist/rules/effects/RakshasaEffectRule.d.ts +13 -13
- package/dist/rules/effects/RakshasaEffectRule.js +23 -48
- package/dist/rules/effects/ResolveEffectsRule.d.ts +15 -12
- package/dist/rules/effects/ResolveEffectsRule.js +154 -141
- package/dist/rules/effects/SelkieEffectRule.d.ts +8 -8
- package/dist/rules/effects/SelkieEffectRule.js +19 -44
- package/dist/rules/effects/ShivaEffectRule.d.ts +10 -10
- package/dist/rules/effects/ShivaEffectRule.js +35 -61
- package/dist/rules/effects/SphinxEffectRule.d.ts +10 -10
- package/dist/rules/effects/SphinxEffectRule.js +33 -58
- package/dist/rules/effects/SupayEffectRule.d.ts +20 -20
- package/dist/rules/effects/SupayEffectRule.js +44 -81
- package/dist/rules/effects/ThorEffectRule.d.ts +11 -11
- package/dist/rules/effects/ThorEffectRule.js +32 -58
- package/dist/rules/effects/TianlongEffectRule.d.ts +17 -17
- package/dist/rules/effects/TianlongEffectRule.js +47 -105
- package/dist/rules/effects/TriggerEffectsRule.d.ts +12 -11
- package/dist/rules/effects/TriggerEffectsRule.js +67 -183
- package/dist/rules/effects/UkukuEffectRule.d.ts +14 -14
- package/dist/rules/effects/UkukuEffectRule.js +35 -66
- package/dist/rules/effects/VetalaEffectRule.d.ts +12 -12
- package/dist/rules/effects/VetalaEffectRule.js +37 -62
- package/dist/rules/effects/ViracochaEffectRule.d.ts +7 -7
- package/dist/rules/effects/ViracochaEffectRule.js +15 -40
- package/dist/rules/effects/VishnuEffectRule.d.ts +10 -0
- package/dist/rules/effects/VishnuEffectRule.js +44 -0
- package/dist/rules/effects/WerehyenaEffectRule.d.ts +8 -8
- package/dist/rules/effects/WerehyenaEffectRule.js +37 -98
- package/dist/rules/effects/YanluoWangEffectRule.d.ts +9 -9
- package/dist/rules/effects/YanluoWangEffectRule.js +46 -104
- package/package.json +7 -8
package/dist/MythologiesSetup.js
CHANGED
|
@@ -1,161 +1,84 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
this_1.material(MaterialType_1.MaterialType.EntityCard).createItems((0, lodash_1.shuffle)(Array(3).fill((0, lodash_1.range)(5, 11)).flat()).map(function (creature) { return ({
|
|
86
|
-
id: { front: mythology * 10 + creature, back: { mythology: mythology, entityType: Entity_1.EntityType.Creature } },
|
|
87
|
-
location: {
|
|
88
|
-
type: LocationType_1.LocationType.CreaturesDeck,
|
|
89
|
-
id: mythology
|
|
90
|
-
}
|
|
91
|
-
}); }));
|
|
92
|
-
};
|
|
93
|
-
var this_1 = this;
|
|
94
|
-
try {
|
|
95
|
-
for (var mythologies_1 = __values(mythologies), mythologies_1_1 = mythologies_1.next(); !mythologies_1_1.done; mythologies_1_1 = mythologies_1.next()) {
|
|
96
|
-
var mythology = mythologies_1_1.value;
|
|
97
|
-
_loop_1(mythology);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
101
|
-
finally {
|
|
102
|
-
try {
|
|
103
|
-
if (mythologies_1_1 && !mythologies_1_1.done && (_a = mythologies_1.return)) _a.call(mythologies_1);
|
|
104
|
-
}
|
|
105
|
-
finally { if (e_1) throw e_1.error; }
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
MythologiesSetup.prototype.setupPlayers = function () {
|
|
109
|
-
var e_2, _a;
|
|
110
|
-
var _loop_2 = function (player) {
|
|
111
|
-
this_2.material(MaterialType_1.MaterialType.DraftToken).createItems((0, lodash_1.shuffle)([true, true, false]).map(function (front) { return ({
|
|
112
|
-
id: { front: front, back: player },
|
|
113
|
-
location: { type: LocationType_1.LocationType.PlayerHand, player: player }
|
|
114
|
-
}); }));
|
|
115
|
-
this_2.material(MaterialType_1.MaterialType.GemToken).createItems((0, lodash_1.range)(0, 3).map(function (y) { return ({ location: { type: LocationType_1.LocationType.PantheonLineBonus, player: player, y: y } }); }));
|
|
116
|
-
this_2.material(MaterialType_1.MaterialType.FavorToken).createItems((0, lodash_1.range)(0, 3).map(function (x) { return ({ location: { type: LocationType_1.LocationType.PantheonColumnBonus, player: player, x: x } }); }));
|
|
117
|
-
};
|
|
118
|
-
var this_2 = this;
|
|
119
|
-
try {
|
|
120
|
-
for (var _b = __values(this.players), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
121
|
-
var player = _c.value;
|
|
122
|
-
_loop_2(player);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
126
|
-
finally {
|
|
127
|
-
try {
|
|
128
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
129
|
-
}
|
|
130
|
-
finally { if (e_2) throw e_2.error; }
|
|
131
|
-
}
|
|
132
|
-
this.material(MaterialType_1.MaterialType.FirstPlayerToken).createItem({ location: { type: LocationType_1.LocationType.FirstPlayerTokenSpot, player: this.players[0] } });
|
|
133
|
-
};
|
|
134
|
-
MythologiesSetup.prototype.dealCreatures = function () {
|
|
135
|
-
var e_3, _a;
|
|
136
|
-
var mythologyBoards = this.material(MaterialType_1.MaterialType.MythologyBoard);
|
|
137
|
-
try {
|
|
138
|
-
for (var _b = __values(mythologyBoards.getIndexes()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
139
|
-
var index = _c.value;
|
|
140
|
-
var mythology = mythologyBoards.getItem(index).id.mythology;
|
|
141
|
-
var deck = this.material(MaterialType_1.MaterialType.EntityCard).location(LocationType_1.LocationType.CreaturesDeck).locationId(mythology).deck();
|
|
142
|
-
deck.deal({ type: LocationType_1.LocationType.SanctuaryCreatureSpot, parent: index }, 3);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
146
|
-
finally {
|
|
147
|
-
try {
|
|
148
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
149
|
-
}
|
|
150
|
-
finally { if (e_3) throw e_3.error; }
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
MythologiesSetup.prototype.createDestinyCards = function () {
|
|
154
|
-
this.material(MaterialType_1.MaterialType.DestinyCard).createItems((0, lodash_1.shuffle)((0, lodash_1.range)(1, 5)).map(function (id) { return ({ id: id, location: { type: LocationType_1.LocationType.DestinyDeck } }); }));
|
|
155
|
-
};
|
|
156
|
-
MythologiesSetup.prototype.start = function () {
|
|
157
|
-
this.startRule(RuleId_1.RuleId.DrawDestinyCard);
|
|
158
|
-
};
|
|
159
|
-
return MythologiesSetup;
|
|
160
|
-
}(rules_api_1.MaterialGameSetup));
|
|
161
|
-
exports.MythologiesSetup = MythologiesSetup;
|
|
1
|
+
import { getEnumValues, MaterialGameSetup } from '@gamepark/rules-api';
|
|
2
|
+
import { difference, range, sampleSize, shuffle } from 'es-toolkit';
|
|
3
|
+
import { EntityType } from './material/Entity';
|
|
4
|
+
import { LocationType } from './material/LocationType';
|
|
5
|
+
import { MaterialType } from './material/MaterialType';
|
|
6
|
+
import { Mythology } from './material/Mythology';
|
|
7
|
+
import { Memory } from './Memory';
|
|
8
|
+
import { MythologiesRules } from './MythologiesRules';
|
|
9
|
+
import { RuleId } from './rules/RuleId';
|
|
10
|
+
export class MythologiesSetup extends MaterialGameSetup {
|
|
11
|
+
Rules = MythologiesRules;
|
|
12
|
+
setupMaterial(options) {
|
|
13
|
+
this.memorize(Memory.PendingEffects, []);
|
|
14
|
+
this.setupMythologies(this.getMythologies(options));
|
|
15
|
+
this.setupPlayers();
|
|
16
|
+
this.dealCreatures();
|
|
17
|
+
this.material(MaterialType.RoundToken).createItem({ location: { type: LocationType.RoundSpace, id: 1 } });
|
|
18
|
+
this.createDestinyCards();
|
|
19
|
+
}
|
|
20
|
+
getMythologies(options) {
|
|
21
|
+
const array = Array.isArray(options.mythologies) ? options.mythologies : [];
|
|
22
|
+
const mythologies = array.filter((item) => typeof item === 'number' && Mythology[item]);
|
|
23
|
+
if (mythologies.length === 4) {
|
|
24
|
+
return mythologies;
|
|
25
|
+
}
|
|
26
|
+
else if (mythologies.length < 4) {
|
|
27
|
+
return mythologies.concat(sampleSize(difference(getEnumValues(Mythology), mythologies), 4 - mythologies.length));
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
return sampleSize(mythologies, 4);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
setupMythologies(mythologies) {
|
|
34
|
+
this.material(MaterialType.MythologyBoard).createItems(shuffle(mythologies).map((mythology, index) => ({
|
|
35
|
+
id: { mythology, side: index % 2 },
|
|
36
|
+
location: {
|
|
37
|
+
type: LocationType.Sanctuary,
|
|
38
|
+
x: index % 2,
|
|
39
|
+
y: Math.floor(index / 2)
|
|
40
|
+
}
|
|
41
|
+
})));
|
|
42
|
+
for (const mythology of mythologies) {
|
|
43
|
+
this.material(MaterialType.EntityCard).createItems(shuffle(range(1, 5)).map((god) => ({
|
|
44
|
+
id: { front: mythology * 10 + god, back: { mythology, entityType: EntityType.Divinity } },
|
|
45
|
+
location: {
|
|
46
|
+
type: LocationType.GodsDeck,
|
|
47
|
+
id: mythology
|
|
48
|
+
}
|
|
49
|
+
})));
|
|
50
|
+
this.material(MaterialType.EntityCard).createItems(shuffle(Array(3).fill(range(5, 11)).flat()).map((creature) => ({
|
|
51
|
+
id: { front: mythology * 10 + creature, back: { mythology, entityType: EntityType.Creature } },
|
|
52
|
+
location: {
|
|
53
|
+
type: LocationType.CreaturesDeck,
|
|
54
|
+
id: mythology
|
|
55
|
+
}
|
|
56
|
+
})));
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
setupPlayers() {
|
|
60
|
+
for (const player of this.players) {
|
|
61
|
+
this.material(MaterialType.DraftToken).createItems(shuffle([true, true, false]).map((front) => ({
|
|
62
|
+
id: { front, back: player },
|
|
63
|
+
location: { type: LocationType.PlayerHand, player }
|
|
64
|
+
})));
|
|
65
|
+
this.material(MaterialType.GemToken).createItems(range(0, 3).map((y) => ({ location: { type: LocationType.PantheonLineBonus, player, y } })));
|
|
66
|
+
this.material(MaterialType.FavorToken).createItems(range(0, 3).map((x) => ({ location: { type: LocationType.PantheonColumnBonus, player, x } })));
|
|
67
|
+
}
|
|
68
|
+
this.material(MaterialType.FirstPlayerToken).createItem({ location: { type: LocationType.FirstPlayerTokenSpot, player: this.players[0] } });
|
|
69
|
+
}
|
|
70
|
+
dealCreatures() {
|
|
71
|
+
const mythologyBoards = this.material(MaterialType.MythologyBoard);
|
|
72
|
+
for (const index of mythologyBoards.getIndexes()) {
|
|
73
|
+
const mythology = mythologyBoards.getItem(index).id.mythology;
|
|
74
|
+
const deck = this.material(MaterialType.EntityCard).location(LocationType.CreaturesDeck).locationId(mythology).deck();
|
|
75
|
+
deck.deal({ type: LocationType.SanctuaryCreatureSpot, parent: index }, 3);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
createDestinyCards() {
|
|
79
|
+
this.material(MaterialType.DestinyCard).createItems(shuffle(range(1, 5)).map((id) => ({ id, location: { type: LocationType.DestinyDeck } })));
|
|
80
|
+
}
|
|
81
|
+
start() {
|
|
82
|
+
this.startRule(RuleId.DrawDestinyCard);
|
|
83
|
+
}
|
|
84
|
+
}
|
package/dist/PlayerColor.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export declare enum PlayerColor {
|
|
2
|
-
Green = 1,
|
|
3
|
-
Red = 2,
|
|
4
|
-
Blue = 3,
|
|
5
|
-
Grey = 4
|
|
6
|
-
}
|
|
7
|
-
export type DraftTokenId = {
|
|
8
|
-
front?: boolean;
|
|
9
|
-
back: PlayerColor;
|
|
10
|
-
};
|
|
1
|
+
export declare enum PlayerColor {
|
|
2
|
+
Green = 1,
|
|
3
|
+
Red = 2,
|
|
4
|
+
Blue = 3,
|
|
5
|
+
Grey = 4
|
|
6
|
+
}
|
|
7
|
+
export type DraftTokenId = {
|
|
8
|
+
front?: boolean;
|
|
9
|
+
back: PlayerColor;
|
|
10
|
+
};
|
package/dist/PlayerColor.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
PlayerColor[PlayerColor["
|
|
7
|
-
|
|
8
|
-
PlayerColor[PlayerColor["Blue"] = 3] = "Blue";
|
|
9
|
-
PlayerColor[PlayerColor["Grey"] = 4] = "Grey";
|
|
10
|
-
})(PlayerColor = exports.PlayerColor || (exports.PlayerColor = {}));
|
|
1
|
+
export var PlayerColor;
|
|
2
|
+
(function (PlayerColor) {
|
|
3
|
+
PlayerColor[PlayerColor["Green"] = 1] = "Green";
|
|
4
|
+
PlayerColor[PlayerColor["Red"] = 2] = "Red";
|
|
5
|
+
PlayerColor[PlayerColor["Blue"] = 3] = "Blue";
|
|
6
|
+
PlayerColor[PlayerColor["Grey"] = 4] = "Grey";
|
|
7
|
+
})(PlayerColor || (PlayerColor = {}));
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { MythologiesRules } from './MythologiesRules';
|
|
2
|
-
export { MythologiesOptionsSpec } from './MythologiesOptions';
|
|
3
|
-
export { MythologiesSetup } from './MythologiesSetup';
|
|
1
|
+
export { MythologiesRules } from './MythologiesRules';
|
|
2
|
+
export { MythologiesOptionsSpec } from './MythologiesOptions';
|
|
3
|
+
export { MythologiesSetup } from './MythologiesSetup';
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var MythologiesRules_1 = require("./MythologiesRules");
|
|
5
|
-
Object.defineProperty(exports, "MythologiesRules", { enumerable: true, get: function () { return MythologiesRules_1.MythologiesRules; } });
|
|
6
|
-
var MythologiesOptions_1 = require("./MythologiesOptions");
|
|
7
|
-
Object.defineProperty(exports, "MythologiesOptionsSpec", { enumerable: true, get: function () { return MythologiesOptions_1.MythologiesOptionsSpec; } });
|
|
8
|
-
var MythologiesSetup_1 = require("./MythologiesSetup");
|
|
9
|
-
Object.defineProperty(exports, "MythologiesSetup", { enumerable: true, get: function () { return MythologiesSetup_1.MythologiesSetup; } });
|
|
1
|
+
export { MythologiesRules } from './MythologiesRules';
|
|
2
|
+
export { MythologiesOptionsSpec } from './MythologiesOptions';
|
|
3
|
+
export { MythologiesSetup } from './MythologiesSetup';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { MaterialRulesPart } from '@gamepark/rules-api';
|
|
2
|
-
import { PlayerColor } from '../PlayerColor';
|
|
3
|
-
import { Mythology } from './Mythology';
|
|
4
|
-
export declare class Destiny extends MaterialRulesPart {
|
|
5
|
-
get mythologies(): Mythology[];
|
|
6
|
-
getMythologyBoard(player: PlayerColor): import("@gamepark/rules-api").Material<number, number, number>;
|
|
7
|
-
getMythology(player: PlayerColor): Mythology;
|
|
8
|
-
getDestinyMap(destiny: number): PlayerColor[][];
|
|
9
|
-
get cardsWithoutToken(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
10
|
-
getAvailableCards(player: PlayerColor): import("@gamepark/rules-api").Material<number, number, number>;
|
|
11
|
-
getAvailableCardsOnBoard(player: PlayerColor): import("@gamepark/rules-api").Material<number, number, number>;
|
|
12
|
-
getTopDeckCreature(mythology: Mythology): import("@gamepark/rules-api").MaterialDeck<number, number, number>;
|
|
13
|
-
getBoardsWithoutPlayer(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
14
|
-
get creaturesOnTopOfDecks(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
15
|
-
}
|
|
1
|
+
import { MaterialRulesPart } from '@gamepark/rules-api';
|
|
2
|
+
import { PlayerColor } from '../PlayerColor';
|
|
3
|
+
import { Mythology } from './Mythology';
|
|
4
|
+
export declare class Destiny extends MaterialRulesPart {
|
|
5
|
+
get mythologies(): Mythology[];
|
|
6
|
+
getMythologyBoard(player: PlayerColor): import("@gamepark/rules-api").Material<number, number, number>;
|
|
7
|
+
getMythology(player: PlayerColor): Mythology;
|
|
8
|
+
getDestinyMap(destiny: number): PlayerColor[][];
|
|
9
|
+
get cardsWithoutToken(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
10
|
+
getAvailableCards(player: PlayerColor): import("@gamepark/rules-api").Material<number, number, number>;
|
|
11
|
+
getAvailableCardsOnBoard(player: PlayerColor): import("@gamepark/rules-api").Material<number, number, number>;
|
|
12
|
+
getTopDeckCreature(mythology: Mythology): import("@gamepark/rules-api").MaterialDeck<number, number, number>;
|
|
13
|
+
getBoardsWithoutPlayer(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
14
|
+
get creaturesOnTopOfDecks(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
15
|
+
}
|
package/dist/material/Destiny.js
CHANGED
|
@@ -1,130 +1,91 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
var indexes = entities.getIndexes().concat(topDeckCreature.getIndex());
|
|
93
|
-
return this.material(MaterialType_1.MaterialType.EntityCard).index(indexes);
|
|
94
|
-
};
|
|
95
|
-
Destiny.prototype.getAvailableCardsOnBoard = function (player) {
|
|
96
|
-
var boardCards = this.cardsWithoutToken.location(function (l) { return l.type === LocationType_1.LocationType.SanctuaryGodSpot || l.type === LocationType_1.LocationType.SanctuaryCreatureSpot; });
|
|
97
|
-
return boardCards.parent(this.getMythologyBoard(player).getIndex());
|
|
98
|
-
};
|
|
99
|
-
Destiny.prototype.getTopDeckCreature = function (mythology) {
|
|
100
|
-
return this.material(MaterialType_1.MaterialType.EntityCard).location(LocationType_1.LocationType.CreaturesDeck).locationId(mythology).deck();
|
|
101
|
-
};
|
|
102
|
-
Destiny.prototype.getBoardsWithoutPlayer = function () {
|
|
103
|
-
var _this = this;
|
|
104
|
-
var destiny = this.material(MaterialType_1.MaterialType.DestinyCard)
|
|
105
|
-
.location(LocationType_1.LocationType.CurrentDestiny)
|
|
106
|
-
.maxBy(function (item) { return item.location.x; })
|
|
107
|
-
.getItem().id;
|
|
108
|
-
var map = this.getDestinyMap(destiny);
|
|
109
|
-
return this.material(MaterialType_1.MaterialType.MythologyBoard).location(function (l) { return !_this.game.players.includes(map[l.y][l.x]); });
|
|
110
|
-
};
|
|
111
|
-
Object.defineProperty(Destiny.prototype, "creaturesOnTopOfDecks", {
|
|
112
|
-
get: function () {
|
|
113
|
-
var mythologies = this.material(MaterialType_1.MaterialType.MythologyBoard)
|
|
114
|
-
.getItems()
|
|
115
|
-
.map(function (item) { return item.id.mythology; });
|
|
116
|
-
var creaturesInDecks = this.material(MaterialType_1.MaterialType.EntityCard).location(LocationType_1.LocationType.CreaturesDeck);
|
|
117
|
-
var creaturesIndexes = mythologies.map(function (mythology) {
|
|
118
|
-
return creaturesInDecks
|
|
119
|
-
.locationId(mythology)
|
|
120
|
-
.maxBy(function (item) { return item.location.x; })
|
|
121
|
-
.getIndex();
|
|
122
|
-
});
|
|
123
|
-
return this.material(MaterialType_1.MaterialType.EntityCard).index(creaturesIndexes);
|
|
124
|
-
},
|
|
125
|
-
enumerable: false,
|
|
126
|
-
configurable: true
|
|
127
|
-
});
|
|
128
|
-
return Destiny;
|
|
129
|
-
}(rules_api_1.MaterialRulesPart));
|
|
130
|
-
exports.Destiny = Destiny;
|
|
1
|
+
import { MaterialRulesPart } from '@gamepark/rules-api';
|
|
2
|
+
import { PlayerColor } from '../PlayerColor';
|
|
3
|
+
import { isCreature } from './Entity';
|
|
4
|
+
import { LocationType } from './LocationType';
|
|
5
|
+
import { MaterialType } from './MaterialType';
|
|
6
|
+
export class Destiny extends MaterialRulesPart {
|
|
7
|
+
get mythologies() {
|
|
8
|
+
return this.material(MaterialType.MythologyBoard)
|
|
9
|
+
.getItems()
|
|
10
|
+
.map((item) => item.id.mythology);
|
|
11
|
+
}
|
|
12
|
+
getMythologyBoard(player) {
|
|
13
|
+
const destiny = this.material(MaterialType.DestinyCard)
|
|
14
|
+
.location(LocationType.CurrentDestiny)
|
|
15
|
+
.maxBy((item) => item.location.x)
|
|
16
|
+
.getItem().id;
|
|
17
|
+
const map = this.getDestinyMap(destiny);
|
|
18
|
+
const y = map.findIndex((line) => line.includes(player));
|
|
19
|
+
const x = map[y].indexOf(player);
|
|
20
|
+
return this.material(MaterialType.MythologyBoard).location((location) => location.x === x && location.y === y);
|
|
21
|
+
}
|
|
22
|
+
getMythology(player) {
|
|
23
|
+
return this.getMythologyBoard(player).getItem().id.mythology;
|
|
24
|
+
}
|
|
25
|
+
getDestinyMap(destiny) {
|
|
26
|
+
switch (destiny) {
|
|
27
|
+
case 1:
|
|
28
|
+
return [
|
|
29
|
+
[PlayerColor.Blue, PlayerColor.Green],
|
|
30
|
+
[PlayerColor.Grey, PlayerColor.Red]
|
|
31
|
+
];
|
|
32
|
+
case 2:
|
|
33
|
+
return [
|
|
34
|
+
[PlayerColor.Red, PlayerColor.Blue],
|
|
35
|
+
[PlayerColor.Green, PlayerColor.Grey]
|
|
36
|
+
];
|
|
37
|
+
case 3:
|
|
38
|
+
return [
|
|
39
|
+
[PlayerColor.Green, PlayerColor.Grey],
|
|
40
|
+
[PlayerColor.Red, PlayerColor.Blue]
|
|
41
|
+
];
|
|
42
|
+
case 4:
|
|
43
|
+
return [
|
|
44
|
+
[PlayerColor.Grey, PlayerColor.Red],
|
|
45
|
+
[PlayerColor.Blue, PlayerColor.Green]
|
|
46
|
+
];
|
|
47
|
+
default:
|
|
48
|
+
throw new Error(`Unknown destiny card: ${destiny}`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
get cardsWithoutToken() {
|
|
52
|
+
const tokensOnCards = this.material(MaterialType.DraftToken).location(LocationType.OnEntityCard).getItems();
|
|
53
|
+
const cardsWithToken = tokensOnCards.map((item) => item.location.parent);
|
|
54
|
+
return this.material(MaterialType.EntityCard).index((index) => !cardsWithToken.includes(index));
|
|
55
|
+
}
|
|
56
|
+
getAvailableCards(player) {
|
|
57
|
+
const entities = this.getAvailableCardsOnBoard(player);
|
|
58
|
+
if (entities.getItems().some((item) => isCreature(item.id.front))) {
|
|
59
|
+
return entities;
|
|
60
|
+
}
|
|
61
|
+
const topDeckCreature = this.getTopDeckCreature(this.getMythology(player));
|
|
62
|
+
const indexes = entities.getIndexes().concat(topDeckCreature.getIndex());
|
|
63
|
+
return this.material(MaterialType.EntityCard).index(indexes);
|
|
64
|
+
}
|
|
65
|
+
getAvailableCardsOnBoard(player) {
|
|
66
|
+
const boardCards = this.cardsWithoutToken.location((l) => l.type === LocationType.SanctuaryGodSpot || l.type === LocationType.SanctuaryCreatureSpot);
|
|
67
|
+
return boardCards.parent(this.getMythologyBoard(player).getIndex());
|
|
68
|
+
}
|
|
69
|
+
getTopDeckCreature(mythology) {
|
|
70
|
+
return this.material(MaterialType.EntityCard).location(LocationType.CreaturesDeck).locationId(mythology).deck();
|
|
71
|
+
}
|
|
72
|
+
getBoardsWithoutPlayer() {
|
|
73
|
+
const destiny = this.material(MaterialType.DestinyCard)
|
|
74
|
+
.location(LocationType.CurrentDestiny)
|
|
75
|
+
.maxBy((item) => item.location.x)
|
|
76
|
+
.getItem().id;
|
|
77
|
+
const map = this.getDestinyMap(destiny);
|
|
78
|
+
return this.material(MaterialType.MythologyBoard).location((l) => !this.game.players.includes(map[l.y][l.x]));
|
|
79
|
+
}
|
|
80
|
+
get creaturesOnTopOfDecks() {
|
|
81
|
+
const mythologies = this.material(MaterialType.MythologyBoard)
|
|
82
|
+
.getItems()
|
|
83
|
+
.map((item) => item.id.mythology);
|
|
84
|
+
const creaturesInDecks = this.material(MaterialType.EntityCard).location(LocationType.CreaturesDeck);
|
|
85
|
+
const creaturesIndexes = mythologies.map((mythology) => creaturesInDecks
|
|
86
|
+
.locationId(mythology)
|
|
87
|
+
.maxBy((item) => item.location.x)
|
|
88
|
+
.getIndex());
|
|
89
|
+
return this.material(MaterialType.EntityCard).index(creaturesIndexes);
|
|
90
|
+
}
|
|
91
|
+
}
|