@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
|
@@ -1,105 +1,47 @@
|
|
|
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
|
-
var Pantheon_1 = require("../../material/Pantheon");
|
|
49
|
-
var Memory_1 = require("../../Memory");
|
|
50
|
-
var RuleId_1 = require("../RuleId");
|
|
51
|
-
var TianlongEffectRule = (function (_super) {
|
|
52
|
-
__extends(TianlongEffectRule, _super);
|
|
53
|
-
function TianlongEffectRule() {
|
|
54
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
55
|
-
_this.ruleId = RuleId_1.RuleId.TianlongEffect;
|
|
56
|
-
return _this;
|
|
57
|
-
}
|
|
58
|
-
TianlongEffectRule.prototype.getPlayerMoves = function () {
|
|
59
|
-
var moves = [this.customMove(CustomMoveType_1.CustomMoveType.EndEffect)];
|
|
60
|
-
if (new Pantheon_1.Pantheon(this.game, this.player).gems > 0) {
|
|
61
|
-
moves.push.apply(moves, __spreadArray([], __read(_super.prototype.getPlayerMoves.call(this)), false));
|
|
62
|
-
}
|
|
63
|
-
return moves;
|
|
64
|
-
};
|
|
65
|
-
TianlongEffectRule.prototype.onCardMoved = function (move) {
|
|
66
|
-
if (move.location.player === this.player) {
|
|
67
|
-
var _a = this.material(MaterialType_1.MaterialType.EntityCard).getItem(move.itemIndex).location, x = _a.x, y = _a.y;
|
|
68
|
-
this.memorize(Memory_1.Memory.TargetLocations, [
|
|
69
|
-
{ x: x, y: y },
|
|
70
|
-
{ x: move.location.x, y: move.location.y }
|
|
71
|
-
]);
|
|
72
|
-
var opponentsEffectRule = new TianlongOpponentsEffectRule(this.game);
|
|
73
|
-
return __spreadArray([new Pantheon_1.Pantheon(this.game, this.player).spendGems(1)], __read(opponentsEffectRule.playEffect()), false);
|
|
74
|
-
}
|
|
75
|
-
return [];
|
|
76
|
-
};
|
|
77
|
-
return TianlongEffectRule;
|
|
78
|
-
}(MoveEffectRule_1.MoveEffectRule));
|
|
79
|
-
exports.TianlongEffectRule = TianlongEffectRule;
|
|
80
|
-
var TianlongOpponentsEffectRule = (function (_super) {
|
|
81
|
-
__extends(TianlongOpponentsEffectRule, _super);
|
|
82
|
-
function TianlongOpponentsEffectRule() {
|
|
83
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
84
|
-
_this.ruleId = RuleId_1.RuleId.TianlongOpponentsEffect;
|
|
85
|
-
return _this;
|
|
86
|
-
}
|
|
87
|
-
TianlongOpponentsEffectRule.prototype.getAffectedPlayers = function () {
|
|
88
|
-
var _this = this;
|
|
89
|
-
return this.game.players.filter(function (player) { return _this.isOpponent(player); });
|
|
90
|
-
};
|
|
91
|
-
TianlongOpponentsEffectRule.prototype.getMovingCards = function (player) {
|
|
92
|
-
var _a = this.remind(Memory_1.Memory.TargetLocations)[0], x = _a.x, y = _a.y;
|
|
93
|
-
return _super.prototype.getMovingCards.call(this, player).location(function (l) { return l.x === x && l.y === y; });
|
|
94
|
-
};
|
|
95
|
-
TianlongOpponentsEffectRule.prototype.isLegalDestination = function (space) {
|
|
96
|
-
var _a = this.remind(Memory_1.Memory.TargetLocations)[1], x = _a.x, y = _a.y;
|
|
97
|
-
return space.x === x && space.y === y;
|
|
98
|
-
};
|
|
99
|
-
TianlongOpponentsEffectRule.prototype.onRuleEnd = function () {
|
|
100
|
-
this.forget(Memory_1.Memory.TargetLocations);
|
|
101
|
-
return [];
|
|
102
|
-
};
|
|
103
|
-
return TianlongOpponentsEffectRule;
|
|
104
|
-
}(SimultaneousMoveEffectRule_1.SimultaneousMoveEffectRule));
|
|
105
|
-
exports.TianlongOpponentsEffectRule = TianlongOpponentsEffectRule;
|
|
1
|
+
import { CustomMoveType } from '../../CustomMoveType';
|
|
2
|
+
import { MoveEffectRule } from '../../material/entity/MoveEffectRule';
|
|
3
|
+
import { SimultaneousMoveEffectRule } from '../../material/entity/SimultaneousMoveEffectRule';
|
|
4
|
+
import { MaterialType } from '../../material/MaterialType';
|
|
5
|
+
import { Pantheon } from '../../material/Pantheon';
|
|
6
|
+
import { Memory } from '../../Memory';
|
|
7
|
+
import { RuleId } from '../RuleId';
|
|
8
|
+
export class TianlongEffectRule extends MoveEffectRule {
|
|
9
|
+
ruleId = RuleId.TianlongEffect;
|
|
10
|
+
getPlayerMoves() {
|
|
11
|
+
const moves = [this.customMove(CustomMoveType.EndEffect)];
|
|
12
|
+
if (new Pantheon(this.game, this.player).gems > 0) {
|
|
13
|
+
moves.push(...super.getPlayerMoves());
|
|
14
|
+
}
|
|
15
|
+
return moves;
|
|
16
|
+
}
|
|
17
|
+
onCardMoved(move) {
|
|
18
|
+
if (move.location.player === this.player) {
|
|
19
|
+
const { x, y } = this.material(MaterialType.EntityCard).getItem(move.itemIndex).location;
|
|
20
|
+
this.memorize(Memory.TargetLocations, [
|
|
21
|
+
{ x, y },
|
|
22
|
+
{ x: move.location.x, y: move.location.y }
|
|
23
|
+
]);
|
|
24
|
+
const opponentsEffectRule = new TianlongOpponentsEffectRule(this.game);
|
|
25
|
+
return [new Pantheon(this.game, this.player).spendGems(1), ...opponentsEffectRule.playEffect()];
|
|
26
|
+
}
|
|
27
|
+
return [];
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export class TianlongOpponentsEffectRule extends SimultaneousMoveEffectRule {
|
|
31
|
+
ruleId = RuleId.TianlongOpponentsEffect;
|
|
32
|
+
getAffectedPlayers() {
|
|
33
|
+
return this.game.players.filter((player) => this.isOpponent(player));
|
|
34
|
+
}
|
|
35
|
+
getMovingCards(player) {
|
|
36
|
+
const { x, y } = this.remind(Memory.TargetLocations)[0];
|
|
37
|
+
return super.getMovingCards(player).location((l) => l.x === x && l.y === y);
|
|
38
|
+
}
|
|
39
|
+
isLegalDestination(space) {
|
|
40
|
+
const { x, y } = this.remind(Memory.TargetLocations)[1];
|
|
41
|
+
return space.x === x && space.y === y;
|
|
42
|
+
}
|
|
43
|
+
onRuleEnd() {
|
|
44
|
+
this.forget(Memory.TargetLocations);
|
|
45
|
+
return [];
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { Location, MaterialRulesPart } from '@gamepark/rules-api';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { Location, MaterialRulesPart } from '@gamepark/rules-api';
|
|
2
|
+
import { Entity } from '../../material/Entity';
|
|
3
|
+
import { CardEffect, TriggerEvent } from '../../material/entity/Effect';
|
|
4
|
+
import { PlayerColor } from '../../PlayerColor';
|
|
5
|
+
export declare class TriggerEffectsRule extends MaterialRulesPart {
|
|
6
|
+
triggerEffects(...triggerEvents: TriggerEvent[]): void;
|
|
7
|
+
triggerPlayerEffects(player: PlayerColor, ...triggerEvents: TriggerEvent[]): void;
|
|
8
|
+
getPlayerEffects(player: PlayerColor, ...triggerEvents: TriggerEvent[]): CardEffect[];
|
|
9
|
+
triggerCardEffect(cardIndex: number, cardLocation: Location, triggerEvent: TriggerEvent, entity?: Entity): void;
|
|
10
|
+
getCardEffects(cardIndex: number, cardLocation: Location, triggerEvent: TriggerEvent, entity?: Entity): CardEffect[];
|
|
11
|
+
getPlayersByEffectPriorityOrder(): PlayerColor[];
|
|
12
|
+
}
|
|
@@ -1,183 +1,67 @@
|
|
|
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
|
-
var triggerEvents = [];
|
|
69
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
70
|
-
triggerEvents[_i] = arguments[_i];
|
|
71
|
-
}
|
|
72
|
-
var players = this.getPlayersByEffectPriorityOrder();
|
|
73
|
-
try {
|
|
74
|
-
for (var _b = __values(players.reverse()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
75
|
-
var player = _c.value;
|
|
76
|
-
this.triggerPlayerEffects.apply(this, __spreadArray([player], __read(triggerEvents), false));
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
80
|
-
finally {
|
|
81
|
-
try {
|
|
82
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
83
|
-
}
|
|
84
|
-
finally { if (e_1) throw e_1.error; }
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
TriggerEffectsRule.prototype.triggerPlayerEffects = function (player) {
|
|
88
|
-
var triggerEvents = [];
|
|
89
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
90
|
-
triggerEvents[_i - 1] = arguments[_i];
|
|
91
|
-
}
|
|
92
|
-
var pendingEffects = this.getPlayerEffects.apply(this, __spreadArray([player], __read(triggerEvents), false));
|
|
93
|
-
if (pendingEffects.length) {
|
|
94
|
-
this.remind(Memory_1.Memory.PendingEffects).unshift(pendingEffects);
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
TriggerEffectsRule.prototype.getPlayerEffects = function (player) {
|
|
98
|
-
var e_2, _a, e_3, _b, e_4, _c;
|
|
99
|
-
var triggerEvents = [];
|
|
100
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
101
|
-
triggerEvents[_i - 1] = arguments[_i];
|
|
102
|
-
}
|
|
103
|
-
var pendingEffects = [];
|
|
104
|
-
var pantheon = new Pantheon_1.Pantheon(this.game, player);
|
|
105
|
-
var material = this.material(MaterialType_1.MaterialType.EntityCard);
|
|
106
|
-
var cards = pantheon.visibleEntities.getIndexes().map(function (index) { return ({ index: index, location: material.getItem(index).location }); });
|
|
107
|
-
var _loop_1 = function (event) {
|
|
108
|
-
if (event.type === Effect_1.TriggerEventType.EntityCrushed) {
|
|
109
|
-
var location = material.getItem(event.cardIndex).location;
|
|
110
|
-
if (location.player === player && !cards.some(function (card) { return card.index === event.cardIndex; })) {
|
|
111
|
-
cards.push({ index: event.cardIndex, location: location });
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
if (event.type === Effect_1.TriggerEventType.EntityPlaced && event.location.player === player && !cards.some(function (card) { return card.index === event.cardIndex; })) {
|
|
115
|
-
cards.push({ index: event.cardIndex, location: event.location });
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
try {
|
|
119
|
-
for (var triggerEvents_1 = __values(triggerEvents), triggerEvents_1_1 = triggerEvents_1.next(); !triggerEvents_1_1.done; triggerEvents_1_1 = triggerEvents_1.next()) {
|
|
120
|
-
var event = triggerEvents_1_1.value;
|
|
121
|
-
_loop_1(event);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
125
|
-
finally {
|
|
126
|
-
try {
|
|
127
|
-
if (triggerEvents_1_1 && !triggerEvents_1_1.done && (_a = triggerEvents_1.return)) _a.call(triggerEvents_1);
|
|
128
|
-
}
|
|
129
|
-
finally { if (e_2) throw e_2.error; }
|
|
130
|
-
}
|
|
131
|
-
try {
|
|
132
|
-
for (var triggerEvents_2 = __values(triggerEvents), triggerEvents_2_1 = triggerEvents_2.next(); !triggerEvents_2_1.done; triggerEvents_2_1 = triggerEvents_2.next()) {
|
|
133
|
-
var triggerEvent = triggerEvents_2_1.value;
|
|
134
|
-
try {
|
|
135
|
-
for (var cards_1 = (e_4 = void 0, __values(cards)), cards_1_1 = cards_1.next(); !cards_1_1.done; cards_1_1 = cards_1.next()) {
|
|
136
|
-
var _d = cards_1_1.value, index = _d.index, location = _d.location;
|
|
137
|
-
pendingEffects.push.apply(pendingEffects, __spreadArray([], __read(this.getCardEffects(index, location, triggerEvent)), false));
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
141
|
-
finally {
|
|
142
|
-
try {
|
|
143
|
-
if (cards_1_1 && !cards_1_1.done && (_c = cards_1.return)) _c.call(cards_1);
|
|
144
|
-
}
|
|
145
|
-
finally { if (e_4) throw e_4.error; }
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
150
|
-
finally {
|
|
151
|
-
try {
|
|
152
|
-
if (triggerEvents_2_1 && !triggerEvents_2_1.done && (_b = triggerEvents_2.return)) _b.call(triggerEvents_2);
|
|
153
|
-
}
|
|
154
|
-
finally { if (e_3) throw e_3.error; }
|
|
155
|
-
}
|
|
156
|
-
return pendingEffects;
|
|
157
|
-
};
|
|
158
|
-
TriggerEffectsRule.prototype.triggerCardEffect = function (cardIndex, cardLocation, triggerEvent) {
|
|
159
|
-
var pendingEffects = this.getCardEffects(cardIndex, cardLocation, triggerEvent);
|
|
160
|
-
if (pendingEffects.length) {
|
|
161
|
-
this.remind(Memory_1.Memory.PendingEffects).unshift(pendingEffects);
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
TriggerEffectsRule.prototype.getCardEffects = function (cardIndex, cardLocation, triggerEvent) {
|
|
165
|
-
var pendingEffects = [];
|
|
166
|
-
var card = this.material(MaterialType_1.MaterialType.EntityCard).getItem(cardIndex);
|
|
167
|
-
for (var effectIndex = 0; effectIndex < (0, EntityDescription_1.getEffects)(card.id.front).length; effectIndex++) {
|
|
168
|
-
var effect = (0, EntityDescription_1.getEffects)(card.id.front)[effectIndex];
|
|
169
|
-
if ((0, Effect_1.isTriggeredEffect)(effect) && effect.trigger(triggerEvent, { cardIndex: cardIndex, cardLocation: cardLocation, game: this.game })) {
|
|
170
|
-
pendingEffects.push({ cardIndex: cardIndex, effectIndex: effectIndex, triggerEvent: triggerEvent, auto: !!effect.auto });
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
return pendingEffects;
|
|
174
|
-
};
|
|
175
|
-
TriggerEffectsRule.prototype.getPlayersByEffectPriorityOrder = function () {
|
|
176
|
-
var _a, _b;
|
|
177
|
-
var firstPlayer = (_b = (_a = this.game.rule) === null || _a === void 0 ? void 0 : _a.player) !== null && _b !== void 0 ? _b : this.material(MaterialType_1.MaterialType.FirstPlayerToken).getItem().location.player;
|
|
178
|
-
var index = this.game.players.indexOf(firstPlayer);
|
|
179
|
-
return this.game.players.slice(index).concat(this.game.players.slice(0, index));
|
|
180
|
-
};
|
|
181
|
-
return TriggerEffectsRule;
|
|
182
|
-
}(rules_api_1.MaterialRulesPart));
|
|
183
|
-
exports.TriggerEffectsRule = TriggerEffectsRule;
|
|
1
|
+
import { MaterialRulesPart } from '@gamepark/rules-api';
|
|
2
|
+
import { isTriggeredEffect, PendingEffectsType, TriggerEventType } from '../../material/entity/Effect';
|
|
3
|
+
import { getEffects } from '../../material/entity/EntityDescription';
|
|
4
|
+
import { MaterialType } from '../../material/MaterialType';
|
|
5
|
+
import { Pantheon } from '../../material/Pantheon';
|
|
6
|
+
import { Memory } from '../../Memory';
|
|
7
|
+
export class TriggerEffectsRule extends MaterialRulesPart {
|
|
8
|
+
triggerEffects(...triggerEvents) {
|
|
9
|
+
const players = this.getPlayersByEffectPriorityOrder();
|
|
10
|
+
for (const player of players.reverse()) {
|
|
11
|
+
this.triggerPlayerEffects(player, ...triggerEvents);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
triggerPlayerEffects(player, ...triggerEvents) {
|
|
15
|
+
const effects = this.getPlayerEffects(player, ...triggerEvents);
|
|
16
|
+
if (effects.length) {
|
|
17
|
+
this.remind(Memory.PendingEffects).unshift({ type: PendingEffectsType.CardsEffects, player, effects });
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
getPlayerEffects(player, ...triggerEvents) {
|
|
21
|
+
const pendingEffects = [];
|
|
22
|
+
const pantheon = new Pantheon(this.game, player);
|
|
23
|
+
const material = this.material(MaterialType.EntityCard);
|
|
24
|
+
const cards = pantheon.visibleEntities.getIndexes().map((index) => ({ index, location: material.getItem(index).location }));
|
|
25
|
+
for (const event of triggerEvents) {
|
|
26
|
+
if (event.type === TriggerEventType.EntityCrushed) {
|
|
27
|
+
const location = material.getItem(event.cardIndex).location;
|
|
28
|
+
if (location.player === player && !cards.some((card) => card.index === event.cardIndex)) {
|
|
29
|
+
cards.push({ index: event.cardIndex, location });
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (event.type === TriggerEventType.EntityPlaced && event.location.player === player && !cards.some((card) => card.index === event.cardIndex)) {
|
|
33
|
+
cards.push({ index: event.cardIndex, location: event.location });
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
for (const triggerEvent of triggerEvents) {
|
|
37
|
+
for (const { index, location } of cards) {
|
|
38
|
+
pendingEffects.push(...this.getCardEffects(index, location, triggerEvent));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return pendingEffects;
|
|
42
|
+
}
|
|
43
|
+
triggerCardEffect(cardIndex, cardLocation, triggerEvent, entity) {
|
|
44
|
+
const effects = this.getCardEffects(cardIndex, cardLocation, triggerEvent, entity);
|
|
45
|
+
if (effects.length) {
|
|
46
|
+
this.remind(Memory.PendingEffects).unshift({ type: PendingEffectsType.CardsEffects, player: cardLocation.player, effects });
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
getCardEffects(cardIndex, cardLocation, triggerEvent, entity = this.material(MaterialType.EntityCard).getItem(cardIndex).id.front) {
|
|
50
|
+
const pendingEffects = [];
|
|
51
|
+
const effects = getEffects(entity);
|
|
52
|
+
for (let effectIndex = 0; effectIndex < effects.length; effectIndex++) {
|
|
53
|
+
const effect = effects[effectIndex];
|
|
54
|
+
if (isTriggeredEffect(effect) && effect.trigger(triggerEvent, { cardIndex, cardLocation, game: this.game })) {
|
|
55
|
+
pendingEffects.push({ cardIndex, effectIndex, triggerEvent, auto: !!effect.auto });
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return pendingEffects;
|
|
59
|
+
}
|
|
60
|
+
getPlayersByEffectPriorityOrder() {
|
|
61
|
+
const firstPlayer = this.game.rule?.player ??
|
|
62
|
+
this.remind(Memory.PendingRule)?.player ??
|
|
63
|
+
this.material(MaterialType.FirstPlayerToken).getItem().location.player;
|
|
64
|
+
const index = this.game.players.indexOf(firstPlayer);
|
|
65
|
+
return this.game.players.slice(index).concat(this.game.players.slice(0, index));
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { ItemMove } from '@gamepark/rules-api';
|
|
2
|
-
import { PlaceCardEffectRule } from '../../material/entity/PlaceCardEffectRule';
|
|
3
|
-
import { PlayerEffectRule } from '../../material/entity/PlayerEffectRule';
|
|
4
|
-
import { RuleId } from '../RuleId';
|
|
5
|
-
export declare class UkukuEffectRule extends PlayerEffectRule {
|
|
6
|
-
ruleId: RuleId;
|
|
7
|
-
getPlayerMoves(): import("@gamepark/rules-api").MoveItem<number, number, number>[];
|
|
8
|
-
afterItemMove(move: ItemMove): import("@gamepark/rules-api").StartRule<RuleId.UkukuPlaceEffect>[];
|
|
9
|
-
}
|
|
10
|
-
export declare class UkukuPlaceEffectRule extends PlaceCardEffectRule {
|
|
11
|
-
getCardsToPlace(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
12
|
-
getAvailableDestinations(cardIndex: number): import("@gamepark/rules-api").XYCoordinates[];
|
|
13
|
-
onRuleEnd(): never[];
|
|
14
|
-
}
|
|
1
|
+
import { ItemMove } from '@gamepark/rules-api';
|
|
2
|
+
import { PlaceCardEffectRule } from '../../material/entity/PlaceCardEffectRule';
|
|
3
|
+
import { PlayerEffectRule } from '../../material/entity/PlayerEffectRule';
|
|
4
|
+
import { RuleId } from '../RuleId';
|
|
5
|
+
export declare class UkukuEffectRule extends PlayerEffectRule {
|
|
6
|
+
ruleId: RuleId;
|
|
7
|
+
getPlayerMoves(): import("@gamepark/rules-api").MoveItem<number, number, number>[];
|
|
8
|
+
afterItemMove(move: ItemMove): import("@gamepark/rules-api").StartRule<RuleId.UkukuPlaceEffect>[];
|
|
9
|
+
}
|
|
10
|
+
export declare class UkukuPlaceEffectRule extends PlaceCardEffectRule {
|
|
11
|
+
getCardsToPlace(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
12
|
+
getAvailableDestinations(cardIndex: number): import("@gamepark/rules-api").XYCoordinates[];
|
|
13
|
+
onRuleEnd(): never[];
|
|
14
|
+
}
|
|
@@ -1,66 +1,35 @@
|
|
|
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
|
-
return
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return new Destiny_1.Destiny(this.game).creaturesOnTopOfDecks.moveItems({ type: LocationType_1.LocationType.PlayerSelectedCards, player: this.player });
|
|
37
|
-
};
|
|
38
|
-
UkukuEffectRule.prototype.afterItemMove = function (move) {
|
|
39
|
-
if ((0, rules_api_1.isMoveItemType)(MaterialType_1.MaterialType.EntityCard)(move) && move.location.type === LocationType_1.LocationType.PlayerSelectedCards) {
|
|
40
|
-
this.memorize(Memory_1.Memory.TargetEntities, move.itemIndex);
|
|
41
|
-
return [this.startRule(RuleId_1.RuleId.UkukuPlaceEffect)];
|
|
42
|
-
}
|
|
43
|
-
return [];
|
|
44
|
-
};
|
|
45
|
-
return UkukuEffectRule;
|
|
46
|
-
}(PlayerEffectRule_1.PlayerEffectRule));
|
|
47
|
-
exports.UkukuEffectRule = UkukuEffectRule;
|
|
48
|
-
var UkukuPlaceEffectRule = (function (_super) {
|
|
49
|
-
__extends(UkukuPlaceEffectRule, _super);
|
|
50
|
-
function UkukuPlaceEffectRule() {
|
|
51
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
52
|
-
}
|
|
53
|
-
UkukuPlaceEffectRule.prototype.getCardsToPlace = function () {
|
|
54
|
-
return this.material(MaterialType_1.MaterialType.EntityCard).index(this.remind(Memory_1.Memory.TargetEntities));
|
|
55
|
-
};
|
|
56
|
-
UkukuPlaceEffectRule.prototype.getAvailableDestinations = function (cardIndex) {
|
|
57
|
-
var ukuku = this.material(MaterialType_1.MaterialType.EntityCard).getItem(cardIndex);
|
|
58
|
-
return new Pantheon_1.Pantheon(this.game, this.player).legalSpaces.filter(function (space) { return space.x === ukuku.location.x; });
|
|
59
|
-
};
|
|
60
|
-
UkukuPlaceEffectRule.prototype.onRuleEnd = function () {
|
|
61
|
-
this.forget(Memory_1.Memory.TargetEntities);
|
|
62
|
-
return [];
|
|
63
|
-
};
|
|
64
|
-
return UkukuPlaceEffectRule;
|
|
65
|
-
}(PlaceCardEffectRule_1.PlaceCardEffectRule));
|
|
66
|
-
exports.UkukuPlaceEffectRule = UkukuPlaceEffectRule;
|
|
1
|
+
import { isMoveItemType } from '@gamepark/rules-api';
|
|
2
|
+
import { Destiny } from '../../material/Destiny';
|
|
3
|
+
import { PlaceCardEffectRule } from '../../material/entity/PlaceCardEffectRule';
|
|
4
|
+
import { PlayerEffectRule } from '../../material/entity/PlayerEffectRule';
|
|
5
|
+
import { LocationType } from '../../material/LocationType';
|
|
6
|
+
import { MaterialType } from '../../material/MaterialType';
|
|
7
|
+
import { Pantheon } from '../../material/Pantheon';
|
|
8
|
+
import { Memory } from '../../Memory';
|
|
9
|
+
import { RuleId } from '../RuleId';
|
|
10
|
+
export class UkukuEffectRule extends PlayerEffectRule {
|
|
11
|
+
ruleId = RuleId.UkukuEffect;
|
|
12
|
+
getPlayerMoves() {
|
|
13
|
+
return new Destiny(this.game).creaturesOnTopOfDecks.moveItems({ type: LocationType.PlayerSelectedCards, player: this.player });
|
|
14
|
+
}
|
|
15
|
+
afterItemMove(move) {
|
|
16
|
+
if (isMoveItemType(MaterialType.EntityCard)(move) && move.location.type === LocationType.PlayerSelectedCards) {
|
|
17
|
+
this.memorize(Memory.TargetEntities, move.itemIndex);
|
|
18
|
+
return [this.startRule(RuleId.UkukuPlaceEffect)];
|
|
19
|
+
}
|
|
20
|
+
return [];
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export class UkukuPlaceEffectRule extends PlaceCardEffectRule {
|
|
24
|
+
getCardsToPlace() {
|
|
25
|
+
return this.material(MaterialType.EntityCard).index(this.remind(Memory.TargetEntities));
|
|
26
|
+
}
|
|
27
|
+
getAvailableDestinations(cardIndex) {
|
|
28
|
+
const ukuku = this.material(MaterialType.EntityCard).getItem(cardIndex);
|
|
29
|
+
return new Pantheon(this.game, this.player).legalSpaces.filter((space) => space.x === ukuku.location.x);
|
|
30
|
+
}
|
|
31
|
+
onRuleEnd() {
|
|
32
|
+
this.forget(Memory.TargetEntities);
|
|
33
|
+
return [];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { MaterialItem, MaterialMove } from '@gamepark/rules-api';
|
|
2
|
-
import { MoveEffectRule } from '../../material/entity/MoveEffectRule';
|
|
3
|
-
import { RuleId } from '../RuleId';
|
|
4
|
-
export declare class VetalaEffectRule extends MoveEffectRule {
|
|
5
|
-
ruleId: RuleId;
|
|
6
|
-
onRuleStart(): MaterialMove[];
|
|
7
|
-
getPlayerMoves(): MaterialMove
|
|
8
|
-
getAvailableDestinations(card: MaterialItem, cardIndex: number): import("@gamepark/rules-api").XYCoordinates[];
|
|
9
|
-
onCardMoved(): import("@gamepark/rules-api").CustomMove
|
|
10
|
-
onCardSacrificed(): import("@gamepark/rules-api").CustomMove
|
|
11
|
-
onRuleEnd(): never[];
|
|
12
|
-
}
|
|
1
|
+
import { MaterialItem, MaterialMove } from '@gamepark/rules-api';
|
|
2
|
+
import { MoveEffectRule } from '../../material/entity/MoveEffectRule';
|
|
3
|
+
import { RuleId } from '../RuleId';
|
|
4
|
+
export declare class VetalaEffectRule extends MoveEffectRule {
|
|
5
|
+
ruleId: RuleId;
|
|
6
|
+
onRuleStart(): MaterialMove[];
|
|
7
|
+
getPlayerMoves(): MaterialMove[];
|
|
8
|
+
getAvailableDestinations(card: MaterialItem, cardIndex: number): import("@gamepark/rules-api").XYCoordinates[];
|
|
9
|
+
onCardMoved(): import("@gamepark/rules-api").CustomMove[];
|
|
10
|
+
onCardSacrificed(): import("@gamepark/rules-api").CustomMove[];
|
|
11
|
+
onRuleEnd(): never[];
|
|
12
|
+
}
|