@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,84 @@
|
|
|
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 __read = (this && this.__read) || function (o, n) {
|
|
18
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
19
|
+
if (!m) return o;
|
|
20
|
+
var i = m.call(o), r, ar = [], e;
|
|
21
|
+
try {
|
|
22
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
23
|
+
}
|
|
24
|
+
catch (error) { e = { error: error }; }
|
|
25
|
+
finally {
|
|
26
|
+
try {
|
|
27
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
28
|
+
}
|
|
29
|
+
finally { if (e) throw e.error; }
|
|
30
|
+
}
|
|
31
|
+
return ar;
|
|
32
|
+
};
|
|
33
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
34
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
35
|
+
if (ar || !(i in from)) {
|
|
36
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
37
|
+
ar[i] = from[i];
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
41
|
+
};
|
|
42
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
|
+
exports.GarudaEffectRule = void 0;
|
|
44
|
+
var Entity_1 = require("../../material/Entity");
|
|
45
|
+
var SacrificeEffectRule_1 = require("../../material/entity/SacrificeEffectRule");
|
|
46
|
+
var Pantheon_1 = require("../../material/Pantheon");
|
|
47
|
+
var Memory_1 = require("../../Memory");
|
|
48
|
+
var RuleId_1 = require("../RuleId");
|
|
49
|
+
var GarudaEffectRule = (function (_super) {
|
|
50
|
+
__extends(GarudaEffectRule, _super);
|
|
51
|
+
function GarudaEffectRule() {
|
|
52
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
53
|
+
_this.ruleId = RuleId_1.RuleId.GarudaEffect;
|
|
54
|
+
return _this;
|
|
55
|
+
}
|
|
56
|
+
GarudaEffectRule.prototype.onRuleStart = function () {
|
|
57
|
+
var count = this.getCardsToSacrifice().length;
|
|
58
|
+
if (!count)
|
|
59
|
+
return this.endEffect();
|
|
60
|
+
this.memorize(Memory_1.Memory.GarudaSacrificeCount, count);
|
|
61
|
+
var moves = [new Pantheon_1.Pantheon(this.game, this.player).gainGems(count)];
|
|
62
|
+
var playerMoves = this.getPlayerMoves();
|
|
63
|
+
if (playerMoves.length === count) {
|
|
64
|
+
moves.push.apply(moves, __spreadArray([], __read(playerMoves), false));
|
|
65
|
+
}
|
|
66
|
+
return moves;
|
|
67
|
+
};
|
|
68
|
+
GarudaEffectRule.prototype.getCardsToSacrifice = function () {
|
|
69
|
+
var pantheon = new Pantheon_1.Pantheon(this.game, this.player);
|
|
70
|
+
return pantheon.visibleEntities.id(function (id) { return (0, Entity_1.isCreature)(id.front); }).location(function (l) { return l.y === 1; });
|
|
71
|
+
};
|
|
72
|
+
GarudaEffectRule.prototype.onSacrifice = function () {
|
|
73
|
+
var sacrificeLeft = this.memorize(Memory_1.Memory.GarudaSacrificeCount, function (count) { return count - 1; });
|
|
74
|
+
if (sacrificeLeft) {
|
|
75
|
+
return [];
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
this.forget(Memory_1.Memory.GarudaSacrificeCount);
|
|
79
|
+
return this.endEffect();
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
return GarudaEffectRule;
|
|
83
|
+
}(SacrificeEffectRule_1.SacrificeEffectRule));
|
|
84
|
+
exports.GarudaEffectRule = GarudaEffectRule;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { InvokeEffectRule } from '../../material/entity/PlaceCardEffectRule';
|
|
2
|
+
import { SacrificeEffectRule } from '../../material/entity/SacrificeEffectRule';
|
|
3
|
+
import { RuleId } from '../RuleId';
|
|
4
|
+
export declare class GorgonEffectRule extends SacrificeEffectRule {
|
|
5
|
+
ruleId: RuleId;
|
|
6
|
+
getCardsToSacrifice(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
7
|
+
onSacrifice(): import("@gamepark/rules-api").MaterialMove<number, number, number, number>[];
|
|
8
|
+
}
|
|
9
|
+
export declare class CobraInvokeEffect extends InvokeEffectRule {
|
|
10
|
+
getCardsToPlace(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
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 __read = (this && this.__read) || function (o, n) {
|
|
18
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
19
|
+
if (!m) return o;
|
|
20
|
+
var i = m.call(o), r, ar = [], e;
|
|
21
|
+
try {
|
|
22
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
23
|
+
}
|
|
24
|
+
catch (error) { e = { error: error }; }
|
|
25
|
+
finally {
|
|
26
|
+
try {
|
|
27
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
28
|
+
}
|
|
29
|
+
finally { if (e) throw e.error; }
|
|
30
|
+
}
|
|
31
|
+
return ar;
|
|
32
|
+
};
|
|
33
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
34
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
35
|
+
if (ar || !(i in from)) {
|
|
36
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
37
|
+
ar[i] = from[i];
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
41
|
+
};
|
|
42
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
|
+
exports.CobraInvokeEffect = exports.GorgonEffectRule = void 0;
|
|
44
|
+
var PlaceCardEffectRule_1 = require("../../material/entity/PlaceCardEffectRule");
|
|
45
|
+
var SacrificeEffectRule_1 = require("../../material/entity/SacrificeEffectRule");
|
|
46
|
+
var LocationType_1 = require("../../material/LocationType");
|
|
47
|
+
var MaterialType_1 = require("../../material/MaterialType");
|
|
48
|
+
var Pantheon_1 = require("../../material/Pantheon");
|
|
49
|
+
var RuleId_1 = require("../RuleId");
|
|
50
|
+
var GorgonEffectRule = (function (_super) {
|
|
51
|
+
__extends(GorgonEffectRule, _super);
|
|
52
|
+
function GorgonEffectRule() {
|
|
53
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
54
|
+
_this.ruleId = RuleId_1.RuleId.GorgonEffect;
|
|
55
|
+
return _this;
|
|
56
|
+
}
|
|
57
|
+
GorgonEffectRule.prototype.getCardsToSacrifice = function () {
|
|
58
|
+
var _a = this.card.location, x = _a.x, y = _a.y;
|
|
59
|
+
return _super.prototype.getCardsToSacrifice.call(this).location(function (l) { return l.x === x && l.y === y + 1; });
|
|
60
|
+
};
|
|
61
|
+
GorgonEffectRule.prototype.onSacrifice = function () {
|
|
62
|
+
var pantheon = new Pantheon_1.Pantheon(this.game, this.player);
|
|
63
|
+
return __spreadArray([pantheon.gainGems(2)], __read(this.endEffect()), false);
|
|
64
|
+
};
|
|
65
|
+
return GorgonEffectRule;
|
|
66
|
+
}(SacrificeEffectRule_1.SacrificeEffectRule));
|
|
67
|
+
exports.GorgonEffectRule = GorgonEffectRule;
|
|
68
|
+
var CobraInvokeEffect = (function (_super) {
|
|
69
|
+
__extends(CobraInvokeEffect, _super);
|
|
70
|
+
function CobraInvokeEffect() {
|
|
71
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
72
|
+
}
|
|
73
|
+
CobraInvokeEffect.prototype.getCardsToPlace = function () {
|
|
74
|
+
return this.material(MaterialType_1.MaterialType.EntityCard).location(LocationType_1.LocationType.CreaturesDeck).rotation(true);
|
|
75
|
+
};
|
|
76
|
+
return CobraInvokeEffect;
|
|
77
|
+
}(PlaceCardEffectRule_1.InvokeEffectRule));
|
|
78
|
+
exports.CobraInvokeEffect = CobraInvokeEffect;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Material, MaterialMove } from '@gamepark/rules-api';
|
|
2
|
+
import { MoveEffectRule } from '../../material/entity/MoveEffectRule';
|
|
3
|
+
import { RuleId } from '../RuleId';
|
|
4
|
+
export declare class GriffinEffectRule extends MoveEffectRule {
|
|
5
|
+
ruleId: RuleId;
|
|
6
|
+
canPlayEffect(cardIndex: number): boolean;
|
|
7
|
+
onRuleStart(): MaterialMove[];
|
|
8
|
+
getMovingCards(effectCardIndex: number): Material;
|
|
9
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
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.GriffinEffectRule = void 0;
|
|
19
|
+
var MoveEffectRule_1 = require("../../material/entity/MoveEffectRule");
|
|
20
|
+
var Pantheon_1 = require("../../material/Pantheon");
|
|
21
|
+
var RuleId_1 = require("../RuleId");
|
|
22
|
+
var GriffinEffectRule = (function (_super) {
|
|
23
|
+
__extends(GriffinEffectRule, _super);
|
|
24
|
+
function GriffinEffectRule() {
|
|
25
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
26
|
+
_this.ruleId = RuleId_1.RuleId.GriffinEffect;
|
|
27
|
+
return _this;
|
|
28
|
+
}
|
|
29
|
+
GriffinEffectRule.prototype.canPlayEffect = function (cardIndex) {
|
|
30
|
+
var pantheon = new Pantheon_1.Pantheon(this.game, this.player);
|
|
31
|
+
return pantheon.gems > 0 && _super.prototype.canPlayEffect.call(this, cardIndex);
|
|
32
|
+
};
|
|
33
|
+
GriffinEffectRule.prototype.onRuleStart = function () {
|
|
34
|
+
return [new Pantheon_1.Pantheon(this.game, this.player).spendGems(1)];
|
|
35
|
+
};
|
|
36
|
+
GriffinEffectRule.prototype.getMovingCards = function (effectCardIndex) {
|
|
37
|
+
return _super.prototype.getMovingCards.call(this, effectCardIndex).location(function (l) { return l.y === 0; });
|
|
38
|
+
};
|
|
39
|
+
return GriffinEffectRule;
|
|
40
|
+
}(MoveEffectRule_1.MoveEffectRule));
|
|
41
|
+
exports.GriffinEffectRule = GriffinEffectRule;
|
|
@@ -0,0 +1,87 @@
|
|
|
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 __assign = (this && this.__assign) || function () {
|
|
18
|
+
__assign = Object.assign || function(t) {
|
|
19
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
+
s = arguments[i];
|
|
21
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
+
t[p] = s[p];
|
|
23
|
+
}
|
|
24
|
+
return t;
|
|
25
|
+
};
|
|
26
|
+
return __assign.apply(this, arguments);
|
|
27
|
+
};
|
|
28
|
+
var __values = (this && this.__values) || function(o) {
|
|
29
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
30
|
+
if (m) return m.call(o);
|
|
31
|
+
if (o && typeof o.length === "number") return {
|
|
32
|
+
next: function () {
|
|
33
|
+
if (o && i >= o.length) o = void 0;
|
|
34
|
+
return { value: o && o[i++], done: !o };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
38
|
+
};
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
exports.HadesEffectRule = void 0;
|
|
41
|
+
var Entity_1 = require("../../material/Entity");
|
|
42
|
+
var SimultaneousMoveEffectRule_1 = require("../../material/entity/SimultaneousMoveEffectRule");
|
|
43
|
+
var Pantheon_1 = require("../../material/Pantheon");
|
|
44
|
+
var HadesEffectRule = (function (_super) {
|
|
45
|
+
__extends(HadesEffectRule, _super);
|
|
46
|
+
function HadesEffectRule() {
|
|
47
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
48
|
+
}
|
|
49
|
+
HadesEffectRule.prototype.playEffect = function () {
|
|
50
|
+
var e_1, _a, e_2, _b;
|
|
51
|
+
var moves = [];
|
|
52
|
+
try {
|
|
53
|
+
for (var _c = __values(this.game.players), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
54
|
+
var player = _d.value;
|
|
55
|
+
var pantheon = new Pantheon_1.Pantheon(this.game, player);
|
|
56
|
+
var entities = pantheon.visibleEntities;
|
|
57
|
+
try {
|
|
58
|
+
for (var _e = (e_2 = void 0, __values(entities.getIndexes())), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
59
|
+
var index = _f.value;
|
|
60
|
+
var entity = entities.getItem(index);
|
|
61
|
+
var _g = entity.location, x = _g.x, y = _g.y;
|
|
62
|
+
if (y !== 2 && !(0, Entity_1.isGod)(entity.id.front) && pantheon.isFreeSpace({ x: x, y: y + 1 })) {
|
|
63
|
+
moves.push(entities.index(index).moveItem(__assign(__assign({}, entity.location), { y: y + 1 })));
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
68
|
+
finally {
|
|
69
|
+
try {
|
|
70
|
+
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
|
|
71
|
+
}
|
|
72
|
+
finally { if (e_2) throw e_2.error; }
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
77
|
+
finally {
|
|
78
|
+
try {
|
|
79
|
+
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
80
|
+
}
|
|
81
|
+
finally { if (e_1) throw e_1.error; }
|
|
82
|
+
}
|
|
83
|
+
return moves;
|
|
84
|
+
};
|
|
85
|
+
return HadesEffectRule;
|
|
86
|
+
}(SimultaneousMoveEffectRule_1.SimultaneousMoveEffectRule));
|
|
87
|
+
exports.HadesEffectRule = HadesEffectRule;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ItemMove, MaterialMove } from '@gamepark/rules-api';
|
|
2
|
+
import { PlayerEffectRule } from '../../material/entity/Effect';
|
|
3
|
+
import { PlaceCardEffectRule } from '../../material/entity/PlaceCardEffectRule';
|
|
4
|
+
import { RuleId } from '../RuleId';
|
|
5
|
+
export declare class KinnaraEffectRule extends PlayerEffectRule {
|
|
6
|
+
ruleId: RuleId;
|
|
7
|
+
getPlayerMoves(): MaterialMove<number, number, number, number>[];
|
|
8
|
+
afterItemMove(move: ItemMove): import("@gamepark/rules-api").StartRule<RuleId.KinnaraPlaceEffect>[];
|
|
9
|
+
}
|
|
10
|
+
export declare class KinnaraPlaceEffectRule extends PlaceCardEffectRule {
|
|
11
|
+
getCardsToPlace(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
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.KinnaraPlaceEffectRule = exports.KinnaraEffectRule = void 0;
|
|
30
|
+
var rules_api_1 = require("@gamepark/rules-api");
|
|
31
|
+
var Effect_1 = require("../../material/entity/Effect");
|
|
32
|
+
var PlaceCardEffectRule_1 = require("../../material/entity/PlaceCardEffectRule");
|
|
33
|
+
var LocationType_1 = require("../../material/LocationType");
|
|
34
|
+
var MaterialType_1 = require("../../material/MaterialType");
|
|
35
|
+
var Pantheon_1 = require("../../material/Pantheon");
|
|
36
|
+
var RuleId_1 = require("../RuleId");
|
|
37
|
+
var KinnaraEffectRule = (function (_super) {
|
|
38
|
+
__extends(KinnaraEffectRule, _super);
|
|
39
|
+
function KinnaraEffectRule() {
|
|
40
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
41
|
+
_this.ruleId = RuleId_1.RuleId.KinnaraEffect;
|
|
42
|
+
return _this;
|
|
43
|
+
}
|
|
44
|
+
KinnaraEffectRule.prototype.getPlayerMoves = function () {
|
|
45
|
+
var e_1, _a;
|
|
46
|
+
var moves = [];
|
|
47
|
+
var mythologies = new Pantheon_1.Pantheon(this.game, this.player).missingMythologies;
|
|
48
|
+
var creaturesDecks = this.material(MaterialType_1.MaterialType.EntityCard).location(LocationType_1.LocationType.CreaturesDeck);
|
|
49
|
+
var godsDecks = this.material(MaterialType_1.MaterialType.EntityCard).location(LocationType_1.LocationType.GodsDeck);
|
|
50
|
+
try {
|
|
51
|
+
for (var mythologies_1 = __values(mythologies), mythologies_1_1 = mythologies_1.next(); !mythologies_1_1.done; mythologies_1_1 = mythologies_1.next()) {
|
|
52
|
+
var mythology = mythologies_1_1.value;
|
|
53
|
+
moves.push(creaturesDecks.locationId(mythology).deck().moveItem({ type: LocationType_1.LocationType.PlayerBufferArea, player: this.player }), godsDecks.locationId(mythology).deck().moveItem({ type: LocationType_1.LocationType.PlayerBufferArea, player: this.player }));
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
57
|
+
finally {
|
|
58
|
+
try {
|
|
59
|
+
if (mythologies_1_1 && !mythologies_1_1.done && (_a = mythologies_1.return)) _a.call(mythologies_1);
|
|
60
|
+
}
|
|
61
|
+
finally { if (e_1) throw e_1.error; }
|
|
62
|
+
}
|
|
63
|
+
return moves;
|
|
64
|
+
};
|
|
65
|
+
KinnaraEffectRule.prototype.afterItemMove = function (move) {
|
|
66
|
+
if ((0, rules_api_1.isMoveItemType)(MaterialType_1.MaterialType.EntityCard)(move) && move.location.type === LocationType_1.LocationType.PlayerBufferArea) {
|
|
67
|
+
return [this.startRule(RuleId_1.RuleId.KinnaraPlaceEffect)];
|
|
68
|
+
}
|
|
69
|
+
return [];
|
|
70
|
+
};
|
|
71
|
+
return KinnaraEffectRule;
|
|
72
|
+
}(Effect_1.PlayerEffectRule));
|
|
73
|
+
exports.KinnaraEffectRule = KinnaraEffectRule;
|
|
74
|
+
var KinnaraPlaceEffectRule = (function (_super) {
|
|
75
|
+
__extends(KinnaraPlaceEffectRule, _super);
|
|
76
|
+
function KinnaraPlaceEffectRule() {
|
|
77
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
78
|
+
}
|
|
79
|
+
KinnaraPlaceEffectRule.prototype.getCardsToPlace = function () {
|
|
80
|
+
return this.material(MaterialType_1.MaterialType.EntityCard).location(LocationType_1.LocationType.PlayerBufferArea).player(this.player);
|
|
81
|
+
};
|
|
82
|
+
return KinnaraPlaceEffectRule;
|
|
83
|
+
}(PlaceCardEffectRule_1.PlaceCardEffectRule));
|
|
84
|
+
exports.KinnaraPlaceEffectRule = KinnaraPlaceEffectRule;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Location, XYCoordinates } from '@gamepark/rules-api';
|
|
2
|
+
import { SimultaneousMoveEffectRule } from '../../material/entity/SimultaneousMoveEffectRule';
|
|
3
|
+
import { PlayerColor } from '../../PlayerColor';
|
|
4
|
+
import { RuleId } from '../RuleId';
|
|
5
|
+
export declare class MinotaurEffectRule extends SimultaneousMoveEffectRule {
|
|
6
|
+
ruleId: RuleId;
|
|
7
|
+
getMovingCards(player: PlayerColor): import("@gamepark/rules-api").Material<number, number, number>;
|
|
8
|
+
isLegalDestination(space: XYCoordinates, cardLocation: Location): boolean;
|
|
9
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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.MinotaurEffectRule = void 0;
|
|
19
|
+
var Entity_1 = require("../../material/Entity");
|
|
20
|
+
var SimultaneousMoveEffectRule_1 = require("../../material/entity/SimultaneousMoveEffectRule");
|
|
21
|
+
var Pantheon_1 = require("../../material/Pantheon");
|
|
22
|
+
var RuleId_1 = require("../RuleId");
|
|
23
|
+
var MinotaurEffectRule = (function (_super) {
|
|
24
|
+
__extends(MinotaurEffectRule, _super);
|
|
25
|
+
function MinotaurEffectRule() {
|
|
26
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
27
|
+
_this.ruleId = RuleId_1.RuleId.MinotaurEffect;
|
|
28
|
+
return _this;
|
|
29
|
+
}
|
|
30
|
+
MinotaurEffectRule.prototype.getMovingCards = function (player) {
|
|
31
|
+
var column = this.getEffect().triggerEvent.location.x;
|
|
32
|
+
return new Pantheon_1.Pantheon(this.game, player).visibleEntities.location(function (l) { return l.x === column; }).id(function (id) { return (0, Entity_1.isCreature)(id.front); });
|
|
33
|
+
};
|
|
34
|
+
MinotaurEffectRule.prototype.isLegalDestination = function (space, cardLocation) {
|
|
35
|
+
return space.y === cardLocation.y;
|
|
36
|
+
};
|
|
37
|
+
return MinotaurEffectRule;
|
|
38
|
+
}(SimultaneousMoveEffectRule_1.SimultaneousMoveEffectRule));
|
|
39
|
+
exports.MinotaurEffectRule = MinotaurEffectRule;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CustomMove, MaterialItem, PlayerTurnRule } from '@gamepark/rules-api';
|
|
2
|
+
import { EntityId } from '../../material/Entity';
|
|
3
|
+
import { LocationType } from '../../material/LocationType';
|
|
4
|
+
import { MaterialType } from '../../material/MaterialType';
|
|
5
|
+
import { PlayerColor } from '../../PlayerColor';
|
|
6
|
+
import { RuleId } from '../RuleId';
|
|
7
|
+
export declare class OdinEffectRule extends PlayerTurnRule {
|
|
8
|
+
getPlayerMoves(): CustomMove<number>[];
|
|
9
|
+
onCustomMove(move: CustomMove): import("@gamepark/rules-api").StartRule<RuleId.DrawDestinyCard>[];
|
|
10
|
+
isCardRestricted(card: MaterialItem<MaterialType, LocationType, EntityId>, player?: PlayerColor): boolean;
|
|
11
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
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.OdinEffectRule = void 0;
|
|
19
|
+
var rules_api_1 = require("@gamepark/rules-api");
|
|
20
|
+
var CustomMoveType_1 = require("../../CustomMoveType");
|
|
21
|
+
var Entity_1 = require("../../material/Entity");
|
|
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 RuleId_1 = require("../RuleId");
|
|
27
|
+
var OdinEffectRule = (function (_super) {
|
|
28
|
+
__extends(OdinEffectRule, _super);
|
|
29
|
+
function OdinEffectRule() {
|
|
30
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
31
|
+
}
|
|
32
|
+
OdinEffectRule.prototype.getPlayerMoves = function () {
|
|
33
|
+
var _this = this;
|
|
34
|
+
return this.material(MaterialType_1.MaterialType.MythologyBoard)
|
|
35
|
+
.getItems()
|
|
36
|
+
.map(function (item) { return _this.customMove(CustomMoveType_1.CustomMoveType.ChooseMythology, item.id.mythology); });
|
|
37
|
+
};
|
|
38
|
+
OdinEffectRule.prototype.onCustomMove = function (move) {
|
|
39
|
+
if (move.type === CustomMoveType_1.CustomMoveType.ChooseMythology) {
|
|
40
|
+
this.memorize(Memory_1.Memory.OdinTargetMythology, move.data);
|
|
41
|
+
return [this.startRule(RuleId_1.RuleId.DrawDestinyCard)];
|
|
42
|
+
}
|
|
43
|
+
return [];
|
|
44
|
+
};
|
|
45
|
+
OdinEffectRule.prototype.isCardRestricted = function (card, player) {
|
|
46
|
+
return ((card.location.type === LocationType_1.LocationType.SanctuaryCreatureSpot || card.location.type === LocationType_1.LocationType.SanctuaryGodSpot) &&
|
|
47
|
+
(0, Entity_1.entityMythology)(card.id.front) === this.remind(Memory_1.Memory.OdinTargetMythology) &&
|
|
48
|
+
(!player || !new Pantheon_1.Pantheon(this.game, player).hasEntity(Entity_1.Entity.Odin)));
|
|
49
|
+
};
|
|
50
|
+
return OdinEffectRule;
|
|
51
|
+
}(rules_api_1.PlayerTurnRule));
|
|
52
|
+
exports.OdinEffectRule = OdinEffectRule;
|
|
@@ -0,0 +1,87 @@
|
|
|
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 __assign = (this && this.__assign) || function () {
|
|
18
|
+
__assign = Object.assign || function(t) {
|
|
19
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
+
s = arguments[i];
|
|
21
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
+
t[p] = s[p];
|
|
23
|
+
}
|
|
24
|
+
return t;
|
|
25
|
+
};
|
|
26
|
+
return __assign.apply(this, arguments);
|
|
27
|
+
};
|
|
28
|
+
var __values = (this && this.__values) || function(o) {
|
|
29
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
30
|
+
if (m) return m.call(o);
|
|
31
|
+
if (o && typeof o.length === "number") return {
|
|
32
|
+
next: function () {
|
|
33
|
+
if (o && i >= o.length) o = void 0;
|
|
34
|
+
return { value: o && o[i++], done: !o };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
38
|
+
};
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
exports.RaEffectRule = void 0;
|
|
41
|
+
var Entity_1 = require("../../material/Entity");
|
|
42
|
+
var SimultaneousMoveEffectRule_1 = require("../../material/entity/SimultaneousMoveEffectRule");
|
|
43
|
+
var Pantheon_1 = require("../../material/Pantheon");
|
|
44
|
+
var RaEffectRule = (function (_super) {
|
|
45
|
+
__extends(RaEffectRule, _super);
|
|
46
|
+
function RaEffectRule() {
|
|
47
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
48
|
+
}
|
|
49
|
+
RaEffectRule.prototype.playEffect = function () {
|
|
50
|
+
var e_1, _a, e_2, _b;
|
|
51
|
+
var moves = [];
|
|
52
|
+
try {
|
|
53
|
+
for (var _c = __values(this.game.players), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
54
|
+
var player = _d.value;
|
|
55
|
+
var pantheon = new Pantheon_1.Pantheon(this.game, player);
|
|
56
|
+
var entities = pantheon.visibleEntities;
|
|
57
|
+
try {
|
|
58
|
+
for (var _e = (e_2 = void 0, __values(entities.getIndexes())), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
59
|
+
var index = _f.value;
|
|
60
|
+
var entity = entities.getItem(index);
|
|
61
|
+
var _g = entity.location, x = _g.x, y = _g.y;
|
|
62
|
+
if (y !== 0 && !(0, Entity_1.isGod)(entity.id.front) && pantheon.isFreeSpace({ x: x, y: y - 1 })) {
|
|
63
|
+
moves.push(entities.index(index).moveItem(__assign(__assign({}, entity.location), { y: y - 1 })));
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
68
|
+
finally {
|
|
69
|
+
try {
|
|
70
|
+
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
|
|
71
|
+
}
|
|
72
|
+
finally { if (e_2) throw e_2.error; }
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
77
|
+
finally {
|
|
78
|
+
try {
|
|
79
|
+
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
80
|
+
}
|
|
81
|
+
finally { if (e_1) throw e_1.error; }
|
|
82
|
+
}
|
|
83
|
+
return moves;
|
|
84
|
+
};
|
|
85
|
+
return RaEffectRule;
|
|
86
|
+
}(SimultaneousMoveEffectRule_1.SimultaneousMoveEffectRule));
|
|
87
|
+
exports.RaEffectRule = RaEffectRule;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MaterialMove, XYCoordinates } from '@gamepark/rules-api';
|
|
2
|
+
import { PlaceCardEffectRule } from '../../material/entity/PlaceCardEffectRule';
|
|
3
|
+
import { PlayerColor } from '../../PlayerColor';
|
|
4
|
+
import { RuleId } from '../RuleId';
|
|
5
|
+
export declare class RakshasaEffectRule extends PlaceCardEffectRule {
|
|
6
|
+
ruleId: RuleId;
|
|
7
|
+
canPlayEffect(cardIndex: number): boolean;
|
|
8
|
+
onRuleStart(): MaterialMove[];
|
|
9
|
+
getCardsToPlace(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
10
|
+
getAvailableDestinations(cardIndex: number): (XYCoordinates & {
|
|
11
|
+
player: PlayerColor;
|
|
12
|
+
})[];
|
|
13
|
+
}
|