@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
package/dist/material/Trial.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { MaterialMove, MaterialRulesPart, XYCoordinates } from '@gamepark/rules-api';
|
|
2
|
-
import { PlayerColor } from '../PlayerColor';
|
|
3
|
-
import { Mythology } from './Mythology';
|
|
4
|
-
import { Pantheon } from './Pantheon';
|
|
5
|
-
export declare class Trial extends MaterialRulesPart {
|
|
6
|
-
passTrials(player: PlayerColor): MaterialMove
|
|
7
|
-
passTrial(player: PlayerColor, [mythology1, mythology2]: Mythology[]): boolean;
|
|
8
|
-
passTrialOnLocation(player: PlayerColor, mythology: Mythology, searchLocation: (location: Partial<XYCoordinates>) => boolean): boolean;
|
|
9
|
-
getPantheon(player: PlayerColor): Pantheon;
|
|
10
|
-
getVisibleEntities(player: PlayerColor, searchLocation?: (location: Partial<XYCoordinates>) => boolean): import("@gamepark/rules-api").Material<number, number, number>;
|
|
11
|
-
haveMoreInvokeFavorThanNeighbor(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): boolean;
|
|
12
|
-
getInvokeGains(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): import("./entity/EntityDescription").InvokeGain[];
|
|
13
|
-
getInvokeFavorGain(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): number;
|
|
14
|
-
getInvokeGemsGain(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): number;
|
|
15
|
-
noEmptySpace(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): boolean;
|
|
16
|
-
countGods(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): number;
|
|
17
|
-
countCreatures(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): number;
|
|
18
|
-
getMythologies(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): Mythology[];
|
|
19
|
-
getTrialReward([mythology1, mythology2]: Mythology[]): number;
|
|
20
|
-
getTrialLeftReward(mythology: Mythology): 1 | 2;
|
|
21
|
-
getTrialRightReward(mythology: Mythology): 1 | 2;
|
|
22
|
-
}
|
|
1
|
+
import { MaterialMove, MaterialRulesPart, XYCoordinates } from '@gamepark/rules-api';
|
|
2
|
+
import { PlayerColor } from '../PlayerColor';
|
|
3
|
+
import { Mythology } from './Mythology';
|
|
4
|
+
import { Pantheon } from './Pantheon';
|
|
5
|
+
export declare class Trial extends MaterialRulesPart {
|
|
6
|
+
passTrials(player: PlayerColor): MaterialMove[];
|
|
7
|
+
passTrial(player: PlayerColor, [mythology1, mythology2]: Mythology[]): boolean;
|
|
8
|
+
passTrialOnLocation(player: PlayerColor, mythology: Mythology, searchLocation: (location: Partial<XYCoordinates>) => boolean): boolean;
|
|
9
|
+
getPantheon(player: PlayerColor): Pantheon;
|
|
10
|
+
getVisibleEntities(player: PlayerColor, searchLocation?: (location: Partial<XYCoordinates>) => boolean): import("@gamepark/rules-api").Material<number, number, number>;
|
|
11
|
+
haveMoreInvokeFavorThanNeighbor(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): boolean;
|
|
12
|
+
getInvokeGains(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): import("./entity/EntityDescription").InvokeGain[];
|
|
13
|
+
getInvokeFavorGain(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): number;
|
|
14
|
+
getInvokeGemsGain(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): number;
|
|
15
|
+
noEmptySpace(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): boolean;
|
|
16
|
+
countGods(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): number;
|
|
17
|
+
countCreatures(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): number;
|
|
18
|
+
getMythologies(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): Mythology[];
|
|
19
|
+
getTrialReward([mythology1, mythology2]: Mythology[]): number;
|
|
20
|
+
getTrialLeftReward(mythology: Mythology): 1 | 2;
|
|
21
|
+
getTrialRightReward(mythology: Mythology): 1 | 2;
|
|
22
|
+
}
|
package/dist/material/Trial.js
CHANGED
|
@@ -1,183 +1,139 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
Trial.prototype.getInvokeGemsGain = function (player, searchLocation) {
|
|
141
|
-
return (0, lodash_1.sumBy)(this.getInvokeGains(player, searchLocation), function (gain) { var _a; return (_a = gain.gem) !== null && _a !== void 0 ? _a : 0; });
|
|
142
|
-
};
|
|
143
|
-
Trial.prototype.noEmptySpace = function (player, searchLocation) {
|
|
144
|
-
return this.getPantheon(player).grid.every(function (line, y) { return line.every(function (space, x) { return space !== undefined || !searchLocation({ x: x, y: y }); }); });
|
|
145
|
-
};
|
|
146
|
-
Trial.prototype.countGods = function (player, searchLocation) {
|
|
147
|
-
return this.getVisibleEntities(player, searchLocation).id(function (id) { return (0, Entity_1.isGod)(id.front); }).length;
|
|
148
|
-
};
|
|
149
|
-
Trial.prototype.countCreatures = function (player, searchLocation) {
|
|
150
|
-
return this.getVisibleEntities(player, searchLocation).id(function (id) { return (0, Entity_1.isCreature)(id.front); }).length;
|
|
151
|
-
};
|
|
152
|
-
Trial.prototype.getMythologies = function (player, searchLocation) {
|
|
153
|
-
return this.getVisibleEntities(player, searchLocation)
|
|
154
|
-
.getItems()
|
|
155
|
-
.map(function (item) { return (0, Entity_1.entityMythology)(item.id.front); });
|
|
156
|
-
};
|
|
157
|
-
Trial.prototype.getTrialReward = function (_a) {
|
|
158
|
-
var _b = __read(_a, 2), mythology1 = _b[0], mythology2 = _b[1];
|
|
159
|
-
return this.getTrialLeftReward(mythology1) + this.getTrialRightReward(mythology2);
|
|
160
|
-
};
|
|
161
|
-
Trial.prototype.getTrialLeftReward = function (mythology) {
|
|
162
|
-
switch (mythology) {
|
|
163
|
-
case Mythology_1.Mythology.Greek:
|
|
164
|
-
case Mythology_1.Mythology.Norse:
|
|
165
|
-
case Mythology_1.Mythology.Egyptian:
|
|
166
|
-
case Mythology_1.Mythology.Inca:
|
|
167
|
-
return 1;
|
|
168
|
-
default:
|
|
169
|
-
return 2;
|
|
170
|
-
}
|
|
171
|
-
};
|
|
172
|
-
Trial.prototype.getTrialRightReward = function (mythology) {
|
|
173
|
-
switch (mythology) {
|
|
174
|
-
case Mythology_1.Mythology.Chinese:
|
|
175
|
-
case Mythology_1.Mythology.Celtic:
|
|
176
|
-
return 1;
|
|
177
|
-
default:
|
|
178
|
-
return 2;
|
|
179
|
-
}
|
|
180
|
-
};
|
|
181
|
-
return Trial;
|
|
182
|
-
}(rules_api_1.MaterialRulesPart));
|
|
183
|
-
exports.Trial = Trial;
|
|
1
|
+
import { getNeighbors, MaterialRulesPart } from '@gamepark/rules-api';
|
|
2
|
+
import { range, sumBy, uniq } from 'es-toolkit';
|
|
3
|
+
import { CustomMoveType } from '../CustomMoveType';
|
|
4
|
+
import { Memory } from '../Memory';
|
|
5
|
+
import { entityMythology, isCreature, isGod } from './Entity';
|
|
6
|
+
import { entities } from './entity/EntityDescription';
|
|
7
|
+
import { MaterialType } from './MaterialType';
|
|
8
|
+
import { Mythology } from './Mythology';
|
|
9
|
+
import { Pantheon } from './Pantheon';
|
|
10
|
+
export class Trial extends MaterialRulesPart {
|
|
11
|
+
passTrials(player) {
|
|
12
|
+
const moves = [];
|
|
13
|
+
const mythologyBoards = this.material(MaterialType.MythologyBoard);
|
|
14
|
+
const round = this.material(MaterialType.RoundToken).getItem().location.id;
|
|
15
|
+
if (round === 3 || (round === 4 && this.remind(Memory.TrialFailure, player))) {
|
|
16
|
+
const firstTrialBoards = mythologyBoards.location((l) => l.y === 0).sort((item) => item.location.x);
|
|
17
|
+
const firstTrialMythologies = firstTrialBoards.getItems().map((item) => item.id.mythology);
|
|
18
|
+
if (this.passTrial(player, firstTrialMythologies)) {
|
|
19
|
+
const reward = this.getTrialReward(firstTrialMythologies);
|
|
20
|
+
moves.push(this.customMove(CustomMoveType.TrialSuccess, { trial: 1, reward: round === 3 ? reward : reward - 1 }));
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
moves.push(this.customMove(CustomMoveType.TrialFailure, 1));
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (round === 4) {
|
|
27
|
+
const secondTrialBoards = mythologyBoards.location((l) => l.y === 1).sort((item) => item.location.x);
|
|
28
|
+
const secondTrialMythologies = secondTrialBoards.getItems().map((item) => item.id.mythology);
|
|
29
|
+
if (this.passTrial(player, secondTrialMythologies)) {
|
|
30
|
+
const reward = this.getTrialReward(secondTrialMythologies);
|
|
31
|
+
moves.push(this.customMove(CustomMoveType.TrialSuccess, { trial: 2, reward }));
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
moves.push(this.customMove(CustomMoveType.TrialFailure, 2));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return moves;
|
|
38
|
+
}
|
|
39
|
+
passTrial(player, [mythology1, mythology2]) {
|
|
40
|
+
switch (mythology2) {
|
|
41
|
+
case Mythology.Greek:
|
|
42
|
+
return this.passTrialOnLocation(player, mythology1, (location) => location.y === 0);
|
|
43
|
+
case Mythology.Norse:
|
|
44
|
+
return this.passTrialOnLocation(player, mythology1, (location) => location.y === 1);
|
|
45
|
+
case Mythology.Egyptian:
|
|
46
|
+
return this.passTrialOnLocation(player, mythology1, (location) => location.x === 1);
|
|
47
|
+
case Mythology.Hindu:
|
|
48
|
+
return this.passTrialOnLocation(player, mythology1, (location) => location.y === 2);
|
|
49
|
+
case Mythology.Inca:
|
|
50
|
+
return this.passTrialOnLocation(player, mythology1, (location) => location.x === 0);
|
|
51
|
+
case Mythology.Chinese:
|
|
52
|
+
return (this.passTrialOnLocation(player, mythology1, (location) => location.x === location.y) ||
|
|
53
|
+
this.passTrialOnLocation(player, mythology1, (location) => location.x === 2 - location.y));
|
|
54
|
+
case Mythology.Zulu:
|
|
55
|
+
return this.passTrialOnLocation(player, mythology1, (location) => location.x === 2);
|
|
56
|
+
case Mythology.Celtic:
|
|
57
|
+
return range(0, 3).some((y) => this.passTrialOnLocation(player, mythology1, (location) => location.y === y));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
passTrialOnLocation(player, mythology, searchLocation) {
|
|
61
|
+
switch (mythology) {
|
|
62
|
+
case Mythology.Greek:
|
|
63
|
+
return this.haveMoreInvokeFavorThanNeighbor(player, searchLocation);
|
|
64
|
+
case Mythology.Norse:
|
|
65
|
+
return this.noEmptySpace(player, searchLocation) && this.countGods(player, searchLocation) >= 1;
|
|
66
|
+
case Mythology.Egyptian:
|
|
67
|
+
return this.getPantheon(player).coveredEntities.location(searchLocation).length >= 2;
|
|
68
|
+
case Mythology.Hindu:
|
|
69
|
+
return this.countGods(player, searchLocation) >= 2;
|
|
70
|
+
case Mythology.Inca:
|
|
71
|
+
return this.countCreatures(player, searchLocation) === 0;
|
|
72
|
+
case Mythology.Chinese:
|
|
73
|
+
return this.noEmptySpace(player, searchLocation) && this.getVisibleEntities(player).length <= 6;
|
|
74
|
+
case Mythology.Zulu:
|
|
75
|
+
return uniq(this.getMythologies(player, searchLocation)).length >= 3;
|
|
76
|
+
case Mythology.Celtic:
|
|
77
|
+
return this.getInvokeGemsGain(player, searchLocation) >= 3;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
getPantheon(player) {
|
|
81
|
+
return new Pantheon(this.game, player);
|
|
82
|
+
}
|
|
83
|
+
getVisibleEntities(player, searchLocation) {
|
|
84
|
+
const visibleEntities = this.getPantheon(player).visibleEntities;
|
|
85
|
+
return searchLocation ? visibleEntities.location(searchLocation) : visibleEntities;
|
|
86
|
+
}
|
|
87
|
+
haveMoreInvokeFavorThanNeighbor(player, searchLocation) {
|
|
88
|
+
const favor = this.getInvokeFavorGain(player, searchLocation);
|
|
89
|
+
return getNeighbors(player, this.game.players).some((neighbor) => this.getInvokeFavorGain(neighbor, searchLocation) < favor);
|
|
90
|
+
}
|
|
91
|
+
getInvokeGains(player, searchLocation) {
|
|
92
|
+
return this.getVisibleEntities(player, searchLocation)
|
|
93
|
+
.getItems()
|
|
94
|
+
.map((item) => entities[item.id.front].invoke[item.location.y]);
|
|
95
|
+
}
|
|
96
|
+
getInvokeFavorGain(player, searchLocation) {
|
|
97
|
+
return sumBy(this.getInvokeGains(player, searchLocation), (gain) => gain.favor ?? 0);
|
|
98
|
+
}
|
|
99
|
+
getInvokeGemsGain(player, searchLocation) {
|
|
100
|
+
return sumBy(this.getInvokeGains(player, searchLocation), (gain) => gain.gem ?? 0);
|
|
101
|
+
}
|
|
102
|
+
noEmptySpace(player, searchLocation) {
|
|
103
|
+
return this.getPantheon(player).grid.every((line, y) => line.every((space, x) => space !== undefined || !searchLocation({ x, y })));
|
|
104
|
+
}
|
|
105
|
+
countGods(player, searchLocation) {
|
|
106
|
+
return this.getVisibleEntities(player, searchLocation).id((id) => isGod(id.front)).length;
|
|
107
|
+
}
|
|
108
|
+
countCreatures(player, searchLocation) {
|
|
109
|
+
return this.getVisibleEntities(player, searchLocation).id((id) => isCreature(id.front)).length;
|
|
110
|
+
}
|
|
111
|
+
getMythologies(player, searchLocation) {
|
|
112
|
+
return this.getVisibleEntities(player, searchLocation)
|
|
113
|
+
.getItems()
|
|
114
|
+
.map((item) => entityMythology(item.id.front));
|
|
115
|
+
}
|
|
116
|
+
getTrialReward([mythology1, mythology2]) {
|
|
117
|
+
return this.getTrialLeftReward(mythology1) + this.getTrialRightReward(mythology2);
|
|
118
|
+
}
|
|
119
|
+
getTrialLeftReward(mythology) {
|
|
120
|
+
switch (mythology) {
|
|
121
|
+
case Mythology.Greek:
|
|
122
|
+
case Mythology.Norse:
|
|
123
|
+
case Mythology.Egyptian:
|
|
124
|
+
case Mythology.Inca:
|
|
125
|
+
return 1;
|
|
126
|
+
default:
|
|
127
|
+
return 2;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
getTrialRightReward(mythology) {
|
|
131
|
+
switch (mythology) {
|
|
132
|
+
case Mythology.Chinese:
|
|
133
|
+
case Mythology.Celtic:
|
|
134
|
+
return 1;
|
|
135
|
+
default:
|
|
136
|
+
return 2;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { MaterialMove, MaterialRulesPart } from '@gamepark/rules-api';
|
|
2
|
-
import { PlayerColor } from '../../PlayerColor';
|
|
3
|
-
import { EntityId } from '../Entity';
|
|
4
|
-
import { EffectRule, PendingEffect, TriggerEvent } from './Effect';
|
|
5
|
-
export declare abstract class AutoEffectRule extends MaterialRulesPart implements EffectRule {
|
|
6
|
-
canPlayEffect: () => boolean;
|
|
7
|
-
abstract playEffect(): MaterialMove[];
|
|
8
|
-
getEffect<Event extends TriggerEvent>(): PendingEffect<Event>;
|
|
9
|
-
get card(): import("@gamepark/rules-api").MaterialItem<number, number, EntityId>;
|
|
10
|
-
get player(): PlayerColor;
|
|
11
|
-
}
|
|
1
|
+
import { MaterialMove, MaterialRulesPart } from '@gamepark/rules-api';
|
|
2
|
+
import { PlayerColor } from '../../PlayerColor';
|
|
3
|
+
import { EntityId } from '../Entity';
|
|
4
|
+
import { EffectRule, PendingEffect, TriggerEvent } from './Effect';
|
|
5
|
+
export declare abstract class AutoEffectRule extends MaterialRulesPart implements EffectRule {
|
|
6
|
+
canPlayEffect: () => boolean;
|
|
7
|
+
abstract playEffect(): MaterialMove[];
|
|
8
|
+
getEffect<Event extends TriggerEvent>(): PendingEffect<Event>;
|
|
9
|
+
get card(): import("@gamepark/rules-api").MaterialItem<number, number, EntityId>;
|
|
10
|
+
get player(): PlayerColor;
|
|
11
|
+
}
|
|
@@ -1,49 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.AutoEffectRule = void 0;
|
|
19
|
-
var rules_api_1 = require("@gamepark/rules-api");
|
|
20
|
-
var Memory_1 = require("../../Memory");
|
|
21
|
-
var MaterialType_1 = require("../MaterialType");
|
|
22
|
-
var AutoEffectRule = (function (_super) {
|
|
23
|
-
__extends(AutoEffectRule, _super);
|
|
24
|
-
function AutoEffectRule() {
|
|
25
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
26
|
-
_this.canPlayEffect = function () { return true; };
|
|
27
|
-
return _this;
|
|
28
|
-
}
|
|
29
|
-
AutoEffectRule.prototype.getEffect = function () {
|
|
30
|
-
return this.remind(Memory_1.Memory.OngoingEffect);
|
|
31
|
-
};
|
|
32
|
-
Object.defineProperty(AutoEffectRule.prototype, "card", {
|
|
33
|
-
get: function () {
|
|
34
|
-
var index = this.getEffect().cardIndex;
|
|
35
|
-
return this.material(MaterialType_1.MaterialType.EntityCard).getItem(index);
|
|
36
|
-
},
|
|
37
|
-
enumerable: false,
|
|
38
|
-
configurable: true
|
|
39
|
-
});
|
|
40
|
-
Object.defineProperty(AutoEffectRule.prototype, "player", {
|
|
41
|
-
get: function () {
|
|
42
|
-
return this.card.location.player;
|
|
43
|
-
},
|
|
44
|
-
enumerable: false,
|
|
45
|
-
configurable: true
|
|
46
|
-
});
|
|
47
|
-
return AutoEffectRule;
|
|
48
|
-
}(rules_api_1.MaterialRulesPart));
|
|
49
|
-
exports.AutoEffectRule = AutoEffectRule;
|
|
1
|
+
import { MaterialRulesPart } from '@gamepark/rules-api';
|
|
2
|
+
import { Memory } from '../../Memory';
|
|
3
|
+
import { MaterialType } from '../MaterialType';
|
|
4
|
+
export class AutoEffectRule extends MaterialRulesPart {
|
|
5
|
+
canPlayEffect = () => true;
|
|
6
|
+
getEffect() {
|
|
7
|
+
return this.remind(Memory.OngoingEffect);
|
|
8
|
+
}
|
|
9
|
+
get card() {
|
|
10
|
+
const index = this.getEffect().cardIndex;
|
|
11
|
+
return this.material(MaterialType.EntityCard).getItem(index);
|
|
12
|
+
}
|
|
13
|
+
get player() {
|
|
14
|
+
return this.card.location.player;
|
|
15
|
+
}
|
|
16
|
+
}
|