@gamepark/mythologies 0.1.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 +13 -0
- package/dist/CustomMoveType.js +13 -0
- package/dist/Memory.d.ts +13 -0
- package/dist/Memory.js +17 -0
- package/dist/MythologiesOptions.d.ts +12 -0
- package/dist/MythologiesOptions.js +14 -0
- package/dist/MythologiesRules.d.ts +111 -0
- package/dist/MythologiesRules.js +218 -0
- package/dist/MythologiesSetup.d.ts +17 -0
- package/dist/MythologiesSetup.js +161 -0
- package/dist/PlayerColor.d.ts +10 -0
- package/dist/PlayerColor.js +10 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +9 -0
- package/dist/material/Destiny.d.ts +9 -0
- package/dist/material/Destiny.js +87 -0
- package/dist/material/Entity.d.ts +98 -0
- package/dist/material/Entity.js +99 -0
- package/dist/material/LocationType.d.ts +26 -0
- package/dist/material/LocationType.js +31 -0
- package/dist/material/MaterialType.d.ts +12 -0
- package/dist/material/MaterialType.js +16 -0
- package/dist/material/Mythology.d.ts +19 -0
- package/dist/material/Mythology.js +21 -0
- package/dist/material/Pantheon.d.ts +36 -0
- package/dist/material/Pantheon.js +357 -0
- package/dist/material/Trial.d.ts +22 -0
- package/dist/material/Trial.js +184 -0
- package/dist/material/entity/Effect.d.ts +91 -0
- package/dist/material/entity/Effect.js +115 -0
- package/dist/material/entity/EntityDescription.d.ts +13 -0
- package/dist/material/entity/EntityDescription.js +173 -0
- package/dist/material/entity/MoveEffectRule.d.ts +15 -0
- package/dist/material/entity/MoveEffectRule.js +86 -0
- package/dist/material/entity/PlaceCardEffectRule.d.ts +15 -0
- package/dist/material/entity/PlaceCardEffectRule.js +75 -0
- package/dist/material/entity/SacrificeEffectRule.d.ts +9 -0
- package/dist/material/entity/SacrificeEffectRule.js +58 -0
- package/dist/material/entity/SimultaneousMoveEffectRule.d.ts +13 -0
- package/dist/material/entity/SimultaneousMoveEffectRule.js +124 -0
- package/dist/material/entity/SimultaneousSacrificeEffectRule.d.ts +10 -0
- package/dist/material/entity/SimultaneousSacrificeEffectRule.js +57 -0
- package/dist/material/entity/celtic/Banshee.d.ts +2 -0
- package/dist/material/entity/celtic/Banshee.js +6 -0
- package/dist/material/entity/celtic/Brigid.d.ts +2 -0
- package/dist/material/entity/celtic/Brigid.js +6 -0
- package/dist/material/entity/celtic/Cernunnos.d.ts +2 -0
- package/dist/material/entity/celtic/Cernunnos.js +6 -0
- package/dist/material/entity/celtic/Dagda.d.ts +2 -0
- package/dist/material/entity/celtic/Dagda.js +6 -0
- package/dist/material/entity/celtic/Dryad.d.ts +2 -0
- package/dist/material/entity/celtic/Dryad.js +6 -0
- package/dist/material/entity/celtic/Dullahan.d.ts +2 -0
- package/dist/material/entity/celtic/Dullahan.js +6 -0
- package/dist/material/entity/celtic/Kelpie.d.ts +2 -0
- package/dist/material/entity/celtic/Kelpie.js +6 -0
- package/dist/material/entity/celtic/Leprechaun.d.ts +2 -0
- package/dist/material/entity/celtic/Leprechaun.js +6 -0
- package/dist/material/entity/celtic/Morrigan.d.ts +2 -0
- package/dist/material/entity/celtic/Morrigan.js +6 -0
- package/dist/material/entity/celtic/Selkie.d.ts +2 -0
- package/dist/material/entity/celtic/Selkie.js +6 -0
- package/dist/material/entity/chinese/ChangE.d.ts +2 -0
- package/dist/material/entity/chinese/ChangE.js +6 -0
- package/dist/material/entity/chinese/Fenghuang.d.ts +2 -0
- package/dist/material/entity/chinese/Fenghuang.js +6 -0
- package/dist/material/entity/chinese/Jiangshi.d.ts +2 -0
- package/dist/material/entity/chinese/Jiangshi.js +6 -0
- package/dist/material/entity/chinese/Mogwai.d.ts +2 -0
- package/dist/material/entity/chinese/Mogwai.js +6 -0
- package/dist/material/entity/chinese/Nian.d.ts +2 -0
- package/dist/material/entity/chinese/Nian.js +6 -0
- package/dist/material/entity/chinese/Nuwa.d.ts +2 -0
- package/dist/material/entity/chinese/Nuwa.js +6 -0
- package/dist/material/entity/chinese/Qilin.d.ts +2 -0
- package/dist/material/entity/chinese/Qilin.js +6 -0
- package/dist/material/entity/chinese/SunWukong.d.ts +2 -0
- package/dist/material/entity/chinese/SunWukong.js +6 -0
- package/dist/material/entity/chinese/Tianlong.d.ts +2 -0
- package/dist/material/entity/chinese/Tianlong.js +6 -0
- package/dist/material/entity/chinese/YanluoWang.d.ts +2 -0
- package/dist/material/entity/chinese/YanluoWang.js +6 -0
- package/dist/material/entity/egyptian/Anubis.d.ts +2 -0
- package/dist/material/entity/egyptian/Anubis.js +12 -0
- package/dist/material/entity/egyptian/Babai.d.ts +2 -0
- package/dist/material/entity/egyptian/Babai.js +12 -0
- package/dist/material/entity/egyptian/Beetle.d.ts +2 -0
- package/dist/material/entity/egyptian/Beetle.js +36 -0
- package/dist/material/entity/egyptian/Bennu.d.ts +2 -0
- package/dist/material/entity/egyptian/Bennu.js +12 -0
- package/dist/material/entity/egyptian/Cobra.d.ts +2 -0
- package/dist/material/entity/egyptian/Cobra.js +12 -0
- package/dist/material/entity/egyptian/Isis.d.ts +2 -0
- package/dist/material/entity/egyptian/Isis.js +39 -0
- package/dist/material/entity/egyptian/Mummy.d.ts +2 -0
- package/dist/material/entity/egyptian/Mummy.js +39 -0
- package/dist/material/entity/egyptian/Osiris.d.ts +2 -0
- package/dist/material/entity/egyptian/Osiris.js +71 -0
- package/dist/material/entity/egyptian/Ra.d.ts +2 -0
- package/dist/material/entity/egyptian/Ra.js +12 -0
- package/dist/material/entity/egyptian/Sphinx.d.ts +2 -0
- package/dist/material/entity/egyptian/Sphinx.js +12 -0
- package/dist/material/entity/greek/Athena.d.ts +2 -0
- package/dist/material/entity/greek/Athena.js +12 -0
- package/dist/material/entity/greek/Centaur.d.ts +2 -0
- package/dist/material/entity/greek/Centaur.js +12 -0
- package/dist/material/entity/greek/Chimera.d.ts +2 -0
- package/dist/material/entity/greek/Chimera.js +12 -0
- package/dist/material/entity/greek/Cyclops.d.ts +2 -0
- package/dist/material/entity/greek/Cyclops.js +21 -0
- package/dist/material/entity/greek/Gorgon.d.ts +2 -0
- package/dist/material/entity/greek/Gorgon.js +12 -0
- package/dist/material/entity/greek/Griffin.d.ts +2 -0
- package/dist/material/entity/greek/Griffin.js +12 -0
- package/dist/material/entity/greek/Hades.d.ts +2 -0
- package/dist/material/entity/greek/Hades.js +12 -0
- package/dist/material/entity/greek/Minotaur.d.ts +2 -0
- package/dist/material/entity/greek/Minotaur.js +12 -0
- package/dist/material/entity/greek/Poseidon.d.ts +2 -0
- package/dist/material/entity/greek/Poseidon.js +44 -0
- package/dist/material/entity/greek/Zeus.d.ts +2 -0
- package/dist/material/entity/greek/Zeus.js +39 -0
- package/dist/material/entity/hindu/Asura.d.ts +2 -0
- package/dist/material/entity/hindu/Asura.js +66 -0
- package/dist/material/entity/hindu/Brahma.d.ts +2 -0
- package/dist/material/entity/hindu/Brahma.js +36 -0
- package/dist/material/entity/hindu/Ganesh.d.ts +2 -0
- package/dist/material/entity/hindu/Ganesh.js +44 -0
- package/dist/material/entity/hindu/Garuda.d.ts +2 -0
- package/dist/material/entity/hindu/Garuda.js +12 -0
- package/dist/material/entity/hindu/Kinnara.d.ts +2 -0
- package/dist/material/entity/hindu/Kinnara.js +12 -0
- package/dist/material/entity/hindu/Naga.d.ts +2 -0
- package/dist/material/entity/hindu/Naga.js +68 -0
- package/dist/material/entity/hindu/Rakshasa.d.ts +2 -0
- package/dist/material/entity/hindu/Rakshasa.js +12 -0
- package/dist/material/entity/hindu/Shiva.d.ts +2 -0
- package/dist/material/entity/hindu/Shiva.js +12 -0
- package/dist/material/entity/hindu/Vetala.d.ts +2 -0
- package/dist/material/entity/hindu/Vetala.js +12 -0
- package/dist/material/entity/hindu/Vishnu.d.ts +2 -0
- package/dist/material/entity/hindu/Vishnu.js +71 -0
- package/dist/material/entity/inca/Amaru.d.ts +2 -0
- package/dist/material/entity/inca/Amaru.js +6 -0
- package/dist/material/entity/inca/Caiman.d.ts +2 -0
- package/dist/material/entity/inca/Caiman.js +6 -0
- package/dist/material/entity/inca/Condor.d.ts +2 -0
- package/dist/material/entity/inca/Condor.js +6 -0
- package/dist/material/entity/inca/Illapa.d.ts +2 -0
- package/dist/material/entity/inca/Illapa.js +6 -0
- package/dist/material/entity/inca/Inti.d.ts +2 -0
- package/dist/material/entity/inca/Inti.js +6 -0
- package/dist/material/entity/inca/MamaQucha.d.ts +2 -0
- package/dist/material/entity/inca/MamaQucha.js +6 -0
- package/dist/material/entity/inca/Pumapunku.d.ts +2 -0
- package/dist/material/entity/inca/Pumapunku.js +6 -0
- package/dist/material/entity/inca/Supay.d.ts +2 -0
- package/dist/material/entity/inca/Supay.js +6 -0
- package/dist/material/entity/inca/Ukuku.d.ts +2 -0
- package/dist/material/entity/inca/Ukuku.js +6 -0
- package/dist/material/entity/inca/Viracocha.d.ts +2 -0
- package/dist/material/entity/inca/Viracocha.js +6 -0
- package/dist/material/entity/norse/Alf.d.ts +2 -0
- package/dist/material/entity/norse/Alf.js +12 -0
- package/dist/material/entity/norse/Draugr.d.ts +2 -0
- package/dist/material/entity/norse/Draugr.js +12 -0
- package/dist/material/entity/norse/Fenrir.d.ts +2 -0
- package/dist/material/entity/norse/Fenrir.js +12 -0
- package/dist/material/entity/norse/Freya.d.ts +2 -0
- package/dist/material/entity/norse/Freya.js +39 -0
- package/dist/material/entity/norse/Jotunn.d.ts +2 -0
- package/dist/material/entity/norse/Jotunn.js +36 -0
- package/dist/material/entity/norse/Loki.d.ts +2 -0
- package/dist/material/entity/norse/Loki.js +36 -0
- package/dist/material/entity/norse/Odin.d.ts +2 -0
- package/dist/material/entity/norse/Odin.js +6 -0
- package/dist/material/entity/norse/Thor.d.ts +2 -0
- package/dist/material/entity/norse/Thor.js +12 -0
- package/dist/material/entity/norse/Troll.d.ts +2 -0
- package/dist/material/entity/norse/Troll.js +6 -0
- package/dist/material/entity/norse/Valkyrie.d.ts +2 -0
- package/dist/material/entity/norse/Valkyrie.js +72 -0
- package/dist/material/entity/zulu/Idlozi.d.ts +2 -0
- package/dist/material/entity/zulu/Idlozi.js +6 -0
- package/dist/material/entity/zulu/Impundulu.d.ts +2 -0
- package/dist/material/entity/zulu/Impundulu.js +6 -0
- package/dist/material/entity/zulu/Inkanyamba.d.ts +2 -0
- package/dist/material/entity/zulu/Inkanyamba.js +6 -0
- package/dist/material/entity/zulu/Inkosazana.d.ts +2 -0
- package/dist/material/entity/zulu/Inkosazana.js +6 -0
- package/dist/material/entity/zulu/Shembe.d.ts +2 -0
- package/dist/material/entity/zulu/Shembe.js +6 -0
- package/dist/material/entity/zulu/Tokoloshe.d.ts +2 -0
- package/dist/material/entity/zulu/Tokoloshe.js +6 -0
- package/dist/material/entity/zulu/Umvelinqangi.d.ts +2 -0
- package/dist/material/entity/zulu/Umvelinqangi.js +6 -0
- package/dist/material/entity/zulu/Unkulunkulu.d.ts +2 -0
- package/dist/material/entity/zulu/Unkulunkulu.js +6 -0
- package/dist/material/entity/zulu/Unwabu.d.ts +2 -0
- package/dist/material/entity/zulu/Unwabu.js +6 -0
- package/dist/material/entity/zulu/Werehyena.d.ts +2 -0
- package/dist/material/entity/zulu/Werehyena.js +6 -0
- package/dist/rules/ChooseDraftTokenRule.d.ts +15 -0
- package/dist/rules/ChooseDraftTokenRule.js +103 -0
- package/dist/rules/DrawDestinyCardRule.d.ts +7 -0
- package/dist/rules/DrawDestinyCardRule.js +116 -0
- package/dist/rules/EndGameRule.d.ts +5 -0
- package/dist/rules/EndGameRule.js +44 -0
- package/dist/rules/PlaceCardsRule.d.ts +13 -0
- package/dist/rules/PlaceCardsRule.js +192 -0
- package/dist/rules/PlaceTokenRule.d.ts +13 -0
- package/dist/rules/PlaceTokenRule.js +139 -0
- package/dist/rules/RuleId.d.ts +36 -0
- package/dist/rules/RuleId.js +40 -0
- package/dist/rules/UpkeepRule.d.ts +9 -0
- package/dist/rules/UpkeepRule.js +140 -0
- package/dist/rules/effects/AlfEffectRule.d.ts +10 -0
- package/dist/rules/effects/AlfEffectRule.js +59 -0
- package/dist/rules/effects/AnubisEffectRule.d.ts +9 -0
- package/dist/rules/effects/AnubisEffectRule.js +49 -0
- package/dist/rules/effects/AthenaEffectRule.d.ts +9 -0
- package/dist/rules/effects/AthenaEffectRule.js +104 -0
- package/dist/rules/effects/BabaiEffectRule.d.ts +6 -0
- package/dist/rules/effects/BabaiEffectRule.js +40 -0
- package/dist/rules/effects/BennuEffectRule.d.ts +6 -0
- package/dist/rules/effects/BennuEffectRule.js +35 -0
- package/dist/rules/effects/CentaurEffectRule.d.ts +15 -0
- package/dist/rules/effects/CentaurEffectRule.js +77 -0
- package/dist/rules/effects/ChimeraEffectRule.d.ts +8 -0
- package/dist/rules/effects/ChimeraEffectRule.js +51 -0
- package/dist/rules/effects/CobraEffectRule.d.ts +12 -0
- package/dist/rules/effects/CobraEffectRule.js +55 -0
- package/dist/rules/effects/CyclopsEffectRule.d.ts +8 -0
- package/dist/rules/effects/CyclopsEffectRule.js +87 -0
- package/dist/rules/effects/DraugrEffectRule.d.ts +11 -0
- package/dist/rules/effects/DraugrEffectRule.js +56 -0
- package/dist/rules/effects/FenrirEffectRule.d.ts +15 -0
- package/dist/rules/effects/FenrirEffectRule.js +132 -0
- package/dist/rules/effects/GarudaEffectRule.d.ts +9 -0
- package/dist/rules/effects/GarudaEffectRule.js +84 -0
- package/dist/rules/effects/GorgonEffectRule.d.ts +11 -0
- package/dist/rules/effects/GorgonEffectRule.js +78 -0
- package/dist/rules/effects/GriffinEffectRule.d.ts +9 -0
- package/dist/rules/effects/GriffinEffectRule.js +41 -0
- package/dist/rules/effects/HadesEffectRule.d.ts +5 -0
- package/dist/rules/effects/HadesEffectRule.js +87 -0
- package/dist/rules/effects/KinnaraEffectRule.d.ts +12 -0
- package/dist/rules/effects/KinnaraEffectRule.js +84 -0
- package/dist/rules/effects/MinotaurEffectRule.d.ts +9 -0
- package/dist/rules/effects/MinotaurEffectRule.js +39 -0
- package/dist/rules/effects/OdinEffectRule.d.ts +11 -0
- package/dist/rules/effects/OdinEffectRule.js +52 -0
- package/dist/rules/effects/RaEffectRule.d.ts +5 -0
- package/dist/rules/effects/RaEffectRule.js +87 -0
- package/dist/rules/effects/RakshasaEffectRule.d.ts +13 -0
- package/dist/rules/effects/RakshasaEffectRule.js +48 -0
- package/dist/rules/effects/ResolveEffectsRule.d.ts +6 -0
- package/dist/rules/effects/ResolveEffectsRule.js +73 -0
- package/dist/rules/effects/ShivaEffectRule.d.ts +10 -0
- package/dist/rules/effects/ShivaEffectRule.js +82 -0
- package/dist/rules/effects/SphinxEffectRule.d.ts +9 -0
- package/dist/rules/effects/SphinxEffectRule.js +47 -0
- package/dist/rules/effects/ThorEffectRule.d.ts +11 -0
- package/dist/rules/effects/ThorEffectRule.js +56 -0
- package/dist/rules/effects/TriggerEffectsRule.d.ts +11 -0
- package/dist/rules/effects/TriggerEffectsRule.js +159 -0
- package/dist/rules/effects/VetalaEffectRule.d.ts +11 -0
- package/dist/rules/effects/VetalaEffectRule.js +59 -0
- package/package.json +33 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CustomMoveType = void 0;
|
|
4
|
+
var CustomMoveType;
|
|
5
|
+
(function (CustomMoveType) {
|
|
6
|
+
CustomMoveType[CustomMoveType["Pass"] = 1] = "Pass";
|
|
7
|
+
CustomMoveType[CustomMoveType["TrialSuccess"] = 2] = "TrialSuccess";
|
|
8
|
+
CustomMoveType[CustomMoveType["TrialFailure"] = 3] = "TrialFailure";
|
|
9
|
+
CustomMoveType[CustomMoveType["PlayEffect"] = 4] = "PlayEffect";
|
|
10
|
+
CustomMoveType[CustomMoveType["EndEffect"] = 5] = "EndEffect";
|
|
11
|
+
CustomMoveType[CustomMoveType["ChoosePlayer"] = 6] = "ChoosePlayer";
|
|
12
|
+
CustomMoveType[CustomMoveType["ChooseMythology"] = 7] = "ChooseMythology";
|
|
13
|
+
})(CustomMoveType = exports.CustomMoveType || (exports.CustomMoveType = {}));
|
package/dist/Memory.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare enum Memory {
|
|
2
|
+
KeepTokenPlaceSecret = 1,
|
|
3
|
+
TrialFailure = 2,
|
|
4
|
+
PendingEffects = 3,
|
|
5
|
+
PendingRule = 4,
|
|
6
|
+
OngoingEffect = 5,
|
|
7
|
+
OncePerTurn = 6,
|
|
8
|
+
OdinTargetMythology = 10,
|
|
9
|
+
FenrirPaid1 = 11,
|
|
10
|
+
AnubisInvoke1 = 12,
|
|
11
|
+
GarudaSacrificeCount = 13,
|
|
12
|
+
VetalaCount = 14
|
|
13
|
+
}
|
package/dist/Memory.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Memory = void 0;
|
|
4
|
+
var Memory;
|
|
5
|
+
(function (Memory) {
|
|
6
|
+
Memory[Memory["KeepTokenPlaceSecret"] = 1] = "KeepTokenPlaceSecret";
|
|
7
|
+
Memory[Memory["TrialFailure"] = 2] = "TrialFailure";
|
|
8
|
+
Memory[Memory["PendingEffects"] = 3] = "PendingEffects";
|
|
9
|
+
Memory[Memory["PendingRule"] = 4] = "PendingRule";
|
|
10
|
+
Memory[Memory["OngoingEffect"] = 5] = "OngoingEffect";
|
|
11
|
+
Memory[Memory["OncePerTurn"] = 6] = "OncePerTurn";
|
|
12
|
+
Memory[Memory["OdinTargetMythology"] = 10] = "OdinTargetMythology";
|
|
13
|
+
Memory[Memory["FenrirPaid1"] = 11] = "FenrirPaid1";
|
|
14
|
+
Memory[Memory["AnubisInvoke1"] = 12] = "AnubisInvoke1";
|
|
15
|
+
Memory[Memory["GarudaSacrificeCount"] = 13] = "GarudaSacrificeCount";
|
|
16
|
+
Memory[Memory["VetalaCount"] = 14] = "VetalaCount";
|
|
17
|
+
})(Memory = exports.Memory || (exports.Memory = {}));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { OptionsSpec } from '@gamepark/rules-api';
|
|
2
|
+
import { Mythology } from './material/Mythology';
|
|
3
|
+
import { PlayerColor } from './PlayerColor';
|
|
4
|
+
type PlayerOptions = {
|
|
5
|
+
id: PlayerColor;
|
|
6
|
+
};
|
|
7
|
+
export type MythologiesOptions = {
|
|
8
|
+
players: PlayerOptions[];
|
|
9
|
+
mythologies?: Mythology[];
|
|
10
|
+
};
|
|
11
|
+
export declare const MythologiesOptionsSpec: OptionsSpec<MythologiesOptions>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MythologiesOptionsSpec = void 0;
|
|
4
|
+
var rules_api_1 = require("@gamepark/rules-api");
|
|
5
|
+
var PlayerColor_1 = require("./PlayerColor");
|
|
6
|
+
exports.MythologiesOptionsSpec = {
|
|
7
|
+
players: {
|
|
8
|
+
id: {
|
|
9
|
+
label: function (t) { return t('player.id'); },
|
|
10
|
+
values: (0, rules_api_1.getEnumValues)(PlayerColor_1.PlayerColor),
|
|
11
|
+
valueSpec: function (id) { return ({ label: function (t) { return t("player.".concat(id)); } }); }
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { CustomMove, FillGapStrategy, ItemMove, Material, MaterialGame, MaterialItem, MaterialMove, PositiveSequenceStrategy, SecretMaterialRules, StackingStrategy, TimeLimit } from '@gamepark/rules-api';
|
|
2
|
+
import { LocationType } from './material/LocationType';
|
|
3
|
+
import { MaterialType } from './material/MaterialType';
|
|
4
|
+
import { PlayerColor } from './PlayerColor';
|
|
5
|
+
import { ChooseDraftTokenRule } from './rules/ChooseDraftTokenRule';
|
|
6
|
+
import { DrawDestinyCardRule } from './rules/DrawDestinyCardRule';
|
|
7
|
+
import { AlfEffectRule } from './rules/effects/AlfEffectRule';
|
|
8
|
+
import { AnubisEffectRule } from './rules/effects/AnubisEffectRule';
|
|
9
|
+
import { AthenaEffectRule } from './rules/effects/AthenaEffectRule';
|
|
10
|
+
import { BabaiEffectRule } from './rules/effects/BabaiEffectRule';
|
|
11
|
+
import { BennuEffectRule } from './rules/effects/BennuEffectRule';
|
|
12
|
+
import { CentaurEffectRule, CentaurEffectSacrificeRule } from './rules/effects/CentaurEffectRule';
|
|
13
|
+
import { ChimeraEffectRule } from './rules/effects/ChimeraEffectRule';
|
|
14
|
+
import { CobraEffectRule, CobraInvokeEffect } from './rules/effects/CobraEffectRule';
|
|
15
|
+
import { CyclopsEffectRule } from './rules/effects/CyclopsEffectRule';
|
|
16
|
+
import { DraugrEffectRule } from './rules/effects/DraugrEffectRule';
|
|
17
|
+
import { FenrirChoiceRule, FenrirEffectRule } from './rules/effects/FenrirEffectRule';
|
|
18
|
+
import { GarudaEffectRule } from './rules/effects/GarudaEffectRule';
|
|
19
|
+
import { GorgonEffectRule } from './rules/effects/GorgonEffectRule';
|
|
20
|
+
import { GriffinEffectRule } from './rules/effects/GriffinEffectRule';
|
|
21
|
+
import { HadesEffectRule } from './rules/effects/HadesEffectRule';
|
|
22
|
+
import { KinnaraEffectRule, KinnaraPlaceEffectRule } from './rules/effects/KinnaraEffectRule';
|
|
23
|
+
import { MinotaurEffectRule } from './rules/effects/MinotaurEffectRule';
|
|
24
|
+
import { OdinEffectRule } from './rules/effects/OdinEffectRule';
|
|
25
|
+
import { RakshasaEffectRule } from './rules/effects/RakshasaEffectRule';
|
|
26
|
+
import { ResolveEffectsRule } from './rules/effects/ResolveEffectsRule';
|
|
27
|
+
import { ShivaEffectRule } from './rules/effects/ShivaEffectRule';
|
|
28
|
+
import { SphinxEffectRule } from './rules/effects/SphinxEffectRule';
|
|
29
|
+
import { ThorEffectRule } from './rules/effects/ThorEffectRule';
|
|
30
|
+
import { VetalaEffectRule } from './rules/effects/VetalaEffectRule';
|
|
31
|
+
import { EndGameRule } from './rules/EndGameRule';
|
|
32
|
+
import { PlaceCardsRule } from './rules/PlaceCardsRule';
|
|
33
|
+
import { PlaceTokenRule } from './rules/PlaceTokenRule';
|
|
34
|
+
import { RuleId } from './rules/RuleId';
|
|
35
|
+
import { UpkeepRule } from './rules/UpkeepRule';
|
|
36
|
+
export declare class MythologiesRules extends SecretMaterialRules<PlayerColor, MaterialType, LocationType> implements TimeLimit<MaterialGame<PlayerColor, MaterialType, LocationType>, MaterialMove<PlayerColor, MaterialType, LocationType>, PlayerColor> {
|
|
37
|
+
rules: {
|
|
38
|
+
1: typeof DrawDestinyCardRule;
|
|
39
|
+
2: typeof ChooseDraftTokenRule;
|
|
40
|
+
3: typeof PlaceTokenRule;
|
|
41
|
+
4: typeof PlaceCardsRule;
|
|
42
|
+
5: typeof UpkeepRule;
|
|
43
|
+
6: typeof EndGameRule;
|
|
44
|
+
10: typeof ResolveEffectsRule;
|
|
45
|
+
11: typeof AthenaEffectRule;
|
|
46
|
+
12: typeof HadesEffectRule;
|
|
47
|
+
13: typeof MinotaurEffectRule;
|
|
48
|
+
14: typeof CentaurEffectRule;
|
|
49
|
+
15: typeof CentaurEffectSacrificeRule;
|
|
50
|
+
16: typeof GorgonEffectRule;
|
|
51
|
+
17: typeof CyclopsEffectRule;
|
|
52
|
+
18: typeof GriffinEffectRule;
|
|
53
|
+
19: typeof ChimeraEffectRule;
|
|
54
|
+
20: typeof OdinEffectRule;
|
|
55
|
+
21: typeof ThorEffectRule;
|
|
56
|
+
22: typeof DraugrEffectRule;
|
|
57
|
+
23: typeof FenrirChoiceRule;
|
|
58
|
+
24: typeof FenrirEffectRule;
|
|
59
|
+
25: typeof AlfEffectRule;
|
|
60
|
+
26: typeof AnubisEffectRule;
|
|
61
|
+
27: typeof SphinxEffectRule;
|
|
62
|
+
28: typeof CobraEffectRule;
|
|
63
|
+
29: typeof CobraInvokeEffect;
|
|
64
|
+
30: typeof BabaiEffectRule;
|
|
65
|
+
31: typeof BennuEffectRule;
|
|
66
|
+
32: typeof ShivaEffectRule;
|
|
67
|
+
33: typeof RakshasaEffectRule;
|
|
68
|
+
34: typeof GarudaEffectRule;
|
|
69
|
+
35: typeof VetalaEffectRule;
|
|
70
|
+
36: typeof KinnaraEffectRule;
|
|
71
|
+
37: typeof KinnaraPlaceEffectRule;
|
|
72
|
+
};
|
|
73
|
+
locationsStrategies: {
|
|
74
|
+
2: {
|
|
75
|
+
2: PositiveSequenceStrategy<number, number, number>;
|
|
76
|
+
3: PositiveSequenceStrategy<number, number, number>;
|
|
77
|
+
6: FillGapStrategy<number, number, number>;
|
|
78
|
+
19: StackingStrategy;
|
|
79
|
+
22: PositiveSequenceStrategy<number, number, number>;
|
|
80
|
+
};
|
|
81
|
+
4: {
|
|
82
|
+
5: PositiveSequenceStrategy<number, number, number>;
|
|
83
|
+
};
|
|
84
|
+
10: {
|
|
85
|
+
15: PositiveSequenceStrategy<number, number, number>;
|
|
86
|
+
16: PositiveSequenceStrategy<number, number, number>;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
hidingStrategies: {
|
|
90
|
+
2: {
|
|
91
|
+
2: import("@gamepark/rules-api").HidingStrategy<number, number>;
|
|
92
|
+
3: (item: MaterialItem) => string[];
|
|
93
|
+
7: (item: MaterialItem, player?: PlayerColor) => string[];
|
|
94
|
+
6: (item: MaterialItem, player?: PlayerColor) => string[];
|
|
95
|
+
};
|
|
96
|
+
4: {
|
|
97
|
+
5: import("@gamepark/rules-api").HidingStrategy<number, number>;
|
|
98
|
+
17: (item: MaterialItem) => string[];
|
|
99
|
+
};
|
|
100
|
+
10: {
|
|
101
|
+
15: import("@gamepark/rules-api").HidingStrategy<number, number>;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
keepMoveSecret(move: MaterialMove): boolean;
|
|
105
|
+
beforeItemMove(move: ItemMove): MaterialMove<number, number, number, number>[];
|
|
106
|
+
onEntitySacrificed(card: Material): void;
|
|
107
|
+
protected onCustomMove(move: CustomMove): import("@gamepark/rules-api").EndGame[] | import("@gamepark/rules-api").StartPlayerTurn<PlayerColor, RuleId.ResolveEffects>[] | (import("@gamepark/rules-api").StartPlayerTurn<number, RuleId.PlaceCards> | import("@gamepark/rules-api").StartRule<RuleId.PlaceCards>)[];
|
|
108
|
+
getAutomaticMoves(): import("@gamepark/rules-api").StartPlayerTurn<PlayerColor, RuleId.ResolveEffects>[];
|
|
109
|
+
startEffectsResolution(): import("@gamepark/rules-api").StartPlayerTurn<PlayerColor, RuleId.ResolveEffects>[];
|
|
110
|
+
giveTime(): number;
|
|
111
|
+
}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.MythologiesRules = void 0;
|
|
19
|
+
var rules_api_1 = require("@gamepark/rules-api");
|
|
20
|
+
var CustomMoveType_1 = require("./CustomMoveType");
|
|
21
|
+
var Effect_1 = require("./material/entity/Effect");
|
|
22
|
+
var LocationType_1 = require("./material/LocationType");
|
|
23
|
+
var MaterialType_1 = require("./material/MaterialType");
|
|
24
|
+
var Pantheon_1 = require("./material/Pantheon");
|
|
25
|
+
var Memory_1 = require("./Memory");
|
|
26
|
+
var ChooseDraftTokenRule_1 = require("./rules/ChooseDraftTokenRule");
|
|
27
|
+
var DrawDestinyCardRule_1 = require("./rules/DrawDestinyCardRule");
|
|
28
|
+
var AlfEffectRule_1 = require("./rules/effects/AlfEffectRule");
|
|
29
|
+
var AnubisEffectRule_1 = require("./rules/effects/AnubisEffectRule");
|
|
30
|
+
var AthenaEffectRule_1 = require("./rules/effects/AthenaEffectRule");
|
|
31
|
+
var BabaiEffectRule_1 = require("./rules/effects/BabaiEffectRule");
|
|
32
|
+
var BennuEffectRule_1 = require("./rules/effects/BennuEffectRule");
|
|
33
|
+
var CentaurEffectRule_1 = require("./rules/effects/CentaurEffectRule");
|
|
34
|
+
var ChimeraEffectRule_1 = require("./rules/effects/ChimeraEffectRule");
|
|
35
|
+
var CobraEffectRule_1 = require("./rules/effects/CobraEffectRule");
|
|
36
|
+
var CyclopsEffectRule_1 = require("./rules/effects/CyclopsEffectRule");
|
|
37
|
+
var DraugrEffectRule_1 = require("./rules/effects/DraugrEffectRule");
|
|
38
|
+
var FenrirEffectRule_1 = require("./rules/effects/FenrirEffectRule");
|
|
39
|
+
var GarudaEffectRule_1 = require("./rules/effects/GarudaEffectRule");
|
|
40
|
+
var GorgonEffectRule_1 = require("./rules/effects/GorgonEffectRule");
|
|
41
|
+
var GriffinEffectRule_1 = require("./rules/effects/GriffinEffectRule");
|
|
42
|
+
var HadesEffectRule_1 = require("./rules/effects/HadesEffectRule");
|
|
43
|
+
var KinnaraEffectRule_1 = require("./rules/effects/KinnaraEffectRule");
|
|
44
|
+
var MinotaurEffectRule_1 = require("./rules/effects/MinotaurEffectRule");
|
|
45
|
+
var OdinEffectRule_1 = require("./rules/effects/OdinEffectRule");
|
|
46
|
+
var RakshasaEffectRule_1 = require("./rules/effects/RakshasaEffectRule");
|
|
47
|
+
var ResolveEffectsRule_1 = require("./rules/effects/ResolveEffectsRule");
|
|
48
|
+
var ShivaEffectRule_1 = require("./rules/effects/ShivaEffectRule");
|
|
49
|
+
var SphinxEffectRule_1 = require("./rules/effects/SphinxEffectRule");
|
|
50
|
+
var ThorEffectRule_1 = require("./rules/effects/ThorEffectRule");
|
|
51
|
+
var TriggerEffectsRule_1 = require("./rules/effects/TriggerEffectsRule");
|
|
52
|
+
var VetalaEffectRule_1 = require("./rules/effects/VetalaEffectRule");
|
|
53
|
+
var EndGameRule_1 = require("./rules/EndGameRule");
|
|
54
|
+
var PlaceCardsRule_1 = require("./rules/PlaceCardsRule");
|
|
55
|
+
var PlaceTokenRule_1 = require("./rules/PlaceTokenRule");
|
|
56
|
+
var RuleId_1 = require("./rules/RuleId");
|
|
57
|
+
var UpkeepRule_1 = require("./rules/UpkeepRule");
|
|
58
|
+
var MythologiesRules = (function (_super) {
|
|
59
|
+
__extends(MythologiesRules, _super);
|
|
60
|
+
function MythologiesRules() {
|
|
61
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
62
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
63
|
+
_this.rules = (_a = {},
|
|
64
|
+
_a[RuleId_1.RuleId.DrawDestinyCard] = DrawDestinyCardRule_1.DrawDestinyCardRule,
|
|
65
|
+
_a[RuleId_1.RuleId.ChooseDraftToken] = ChooseDraftTokenRule_1.ChooseDraftTokenRule,
|
|
66
|
+
_a[RuleId_1.RuleId.PlaceToken] = PlaceTokenRule_1.PlaceTokenRule,
|
|
67
|
+
_a[RuleId_1.RuleId.PlaceCards] = PlaceCardsRule_1.PlaceCardsRule,
|
|
68
|
+
_a[RuleId_1.RuleId.Upkeep] = UpkeepRule_1.UpkeepRule,
|
|
69
|
+
_a[RuleId_1.RuleId.EndGame] = EndGameRule_1.EndGameRule,
|
|
70
|
+
_a[RuleId_1.RuleId.ResolveEffects] = ResolveEffectsRule_1.ResolveEffectsRule,
|
|
71
|
+
_a[RuleId_1.RuleId.AthenaEffect] = AthenaEffectRule_1.AthenaEffectRule,
|
|
72
|
+
_a[RuleId_1.RuleId.HadesEffect] = HadesEffectRule_1.HadesEffectRule,
|
|
73
|
+
_a[RuleId_1.RuleId.MinotaurEffect] = MinotaurEffectRule_1.MinotaurEffectRule,
|
|
74
|
+
_a[RuleId_1.RuleId.CentaurEffect] = CentaurEffectRule_1.CentaurEffectRule,
|
|
75
|
+
_a[RuleId_1.RuleId.CentaurEffectSacrifice] = CentaurEffectRule_1.CentaurEffectSacrificeRule,
|
|
76
|
+
_a[RuleId_1.RuleId.GorgonEffect] = GorgonEffectRule_1.GorgonEffectRule,
|
|
77
|
+
_a[RuleId_1.RuleId.CyclopsEffect] = CyclopsEffectRule_1.CyclopsEffectRule,
|
|
78
|
+
_a[RuleId_1.RuleId.GriffinEffect] = GriffinEffectRule_1.GriffinEffectRule,
|
|
79
|
+
_a[RuleId_1.RuleId.ChimeraEffect] = ChimeraEffectRule_1.ChimeraEffectRule,
|
|
80
|
+
_a[RuleId_1.RuleId.OdinEffect] = OdinEffectRule_1.OdinEffectRule,
|
|
81
|
+
_a[RuleId_1.RuleId.ThorEffect] = ThorEffectRule_1.ThorEffectRule,
|
|
82
|
+
_a[RuleId_1.RuleId.DraugrEffect] = DraugrEffectRule_1.DraugrEffectRule,
|
|
83
|
+
_a[RuleId_1.RuleId.FenrirChoice] = FenrirEffectRule_1.FenrirChoiceRule,
|
|
84
|
+
_a[RuleId_1.RuleId.FenrirEffect] = FenrirEffectRule_1.FenrirEffectRule,
|
|
85
|
+
_a[RuleId_1.RuleId.AlfEffect] = AlfEffectRule_1.AlfEffectRule,
|
|
86
|
+
_a[RuleId_1.RuleId.AnubisEffect] = AnubisEffectRule_1.AnubisEffectRule,
|
|
87
|
+
_a[RuleId_1.RuleId.SphinxEffect] = SphinxEffectRule_1.SphinxEffectRule,
|
|
88
|
+
_a[RuleId_1.RuleId.CobraEffect] = CobraEffectRule_1.CobraEffectRule,
|
|
89
|
+
_a[RuleId_1.RuleId.CobraInvokeEffect] = CobraEffectRule_1.CobraInvokeEffect,
|
|
90
|
+
_a[RuleId_1.RuleId.BabaiEffect] = BabaiEffectRule_1.BabaiEffectRule,
|
|
91
|
+
_a[RuleId_1.RuleId.BennuEffect] = BennuEffectRule_1.BennuEffectRule,
|
|
92
|
+
_a[RuleId_1.RuleId.ShivaEffect] = ShivaEffectRule_1.ShivaEffectRule,
|
|
93
|
+
_a[RuleId_1.RuleId.RakshasaEffect] = RakshasaEffectRule_1.RakshasaEffectRule,
|
|
94
|
+
_a[RuleId_1.RuleId.GarudaEffect] = GarudaEffectRule_1.GarudaEffectRule,
|
|
95
|
+
_a[RuleId_1.RuleId.VetalaEffect] = VetalaEffectRule_1.VetalaEffectRule,
|
|
96
|
+
_a[RuleId_1.RuleId.KinnaraEffect] = KinnaraEffectRule_1.KinnaraEffectRule,
|
|
97
|
+
_a[RuleId_1.RuleId.KinnaraPlaceEffect] = KinnaraEffectRule_1.KinnaraPlaceEffectRule,
|
|
98
|
+
_a);
|
|
99
|
+
_this.locationsStrategies = (_b = {},
|
|
100
|
+
_b[MaterialType_1.MaterialType.EntityCard] = (_c = {},
|
|
101
|
+
_c[LocationType_1.LocationType.GodsDeck] = new rules_api_1.PositiveSequenceStrategy(),
|
|
102
|
+
_c[LocationType_1.LocationType.CreaturesDeck] = new rules_api_1.PositiveSequenceStrategy(),
|
|
103
|
+
_c[LocationType_1.LocationType.SanctuaryCreatureSpot] = new rules_api_1.FillGapStrategy(),
|
|
104
|
+
_c[LocationType_1.LocationType.Pantheon] = new rules_api_1.StackingStrategy(),
|
|
105
|
+
_c[LocationType_1.LocationType.PlayerDiscard] = new rules_api_1.PositiveSequenceStrategy(),
|
|
106
|
+
_c),
|
|
107
|
+
_b[MaterialType_1.MaterialType.DraftToken] = (_d = {},
|
|
108
|
+
_d[LocationType_1.LocationType.PlayerHand] = new rules_api_1.PositiveSequenceStrategy(),
|
|
109
|
+
_d),
|
|
110
|
+
_b[MaterialType_1.MaterialType.DestinyCard] = (_e = {},
|
|
111
|
+
_e[LocationType_1.LocationType.DestinyDeck] = new rules_api_1.PositiveSequenceStrategy(),
|
|
112
|
+
_e[LocationType_1.LocationType.CurrentDestiny] = new rules_api_1.PositiveSequenceStrategy(),
|
|
113
|
+
_e),
|
|
114
|
+
_b);
|
|
115
|
+
_this.hidingStrategies = (_f = {},
|
|
116
|
+
_f[MaterialType_1.MaterialType.EntityCard] = (_g = {},
|
|
117
|
+
_g[LocationType_1.LocationType.GodsDeck] = rules_api_1.hideFront,
|
|
118
|
+
_g[LocationType_1.LocationType.CreaturesDeck] = function (item) { return (item.location.rotation ? [] : ['id.front']); },
|
|
119
|
+
_g[LocationType_1.LocationType.SanctuaryGodSpot] = function (item, player) { var _a; return (((_a = item.location.rotation) !== null && _a !== void 0 ? _a : player) === player ? [] : ['id.front']); },
|
|
120
|
+
_g[LocationType_1.LocationType.SanctuaryCreatureSpot] = function (item, player) { var _a; return (((_a = item.location.rotation) !== null && _a !== void 0 ? _a : player) === player ? [] : ['id.front']); },
|
|
121
|
+
_g),
|
|
122
|
+
_f[MaterialType_1.MaterialType.DraftToken] = (_h = {},
|
|
123
|
+
_h[LocationType_1.LocationType.PlayerHand] = rules_api_1.hideFrontToOthers,
|
|
124
|
+
_h[LocationType_1.LocationType.PlayedTokenSpot] = function (item) { return (item.location.rotation ? ['id.front'] : []); },
|
|
125
|
+
_h),
|
|
126
|
+
_f[MaterialType_1.MaterialType.DestinyCard] = (_j = {},
|
|
127
|
+
_j[LocationType_1.LocationType.DestinyDeck] = rules_api_1.hideItemId,
|
|
128
|
+
_j),
|
|
129
|
+
_f);
|
|
130
|
+
return _this;
|
|
131
|
+
}
|
|
132
|
+
MythologiesRules.prototype.keepMoveSecret = function (move) {
|
|
133
|
+
return ((0, rules_api_1.isMoveItemType)(MaterialType_1.MaterialType.DraftToken)(move) &&
|
|
134
|
+
this.remind(Memory_1.Memory.KeepTokenPlaceSecret, this.material(MaterialType_1.MaterialType.DraftToken).getItem(move.itemIndex).id.back) === true);
|
|
135
|
+
};
|
|
136
|
+
MythologiesRules.prototype.beforeItemMove = function (move) {
|
|
137
|
+
var _a;
|
|
138
|
+
if ((0, rules_api_1.isMoveItemType)(MaterialType_1.MaterialType.EntityCard)(move)) {
|
|
139
|
+
if (move.location.type === LocationType_1.LocationType.Pantheon) {
|
|
140
|
+
var location = this.material(MaterialType_1.MaterialType.EntityCard).getItem(move.itemIndex).location;
|
|
141
|
+
if (location.type !== LocationType_1.LocationType.Pantheon && location.type !== LocationType_1.LocationType.PlayerBufferArea) {
|
|
142
|
+
return new Pantheon_1.Pantheon(this.game, move.location.player).onCardPlaced(move);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
else if (move.location.type === LocationType_1.LocationType.PlayerDiscard) {
|
|
146
|
+
var card = this.material(MaterialType_1.MaterialType.EntityCard).index(move.itemIndex);
|
|
147
|
+
var location = card.getItem().location;
|
|
148
|
+
if (location.type === LocationType_1.LocationType.Pantheon) {
|
|
149
|
+
this.onEntitySacrificed(card);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
if ((0, rules_api_1.isMoveItemTypeAtOnce)(MaterialType_1.MaterialType.EntityCard)(move)) {
|
|
154
|
+
if (move.location.type === LocationType_1.LocationType.PlayerDiscard) {
|
|
155
|
+
var pile = this.material(MaterialType_1.MaterialType.EntityCard).index(move.indexes);
|
|
156
|
+
if (((_a = pile.getItem()) === null || _a === void 0 ? void 0 : _a.location.type) === LocationType_1.LocationType.Pantheon) {
|
|
157
|
+
var topCard = pile.maxBy(function (item) { return item.location.z; });
|
|
158
|
+
this.onEntitySacrificed(topCard);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
if ((0, rules_api_1.isMoveItemType)(MaterialType_1.MaterialType.GemToken)(move) && move.location.type === LocationType_1.LocationType.PlayerGems) {
|
|
163
|
+
var gem = this.material(MaterialType_1.MaterialType.GemToken).getItem(move.itemIndex);
|
|
164
|
+
var player = gem.location.player;
|
|
165
|
+
if (gem.location.type === LocationType_1.LocationType.PantheonLineBonus && player === move.location.player) {
|
|
166
|
+
new TriggerEffectsRule_1.TriggerEffectsRule(this.game).triggerEffects({ type: Effect_1.TriggerEventType.LineBonusGain, player: player, y: gem.location.y });
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
if ((0, rules_api_1.isMoveItemType)(MaterialType_1.MaterialType.FavorToken)(move) && move.location.type === LocationType_1.LocationType.PlayerFavor) {
|
|
170
|
+
var favor = this.material(MaterialType_1.MaterialType.FavorToken).getItem(move.itemIndex);
|
|
171
|
+
var player = favor.location.player;
|
|
172
|
+
if (favor.location.type === LocationType_1.LocationType.PantheonColumnBonus && player === move.location.player) {
|
|
173
|
+
new TriggerEffectsRule_1.TriggerEffectsRule(this.game).triggerEffects({ type: Effect_1.TriggerEventType.ColumnBonusGain, player: player, x: favor.location.x });
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
return [];
|
|
177
|
+
};
|
|
178
|
+
MythologiesRules.prototype.onEntitySacrificed = function (card) {
|
|
179
|
+
new TriggerEffectsRule_1.TriggerEffectsRule(this.game).triggerEffects({ type: Effect_1.TriggerEventType.EntitySacrificed, card: card.getItem(), cardIndex: card.getIndex() });
|
|
180
|
+
};
|
|
181
|
+
MythologiesRules.prototype.onCustomMove = function (move) {
|
|
182
|
+
var _a;
|
|
183
|
+
if (move.type === CustomMoveType_1.CustomMoveType.EndEffect) {
|
|
184
|
+
this.forget(Memory_1.Memory.OngoingEffect);
|
|
185
|
+
if (this.remind(Memory_1.Memory.PendingEffects).length) {
|
|
186
|
+
return this.startEffectsResolution();
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
var _b = this.remind(Memory_1.Memory.PendingRule), id = _b.id, player = _b.player;
|
|
190
|
+
this.forget(Memory_1.Memory.PendingRule);
|
|
191
|
+
switch (id) {
|
|
192
|
+
case RuleId_1.RuleId.EndGame:
|
|
193
|
+
return [this.endGame()];
|
|
194
|
+
default:
|
|
195
|
+
return [player === ((_a = this.game.rule) === null || _a === void 0 ? void 0 : _a.player) ? this.startRule(RuleId_1.RuleId.PlaceCards) : this.startPlayerTurn(RuleId_1.RuleId.PlaceCards, player)];
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
return [];
|
|
200
|
+
};
|
|
201
|
+
MythologiesRules.prototype.getAutomaticMoves = function () {
|
|
202
|
+
var _a;
|
|
203
|
+
if (!this.remind(Memory_1.Memory.OngoingEffect) && ((_a = this.game.rule) === null || _a === void 0 ? void 0 : _a.id) !== RuleId_1.RuleId.ResolveEffects && this.remind(Memory_1.Memory.PendingEffects).length) {
|
|
204
|
+
return this.startEffectsResolution();
|
|
205
|
+
}
|
|
206
|
+
return [];
|
|
207
|
+
};
|
|
208
|
+
MythologiesRules.prototype.startEffectsResolution = function () {
|
|
209
|
+
var cardIndex = this.remind(Memory_1.Memory.PendingEffects)[0][0].cardIndex;
|
|
210
|
+
var player = this.material(MaterialType_1.MaterialType.EntityCard).getItem(cardIndex).location.player;
|
|
211
|
+
return [this.startPlayerTurn(RuleId_1.RuleId.ResolveEffects, player)];
|
|
212
|
+
};
|
|
213
|
+
MythologiesRules.prototype.giveTime = function () {
|
|
214
|
+
return 60;
|
|
215
|
+
};
|
|
216
|
+
return MythologiesRules;
|
|
217
|
+
}(rules_api_1.SecretMaterialRules));
|
|
218
|
+
exports.MythologiesRules = MythologiesRules;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { MaterialGameSetup } from '@gamepark/rules-api';
|
|
2
|
+
import { LocationType } from './material/LocationType';
|
|
3
|
+
import { MaterialType } from './material/MaterialType';
|
|
4
|
+
import { Mythology } from './material/Mythology';
|
|
5
|
+
import { MythologiesOptions } from './MythologiesOptions';
|
|
6
|
+
import { MythologiesRules } from './MythologiesRules';
|
|
7
|
+
import { PlayerColor } from './PlayerColor';
|
|
8
|
+
export declare class MythologiesSetup extends MaterialGameSetup<PlayerColor, MaterialType, LocationType, MythologiesOptions> {
|
|
9
|
+
Rules: typeof MythologiesRules;
|
|
10
|
+
setupMaterial(options: MythologiesOptions): void;
|
|
11
|
+
getMythologies(options: MythologiesOptions): Mythology[];
|
|
12
|
+
setupMythologies(mythologies: Mythology[]): void;
|
|
13
|
+
setupPlayers(): void;
|
|
14
|
+
dealCreatures(): void;
|
|
15
|
+
private createDestinyCards;
|
|
16
|
+
start(): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __values = (this && this.__values) || function(o) {
|
|
18
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
19
|
+
if (m) return m.call(o);
|
|
20
|
+
if (o && typeof o.length === "number") return {
|
|
21
|
+
next: function () {
|
|
22
|
+
if (o && i >= o.length) o = void 0;
|
|
23
|
+
return { value: o && o[i++], done: !o };
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.MythologiesSetup = void 0;
|
|
30
|
+
var rules_api_1 = require("@gamepark/rules-api");
|
|
31
|
+
var lodash_1 = require("lodash");
|
|
32
|
+
var Entity_1 = require("./material/Entity");
|
|
33
|
+
var LocationType_1 = require("./material/LocationType");
|
|
34
|
+
var MaterialType_1 = require("./material/MaterialType");
|
|
35
|
+
var Mythology_1 = require("./material/Mythology");
|
|
36
|
+
var Memory_1 = require("./Memory");
|
|
37
|
+
var MythologiesRules_1 = require("./MythologiesRules");
|
|
38
|
+
var RuleId_1 = require("./rules/RuleId");
|
|
39
|
+
var MythologiesSetup = (function (_super) {
|
|
40
|
+
__extends(MythologiesSetup, _super);
|
|
41
|
+
function MythologiesSetup() {
|
|
42
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
43
|
+
_this.Rules = MythologiesRules_1.MythologiesRules;
|
|
44
|
+
return _this;
|
|
45
|
+
}
|
|
46
|
+
MythologiesSetup.prototype.setupMaterial = function (options) {
|
|
47
|
+
this.memorize(Memory_1.Memory.PendingEffects, []);
|
|
48
|
+
this.setupMythologies(this.getMythologies(options));
|
|
49
|
+
this.setupPlayers();
|
|
50
|
+
this.dealCreatures();
|
|
51
|
+
this.material(MaterialType_1.MaterialType.RoundToken).createItem({ location: { type: LocationType_1.LocationType.RoundSpace, id: 1 } });
|
|
52
|
+
this.createDestinyCards();
|
|
53
|
+
};
|
|
54
|
+
MythologiesSetup.prototype.getMythologies = function (options) {
|
|
55
|
+
var array = Array.isArray(options.mythologies) ? options.mythologies : [];
|
|
56
|
+
var mythologies = array.filter(function (item) { return typeof item === 'number' && Mythology_1.Mythology[item]; });
|
|
57
|
+
if (mythologies.length === 4) {
|
|
58
|
+
return mythologies;
|
|
59
|
+
}
|
|
60
|
+
else if (mythologies.length < 4) {
|
|
61
|
+
return mythologies.concat((0, lodash_1.sampleSize)((0, lodash_1.difference)(Mythology_1.availableMythologies, mythologies), 4 - mythologies.length));
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
return (0, lodash_1.sampleSize)(mythologies, 4);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
MythologiesSetup.prototype.setupMythologies = function (mythologies) {
|
|
68
|
+
var e_1, _a;
|
|
69
|
+
this.material(MaterialType_1.MaterialType.MythologyBoard).createItems(mythologies.map(function (mythology, index) { return ({
|
|
70
|
+
id: { mythology: mythology, side: index % 2 },
|
|
71
|
+
location: {
|
|
72
|
+
type: LocationType_1.LocationType.Sanctuary,
|
|
73
|
+
x: index % 2,
|
|
74
|
+
y: Math.floor(index / 2)
|
|
75
|
+
}
|
|
76
|
+
}); }));
|
|
77
|
+
var _loop_1 = function (mythology) {
|
|
78
|
+
this_1.material(MaterialType_1.MaterialType.EntityCard).createItems((0, lodash_1.shuffle)((0, lodash_1.range)(1, 5)).map(function (god) { return ({
|
|
79
|
+
id: { front: mythology * 10 + god, back: { mythology: mythology, entityType: Entity_1.EntityType.God } },
|
|
80
|
+
location: {
|
|
81
|
+
type: LocationType_1.LocationType.GodsDeck,
|
|
82
|
+
id: mythology
|
|
83
|
+
}
|
|
84
|
+
}); }));
|
|
85
|
+
this_1.material(MaterialType_1.MaterialType.EntityCard).createItems((0, lodash_1.shuffle)(Array(3).fill((0, lodash_1.range)(5, 11)).flat()).map(function (creature) { return ({
|
|
86
|
+
id: { front: mythology * 10 + creature, back: { mythology: mythology, entityType: Entity_1.EntityType.Creature } },
|
|
87
|
+
location: {
|
|
88
|
+
type: LocationType_1.LocationType.CreaturesDeck,
|
|
89
|
+
id: mythology
|
|
90
|
+
}
|
|
91
|
+
}); }));
|
|
92
|
+
};
|
|
93
|
+
var this_1 = this;
|
|
94
|
+
try {
|
|
95
|
+
for (var mythologies_1 = __values(mythologies), mythologies_1_1 = mythologies_1.next(); !mythologies_1_1.done; mythologies_1_1 = mythologies_1.next()) {
|
|
96
|
+
var mythology = mythologies_1_1.value;
|
|
97
|
+
_loop_1(mythology);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
101
|
+
finally {
|
|
102
|
+
try {
|
|
103
|
+
if (mythologies_1_1 && !mythologies_1_1.done && (_a = mythologies_1.return)) _a.call(mythologies_1);
|
|
104
|
+
}
|
|
105
|
+
finally { if (e_1) throw e_1.error; }
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
MythologiesSetup.prototype.setupPlayers = function () {
|
|
109
|
+
var e_2, _a;
|
|
110
|
+
var _loop_2 = function (player) {
|
|
111
|
+
this_2.material(MaterialType_1.MaterialType.DraftToken).createItems((0, lodash_1.shuffle)([true, true, false]).map(function (front) { return ({
|
|
112
|
+
id: { front: front, back: player },
|
|
113
|
+
location: { type: LocationType_1.LocationType.PlayerHand, player: player }
|
|
114
|
+
}); }));
|
|
115
|
+
this_2.material(MaterialType_1.MaterialType.GemToken).createItems((0, lodash_1.range)(0, 3).map(function (y) { return ({ location: { type: LocationType_1.LocationType.PantheonLineBonus, player: player, y: y } }); }));
|
|
116
|
+
this_2.material(MaterialType_1.MaterialType.FavorToken).createItems((0, lodash_1.range)(0, 3).map(function (x) { return ({ location: { type: LocationType_1.LocationType.PantheonColumnBonus, player: player, x: x } }); }));
|
|
117
|
+
};
|
|
118
|
+
var this_2 = this;
|
|
119
|
+
try {
|
|
120
|
+
for (var _b = __values(this.players), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
121
|
+
var player = _c.value;
|
|
122
|
+
_loop_2(player);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
126
|
+
finally {
|
|
127
|
+
try {
|
|
128
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
129
|
+
}
|
|
130
|
+
finally { if (e_2) throw e_2.error; }
|
|
131
|
+
}
|
|
132
|
+
this.material(MaterialType_1.MaterialType.FirstPlayerToken).createItem({ location: { type: LocationType_1.LocationType.FirstPlayerTokenSpot, player: this.players[0] } });
|
|
133
|
+
};
|
|
134
|
+
MythologiesSetup.prototype.dealCreatures = function () {
|
|
135
|
+
var e_3, _a;
|
|
136
|
+
var mythologyBoards = this.material(MaterialType_1.MaterialType.MythologyBoard);
|
|
137
|
+
try {
|
|
138
|
+
for (var _b = __values(mythologyBoards.getIndexes()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
139
|
+
var index = _c.value;
|
|
140
|
+
var mythology = mythologyBoards.getItem(index).id.mythology;
|
|
141
|
+
var deck = this.material(MaterialType_1.MaterialType.EntityCard).location(LocationType_1.LocationType.CreaturesDeck).locationId(mythology).deck();
|
|
142
|
+
deck.deal({ type: LocationType_1.LocationType.SanctuaryCreatureSpot, parent: index }, 3);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
146
|
+
finally {
|
|
147
|
+
try {
|
|
148
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
149
|
+
}
|
|
150
|
+
finally { if (e_3) throw e_3.error; }
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
MythologiesSetup.prototype.createDestinyCards = function () {
|
|
154
|
+
this.material(MaterialType_1.MaterialType.DestinyCard).createItems((0, lodash_1.shuffle)((0, lodash_1.range)(1, 5)).map(function (id) { return ({ id: id, location: { type: LocationType_1.LocationType.DestinyDeck } }); }));
|
|
155
|
+
};
|
|
156
|
+
MythologiesSetup.prototype.start = function () {
|
|
157
|
+
this.startRule(RuleId_1.RuleId.DrawDestinyCard);
|
|
158
|
+
};
|
|
159
|
+
return MythologiesSetup;
|
|
160
|
+
}(rules_api_1.MaterialGameSetup));
|
|
161
|
+
exports.MythologiesSetup = MythologiesSetup;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PlayerColor = void 0;
|
|
4
|
+
var PlayerColor;
|
|
5
|
+
(function (PlayerColor) {
|
|
6
|
+
PlayerColor[PlayerColor["Green"] = 1] = "Green";
|
|
7
|
+
PlayerColor[PlayerColor["Red"] = 2] = "Red";
|
|
8
|
+
PlayerColor[PlayerColor["Blue"] = 3] = "Blue";
|
|
9
|
+
PlayerColor[PlayerColor["Grey"] = 4] = "Grey";
|
|
10
|
+
})(PlayerColor = exports.PlayerColor || (exports.PlayerColor = {}));
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MythologiesSetup = exports.MythologiesOptionsSpec = exports.MythologiesRules = void 0;
|
|
4
|
+
var MythologiesRules_1 = require("./MythologiesRules");
|
|
5
|
+
Object.defineProperty(exports, "MythologiesRules", { enumerable: true, get: function () { return MythologiesRules_1.MythologiesRules; } });
|
|
6
|
+
var MythologiesOptions_1 = require("./MythologiesOptions");
|
|
7
|
+
Object.defineProperty(exports, "MythologiesOptionsSpec", { enumerable: true, get: function () { return MythologiesOptions_1.MythologiesOptionsSpec; } });
|
|
8
|
+
var MythologiesSetup_1 = require("./MythologiesSetup");
|
|
9
|
+
Object.defineProperty(exports, "MythologiesSetup", { enumerable: true, get: function () { return MythologiesSetup_1.MythologiesSetup; } });
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MaterialRulesPart } from '@gamepark/rules-api';
|
|
2
|
+
import { PlayerColor } from '../PlayerColor';
|
|
3
|
+
export declare class Destiny extends MaterialRulesPart {
|
|
4
|
+
getMythologyBoard(player: PlayerColor): import("@gamepark/rules-api").Material<number, number, number>;
|
|
5
|
+
getMythology(player: PlayerColor): import("./Mythology").Mythology;
|
|
6
|
+
getDestinyMap(destiny: number): PlayerColor[][];
|
|
7
|
+
getAvailableEntities(player: PlayerColor): import("@gamepark/rules-api").Material<number, number, number>;
|
|
8
|
+
getBoardsWithoutPlayer(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
9
|
+
}
|