@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,13 +1,13 @@
|
|
|
1
|
-
import { MoveItem } from '@gamepark/rules-api';
|
|
2
|
-
import { InvokeEffectRule } from '../../material/entity/PlaceCardEffectRule';
|
|
3
|
-
import { SacrificeEffectRule } from '../../material/entity/SacrificeEffectRule';
|
|
4
|
-
import { RuleId } from '../RuleId';
|
|
5
|
-
export declare class CobraEffectRule extends SacrificeEffectRule {
|
|
6
|
-
ruleId: RuleId;
|
|
7
|
-
getCardsToSacrifice(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
8
|
-
onSacrifice(move: MoveItem): (MoveItem<number, number, number> | import("@gamepark/rules-api").StartRule<RuleId.CobraInvokeEffect>)[];
|
|
9
|
-
}
|
|
10
|
-
export declare class CobraInvokeEffect extends InvokeEffectRule {
|
|
11
|
-
getCardsToPlace(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
12
|
-
onRuleEnd(): never[];
|
|
13
|
-
}
|
|
1
|
+
import { MoveItem } from '@gamepark/rules-api';
|
|
2
|
+
import { InvokeEffectRule } from '../../material/entity/PlaceCardEffectRule';
|
|
3
|
+
import { SacrificeEffectRule } from '../../material/entity/SacrificeEffectRule';
|
|
4
|
+
import { RuleId } from '../RuleId';
|
|
5
|
+
export declare class CobraEffectRule extends SacrificeEffectRule {
|
|
6
|
+
ruleId: RuleId;
|
|
7
|
+
getCardsToSacrifice(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
8
|
+
onSacrifice(move: MoveItem): (MoveItem<number, number, number> | import("@gamepark/rules-api").StartRule<RuleId.CobraInvokeEffect>)[];
|
|
9
|
+
}
|
|
10
|
+
export declare class CobraInvokeEffect extends InvokeEffectRule {
|
|
11
|
+
getCardsToPlace(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
12
|
+
onRuleEnd(): never[];
|
|
13
|
+
}
|
|
@@ -1,61 +1,30 @@
|
|
|
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
|
-
return _this;
|
|
32
|
-
}
|
|
33
|
-
CobraEffectRule.prototype.getCardsToSacrifice = function () {
|
|
34
|
-
var _a = this.card.location, x = _a.x, y = _a.y;
|
|
35
|
-
return _super.prototype.getCardsToSacrifice.call(this).location(function (l) { return l.x === x && l.y !== y; });
|
|
36
|
-
};
|
|
37
|
-
CobraEffectRule.prototype.onSacrifice = function (move) {
|
|
38
|
-
var cards = this.material(MaterialType_1.MaterialType.EntityCard);
|
|
39
|
-
var mythology = (0, Entity_1.entityMythology)(cards.getItem(move.itemIndex).id.front);
|
|
40
|
-
var creaturesDeck = cards.location(LocationType_1.LocationType.CreaturesDeck).locationId(mythology).deck();
|
|
41
|
-
this.memorize(Memory_1.Memory.TargetEntities, creaturesDeck.getIndex());
|
|
42
|
-
return [creaturesDeck.dealOne({ type: LocationType_1.LocationType.PlayerSelectedCards, player: this.player }), this.startRule(RuleId_1.RuleId.CobraInvokeEffect)];
|
|
43
|
-
};
|
|
44
|
-
return CobraEffectRule;
|
|
45
|
-
}(SacrificeEffectRule_1.SacrificeEffectRule));
|
|
46
|
-
exports.CobraEffectRule = CobraEffectRule;
|
|
47
|
-
var CobraInvokeEffect = (function (_super) {
|
|
48
|
-
__extends(CobraInvokeEffect, _super);
|
|
49
|
-
function CobraInvokeEffect() {
|
|
50
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
51
|
-
}
|
|
52
|
-
CobraInvokeEffect.prototype.getCardsToPlace = function () {
|
|
53
|
-
return this.material(MaterialType_1.MaterialType.EntityCard).index(this.remind(Memory_1.Memory.TargetEntities));
|
|
54
|
-
};
|
|
55
|
-
CobraInvokeEffect.prototype.onRuleEnd = function () {
|
|
56
|
-
this.forget(Memory_1.Memory.TargetEntities);
|
|
57
|
-
return [];
|
|
58
|
-
};
|
|
59
|
-
return CobraInvokeEffect;
|
|
60
|
-
}(PlaceCardEffectRule_1.InvokeEffectRule));
|
|
61
|
-
exports.CobraInvokeEffect = CobraInvokeEffect;
|
|
1
|
+
import { entityMythology } from '../../material/Entity';
|
|
2
|
+
import { InvokeEffectRule } from '../../material/entity/PlaceCardEffectRule';
|
|
3
|
+
import { SacrificeEffectRule } from '../../material/entity/SacrificeEffectRule';
|
|
4
|
+
import { LocationType } from '../../material/LocationType';
|
|
5
|
+
import { MaterialType } from '../../material/MaterialType';
|
|
6
|
+
import { Memory } from '../../Memory';
|
|
7
|
+
import { RuleId } from '../RuleId';
|
|
8
|
+
export class CobraEffectRule extends SacrificeEffectRule {
|
|
9
|
+
ruleId = RuleId.CobraEffect;
|
|
10
|
+
getCardsToSacrifice() {
|
|
11
|
+
const { x, y } = this.card.location;
|
|
12
|
+
return super.getCardsToSacrifice().location((l) => l.x === x && l.y !== y);
|
|
13
|
+
}
|
|
14
|
+
onSacrifice(move) {
|
|
15
|
+
const cards = this.material(MaterialType.EntityCard);
|
|
16
|
+
const mythology = entityMythology(cards.getItem(move.itemIndex).id.front);
|
|
17
|
+
const creaturesDeck = cards.location(LocationType.CreaturesDeck).locationId(mythology).deck();
|
|
18
|
+
this.memorize(Memory.TargetEntities, creaturesDeck.getIndex());
|
|
19
|
+
return [creaturesDeck.dealOne({ type: LocationType.PlayerSelectedCards, player: this.player }), this.startRule(RuleId.CobraInvokeEffect)];
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export class CobraInvokeEffect extends InvokeEffectRule {
|
|
23
|
+
getCardsToPlace() {
|
|
24
|
+
return this.material(MaterialType.EntityCard).index(this.remind(Memory.TargetEntities));
|
|
25
|
+
}
|
|
26
|
+
onRuleEnd() {
|
|
27
|
+
this.forget(Memory.TargetEntities);
|
|
28
|
+
return [];
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { MaterialMove, MoveItem } from '@gamepark/rules-api';
|
|
2
|
-
import { SacrificeEffectRule } from '../../material/entity/SacrificeEffectRule';
|
|
3
|
-
import { RuleId } from '../RuleId';
|
|
4
|
-
export declare class CondorEffectRule extends SacrificeEffectRule {
|
|
5
|
-
ruleId: RuleId;
|
|
6
|
-
getCardsToSacrifice(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
7
|
-
onSacrifice(move: MoveItem): MaterialMove
|
|
8
|
-
}
|
|
1
|
+
import { MaterialMove, MoveItem } from '@gamepark/rules-api';
|
|
2
|
+
import { SacrificeEffectRule } from '../../material/entity/SacrificeEffectRule';
|
|
3
|
+
import { RuleId } from '../RuleId';
|
|
4
|
+
export declare class CondorEffectRule extends SacrificeEffectRule {
|
|
5
|
+
ruleId: RuleId;
|
|
6
|
+
getCardsToSacrifice(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
7
|
+
onSacrifice(move: MoveItem): MaterialMove[];
|
|
8
|
+
}
|
|
@@ -1,45 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var SacrificeEffectRule_1 = require("../../material/entity/SacrificeEffectRule");
|
|
22
|
-
var MaterialType_1 = require("../../material/MaterialType");
|
|
23
|
-
var Pantheon_1 = require("../../material/Pantheon");
|
|
24
|
-
var RuleId_1 = require("../RuleId");
|
|
25
|
-
var CondorEffectRule = (function (_super) {
|
|
26
|
-
__extends(CondorEffectRule, _super);
|
|
27
|
-
function CondorEffectRule() {
|
|
28
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
29
|
-
_this.ruleId = RuleId_1.RuleId.CondorEffect;
|
|
30
|
-
return _this;
|
|
31
|
-
}
|
|
32
|
-
CondorEffectRule.prototype.getCardsToSacrifice = function () {
|
|
33
|
-
var location = this.card.location;
|
|
34
|
-
return _super.prototype.getCardsToSacrifice.call(this).location(function (l) { return (0, rules_api_1.areAdjacentSquares)(l, location); });
|
|
35
|
-
};
|
|
36
|
-
CondorEffectRule.prototype.onSacrifice = function (move) {
|
|
37
|
-
var entity = this.material(MaterialType_1.MaterialType.EntityCard).getItem(move.itemIndex);
|
|
38
|
-
var pantheon = new Pantheon_1.Pantheon(this.game, this.player);
|
|
39
|
-
var moves = pantheon.getInvokeGains(entity.id.front, entity.location.y);
|
|
40
|
-
moves.push(this.customMove(CustomMoveType_1.CustomMoveType.EndEffect));
|
|
41
|
-
return moves;
|
|
42
|
-
};
|
|
43
|
-
return CondorEffectRule;
|
|
44
|
-
}(SacrificeEffectRule_1.SacrificeEffectRule));
|
|
45
|
-
exports.CondorEffectRule = CondorEffectRule;
|
|
1
|
+
import { areAdjacentSquares } from '@gamepark/rules-api';
|
|
2
|
+
import { CustomMoveType } from '../../CustomMoveType';
|
|
3
|
+
import { SacrificeEffectRule } from '../../material/entity/SacrificeEffectRule';
|
|
4
|
+
import { MaterialType } from '../../material/MaterialType';
|
|
5
|
+
import { Pantheon } from '../../material/Pantheon';
|
|
6
|
+
import { RuleId } from '../RuleId';
|
|
7
|
+
export class CondorEffectRule extends SacrificeEffectRule {
|
|
8
|
+
ruleId = RuleId.CondorEffect;
|
|
9
|
+
getCardsToSacrifice() {
|
|
10
|
+
const location = this.card.location;
|
|
11
|
+
return super.getCardsToSacrifice().location((l) => areAdjacentSquares(l, location));
|
|
12
|
+
}
|
|
13
|
+
onSacrifice(move) {
|
|
14
|
+
const entity = this.material(MaterialType.EntityCard).getItem(move.itemIndex);
|
|
15
|
+
const pantheon = new Pantheon(this.game, this.player);
|
|
16
|
+
const moves = pantheon.getInvokeGains(entity.id.front, entity.location.y);
|
|
17
|
+
moves.push(this.customMove(CustomMoveType.EndEffect));
|
|
18
|
+
return moves;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ItemMove, MaterialMove } from '@gamepark/rules-api';
|
|
2
|
-
import { ColumnEvent, LineEvent } from '../../material/entity/Effect';
|
|
3
|
-
import { PlayerEffectRule } from '../../material/entity/PlayerEffectRule';
|
|
4
|
-
import { RuleId } from '../RuleId';
|
|
5
|
-
export declare class CyclopsEffectRule extends PlayerEffectRule {
|
|
6
|
-
ruleId: RuleId;
|
|
7
|
-
getPlayerMoves(): MaterialMove
|
|
8
|
-
afterItemMove(move: ItemMove): (import("@gamepark/rules-api").CustomMove
|
|
9
|
-
takeNeighborsBonus(event?: LineEvent | ColumnEvent): import("@gamepark/rules-api").MoveItem<number, number, number>[];
|
|
10
|
-
getBonus(event?: LineEvent | ColumnEvent): import("@gamepark/rules-api").Material<number, number, number>;
|
|
11
|
-
}
|
|
1
|
+
import { ItemMove, MaterialMove } from '@gamepark/rules-api';
|
|
2
|
+
import { ColumnEvent, LineEvent } from '../../material/entity/Effect';
|
|
3
|
+
import { PlayerEffectRule } from '../../material/entity/PlayerEffectRule';
|
|
4
|
+
import { RuleId } from '../RuleId';
|
|
5
|
+
export declare class CyclopsEffectRule extends PlayerEffectRule {
|
|
6
|
+
ruleId: RuleId;
|
|
7
|
+
getPlayerMoves(): MaterialMove[];
|
|
8
|
+
afterItemMove(move: ItemMove): (import("@gamepark/rules-api").CustomMove | import("@gamepark/rules-api").MoveItem<number, number, number>)[];
|
|
9
|
+
takeNeighborsBonus(event?: LineEvent | ColumnEvent): import("@gamepark/rules-api").MoveItem<number, number, number>[];
|
|
10
|
+
getBonus(event?: LineEvent | ColumnEvent): import("@gamepark/rules-api").Material<number, number, number>;
|
|
11
|
+
}
|
|
@@ -1,106 +1,50 @@
|
|
|
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
|
-
var Memory_1 = require("../../Memory");
|
|
52
|
-
var RuleId_1 = require("../RuleId");
|
|
53
|
-
var CyclopsEffectRule = (function (_super) {
|
|
54
|
-
__extends(CyclopsEffectRule, _super);
|
|
55
|
-
function CyclopsEffectRule() {
|
|
56
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
57
|
-
_this.ruleId = RuleId_1.RuleId.CyclopsEffect;
|
|
58
|
-
return _this;
|
|
59
|
-
}
|
|
60
|
-
CyclopsEffectRule.prototype.getPlayerMoves = function () {
|
|
61
|
-
var moves = [this.customMove(CustomMoveType_1.CustomMoveType.EndEffect)];
|
|
62
|
-
var canPay = new Pantheon_1.Pantheon(this.game, this.player).gems > 0;
|
|
63
|
-
if (canPay) {
|
|
64
|
-
moves.push(new Pantheon_1.Pantheon(this.game, this.player).spendGems(1));
|
|
65
|
-
}
|
|
66
|
-
return moves;
|
|
67
|
-
};
|
|
68
|
-
CyclopsEffectRule.prototype.afterItemMove = function (move) {
|
|
69
|
-
var _this = this;
|
|
70
|
-
if ((0, rules_api_1.isDeleteItemType)(MaterialType_1.MaterialType.GemToken)(move)) {
|
|
71
|
-
this.memorize(Memory_1.Memory.OncePerTurn, function (indexes) {
|
|
72
|
-
if (indexes === void 0) { indexes = []; }
|
|
73
|
-
return indexes.concat(_this.getEffect().cardIndex);
|
|
74
|
-
});
|
|
75
|
-
return __spreadArray(__spreadArray([], __read(this.takeNeighborsBonus()), false), [this.customMove(CustomMoveType_1.CustomMoveType.EndEffect)], false);
|
|
76
|
-
}
|
|
77
|
-
return [];
|
|
78
|
-
};
|
|
79
|
-
CyclopsEffectRule.prototype.takeNeighborsBonus = function (event) {
|
|
80
|
-
if (event === void 0) { event = this.getEffect().triggerEvent; }
|
|
81
|
-
if (event.type === Effect_1.TriggerEventType.LineEvent) {
|
|
82
|
-
return this.getBonus().moveItems({ type: LocationType_1.LocationType.PlayerGems, player: event.player });
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
return this.getBonus().moveItems({ type: LocationType_1.LocationType.PlayerFavor, player: event.player });
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
CyclopsEffectRule.prototype.getBonus = function (event) {
|
|
89
|
-
if (event === void 0) { event = this.getEffect().triggerEvent; }
|
|
90
|
-
var neighbors = (0, rules_api_1.getNeighbors)(event.player, this.game.players);
|
|
91
|
-
if (event.type === Effect_1.TriggerEventType.LineEvent) {
|
|
92
|
-
return this.material(MaterialType_1.MaterialType.GemToken)
|
|
93
|
-
.location(LocationType_1.LocationType.PantheonLineBonus)
|
|
94
|
-
.player(function (player) { return neighbors.includes(player); })
|
|
95
|
-
.location(function (l) { return l.y === event.y; });
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
return this.material(MaterialType_1.MaterialType.FavorToken)
|
|
99
|
-
.location(LocationType_1.LocationType.PantheonColumnBonus)
|
|
100
|
-
.player(function (player) { return neighbors.includes(player); })
|
|
101
|
-
.location(function (l) { return l.x === event.x; });
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
return CyclopsEffectRule;
|
|
105
|
-
}(PlayerEffectRule_1.PlayerEffectRule));
|
|
106
|
-
exports.CyclopsEffectRule = CyclopsEffectRule;
|
|
1
|
+
import { getNeighbors, isDeleteItemType } from '@gamepark/rules-api';
|
|
2
|
+
import { CustomMoveType } from '../../CustomMoveType';
|
|
3
|
+
import { TriggerEventType } from '../../material/entity/Effect';
|
|
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 CyclopsEffectRule extends PlayerEffectRule {
|
|
11
|
+
ruleId = RuleId.CyclopsEffect;
|
|
12
|
+
getPlayerMoves() {
|
|
13
|
+
const moves = [this.customMove(CustomMoveType.EndEffect)];
|
|
14
|
+
const canPay = new Pantheon(this.game, this.player).gems > 0;
|
|
15
|
+
if (canPay) {
|
|
16
|
+
moves.push(new Pantheon(this.game, this.player).spendGems(1));
|
|
17
|
+
}
|
|
18
|
+
return moves;
|
|
19
|
+
}
|
|
20
|
+
afterItemMove(move) {
|
|
21
|
+
if (isDeleteItemType(MaterialType.GemToken)(move)) {
|
|
22
|
+
this.memorize(Memory.OncePerTurn, (indexes = []) => indexes.concat(this.getEffect().cardIndex));
|
|
23
|
+
return [...this.takeNeighborsBonus(), this.customMove(CustomMoveType.EndEffect)];
|
|
24
|
+
}
|
|
25
|
+
return [];
|
|
26
|
+
}
|
|
27
|
+
takeNeighborsBonus(event = this.getEffect().triggerEvent) {
|
|
28
|
+
if (event.type === TriggerEventType.LineEvent) {
|
|
29
|
+
return this.getBonus().moveItems({ type: LocationType.PlayerGems, player: event.player });
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
return this.getBonus().moveItems({ type: LocationType.PlayerFavor, player: event.player });
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
getBonus(event = this.getEffect().triggerEvent) {
|
|
36
|
+
const neighbors = getNeighbors(event.player, this.game.players);
|
|
37
|
+
if (event.type === TriggerEventType.LineEvent) {
|
|
38
|
+
return this.material(MaterialType.GemToken)
|
|
39
|
+
.location(LocationType.PantheonLineBonus)
|
|
40
|
+
.player((player) => neighbors.includes(player))
|
|
41
|
+
.location((l) => l.y === event.y);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
return this.material(MaterialType.FavorToken)
|
|
45
|
+
.location(LocationType.PantheonColumnBonus)
|
|
46
|
+
.player((player) => neighbors.includes(player))
|
|
47
|
+
.location((l) => l.x === event.x);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ItemMove, Material } from '@gamepark/rules-api';
|
|
2
|
-
import { SimultaneousSacrificeEffectRule } from '../../material/entity/SimultaneousSacrificeEffectRule';
|
|
3
|
-
import { PlayerColor } from '../../PlayerColor';
|
|
4
|
-
import { RuleId } from '../RuleId';
|
|
5
|
-
export declare class DraugrEffectRule extends SimultaneousSacrificeEffectRule {
|
|
6
|
-
ruleId: RuleId;
|
|
7
|
-
getAffectedPlayers(): number[];
|
|
8
|
-
getActivePlayerLegalMoves(player: PlayerColor): import("@gamepark/rules-api").MaterialMove
|
|
9
|
-
getCardsToSacrifice(player: PlayerColor): Material;
|
|
10
|
-
beforeItemMove(move: ItemMove): import("@gamepark/rules-api").MaterialMove
|
|
11
|
-
}
|
|
1
|
+
import { ItemMove, Material } from '@gamepark/rules-api';
|
|
2
|
+
import { SimultaneousSacrificeEffectRule } from '../../material/entity/SimultaneousSacrificeEffectRule';
|
|
3
|
+
import { PlayerColor } from '../../PlayerColor';
|
|
4
|
+
import { RuleId } from '../RuleId';
|
|
5
|
+
export declare class DraugrEffectRule extends SimultaneousSacrificeEffectRule {
|
|
6
|
+
ruleId: RuleId;
|
|
7
|
+
getAffectedPlayers(): number[];
|
|
8
|
+
getActivePlayerLegalMoves(player: PlayerColor): import("@gamepark/rules-api").MaterialMove[];
|
|
9
|
+
getCardsToSacrifice(player: PlayerColor): Material;
|
|
10
|
+
beforeItemMove(move: ItemMove): import("@gamepark/rules-api").MaterialMove[];
|
|
11
|
+
}
|
|
@@ -1,58 +1,32 @@
|
|
|
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
|
-
var _this = this;
|
|
34
|
-
return this.game.players.filter(function (player) { return _this.isOpponent(player); });
|
|
35
|
-
};
|
|
36
|
-
DraugrEffectRule.prototype.getActivePlayerLegalMoves = function (player) {
|
|
37
|
-
var moves = _super.prototype.getActivePlayerLegalMoves.call(this, player);
|
|
38
|
-
var gems = this.material(MaterialType_1.MaterialType.GemToken).location(LocationType_1.LocationType.PlayerGems).player(player);
|
|
39
|
-
var owner = this.card.location.player;
|
|
40
|
-
if (gems.getQuantity() >= 2 || (gems.getQuantity() === 1 && moves.length === 0)) {
|
|
41
|
-
moves.push(gems.moveItem({ type: LocationType_1.LocationType.PlayerGems, player: owner }, 2));
|
|
42
|
-
}
|
|
43
|
-
return moves;
|
|
44
|
-
};
|
|
45
|
-
DraugrEffectRule.prototype.getCardsToSacrifice = function (player) {
|
|
46
|
-
return _super.prototype.getCardsToSacrifice.call(this, player).id(function (id) { return (0, Entity_1.isCreature)(id.front); });
|
|
47
|
-
};
|
|
48
|
-
DraugrEffectRule.prototype.beforeItemMove = function (move) {
|
|
49
|
-
if ((0, rules_api_1.isMoveItemType)(MaterialType_1.MaterialType.GemToken)(move)) {
|
|
50
|
-
return [this.endPlayerTurn(this.material(MaterialType_1.MaterialType.GemToken).getItem(move.itemIndex).location.player)];
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
return _super.prototype.beforeItemMove.call(this, move);
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
return DraugrEffectRule;
|
|
57
|
-
}(SimultaneousSacrificeEffectRule_1.SimultaneousSacrificeEffectRule));
|
|
58
|
-
exports.DraugrEffectRule = DraugrEffectRule;
|
|
1
|
+
import { 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 { RuleId } from '../RuleId';
|
|
7
|
+
export class DraugrEffectRule extends SimultaneousSacrificeEffectRule {
|
|
8
|
+
ruleId = RuleId.DraugrEffect;
|
|
9
|
+
getAffectedPlayers() {
|
|
10
|
+
return this.game.players.filter((player) => this.isOpponent(player));
|
|
11
|
+
}
|
|
12
|
+
getActivePlayerLegalMoves(player) {
|
|
13
|
+
const moves = super.getActivePlayerLegalMoves(player);
|
|
14
|
+
const gems = this.material(MaterialType.GemToken).location(LocationType.PlayerGems).player(player);
|
|
15
|
+
const owner = this.card.location.player;
|
|
16
|
+
if (gems.getQuantity() >= 2 || (gems.getQuantity() === 1 && moves.length === 0)) {
|
|
17
|
+
moves.push(gems.moveItem({ type: LocationType.PlayerGems, player: owner }, 2));
|
|
18
|
+
}
|
|
19
|
+
return moves;
|
|
20
|
+
}
|
|
21
|
+
getCardsToSacrifice(player) {
|
|
22
|
+
return super.getCardsToSacrifice(player).id((id) => isCreature(id.front));
|
|
23
|
+
}
|
|
24
|
+
beforeItemMove(move) {
|
|
25
|
+
if (isMoveItemType(MaterialType.GemToken)(move)) {
|
|
26
|
+
return [this.endPlayerTurn(this.material(MaterialType.GemToken).getItem(move.itemIndex).location.player)];
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
return super.beforeItemMove(move);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Location, MaterialMove, MoveItem, XYCoordinates } from '@gamepark/rules-api';
|
|
2
|
-
import { MoveEffectRule } from '../../material/entity/MoveEffectRule';
|
|
3
|
-
import { RuleId } from '../RuleId';
|
|
4
|
-
export declare class DullahanEffectRule extends MoveEffectRule {
|
|
5
|
-
ruleId: RuleId;
|
|
6
|
-
onRuleStart(): MaterialMove
|
|
7
|
-
getMovingCards(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
8
|
-
isLegalDestination(space: XYCoordinates, cardLocation: Location): boolean;
|
|
9
|
-
onCardMoved(move: MoveItem): MaterialMove
|
|
10
|
-
onRuleEnd(): never[];
|
|
11
|
-
}
|
|
1
|
+
import { Location, MaterialMove, MoveItem, XYCoordinates } from '@gamepark/rules-api';
|
|
2
|
+
import { MoveEffectRule } from '../../material/entity/MoveEffectRule';
|
|
3
|
+
import { RuleId } from '../RuleId';
|
|
4
|
+
export declare class DullahanEffectRule extends MoveEffectRule {
|
|
5
|
+
ruleId: RuleId;
|
|
6
|
+
onRuleStart(): MaterialMove[];
|
|
7
|
+
getMovingCards(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
8
|
+
isLegalDestination(space: XYCoordinates, cardLocation: Location): boolean;
|
|
9
|
+
onCardMoved(move: MoveItem): MaterialMove[];
|
|
10
|
+
onRuleEnd(): never[];
|
|
11
|
+
}
|