@gamepark/mythologies 0.10.0 → 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.
- 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 +158 -158
- package/dist/MythologiesRules.js +216 -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 +294 -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 +106 -106
- package/dist/material/entity/Effect.js +26 -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 +15 -15
- package/dist/material/entity/PlaceCardEffectRule.js +43 -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 +65 -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 +20 -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 +65 -65
- package/dist/rules/RuleId.js +66 -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 +24 -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 +36 -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 +21 -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 +14 -14
- package/dist/rules/effects/MultipleSimultaneousMoveEffectRule.js +71 -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 +12 -12
- package/dist/rules/effects/ResolveEffectsRule.js +87 -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 +11 -11
- package/dist/rules/effects/TriggerEffectsRule.js +65 -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/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
|
@@ -1,106 +1,57 @@
|
|
|
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
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
59
|
-
finally {
|
|
60
|
-
try {
|
|
61
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
62
|
-
}
|
|
63
|
-
finally { if (e_1) throw e_1.error; }
|
|
64
|
-
}
|
|
65
|
-
return _super.prototype.onRuleStart.call(this);
|
|
66
|
-
};
|
|
67
|
-
NuwaEffectRule.prototype.getActivePlayerLegalMoves = function (player) {
|
|
68
|
-
var moves = _super.prototype.getActivePlayerLegalMoves.call(this, player);
|
|
69
|
-
var gems = this.material(MaterialType_1.MaterialType.GemToken).location(LocationType_1.LocationType.PlayerGems).player(player);
|
|
70
|
-
var creatures = this.getCardsToSacrifice(player);
|
|
71
|
-
if (gems.getQuantity() >= creatures.length) {
|
|
72
|
-
moves.push(gems.moveItem({ type: LocationType_1.LocationType.PlayerGems, player: this.card.location.player }, creatures.length));
|
|
73
|
-
}
|
|
74
|
-
return moves;
|
|
75
|
-
};
|
|
76
|
-
NuwaEffectRule.prototype.getCardsToSacrifice = function (player) {
|
|
77
|
-
var targets = this.remind(Memory_1.Memory.TargetEntities, player);
|
|
78
|
-
var visibleEntities = new Pantheon_1.Pantheon(this.game, player).visibleEntities;
|
|
79
|
-
if (targets) {
|
|
80
|
-
return visibleEntities.index(targets);
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
return visibleEntities.id(function (id) { return (0, Entity_1.isCreature)(id.front); });
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
NuwaEffectRule.prototype.onSacrifice = function (move) {
|
|
87
|
-
var player = move.location.player;
|
|
88
|
-
var creaturesLeft = this.memorize(Memory_1.Memory.TargetEntities, function (creatures) { return creatures.filter(function (c) { return c !== move.itemIndex; }); }, player);
|
|
89
|
-
return creaturesLeft.length ? [] : [this.endPlayerTurn(player)];
|
|
90
|
-
};
|
|
91
|
-
NuwaEffectRule.prototype.beforeItemMove = function (move) {
|
|
92
|
-
if ((0, rules_api_1.isMoveItemType)(MaterialType_1.MaterialType.GemToken)(move)) {
|
|
93
|
-
var player = this.material(MaterialType_1.MaterialType.GemToken).getItem(move.itemIndex).location.player;
|
|
94
|
-
return [this.endPlayerTurn(player)];
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
return _super.prototype.beforeItemMove.call(this, move);
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
NuwaEffectRule.prototype.onRuleEnd = function () {
|
|
101
|
-
this.forget(Memory_1.Memory.TargetEntities);
|
|
102
|
-
return [];
|
|
103
|
-
};
|
|
104
|
-
return NuwaEffectRule;
|
|
105
|
-
}(SimultaneousSacrificeEffectRule_1.SimultaneousSacrificeEffectRule));
|
|
106
|
-
exports.NuwaEffectRule = NuwaEffectRule;
|
|
1
|
+
import { areNeighbors, isMoveItemType } from '@gamepark/rules-api';
|
|
2
|
+
import { isCreature } from '../../material/Entity';
|
|
3
|
+
import { SimultaneousSacrificeEffectRule } from '../../material/entity/SimultaneousSacrificeEffectRule';
|
|
4
|
+
import { LocationType } from '../../material/LocationType';
|
|
5
|
+
import { MaterialType } from '../../material/MaterialType';
|
|
6
|
+
import { Pantheon } from '../../material/Pantheon';
|
|
7
|
+
import { Memory } from '../../Memory';
|
|
8
|
+
import { RuleId } from '../RuleId';
|
|
9
|
+
export class NuwaEffectRule extends SimultaneousSacrificeEffectRule {
|
|
10
|
+
ruleId = RuleId.NuwaEffect;
|
|
11
|
+
getAffectedPlayers() {
|
|
12
|
+
return this.game.players.filter((player) => areNeighbors(player, this.card.location.player, this.game.players));
|
|
13
|
+
}
|
|
14
|
+
onRuleStart() {
|
|
15
|
+
for (const player of this.game.rule.players) {
|
|
16
|
+
this.memorize(Memory.TargetEntities, this.getCardsToSacrifice(player).getIndexes(), player);
|
|
17
|
+
}
|
|
18
|
+
return super.onRuleStart();
|
|
19
|
+
}
|
|
20
|
+
getActivePlayerLegalMoves(player) {
|
|
21
|
+
const moves = super.getActivePlayerLegalMoves(player);
|
|
22
|
+
const gems = this.material(MaterialType.GemToken).location(LocationType.PlayerGems).player(player);
|
|
23
|
+
const creatures = this.getCardsToSacrifice(player);
|
|
24
|
+
if (gems.getQuantity() >= creatures.length) {
|
|
25
|
+
moves.push(gems.moveItem({ type: LocationType.PlayerGems, player: this.card.location.player }, creatures.length));
|
|
26
|
+
}
|
|
27
|
+
return moves;
|
|
28
|
+
}
|
|
29
|
+
getCardsToSacrifice(player) {
|
|
30
|
+
const targets = this.remind(Memory.TargetEntities, player);
|
|
31
|
+
const visibleEntities = new Pantheon(this.game, player).visibleEntities;
|
|
32
|
+
if (targets) {
|
|
33
|
+
return visibleEntities.index(targets);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
return visibleEntities.id((id) => isCreature(id.front));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
onSacrifice(move) {
|
|
40
|
+
const player = move.location.player;
|
|
41
|
+
const creaturesLeft = this.memorize(Memory.TargetEntities, (creatures) => creatures.filter((c) => c !== move.itemIndex), player);
|
|
42
|
+
return creaturesLeft.length ? [] : [this.endPlayerTurn(player)];
|
|
43
|
+
}
|
|
44
|
+
beforeItemMove(move) {
|
|
45
|
+
if (isMoveItemType(MaterialType.GemToken)(move)) {
|
|
46
|
+
const player = this.material(MaterialType.GemToken).getItem(move.itemIndex).location.player;
|
|
47
|
+
return [this.endPlayerTurn(player)];
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
return super.beforeItemMove(move);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
onRuleEnd() {
|
|
54
|
+
this.forget(Memory.TargetEntities);
|
|
55
|
+
return [];
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { CustomMove, MaterialItem, PlayerTurnRule } from '@gamepark/rules-api';
|
|
2
|
-
import { EntityId } from '../../material/Entity';
|
|
3
|
-
import { LocationType } from '../../material/LocationType';
|
|
4
|
-
import { MaterialType } from '../../material/MaterialType';
|
|
5
|
-
import { PlayerColor } from '../../PlayerColor';
|
|
6
|
-
import { RuleId } from '../RuleId';
|
|
7
|
-
export declare class OdinEffectRule extends PlayerTurnRule {
|
|
8
|
-
getPlayerMoves(): CustomMove
|
|
9
|
-
onCustomMove(move: CustomMove): import("@gamepark/rules-api").StartRule<RuleId.DrawDestinyCard>[];
|
|
10
|
-
isCardRestricted(card: MaterialItem<MaterialType, LocationType, EntityId>, player?: PlayerColor): boolean;
|
|
11
|
-
}
|
|
1
|
+
import { CustomMove, MaterialItem, PlayerTurnRule } from '@gamepark/rules-api';
|
|
2
|
+
import { EntityId } from '../../material/Entity';
|
|
3
|
+
import { LocationType } from '../../material/LocationType';
|
|
4
|
+
import { MaterialType } from '../../material/MaterialType';
|
|
5
|
+
import { PlayerColor } from '../../PlayerColor';
|
|
6
|
+
import { RuleId } from '../RuleId';
|
|
7
|
+
export declare class OdinEffectRule extends PlayerTurnRule {
|
|
8
|
+
getPlayerMoves(): CustomMove[];
|
|
9
|
+
onCustomMove(move: CustomMove): import("@gamepark/rules-api").StartRule<RuleId.DrawDestinyCard>[];
|
|
10
|
+
isCardRestricted(card: MaterialItem<MaterialType, LocationType, EntityId>, player?: PlayerColor): boolean;
|
|
11
|
+
}
|
|
@@ -1,52 +1,27 @@
|
|
|
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
|
-
__extends(OdinEffectRule, _super);
|
|
29
|
-
function OdinEffectRule() {
|
|
30
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
31
|
-
}
|
|
32
|
-
OdinEffectRule.prototype.getPlayerMoves = function () {
|
|
33
|
-
var _this = this;
|
|
34
|
-
return this.material(MaterialType_1.MaterialType.MythologyBoard)
|
|
35
|
-
.getItems()
|
|
36
|
-
.map(function (item) { return _this.customMove(CustomMoveType_1.CustomMoveType.ChooseMythology, item.id.mythology); });
|
|
37
|
-
};
|
|
38
|
-
OdinEffectRule.prototype.onCustomMove = function (move) {
|
|
39
|
-
if (move.type === CustomMoveType_1.CustomMoveType.ChooseMythology) {
|
|
40
|
-
this.memorize(Memory_1.Memory.TargetMythology, move.data);
|
|
41
|
-
return [this.startRule(RuleId_1.RuleId.DrawDestinyCard)];
|
|
42
|
-
}
|
|
43
|
-
return [];
|
|
44
|
-
};
|
|
45
|
-
OdinEffectRule.prototype.isCardRestricted = function (card, player) {
|
|
46
|
-
return ((card.location.type === LocationType_1.LocationType.SanctuaryCreatureSpot || card.location.type === LocationType_1.LocationType.SanctuaryGodSpot) &&
|
|
47
|
-
(0, Entity_1.entityMythology)(card.id.front) === this.remind(Memory_1.Memory.TargetMythology) &&
|
|
48
|
-
(!player || !new Pantheon_1.Pantheon(this.game, player).hasEntity(Entity_1.Entity.Odin)));
|
|
49
|
-
};
|
|
50
|
-
return OdinEffectRule;
|
|
51
|
-
}(rules_api_1.PlayerTurnRule));
|
|
52
|
-
exports.OdinEffectRule = OdinEffectRule;
|
|
1
|
+
import { PlayerTurnRule } from '@gamepark/rules-api';
|
|
2
|
+
import { CustomMoveType } from '../../CustomMoveType';
|
|
3
|
+
import { Entity, entityMythology } from '../../material/Entity';
|
|
4
|
+
import { LocationType } from '../../material/LocationType';
|
|
5
|
+
import { MaterialType } from '../../material/MaterialType';
|
|
6
|
+
import { Pantheon } from '../../material/Pantheon';
|
|
7
|
+
import { Memory } from '../../Memory';
|
|
8
|
+
import { RuleId } from '../RuleId';
|
|
9
|
+
export class OdinEffectRule extends PlayerTurnRule {
|
|
10
|
+
getPlayerMoves() {
|
|
11
|
+
return this.material(MaterialType.MythologyBoard)
|
|
12
|
+
.getItems()
|
|
13
|
+
.map((item) => this.customMove(CustomMoveType.ChooseMythology, item.id.mythology));
|
|
14
|
+
}
|
|
15
|
+
onCustomMove(move) {
|
|
16
|
+
if (move.type === CustomMoveType.ChooseMythology) {
|
|
17
|
+
this.memorize(Memory.TargetMythology, move.data);
|
|
18
|
+
return [this.startRule(RuleId.DrawDestinyCard)];
|
|
19
|
+
}
|
|
20
|
+
return [];
|
|
21
|
+
}
|
|
22
|
+
isCardRestricted(card, player) {
|
|
23
|
+
return ((card.location.type === LocationType.SanctuaryCreatureSpot || card.location.type === LocationType.SanctuaryGodSpot) &&
|
|
24
|
+
entityMythology(card.id.front) === this.remind(Memory.TargetMythology) &&
|
|
25
|
+
(!player || !new Pantheon(this.game, player).hasEntity(Entity.Odin)));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MaterialRulesPart } from '@gamepark/rules-api';
|
|
2
|
-
import { EntityItem } from '../../material/Entity';
|
|
3
|
-
export declare class PermanentEffectsRule extends MaterialRulesPart {
|
|
4
|
-
canSacrifice(card: EntityItem): boolean;
|
|
5
|
-
canCrush(card: EntityItem): boolean;
|
|
6
|
-
canMove(card: EntityItem): boolean;
|
|
7
|
-
}
|
|
1
|
+
import { MaterialRulesPart } from '@gamepark/rules-api';
|
|
2
|
+
import { EntityItem } from '../../material/Entity';
|
|
3
|
+
export declare class PermanentEffectsRule extends MaterialRulesPart {
|
|
4
|
+
canSacrifice(card: EntityItem): boolean;
|
|
5
|
+
canCrush(card: EntityItem): boolean;
|
|
6
|
+
canMove(card: EntityItem): boolean;
|
|
7
|
+
}
|
|
@@ -1,54 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
var Pantheon_1 = require("../../material/Pantheon");
|
|
23
|
-
var PermanentEffectsRule = (function (_super) {
|
|
24
|
-
__extends(PermanentEffectsRule, _super);
|
|
25
|
-
function PermanentEffectsRule() {
|
|
26
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
27
|
-
}
|
|
28
|
-
PermanentEffectsRule.prototype.canSacrifice = function (card) {
|
|
29
|
-
var _this = this;
|
|
30
|
-
return !this.game.players.some(function (player) {
|
|
31
|
-
return new Pantheon_1.Pantheon(_this.game, player).visibleEntities
|
|
32
|
-
.getItems()
|
|
33
|
-
.some(function (effectCard) { return (0, EntityDescription_1.getEffects)(effectCard.id.front).some(function (effect) { var _a; return !(0, Effect_1.isTriggeredEffect)(effect) && ((_a = effect.preventSacrifice) === null || _a === void 0 ? void 0 : _a.call(effect, card, effectCard)); }); });
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
PermanentEffectsRule.prototype.canCrush = function (card) {
|
|
37
|
-
var _this = this;
|
|
38
|
-
return !this.game.players.some(function (player) {
|
|
39
|
-
return new Pantheon_1.Pantheon(_this.game, player).visibleEntities
|
|
40
|
-
.getItems()
|
|
41
|
-
.some(function (effectCard) { return (0, EntityDescription_1.getEffects)(effectCard.id.front).some(function (effect) { var _a; return !(0, Effect_1.isTriggeredEffect)(effect) && ((_a = effect.preventCrush) === null || _a === void 0 ? void 0 : _a.call(effect, card, effectCard)); }); });
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
PermanentEffectsRule.prototype.canMove = function (card) {
|
|
45
|
-
var _this = this;
|
|
46
|
-
return !this.game.players.some(function (player) {
|
|
47
|
-
return new Pantheon_1.Pantheon(_this.game, player).visibleEntities
|
|
48
|
-
.getItems()
|
|
49
|
-
.some(function (effectCard) { return (0, EntityDescription_1.getEffects)(effectCard.id.front).some(function (effect) { var _a; return !(0, Effect_1.isTriggeredEffect)(effect) && ((_a = effect.preventMove) === null || _a === void 0 ? void 0 : _a.call(effect, card, effectCard)); }); });
|
|
50
|
-
});
|
|
51
|
-
};
|
|
52
|
-
return PermanentEffectsRule;
|
|
53
|
-
}(rules_api_1.MaterialRulesPart));
|
|
54
|
-
exports.PermanentEffectsRule = PermanentEffectsRule;
|
|
1
|
+
import { MaterialRulesPart } from '@gamepark/rules-api';
|
|
2
|
+
import { isTriggeredEffect } from '../../material/entity/Effect';
|
|
3
|
+
import { getEffects } from '../../material/entity/EntityDescription';
|
|
4
|
+
import { Pantheon } from '../../material/Pantheon';
|
|
5
|
+
export class PermanentEffectsRule extends MaterialRulesPart {
|
|
6
|
+
canSacrifice(card) {
|
|
7
|
+
return !this.game.players.some((player) => new Pantheon(this.game, player).visibleEntities
|
|
8
|
+
.getItems()
|
|
9
|
+
.some((effectCard) => getEffects(effectCard.id.front).some((effect) => !isTriggeredEffect(effect) && effect.preventSacrifice?.(card, effectCard))));
|
|
10
|
+
}
|
|
11
|
+
canCrush(card) {
|
|
12
|
+
return !this.game.players.some((player) => new Pantheon(this.game, player).visibleEntities
|
|
13
|
+
.getItems()
|
|
14
|
+
.some((effectCard) => getEffects(effectCard.id.front).some((effect) => !isTriggeredEffect(effect) && effect.preventCrush?.(card, effectCard))));
|
|
15
|
+
}
|
|
16
|
+
canMove(card) {
|
|
17
|
+
return !this.game.players.some((player) => new Pantheon(this.game, player).visibleEntities
|
|
18
|
+
.getItems()
|
|
19
|
+
.some((effectCard) => getEffects(effectCard.id.front).some((effect) => !isTriggeredEffect(effect) && effect.preventMove?.(card, effectCard))));
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { CustomMove } from '@gamepark/rules-api';
|
|
2
|
-
import { PlayerEffectRule } from '../../material/entity/PlayerEffectRule';
|
|
3
|
-
import { RuleId } from '../RuleId';
|
|
4
|
-
export declare class QilinEffectRule extends PlayerEffectRule {
|
|
5
|
-
ruleId: RuleId;
|
|
6
|
-
getPlayerMoves(): CustomMove
|
|
7
|
-
onCustomMove(move: CustomMove): import("@gamepark/rules-api").MaterialMove
|
|
8
|
-
}
|
|
1
|
+
import { CustomMove } from '@gamepark/rules-api';
|
|
2
|
+
import { PlayerEffectRule } from '../../material/entity/PlayerEffectRule';
|
|
3
|
+
import { RuleId } from '../RuleId';
|
|
4
|
+
export declare class QilinEffectRule extends PlayerEffectRule {
|
|
5
|
+
ruleId: RuleId;
|
|
6
|
+
getPlayerMoves(): CustomMove[];
|
|
7
|
+
onCustomMove(move: CustomMove): import("@gamepark/rules-api").MaterialMove[];
|
|
8
|
+
}
|
|
@@ -1,115 +1,40 @@
|
|
|
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
|
-
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.QilinEffectRule = 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 PlayerEffectRule_1 = require("../../material/entity/PlayerEffectRule");
|
|
61
|
-
var MaterialType_1 = require("../../material/MaterialType");
|
|
62
|
-
var Pantheon_1 = require("../../material/Pantheon");
|
|
63
|
-
var RuleId_1 = require("../RuleId");
|
|
64
|
-
var QilinEffectRule = (function (_super) {
|
|
65
|
-
__extends(QilinEffectRule, _super);
|
|
66
|
-
function QilinEffectRule() {
|
|
67
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
68
|
-
_this.ruleId = RuleId_1.RuleId.QilinEffect;
|
|
69
|
-
return _this;
|
|
70
|
-
}
|
|
71
|
-
QilinEffectRule.prototype.getPlayerMoves = function () {
|
|
72
|
-
var e_1, _a;
|
|
73
|
-
var _this = this;
|
|
74
|
-
var cardsToCopy = [];
|
|
75
|
-
try {
|
|
76
|
-
for (var _b = __values(this.game.players), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
77
|
-
var player = _c.value;
|
|
78
|
-
if (player !== this.player) {
|
|
79
|
-
cardsToCopy.push.apply(cardsToCopy, __spreadArray([], __read(new Pantheon_1.Pantheon(this.game, player).visibleEntities
|
|
80
|
-
.location(function (l) { return l.x === _this.card.location.x; })
|
|
81
|
-
.id(function (id) {
|
|
82
|
-
return (0, Entity_1.isCreature)(id.front) &&
|
|
83
|
-
id.front !== Entity_1.Entity.Qilin &&
|
|
84
|
-
(0, EntityDescription_1.getEffects)(id.front).some(function (effect) { return (0, Effect_1.isTriggeredEffect)(effect) && effect.trigger === Effect_1.isPlaced; });
|
|
85
|
-
})
|
|
86
|
-
.getIndexes()), false));
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
91
|
-
finally {
|
|
92
|
-
try {
|
|
93
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
94
|
-
}
|
|
95
|
-
finally { if (e_1) throw e_1.error; }
|
|
96
|
-
}
|
|
97
|
-
return cardsToCopy.map(function (index) { return _this.customMove(CustomMoveType_1.CustomMoveType.ChooseEntityCard, index); });
|
|
98
|
-
};
|
|
99
|
-
QilinEffectRule.prototype.onCustomMove = function (move) {
|
|
100
|
-
if (move.type === CustomMoveType_1.CustomMoveType.ChooseEntityCard) {
|
|
101
|
-
var card = this.material(MaterialType_1.MaterialType.EntityCard).getItem(move.data);
|
|
102
|
-
var effect = (0, EntityDescription_1.getEffects)(card.id.front)
|
|
103
|
-
.filter(Effect_1.isTriggeredEffect)
|
|
104
|
-
.find(function (effect) { return effect.trigger === Effect_1.isPlaced; });
|
|
105
|
-
var moves = new effect.rule(this.game).playEffect();
|
|
106
|
-
if (!moves.some(function (move) { return move.kind === rules_api_1.MoveKind.RulesMove; })) {
|
|
107
|
-
moves.push(this.customMove(CustomMoveType_1.CustomMoveType.EndEffect));
|
|
108
|
-
}
|
|
109
|
-
return moves;
|
|
110
|
-
}
|
|
111
|
-
return _super.prototype.onCustomMove.call(this, move);
|
|
112
|
-
};
|
|
113
|
-
return QilinEffectRule;
|
|
114
|
-
}(PlayerEffectRule_1.PlayerEffectRule));
|
|
115
|
-
exports.QilinEffectRule = QilinEffectRule;
|
|
1
|
+
import { MoveKind } from '@gamepark/rules-api';
|
|
2
|
+
import { CustomMoveType } from '../../CustomMoveType';
|
|
3
|
+
import { Entity, isCreature } from '../../material/Entity';
|
|
4
|
+
import { isPlaced, isTriggeredEffect } from '../../material/entity/Effect';
|
|
5
|
+
import { getEffects } from '../../material/entity/EntityDescription';
|
|
6
|
+
import { PlayerEffectRule } from '../../material/entity/PlayerEffectRule';
|
|
7
|
+
import { MaterialType } from '../../material/MaterialType';
|
|
8
|
+
import { Pantheon } from '../../material/Pantheon';
|
|
9
|
+
import { RuleId } from '../RuleId';
|
|
10
|
+
export class QilinEffectRule extends PlayerEffectRule {
|
|
11
|
+
ruleId = RuleId.QilinEffect;
|
|
12
|
+
getPlayerMoves() {
|
|
13
|
+
const cardsToCopy = [];
|
|
14
|
+
for (const player of this.game.players) {
|
|
15
|
+
if (player !== this.player) {
|
|
16
|
+
cardsToCopy.push(...new Pantheon(this.game, player).visibleEntities
|
|
17
|
+
.location((l) => l.x === this.card.location.x)
|
|
18
|
+
.id((id) => isCreature(id.front) &&
|
|
19
|
+
id.front !== Entity.Qilin &&
|
|
20
|
+
getEffects(id.front).some((effect) => isTriggeredEffect(effect) && effect.trigger === isPlaced))
|
|
21
|
+
.getIndexes());
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return cardsToCopy.map((index) => this.customMove(CustomMoveType.ChooseEntityCard, index));
|
|
25
|
+
}
|
|
26
|
+
onCustomMove(move) {
|
|
27
|
+
if (move.type === CustomMoveType.ChooseEntityCard) {
|
|
28
|
+
const card = this.material(MaterialType.EntityCard).getItem(move.data);
|
|
29
|
+
const effect = getEffects(card.id.front)
|
|
30
|
+
.filter(isTriggeredEffect)
|
|
31
|
+
.find((effect) => effect.trigger === isPlaced);
|
|
32
|
+
const moves = new effect.rule(this.game).playEffect();
|
|
33
|
+
if (!moves.some((move) => move.kind === MoveKind.RulesMove)) {
|
|
34
|
+
moves.push(this.customMove(CustomMoveType.EndEffect));
|
|
35
|
+
}
|
|
36
|
+
return moves;
|
|
37
|
+
}
|
|
38
|
+
return super.onCustomMove(move);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Location, XYCoordinates } from '@gamepark/rules-api';
|
|
2
|
-
import { PlayerColor } from '../../PlayerColor';
|
|
3
|
-
import { RuleId } from '../RuleId';
|
|
4
|
-
import { MultipleSimultaneousMoveEffectRule } from './MultipleSimultaneousMoveEffectRule';
|
|
5
|
-
export declare class RaEffectRule extends MultipleSimultaneousMoveEffectRule {
|
|
6
|
-
ruleId: RuleId;
|
|
7
|
-
getTargetEntities(player: PlayerColor): import("@gamepark/rules-api").Material<number, number, number>;
|
|
8
|
-
isLegalDestination(space: XYCoordinates, cardLocation: Location): boolean;
|
|
9
|
-
}
|
|
1
|
+
import { Location, XYCoordinates } from '@gamepark/rules-api';
|
|
2
|
+
import { PlayerColor } from '../../PlayerColor';
|
|
3
|
+
import { RuleId } from '../RuleId';
|
|
4
|
+
import { MultipleSimultaneousMoveEffectRule } from './MultipleSimultaneousMoveEffectRule';
|
|
5
|
+
export declare class RaEffectRule extends MultipleSimultaneousMoveEffectRule {
|
|
6
|
+
ruleId: RuleId;
|
|
7
|
+
getTargetEntities(player: PlayerColor): import("@gamepark/rules-api").Material<number, number, number>;
|
|
8
|
+
isLegalDestination(space: XYCoordinates, cardLocation: Location): boolean;
|
|
9
|
+
}
|
|
@@ -1,39 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.RaEffectRule = void 0;
|
|
19
|
-
var Entity_1 = require("../../material/Entity");
|
|
20
|
-
var Pantheon_1 = require("../../material/Pantheon");
|
|
21
|
-
var RuleId_1 = require("../RuleId");
|
|
22
|
-
var MultipleSimultaneousMoveEffectRule_1 = require("./MultipleSimultaneousMoveEffectRule");
|
|
23
|
-
var RaEffectRule = (function (_super) {
|
|
24
|
-
__extends(RaEffectRule, _super);
|
|
25
|
-
function RaEffectRule() {
|
|
26
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
27
|
-
_this.ruleId = RuleId_1.RuleId.RaEffect;
|
|
28
|
-
return _this;
|
|
29
|
-
}
|
|
30
|
-
RaEffectRule.prototype.getTargetEntities = function (player) {
|
|
31
|
-
var pantheon = new Pantheon_1.Pantheon(this.game, player);
|
|
32
|
-
return pantheon.visibleEntities.id(function (id) { return !(0, Entity_1.isGod)(id.front); }).location(function (l) { return l.y > 0 && pantheon.isFreeSpace({ x: l.x, y: l.y - 1 }); });
|
|
33
|
-
};
|
|
34
|
-
RaEffectRule.prototype.isLegalDestination = function (space, cardLocation) {
|
|
35
|
-
return cardLocation.x === space.x && cardLocation.y === space.y + 1;
|
|
36
|
-
};
|
|
37
|
-
return RaEffectRule;
|
|
38
|
-
}(MultipleSimultaneousMoveEffectRule_1.MultipleSimultaneousMoveEffectRule));
|
|
39
|
-
exports.RaEffectRule = RaEffectRule;
|
|
1
|
+
import { isGod } from '../../material/Entity';
|
|
2
|
+
import { Pantheon } from '../../material/Pantheon';
|
|
3
|
+
import { RuleId } from '../RuleId';
|
|
4
|
+
import { MultipleSimultaneousMoveEffectRule } from './MultipleSimultaneousMoveEffectRule';
|
|
5
|
+
export class RaEffectRule extends MultipleSimultaneousMoveEffectRule {
|
|
6
|
+
ruleId = RuleId.RaEffect;
|
|
7
|
+
getTargetEntities(player) {
|
|
8
|
+
const pantheon = new Pantheon(this.game, player);
|
|
9
|
+
return pantheon.visibleEntities.id((id) => !isGod(id.front)).location((l) => l.y > 0 && pantheon.isFreeSpace({ x: l.x, y: l.y - 1 }));
|
|
10
|
+
}
|
|
11
|
+
isLegalDestination(space, cardLocation) {
|
|
12
|
+
return cardLocation.x === space.x && cardLocation.y === space.y + 1;
|
|
13
|
+
}
|
|
14
|
+
}
|