@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,13 +1,13 @@
|
|
|
1
|
-
import { MaterialMove, XYCoordinates } from '@gamepark/rules-api';
|
|
2
|
-
import { PlaceCardEffectRule } from '../../material/entity/PlaceCardEffectRule';
|
|
3
|
-
import { PlayerColor } from '../../PlayerColor';
|
|
4
|
-
import { RuleId } from '../RuleId';
|
|
5
|
-
export declare class RakshasaEffectRule extends PlaceCardEffectRule {
|
|
6
|
-
ruleId: RuleId;
|
|
7
|
-
canPlayEffect(cardIndex: number): boolean;
|
|
8
|
-
onRuleStart(): MaterialMove[];
|
|
9
|
-
getCardsToPlace(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
10
|
-
getAvailableDestinations(cardIndex: number): (XYCoordinates & {
|
|
11
|
-
player: PlayerColor;
|
|
12
|
-
})[];
|
|
13
|
-
}
|
|
1
|
+
import { MaterialMove, XYCoordinates } from '@gamepark/rules-api';
|
|
2
|
+
import { PlaceCardEffectRule } from '../../material/entity/PlaceCardEffectRule';
|
|
3
|
+
import { PlayerColor } from '../../PlayerColor';
|
|
4
|
+
import { RuleId } from '../RuleId';
|
|
5
|
+
export declare class RakshasaEffectRule extends PlaceCardEffectRule {
|
|
6
|
+
ruleId: RuleId;
|
|
7
|
+
canPlayEffect(cardIndex: number): boolean;
|
|
8
|
+
onRuleStart(): MaterialMove[];
|
|
9
|
+
getCardsToPlace(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
10
|
+
getAvailableDestinations(cardIndex: number): (XYCoordinates & {
|
|
11
|
+
player: PlayerColor;
|
|
12
|
+
})[];
|
|
13
|
+
}
|
|
@@ -1,48 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
var RakshasaEffectRule = (function (_super) {
|
|
25
|
-
__extends(RakshasaEffectRule, _super);
|
|
26
|
-
function RakshasaEffectRule() {
|
|
27
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
28
|
-
_this.ruleId = RuleId_1.RuleId.RakshasaEffect;
|
|
29
|
-
return _this;
|
|
30
|
-
}
|
|
31
|
-
RakshasaEffectRule.prototype.canPlayEffect = function (cardIndex) {
|
|
32
|
-
var pantheon = new Pantheon_1.Pantheon(this.game, this.player);
|
|
33
|
-
return pantheon.gems > 0 && _super.prototype.canPlayEffect.call(this, cardIndex);
|
|
34
|
-
};
|
|
35
|
-
RakshasaEffectRule.prototype.onRuleStart = function () {
|
|
36
|
-
return [new Pantheon_1.Pantheon(this.game, this.player).spendGems(1)];
|
|
37
|
-
};
|
|
38
|
-
RakshasaEffectRule.prototype.getCardsToPlace = function () {
|
|
39
|
-
return new Destiny_1.Destiny(this.game).getAvailableCards(this.player);
|
|
40
|
-
};
|
|
41
|
-
RakshasaEffectRule.prototype.getAvailableDestinations = function (cardIndex) {
|
|
42
|
-
var location = this.material(MaterialType_1.MaterialType.EntityCard).getItem(cardIndex).location;
|
|
43
|
-
var pantheon = new Pantheon_1.Pantheon(this.game, location.player);
|
|
44
|
-
return pantheon.isLegalSpaceToInvoke(location) ? [location] : [];
|
|
45
|
-
};
|
|
46
|
-
return RakshasaEffectRule;
|
|
47
|
-
}(PlaceCardEffectRule_1.PlaceCardEffectRule));
|
|
48
|
-
exports.RakshasaEffectRule = RakshasaEffectRule;
|
|
1
|
+
import { Destiny } from '../../material/Destiny';
|
|
2
|
+
import { PlaceCardEffectRule } from '../../material/entity/PlaceCardEffectRule';
|
|
3
|
+
import { MaterialType } from '../../material/MaterialType';
|
|
4
|
+
import { Pantheon } from '../../material/Pantheon';
|
|
5
|
+
import { RuleId } from '../RuleId';
|
|
6
|
+
export class RakshasaEffectRule extends PlaceCardEffectRule {
|
|
7
|
+
ruleId = RuleId.RakshasaEffect;
|
|
8
|
+
canPlayEffect(cardIndex) {
|
|
9
|
+
const pantheon = new Pantheon(this.game, this.player);
|
|
10
|
+
return pantheon.gems > 0 && super.canPlayEffect(cardIndex);
|
|
11
|
+
}
|
|
12
|
+
onRuleStart() {
|
|
13
|
+
return [new Pantheon(this.game, this.player).spendGems(1)];
|
|
14
|
+
}
|
|
15
|
+
getCardsToPlace() {
|
|
16
|
+
return new Destiny(this.game).getAvailableCards(this.player);
|
|
17
|
+
}
|
|
18
|
+
getAvailableDestinations(cardIndex) {
|
|
19
|
+
const location = this.material(MaterialType.EntityCard).getItem(cardIndex).location;
|
|
20
|
+
const pantheon = new Pantheon(this.game, location.player);
|
|
21
|
+
return pantheon.isLegalSpaceToInvoke(location) ? [location] : [];
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { CustomMove, MaterialMove, PlayerTurnRule, RuleMove, RuleStep } from '@gamepark/rules-api';
|
|
2
|
-
import { PendingEffect } from '../../material/entity/Effect';
|
|
3
|
-
import { RuleId } from '../RuleId';
|
|
4
|
-
export declare class ResolveEffectsRule extends PlayerTurnRule {
|
|
5
|
-
startEffectsResolution(): import("@gamepark/rules-api").StartPlayerTurn<number, RuleId.ResolveEffects>[] | import("@gamepark/rules-api").StartRule<RuleId.ResolveEffects>[];
|
|
6
|
-
onRuleStart(_move: RuleMove, previousRule: RuleStep): CustomMove
|
|
7
|
-
getPlayerMoves(): CustomMove
|
|
8
|
-
onCustomMove(move: CustomMove): MaterialMove
|
|
9
|
-
onPlayEffect(pendingEffect: PendingEffect): MaterialMove
|
|
10
|
-
playEffect(pendingEffect: PendingEffect): MaterialMove
|
|
11
|
-
onEndEffect(): MaterialMove
|
|
12
|
-
}
|
|
1
|
+
import { CustomMove, MaterialMove, PlayerTurnRule, RuleMove, RuleStep } from '@gamepark/rules-api';
|
|
2
|
+
import { PendingEffect } from '../../material/entity/Effect';
|
|
3
|
+
import { RuleId } from '../RuleId';
|
|
4
|
+
export declare class ResolveEffectsRule extends PlayerTurnRule {
|
|
5
|
+
startEffectsResolution(): import("@gamepark/rules-api").StartPlayerTurn<number, RuleId.ResolveEffects>[] | import("@gamepark/rules-api").StartRule<RuleId.ResolveEffects>[];
|
|
6
|
+
onRuleStart(_move: RuleMove, previousRule: RuleStep): CustomMove[];
|
|
7
|
+
getPlayerMoves(): CustomMove[];
|
|
8
|
+
onCustomMove(move: CustomMove): MaterialMove[];
|
|
9
|
+
onPlayEffect(pendingEffect: PendingEffect): MaterialMove[];
|
|
10
|
+
playEffect(pendingEffect: PendingEffect): MaterialMove[];
|
|
11
|
+
onEndEffect(): MaterialMove[];
|
|
12
|
+
}
|
|
@@ -1,141 +1,87 @@
|
|
|
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
|
-
return
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
else if (move.type === CustomMoveType_1.CustomMoveType.EndEffect) {
|
|
89
|
-
return this.onEndEffect();
|
|
90
|
-
}
|
|
91
|
-
return [];
|
|
92
|
-
};
|
|
93
|
-
ResolveEffectsRule.prototype.onPlayEffect = function (pendingEffect) {
|
|
94
|
-
var pendingEffects = this.remind(Memory_1.Memory.PendingEffects);
|
|
95
|
-
if (pendingEffects.length) {
|
|
96
|
-
pendingEffects[0] = pendingEffects[0].filter(function (effect) { return !(0, lodash_1.isEqual)(effect, pendingEffect); });
|
|
97
|
-
if (pendingEffects[0].length === 0) {
|
|
98
|
-
pendingEffects.splice(0, 1);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
return this.playEffect(pendingEffect);
|
|
102
|
-
};
|
|
103
|
-
ResolveEffectsRule.prototype.playEffect = function (pendingEffect) {
|
|
104
|
-
this.memorize(Memory_1.Memory.OngoingEffect, pendingEffect);
|
|
105
|
-
var card = this.material(MaterialType_1.MaterialType.EntityCard).getItem(pendingEffect.cardIndex);
|
|
106
|
-
var effect = (0, EntityDescription_1.getEffects)(card.id.front)[pendingEffect.effectIndex];
|
|
107
|
-
if (effect.trigger === Effect_1.oncePerTurn) {
|
|
108
|
-
this.memorize(Memory_1.Memory.OncePerTurn, function (indexes) {
|
|
109
|
-
if (indexes === void 0) { indexes = []; }
|
|
110
|
-
return indexes.concat(pendingEffect.cardIndex);
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
var moves = new effect.rule(this.game).playEffect();
|
|
114
|
-
if (!moves.some(function (move) { return move.kind === rules_api_1.MoveKind.RulesMove; })) {
|
|
115
|
-
moves.push(this.customMove(CustomMoveType_1.CustomMoveType.EndEffect));
|
|
116
|
-
}
|
|
117
|
-
return moves;
|
|
118
|
-
};
|
|
119
|
-
ResolveEffectsRule.prototype.onEndEffect = function () {
|
|
120
|
-
var moves = [];
|
|
121
|
-
this.forget(Memory_1.Memory.OngoingEffect);
|
|
122
|
-
if (this.remind(Memory_1.Memory.PendingEffects).length) {
|
|
123
|
-
moves.push.apply(moves, __spreadArray([], __read(this.startEffectsResolution()), false));
|
|
124
|
-
}
|
|
125
|
-
else {
|
|
126
|
-
var pendingRule = this.remind(Memory_1.Memory.PendingRule);
|
|
127
|
-
if (pendingRule) {
|
|
128
|
-
this.forget(Memory_1.Memory.PendingRule);
|
|
129
|
-
if (pendingRule.id === RuleId_1.RuleId.EndGame) {
|
|
130
|
-
moves.push.apply(moves, __spreadArray(__spreadArray([], __read(new EndGameRule_1.EndGameRule(this.game).convertGems()), false), [this.endGame()], false));
|
|
131
|
-
}
|
|
132
|
-
else {
|
|
133
|
-
moves.push(this.startPlayerTurn(RuleId_1.RuleId.PlaceCards, pendingRule.player));
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
return moves;
|
|
138
|
-
};
|
|
139
|
-
return ResolveEffectsRule;
|
|
140
|
-
}(rules_api_1.PlayerTurnRule));
|
|
141
|
-
exports.ResolveEffectsRule = ResolveEffectsRule;
|
|
1
|
+
import { MoveKind, PlayerTurnRule } from '@gamepark/rules-api';
|
|
2
|
+
import { isEqual } from 'es-toolkit';
|
|
3
|
+
import { CustomMoveType } from '../../CustomMoveType';
|
|
4
|
+
import { oncePerTurn } from '../../material/entity/Effect';
|
|
5
|
+
import { getEffects } from '../../material/entity/EntityDescription';
|
|
6
|
+
import { MaterialType } from '../../material/MaterialType';
|
|
7
|
+
import { Memory } from '../../Memory';
|
|
8
|
+
import { EndGameRule } from '../EndGameRule';
|
|
9
|
+
import { RuleId } from '../RuleId';
|
|
10
|
+
export class ResolveEffectsRule extends PlayerTurnRule {
|
|
11
|
+
startEffectsResolution() {
|
|
12
|
+
const pendingEffects = this.remind(Memory.PendingEffects)[0];
|
|
13
|
+
if (pendingEffects.every((effect) => effect.auto)) {
|
|
14
|
+
return [this.startRule(RuleId.ResolveEffects)];
|
|
15
|
+
}
|
|
16
|
+
const cardIndex = pendingEffects[0].cardIndex;
|
|
17
|
+
const player = this.material(MaterialType.EntityCard).getItem(cardIndex).location.player;
|
|
18
|
+
return [this.startPlayerTurn(RuleId.ResolveEffects, player)];
|
|
19
|
+
}
|
|
20
|
+
onRuleStart(_move, previousRule) {
|
|
21
|
+
if (!this.remind(Memory.PendingRule)) {
|
|
22
|
+
this.memorize(Memory.PendingRule, previousRule);
|
|
23
|
+
}
|
|
24
|
+
const moves = this.getPlayerMoves();
|
|
25
|
+
return moves.length === 1 ? moves : [];
|
|
26
|
+
}
|
|
27
|
+
getPlayerMoves() {
|
|
28
|
+
const pendingEffects = this.remind(Memory.PendingEffects)[0] ?? [];
|
|
29
|
+
const autoEffect = pendingEffects.find((effect) => effect.auto);
|
|
30
|
+
if (autoEffect) {
|
|
31
|
+
return [this.customMove(CustomMoveType.PlayEffect, autoEffect)];
|
|
32
|
+
}
|
|
33
|
+
return pendingEffects.map((effect) => this.customMove(CustomMoveType.PlayEffect, effect));
|
|
34
|
+
}
|
|
35
|
+
onCustomMove(move) {
|
|
36
|
+
if (move.type === CustomMoveType.PlayEffect) {
|
|
37
|
+
return this.onPlayEffect(move.data);
|
|
38
|
+
}
|
|
39
|
+
else if (move.type === CustomMoveType.EndEffect) {
|
|
40
|
+
return this.onEndEffect();
|
|
41
|
+
}
|
|
42
|
+
return [];
|
|
43
|
+
}
|
|
44
|
+
onPlayEffect(pendingEffect) {
|
|
45
|
+
const pendingEffects = this.remind(Memory.PendingEffects);
|
|
46
|
+
if (pendingEffects.length) {
|
|
47
|
+
pendingEffects[0] = pendingEffects[0].filter((effect) => !isEqual(effect, pendingEffect));
|
|
48
|
+
if (pendingEffects[0].length === 0) {
|
|
49
|
+
pendingEffects.splice(0, 1);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return this.playEffect(pendingEffect);
|
|
53
|
+
}
|
|
54
|
+
playEffect(pendingEffect) {
|
|
55
|
+
this.memorize(Memory.OngoingEffect, pendingEffect);
|
|
56
|
+
const card = this.material(MaterialType.EntityCard).getItem(pendingEffect.cardIndex);
|
|
57
|
+
const effect = getEffects(card.id.front)[pendingEffect.effectIndex];
|
|
58
|
+
if (effect.trigger === oncePerTurn) {
|
|
59
|
+
this.memorize(Memory.OncePerTurn, (indexes = []) => indexes.concat(pendingEffect.cardIndex));
|
|
60
|
+
}
|
|
61
|
+
const moves = new effect.rule(this.game).playEffect();
|
|
62
|
+
if (!moves.some((move) => move.kind === MoveKind.RulesMove)) {
|
|
63
|
+
moves.push(this.customMove(CustomMoveType.EndEffect));
|
|
64
|
+
}
|
|
65
|
+
return moves;
|
|
66
|
+
}
|
|
67
|
+
onEndEffect() {
|
|
68
|
+
const moves = [];
|
|
69
|
+
this.forget(Memory.OngoingEffect);
|
|
70
|
+
if (this.remind(Memory.PendingEffects).length) {
|
|
71
|
+
moves.push(...this.startEffectsResolution());
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
const pendingRule = this.remind(Memory.PendingRule);
|
|
75
|
+
if (pendingRule) {
|
|
76
|
+
this.forget(Memory.PendingRule);
|
|
77
|
+
if (pendingRule.id === RuleId.EndGame) {
|
|
78
|
+
moves.push(...new EndGameRule(this.game).convertGems(), this.endGame());
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
moves.push(this.startPlayerTurn(RuleId.PlaceCards, pendingRule.player));
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return moves;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ItemMove } from '@gamepark/rules-api';
|
|
2
|
-
import { PlayerEffectRule } from '../../material/entity/PlayerEffectRule';
|
|
3
|
-
import { RuleId } from '../RuleId';
|
|
4
|
-
export declare class SelkieEffectRule extends PlayerEffectRule {
|
|
5
|
-
ruleId: RuleId;
|
|
6
|
-
getPlayerMoves(): import("@gamepark/rules-api").CreateItem<number, number, number>[];
|
|
7
|
-
afterItemMove(move: ItemMove): import("@gamepark/rules-api").CustomMove
|
|
8
|
-
}
|
|
1
|
+
import { ItemMove } from '@gamepark/rules-api';
|
|
2
|
+
import { PlayerEffectRule } from '../../material/entity/PlayerEffectRule';
|
|
3
|
+
import { RuleId } from '../RuleId';
|
|
4
|
+
export declare class SelkieEffectRule extends PlayerEffectRule {
|
|
5
|
+
ruleId: RuleId;
|
|
6
|
+
getPlayerMoves(): import("@gamepark/rules-api").CreateItem<number, number, number>[];
|
|
7
|
+
afterItemMove(move: ItemMove): import("@gamepark/rules-api").CustomMove[];
|
|
8
|
+
}
|
|
@@ -1,44 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var CustomMoveType_1 = require("../../CustomMoveType");
|
|
21
|
-
var PlayerEffectRule_1 = require("../../material/entity/PlayerEffectRule");
|
|
22
|
-
var MaterialType_1 = require("../../material/MaterialType");
|
|
23
|
-
var Pantheon_1 = require("../../material/Pantheon");
|
|
24
|
-
var RuleId_1 = require("../RuleId");
|
|
25
|
-
var SelkieEffectRule = (function (_super) {
|
|
26
|
-
__extends(SelkieEffectRule, _super);
|
|
27
|
-
function SelkieEffectRule() {
|
|
28
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
29
|
-
_this.ruleId = RuleId_1.RuleId.SelkieEffect;
|
|
30
|
-
return _this;
|
|
31
|
-
}
|
|
32
|
-
SelkieEffectRule.prototype.getPlayerMoves = function () {
|
|
33
|
-
var pantheon = new Pantheon_1.Pantheon(this.game, this.player);
|
|
34
|
-
return [pantheon.gainFavor(1), pantheon.gainGems(1)];
|
|
35
|
-
};
|
|
36
|
-
SelkieEffectRule.prototype.afterItemMove = function (move) {
|
|
37
|
-
if ((0, rules_api_1.isCreateItemType)(MaterialType_1.MaterialType.GemToken)(move) || (0, rules_api_1.isCreateItemType)(MaterialType_1.MaterialType.FavorToken)(move)) {
|
|
38
|
-
return [this.customMove(CustomMoveType_1.CustomMoveType.EndEffect)];
|
|
39
|
-
}
|
|
40
|
-
return [];
|
|
41
|
-
};
|
|
42
|
-
return SelkieEffectRule;
|
|
43
|
-
}(PlayerEffectRule_1.PlayerEffectRule));
|
|
44
|
-
exports.SelkieEffectRule = SelkieEffectRule;
|
|
1
|
+
import { isCreateItemType } from '@gamepark/rules-api';
|
|
2
|
+
import { CustomMoveType } from '../../CustomMoveType';
|
|
3
|
+
import { PlayerEffectRule } from '../../material/entity/PlayerEffectRule';
|
|
4
|
+
import { MaterialType } from '../../material/MaterialType';
|
|
5
|
+
import { Pantheon } from '../../material/Pantheon';
|
|
6
|
+
import { RuleId } from '../RuleId';
|
|
7
|
+
export class SelkieEffectRule extends PlayerEffectRule {
|
|
8
|
+
ruleId = RuleId.SelkieEffect;
|
|
9
|
+
getPlayerMoves() {
|
|
10
|
+
const pantheon = new Pantheon(this.game, this.player);
|
|
11
|
+
return [pantheon.gainFavor(1), pantheon.gainGems(1)];
|
|
12
|
+
}
|
|
13
|
+
afterItemMove(move) {
|
|
14
|
+
if (isCreateItemType(MaterialType.GemToken)(move) || isCreateItemType(MaterialType.FavorToken)(move)) {
|
|
15
|
+
return [this.customMove(CustomMoveType.EndEffect)];
|
|
16
|
+
}
|
|
17
|
+
return [];
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ItemMove, MaterialMove } from '@gamepark/rules-api';
|
|
2
|
-
import { PlayerEffectRule } from '../../material/entity/PlayerEffectRule';
|
|
3
|
-
import { RuleId } from '../RuleId';
|
|
4
|
-
export declare class ShivaEffectRule extends PlayerEffectRule {
|
|
5
|
-
ruleId: RuleId;
|
|
6
|
-
canPlayEffect(cardIndex: number): boolean;
|
|
7
|
-
onRuleStart(): MaterialMove[];
|
|
8
|
-
getPlayerMoves(cardIndex?: number): import("@gamepark/rules-api").MoveItemsAtOnce<number, number, number>[];
|
|
9
|
-
beforeItemMove(move: ItemMove): (import("@gamepark/rules-api").CustomMove
|
|
10
|
-
}
|
|
1
|
+
import { ItemMove, MaterialMove } from '@gamepark/rules-api';
|
|
2
|
+
import { PlayerEffectRule } from '../../material/entity/PlayerEffectRule';
|
|
3
|
+
import { RuleId } from '../RuleId';
|
|
4
|
+
export declare class ShivaEffectRule extends PlayerEffectRule {
|
|
5
|
+
ruleId: RuleId;
|
|
6
|
+
canPlayEffect(cardIndex: number): boolean;
|
|
7
|
+
onRuleStart(): MaterialMove[];
|
|
8
|
+
getPlayerMoves(cardIndex?: number): import("@gamepark/rules-api").MoveItemsAtOnce<number, number, number>[];
|
|
9
|
+
beforeItemMove(move: ItemMove): (import("@gamepark/rules-api").CustomMove | import("@gamepark/rules-api").CreateItem<number, number, number>)[];
|
|
10
|
+
}
|
|
@@ -1,61 +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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
var pantheon = new Pantheon_1.Pantheon(this.game, player);
|
|
37
|
-
return pantheon.gems > 0 && this.getPlayerMoves(cardIndex).length > 0;
|
|
38
|
-
};
|
|
39
|
-
ShivaEffectRule.prototype.onRuleStart = function () {
|
|
40
|
-
return [new Pantheon_1.Pantheon(this.game, this.player).spendGems(1)];
|
|
41
|
-
};
|
|
42
|
-
ShivaEffectRule.prototype.getPlayerMoves = function (cardIndex) {
|
|
43
|
-
if (cardIndex === void 0) { cardIndex = this.getEffect().cardIndex; }
|
|
44
|
-
var location = this.material(MaterialType_1.MaterialType.EntityCard).getItem(cardIndex).location;
|
|
45
|
-
var pantheon = new Pantheon_1.Pantheon(this.game, location.player);
|
|
46
|
-
var rule = new PermanentEffectsRule_1.PermanentEffectsRule(this.game);
|
|
47
|
-
var piles = pantheon
|
|
48
|
-
.getPiles(function (space) { return (0, rules_api_1.areAdjacentSquares)(space, location); })
|
|
49
|
-
.filter(function (pile) { return rule.canSacrifice(pile.maxBy(function (item) { return item.location.z; }).getItem()); });
|
|
50
|
-
return piles.map(function (pile) { return pile.moveItemsAtOnce({ type: LocationType_1.LocationType.PlayerDiscard, player: location.player }); });
|
|
51
|
-
};
|
|
52
|
-
ShivaEffectRule.prototype.beforeItemMove = function (move) {
|
|
53
|
-
if ((0, rules_api_1.isMoveItemTypeAtOnce)(MaterialType_1.MaterialType.EntityCard)(move) && move.location.type === LocationType_1.LocationType.PlayerDiscard) {
|
|
54
|
-
var pantheon = new Pantheon_1.Pantheon(this.game, this.player);
|
|
55
|
-
return [pantheon.gainFavor(move.indexes.length), this.customMove(CustomMoveType_1.CustomMoveType.EndEffect)];
|
|
56
|
-
}
|
|
57
|
-
return [];
|
|
58
|
-
};
|
|
59
|
-
return ShivaEffectRule;
|
|
60
|
-
}(PlayerEffectRule_1.PlayerEffectRule));
|
|
61
|
-
exports.ShivaEffectRule = ShivaEffectRule;
|
|
1
|
+
import { areAdjacentSquares, isMoveItemTypeAtOnce } from '@gamepark/rules-api';
|
|
2
|
+
import { CustomMoveType } from '../../CustomMoveType';
|
|
3
|
+
import { PlayerEffectRule } from '../../material/entity/PlayerEffectRule';
|
|
4
|
+
import { LocationType } from '../../material/LocationType';
|
|
5
|
+
import { MaterialType } from '../../material/MaterialType';
|
|
6
|
+
import { Pantheon } from '../../material/Pantheon';
|
|
7
|
+
import { RuleId } from '../RuleId';
|
|
8
|
+
import { PermanentEffectsRule } from './PermanentEffectsRule';
|
|
9
|
+
export class ShivaEffectRule extends PlayerEffectRule {
|
|
10
|
+
ruleId = RuleId.ShivaEffect;
|
|
11
|
+
canPlayEffect(cardIndex) {
|
|
12
|
+
const player = this.material(MaterialType.EntityCard).getItem(cardIndex).location.player;
|
|
13
|
+
const pantheon = new Pantheon(this.game, player);
|
|
14
|
+
return pantheon.gems > 0 && this.getPlayerMoves(cardIndex).length > 0;
|
|
15
|
+
}
|
|
16
|
+
onRuleStart() {
|
|
17
|
+
return [new Pantheon(this.game, this.player).spendGems(1)];
|
|
18
|
+
}
|
|
19
|
+
getPlayerMoves(cardIndex = this.getEffect().cardIndex) {
|
|
20
|
+
const location = this.material(MaterialType.EntityCard).getItem(cardIndex).location;
|
|
21
|
+
const pantheon = new Pantheon(this.game, location.player);
|
|
22
|
+
const rule = new PermanentEffectsRule(this.game);
|
|
23
|
+
const piles = pantheon
|
|
24
|
+
.getPiles((space) => areAdjacentSquares(space, location))
|
|
25
|
+
.filter((pile) => rule.canSacrifice(pile.maxBy((item) => item.location.z).getItem()));
|
|
26
|
+
return piles.map((pile) => pile.moveItemsAtOnce({ type: LocationType.PlayerDiscard, player: location.player }));
|
|
27
|
+
}
|
|
28
|
+
beforeItemMove(move) {
|
|
29
|
+
if (isMoveItemTypeAtOnce(MaterialType.EntityCard)(move) && move.location.type === LocationType.PlayerDiscard) {
|
|
30
|
+
const pantheon = new Pantheon(this.game, this.player);
|
|
31
|
+
return [pantheon.gainFavor(move.indexes.length), this.customMove(CustomMoveType.EndEffect)];
|
|
32
|
+
}
|
|
33
|
+
return [];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Location, Material, MoveItem, XYCoordinates } from '@gamepark/rules-api';
|
|
2
|
-
import { MoveEffectRule } from '../../material/entity/MoveEffectRule';
|
|
3
|
-
import { RuleId } from '../RuleId';
|
|
4
|
-
export declare class SphinxEffectRule extends MoveEffectRule {
|
|
5
|
-
ruleId: RuleId;
|
|
6
|
-
getMovingCards(): Material;
|
|
7
|
-
isLegalDestination(space: XYCoordinates, cardLocation: Location): boolean;
|
|
8
|
-
onCardMoved(move: MoveItem): import("@gamepark/rules-api").MaterialMove
|
|
9
|
-
updateGridAfterMoves(): MoveItem
|
|
10
|
-
}
|
|
1
|
+
import { Location, Material, MoveItem, XYCoordinates } from '@gamepark/rules-api';
|
|
2
|
+
import { MoveEffectRule } from '../../material/entity/MoveEffectRule';
|
|
3
|
+
import { RuleId } from '../RuleId';
|
|
4
|
+
export declare class SphinxEffectRule extends MoveEffectRule {
|
|
5
|
+
ruleId: RuleId;
|
|
6
|
+
getMovingCards(): Material;
|
|
7
|
+
isLegalDestination(space: XYCoordinates, cardLocation: Location): boolean;
|
|
8
|
+
onCardMoved(move: MoveItem): import("@gamepark/rules-api").MaterialMove[];
|
|
9
|
+
updateGridAfterMoves(): MoveItem[];
|
|
10
|
+
}
|