@gamepark/mythologies 0.1.0 → 0.2.1
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 +2 -1
- package/dist/CustomMoveType.js +1 -0
- package/dist/Memory.d.ts +4 -1
- package/dist/Memory.js +3 -0
- package/dist/MythologiesRules.d.ts +20 -3
- package/dist/MythologiesRules.js +42 -13
- package/dist/material/Destiny.d.ts +1 -0
- package/dist/material/Destiny.js +17 -0
- package/dist/material/Mythology.js +1 -1
- package/dist/material/Pantheon.d.ts +3 -1
- package/dist/material/Pantheon.js +34 -6
- package/dist/material/entity/Effect.d.ts +13 -7
- package/dist/material/entity/Effect.js +8 -3
- package/dist/material/entity/MoveEffectRule.d.ts +2 -2
- package/dist/material/entity/MoveEffectRule.js +3 -7
- package/dist/material/entity/SacrificeEffectRule.d.ts +1 -0
- package/dist/material/entity/SacrificeEffectRule.js +3 -0
- package/dist/material/entity/SimultaneousMoveEffectRule.d.ts +2 -2
- package/dist/material/entity/SimultaneousMoveEffectRule.js +15 -18
- package/dist/material/entity/chinese/YanluoWang.js +7 -1
- package/dist/material/entity/greek/Cyclops.js +5 -7
- package/dist/material/entity/inca/Amaru.js +32 -1
- package/dist/material/entity/inca/Caiman.js +7 -1
- package/dist/material/entity/inca/Condor.js +7 -1
- package/dist/material/entity/inca/Illapa.js +7 -1
- package/dist/material/entity/inca/Inti.js +33 -1
- package/dist/material/entity/inca/MamaQucha.js +37 -1
- package/dist/material/entity/inca/Pumapunku.js +31 -1
- package/dist/material/entity/inca/Supay.js +7 -1
- package/dist/material/entity/inca/Ukuku.js +13 -1
- package/dist/material/entity/inca/Viracocha.js +7 -1
- package/dist/rules/RuleId.d.ts +10 -1
- package/dist/rules/RuleId.js +9 -0
- package/dist/rules/effects/AthenaEffectRule.js +1 -1
- package/dist/rules/effects/CaimanEffectRule.d.ts +8 -0
- package/dist/rules/effects/CaimanEffectRule.js +76 -0
- package/dist/rules/effects/CentaurEffectRule.js +1 -1
- package/dist/rules/effects/ChimeraEffectRule.js +2 -13
- package/dist/rules/effects/CondorEffectRule.d.ts +8 -0
- package/dist/rules/effects/CondorEffectRule.js +45 -0
- package/dist/rules/effects/CyclopsEffectRule.js +2 -2
- package/dist/rules/effects/GorgonEffectRule.d.ts +0 -4
- package/dist/rules/effects/GorgonEffectRule.js +1 -15
- package/dist/rules/effects/HadesEffectRule.js +2 -12
- package/dist/rules/effects/IllapaEffectRule.d.ts +14 -0
- package/dist/rules/effects/IllapaEffectRule.js +71 -0
- package/dist/rules/effects/RaEffectRule.js +2 -12
- package/dist/rules/effects/SupayEffectRule.d.ts +19 -0
- package/dist/rules/effects/SupayEffectRule.js +78 -0
- package/dist/rules/effects/UkukuEffectRule.d.ts +13 -0
- package/dist/rules/effects/UkukuEffectRule.js +60 -0
- package/dist/rules/effects/ViracochaEffectRule.d.ts +7 -0
- package/dist/rules/effects/ViracochaEffectRule.js +64 -0
- package/dist/rules/effects/YanluoWangEffectRule.d.ts +9 -0
- package/dist/rules/effects/YanluoWangEffectRule.js +104 -0
- package/package.json +2 -2
|
@@ -7,14 +7,12 @@ exports.Cyclops = {
|
|
|
7
7
|
invoke: [{ favor: 1 }, { gem: 1 }, {}],
|
|
8
8
|
effect: {
|
|
9
9
|
trigger: function (event, card) {
|
|
10
|
+
if (event.type !== Effect_1.TriggerEventType.LineEvent && event.type !== Effect_1.TriggerEventType.ColumnEvent)
|
|
11
|
+
return false;
|
|
10
12
|
var _a = card.getItem().location, x = _a.x, y = _a.y, player = _a.player;
|
|
11
|
-
if (event.
|
|
12
|
-
return
|
|
13
|
-
|
|
14
|
-
else if (event.type === Effect_1.TriggerEventType.ColumnBonusGain) {
|
|
15
|
-
return event.player === player && event.x === x;
|
|
16
|
-
}
|
|
17
|
-
return false;
|
|
13
|
+
if (event.eventType !== Effect_1.LineEventType.BonusGain || event.player !== player)
|
|
14
|
+
return false;
|
|
15
|
+
return event.type === Effect_1.TriggerEventType.LineEvent ? event.y === y : event.x === x;
|
|
18
16
|
},
|
|
19
17
|
rule: CyclopsEffectRule_1.CyclopsEffectRule
|
|
20
18
|
}
|
|
@@ -1,6 +1,37 @@
|
|
|
1
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
|
+
})();
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.Amaru = void 0;
|
|
19
|
+
var Pantheon_1 = require("../../Pantheon");
|
|
20
|
+
var Effect_1 = require("../Effect");
|
|
4
21
|
exports.Amaru = {
|
|
5
|
-
invoke: [{ gem: 1 }, {}, { favor: 1 }]
|
|
22
|
+
invoke: [{ gem: 1 }, {}, { favor: 1 }],
|
|
23
|
+
effect: {
|
|
24
|
+
trigger: Effect_1.isPlaced,
|
|
25
|
+
rule: (function (_super) {
|
|
26
|
+
__extends(AmaruEffectRule, _super);
|
|
27
|
+
function AmaruEffectRule() {
|
|
28
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
29
|
+
}
|
|
30
|
+
AmaruEffectRule.prototype.playEffect = function () {
|
|
31
|
+
var pantheon = new Pantheon_1.Pantheon(this.game, this.player);
|
|
32
|
+
return pantheon.mythologies.length > 1 ? [pantheon.gainGems(pantheon.mythologies.length - 1)] : [];
|
|
33
|
+
};
|
|
34
|
+
return AmaruEffectRule;
|
|
35
|
+
}(Effect_1.PlayerEffectRule))
|
|
36
|
+
}
|
|
6
37
|
};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Caiman = void 0;
|
|
4
|
+
var CaimanEffectRule_1 = require("../../../rules/effects/CaimanEffectRule");
|
|
5
|
+
var Effect_1 = require("../Effect");
|
|
4
6
|
exports.Caiman = {
|
|
5
|
-
invoke: [{}, { gem: 1, favor: 1 }, { gem: 1 }]
|
|
7
|
+
invoke: [{}, { gem: 1, favor: 1 }, { gem: 1 }],
|
|
8
|
+
effect: {
|
|
9
|
+
trigger: Effect_1.isPlaced,
|
|
10
|
+
rule: CaimanEffectRule_1.CaimanEffectRule
|
|
11
|
+
}
|
|
6
12
|
};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Condor = void 0;
|
|
4
|
+
var CondorEffectRule_1 = require("../../../rules/effects/CondorEffectRule");
|
|
5
|
+
var Effect_1 = require("../Effect");
|
|
4
6
|
exports.Condor = {
|
|
5
|
-
invoke: [{ gem: 1 }, {}, {}]
|
|
7
|
+
invoke: [{ gem: 1 }, {}, {}],
|
|
8
|
+
effect: {
|
|
9
|
+
trigger: Effect_1.isPlaced,
|
|
10
|
+
rule: CondorEffectRule_1.CondorEffectRule
|
|
11
|
+
}
|
|
6
12
|
};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Illapa = void 0;
|
|
4
|
+
var IllapaEffectRule_1 = require("../../../rules/effects/IllapaEffectRule");
|
|
5
|
+
var Effect_1 = require("../Effect");
|
|
4
6
|
exports.Illapa = {
|
|
5
|
-
invoke: [{ favor: 2 }, {}, { gem: 1 }]
|
|
7
|
+
invoke: [{ favor: 2 }, {}, { gem: 1 }],
|
|
8
|
+
effect: {
|
|
9
|
+
trigger: Effect_1.isPlaced,
|
|
10
|
+
rule: IllapaEffectRule_1.IllapaEffectRule
|
|
11
|
+
}
|
|
6
12
|
};
|
|
@@ -1,6 +1,38 @@
|
|
|
1
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
|
+
})();
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.Inti = void 0;
|
|
19
|
+
var Pantheon_1 = require("../../Pantheon");
|
|
20
|
+
var Effect_1 = require("../Effect");
|
|
4
21
|
exports.Inti = {
|
|
5
|
-
invoke: [{ favor: 1 }, {}, {}]
|
|
22
|
+
invoke: [{ favor: 1 }, {}, {}],
|
|
23
|
+
effect: {
|
|
24
|
+
trigger: Effect_1.isEndOfGame,
|
|
25
|
+
rule: (function (_super) {
|
|
26
|
+
__extends(IntiEffectRule, _super);
|
|
27
|
+
function IntiEffectRule() {
|
|
28
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
29
|
+
}
|
|
30
|
+
IntiEffectRule.prototype.playEffect = function () {
|
|
31
|
+
var pantheon = new Pantheon_1.Pantheon(this.game, this.player);
|
|
32
|
+
var gain = Math.min(Math.floor(pantheon.gems / 2), 5);
|
|
33
|
+
return gain > 0 ? [pantheon.gainFavor(gain)] : [];
|
|
34
|
+
};
|
|
35
|
+
return IntiEffectRule;
|
|
36
|
+
}(Effect_1.PlayerEffectRule))
|
|
37
|
+
}
|
|
6
38
|
};
|
|
@@ -1,6 +1,42 @@
|
|
|
1
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
|
+
})();
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.MamaQucha = void 0;
|
|
19
|
+
var Entity_1 = require("../../Entity");
|
|
20
|
+
var Pantheon_1 = require("../../Pantheon");
|
|
21
|
+
var Effect_1 = require("../Effect");
|
|
4
22
|
exports.MamaQucha = {
|
|
5
|
-
invoke: [{}, { favor: 1 }, { gem: 2 }]
|
|
23
|
+
invoke: [{}, { favor: 1 }, { gem: 2 }],
|
|
24
|
+
effect: {
|
|
25
|
+
trigger: Effect_1.isEndOfGame,
|
|
26
|
+
rule: (function (_super) {
|
|
27
|
+
__extends(MamaQuchaEffectRule, _super);
|
|
28
|
+
function MamaQuchaEffectRule() {
|
|
29
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
30
|
+
}
|
|
31
|
+
MamaQuchaEffectRule.prototype.playEffect = function () {
|
|
32
|
+
var pantheon = new Pantheon_1.Pantheon(this.game, this.player);
|
|
33
|
+
var hasCreature = pantheon.visibleEntities
|
|
34
|
+
.location(function (l) { return l.y === 0; })
|
|
35
|
+
.getItems()
|
|
36
|
+
.some(function (item) { return (0, Entity_1.isCreature)(item.id.front); });
|
|
37
|
+
return hasCreature ? [] : [pantheon.gainFavor(3)];
|
|
38
|
+
};
|
|
39
|
+
return MamaQuchaEffectRule;
|
|
40
|
+
}(Effect_1.PlayerEffectRule))
|
|
41
|
+
}
|
|
6
42
|
};
|
|
@@ -1,6 +1,36 @@
|
|
|
1
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
|
+
})();
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.Pumapunku = void 0;
|
|
19
|
+
var Pantheon_1 = require("../../Pantheon");
|
|
20
|
+
var Effect_1 = require("../Effect");
|
|
4
21
|
exports.Pumapunku = {
|
|
5
|
-
invoke: [{}, { favor: 1 }, {}]
|
|
22
|
+
invoke: [{}, { favor: 1 }, {}],
|
|
23
|
+
effect: {
|
|
24
|
+
trigger: function (event, card) { return event.type === Effect_1.TriggerEventType.EntityCrushed && card.getItem().location.player === event.card.location.player; },
|
|
25
|
+
rule: (function (_super) {
|
|
26
|
+
__extends(PumapunkuEffectRule, _super);
|
|
27
|
+
function PumapunkuEffectRule() {
|
|
28
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
29
|
+
}
|
|
30
|
+
PumapunkuEffectRule.prototype.playEffect = function () {
|
|
31
|
+
return [new Pantheon_1.Pantheon(this.game, this.player).gainGems(1)];
|
|
32
|
+
};
|
|
33
|
+
return PumapunkuEffectRule;
|
|
34
|
+
}(Effect_1.PlayerEffectRule))
|
|
35
|
+
}
|
|
6
36
|
};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Supay = void 0;
|
|
4
|
+
var SupayEffectRule_1 = require("../../../rules/effects/SupayEffectRule");
|
|
5
|
+
var Effect_1 = require("../Effect");
|
|
4
6
|
exports.Supay = {
|
|
5
|
-
invoke: [{}, {}, { gem: 2, favor: 1 }]
|
|
7
|
+
invoke: [{}, {}, { gem: 2, favor: 1 }],
|
|
8
|
+
effect: {
|
|
9
|
+
trigger: Effect_1.isPlaced,
|
|
10
|
+
rule: SupayEffectRule_1.SupayEffectRule
|
|
11
|
+
}
|
|
6
12
|
};
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Ukuku = void 0;
|
|
4
|
+
var UkukuEffectRule_1 = require("../../../rules/effects/UkukuEffectRule");
|
|
5
|
+
var Effect_1 = require("../Effect");
|
|
4
6
|
exports.Ukuku = {
|
|
5
|
-
invoke: [{ gem: 1 }, { gem: 2 }, {}]
|
|
7
|
+
invoke: [{ gem: 1 }, { gem: 2 }, {}],
|
|
8
|
+
effect: {
|
|
9
|
+
trigger: function (event, card) {
|
|
10
|
+
var ukuku = card.getItem();
|
|
11
|
+
return (event.type === Effect_1.TriggerEventType.LineEvent &&
|
|
12
|
+
event.eventType === Effect_1.LineEventType.Completed &&
|
|
13
|
+
ukuku.location.player === event.player &&
|
|
14
|
+
ukuku.location.y === event.y);
|
|
15
|
+
},
|
|
16
|
+
rule: UkukuEffectRule_1.UkukuEffectRule
|
|
17
|
+
}
|
|
6
18
|
};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Viracocha = void 0;
|
|
4
|
+
var ViracochaEffectRule_1 = require("../../../rules/effects/ViracochaEffectRule");
|
|
5
|
+
var Effect_1 = require("../Effect");
|
|
4
6
|
exports.Viracocha = {
|
|
5
|
-
invoke: [{}, { favor: 1 }, {}]
|
|
7
|
+
invoke: [{}, { favor: 1 }, {}],
|
|
8
|
+
effect: {
|
|
9
|
+
trigger: Effect_1.oncePerTurn,
|
|
10
|
+
rule: ViracochaEffectRule_1.ViracochaEffectRule
|
|
11
|
+
}
|
|
6
12
|
};
|
package/dist/rules/RuleId.d.ts
CHANGED
|
@@ -32,5 +32,14 @@ export declare enum RuleId {
|
|
|
32
32
|
GarudaEffect = 34,
|
|
33
33
|
VetalaEffect = 35,
|
|
34
34
|
KinnaraEffect = 36,
|
|
35
|
-
KinnaraPlaceEffect = 37
|
|
35
|
+
KinnaraPlaceEffect = 37,
|
|
36
|
+
ViracochaEffect = 38,
|
|
37
|
+
IllapaEffect = 39,
|
|
38
|
+
IllapaSacrifice = 40,
|
|
39
|
+
CaimanEffect = 41,
|
|
40
|
+
CondorEffect = 42,
|
|
41
|
+
SupayEffect = 43,
|
|
42
|
+
UkukuEffect = 44,
|
|
43
|
+
UkukuPlaceEffect = 45,
|
|
44
|
+
YanluoWangEffect = 46
|
|
36
45
|
}
|
package/dist/rules/RuleId.js
CHANGED
|
@@ -37,4 +37,13 @@ var RuleId;
|
|
|
37
37
|
RuleId[RuleId["VetalaEffect"] = 35] = "VetalaEffect";
|
|
38
38
|
RuleId[RuleId["KinnaraEffect"] = 36] = "KinnaraEffect";
|
|
39
39
|
RuleId[RuleId["KinnaraPlaceEffect"] = 37] = "KinnaraPlaceEffect";
|
|
40
|
+
RuleId[RuleId["ViracochaEffect"] = 38] = "ViracochaEffect";
|
|
41
|
+
RuleId[RuleId["IllapaEffect"] = 39] = "IllapaEffect";
|
|
42
|
+
RuleId[RuleId["IllapaSacrifice"] = 40] = "IllapaSacrifice";
|
|
43
|
+
RuleId[RuleId["CaimanEffect"] = 41] = "CaimanEffect";
|
|
44
|
+
RuleId[RuleId["CondorEffect"] = 42] = "CondorEffect";
|
|
45
|
+
RuleId[RuleId["SupayEffect"] = 43] = "SupayEffect";
|
|
46
|
+
RuleId[RuleId["UkukuEffect"] = 44] = "UkukuEffect";
|
|
47
|
+
RuleId[RuleId["UkukuPlaceEffect"] = 45] = "UkukuPlaceEffect";
|
|
48
|
+
RuleId[RuleId["YanluoWangEffect"] = 46] = "YanluoWangEffect";
|
|
40
49
|
})(RuleId = exports.RuleId || (exports.RuleId = {}));
|
|
@@ -95,7 +95,7 @@ var AthenaEffectRule = (function (_super) {
|
|
|
95
95
|
AthenaEffectRule.prototype.onCustomMove = function (move) {
|
|
96
96
|
if (move.type === CustomMoveType_1.CustomMoveType.EndEffect) {
|
|
97
97
|
var pantheon = new Pantheon_1.Pantheon(this.game, this.player);
|
|
98
|
-
return pantheon.
|
|
98
|
+
return pantheon.updateGrid();
|
|
99
99
|
}
|
|
100
100
|
return [];
|
|
101
101
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MoveItem } from '@gamepark/rules-api';
|
|
2
|
+
import { SacrificeEffectRule } from '../../material/entity/SacrificeEffectRule';
|
|
3
|
+
import { RuleId } from '../RuleId';
|
|
4
|
+
export declare class CaimanEffectRule extends SacrificeEffectRule {
|
|
5
|
+
ruleId: RuleId;
|
|
6
|
+
getCardsToSacrifice(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
7
|
+
onSacrifice(move: MoveItem): (import("@gamepark/rules-api").CustomMove<number> | import("@gamepark/rules-api").CreateItem<number, number, number> | MoveItem<number, number, number>)[];
|
|
8
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
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.CaimanEffectRule = void 0;
|
|
44
|
+
var CustomMoveType_1 = require("../../CustomMoveType");
|
|
45
|
+
var Entity_1 = require("../../material/Entity");
|
|
46
|
+
var SacrificeEffectRule_1 = require("../../material/entity/SacrificeEffectRule");
|
|
47
|
+
var LocationType_1 = require("../../material/LocationType");
|
|
48
|
+
var MaterialType_1 = require("../../material/MaterialType");
|
|
49
|
+
var Mythology_1 = require("../../material/Mythology");
|
|
50
|
+
var Pantheon_1 = require("../../material/Pantheon");
|
|
51
|
+
var RuleId_1 = require("../RuleId");
|
|
52
|
+
var CaimanEffectRule = (function (_super) {
|
|
53
|
+
__extends(CaimanEffectRule, _super);
|
|
54
|
+
function CaimanEffectRule() {
|
|
55
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
56
|
+
_this.ruleId = RuleId_1.RuleId.CaimanEffect;
|
|
57
|
+
return _this;
|
|
58
|
+
}
|
|
59
|
+
CaimanEffectRule.prototype.getCardsToSacrifice = function () {
|
|
60
|
+
return _super.prototype.getCardsToSacrifice.call(this).id(function (id) { return (0, Entity_1.entityMythology)(id.front) !== Mythology_1.Mythology.Inca; });
|
|
61
|
+
};
|
|
62
|
+
CaimanEffectRule.prototype.onSacrifice = function (move) {
|
|
63
|
+
var card = this.material(MaterialType_1.MaterialType.EntityCard).getItem(move.itemIndex);
|
|
64
|
+
var mythology = (0, Entity_1.entityMythology)(card.id.front);
|
|
65
|
+
var pantheon = new Pantheon_1.Pantheon(this.game, this.player);
|
|
66
|
+
var others = pantheon.visibleEntities
|
|
67
|
+
.location(function (l) { return l.x !== card.location.x || l.y !== card.location.y; })
|
|
68
|
+
.id(function (id) { return (0, Entity_1.entityMythology)(id.front) === mythology; });
|
|
69
|
+
return __spreadArray(__spreadArray([], __read(others.moveItems({ type: LocationType_1.LocationType.PlayerDiscard, player: this.player })), false), [
|
|
70
|
+
pantheon.gainGems(1 + others.length),
|
|
71
|
+
this.customMove(CustomMoveType_1.CustomMoveType.EndEffect)
|
|
72
|
+
], false);
|
|
73
|
+
};
|
|
74
|
+
return CaimanEffectRule;
|
|
75
|
+
}(SacrificeEffectRule_1.SacrificeEffectRule));
|
|
76
|
+
exports.CaimanEffectRule = CaimanEffectRule;
|
|
@@ -42,7 +42,7 @@ var CentaurEffectRule = (function (_super) {
|
|
|
42
42
|
var players = this.playersHavingToSacrifice;
|
|
43
43
|
if (players.length) {
|
|
44
44
|
var pantheon = new Pantheon_1.Pantheon(this.game, this.player);
|
|
45
|
-
return pantheon.
|
|
45
|
+
return pantheon.updateGrid().concat(this.startSimultaneousRule(RuleId_1.RuleId.CentaurEffectSacrifice, players));
|
|
46
46
|
}
|
|
47
47
|
else {
|
|
48
48
|
return _super.prototype.endEffect.call(this);
|
|
@@ -16,9 +16,8 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
16
16
|
})();
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.ChimeraEffectRule = void 0;
|
|
19
|
+
var Destiny_1 = require("../../material/Destiny");
|
|
19
20
|
var PlaceCardEffectRule_1 = require("../../material/entity/PlaceCardEffectRule");
|
|
20
|
-
var LocationType_1 = require("../../material/LocationType");
|
|
21
|
-
var MaterialType_1 = require("../../material/MaterialType");
|
|
22
21
|
var Pantheon_1 = require("../../material/Pantheon");
|
|
23
22
|
var RuleId_1 = require("../RuleId");
|
|
24
23
|
var ChimeraEffectRule = (function (_super) {
|
|
@@ -29,17 +28,7 @@ var ChimeraEffectRule = (function (_super) {
|
|
|
29
28
|
return _this;
|
|
30
29
|
}
|
|
31
30
|
ChimeraEffectRule.prototype.getCardsToPlace = function () {
|
|
32
|
-
|
|
33
|
-
.getItems()
|
|
34
|
-
.map(function (item) { return item.id.mythology; });
|
|
35
|
-
var creaturesInDecks = this.material(MaterialType_1.MaterialType.EntityCard).location(LocationType_1.LocationType.CreaturesDeck);
|
|
36
|
-
var creaturesIndexes = mythologies.map(function (mythology) {
|
|
37
|
-
return creaturesInDecks
|
|
38
|
-
.locationId(mythology)
|
|
39
|
-
.maxBy(function (item) { return item.location.x; })
|
|
40
|
-
.getIndex();
|
|
41
|
-
});
|
|
42
|
-
return this.material(MaterialType_1.MaterialType.EntityCard).index(creaturesIndexes);
|
|
31
|
+
return new Destiny_1.Destiny(this.game).creaturesOnTopOfDecks;
|
|
43
32
|
};
|
|
44
33
|
ChimeraEffectRule.prototype.getAvailableDestinations = function () {
|
|
45
34
|
var pantheon = new Pantheon_1.Pantheon(this.game, this.card.location.player);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ItemMove, MaterialMove } from '@gamepark/rules-api';
|
|
2
|
+
import { SacrificeEffectRule } from '../../material/entity/SacrificeEffectRule';
|
|
3
|
+
import { RuleId } from '../RuleId';
|
|
4
|
+
export declare class CondorEffectRule extends SacrificeEffectRule {
|
|
5
|
+
ruleId: RuleId;
|
|
6
|
+
getCardsToSacrifice(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
7
|
+
beforeItemMove(move: ItemMove): MaterialMove[];
|
|
8
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
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.CondorEffectRule = void 0;
|
|
19
|
+
var rules_api_1 = require("@gamepark/rules-api");
|
|
20
|
+
var SacrificeEffectRule_1 = require("../../material/entity/SacrificeEffectRule");
|
|
21
|
+
var LocationType_1 = require("../../material/LocationType");
|
|
22
|
+
var MaterialType_1 = require("../../material/MaterialType");
|
|
23
|
+
var Pantheon_1 = require("../../material/Pantheon");
|
|
24
|
+
var RuleId_1 = require("../RuleId");
|
|
25
|
+
var CondorEffectRule = (function (_super) {
|
|
26
|
+
__extends(CondorEffectRule, _super);
|
|
27
|
+
function CondorEffectRule() {
|
|
28
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
29
|
+
_this.ruleId = RuleId_1.RuleId.CondorEffect;
|
|
30
|
+
return _this;
|
|
31
|
+
}
|
|
32
|
+
CondorEffectRule.prototype.getCardsToSacrifice = function () {
|
|
33
|
+
var location = this.card.location;
|
|
34
|
+
return _super.prototype.getCardsToSacrifice.call(this).location(function (l) { return (0, rules_api_1.areAdjacentSquares)(l, location); });
|
|
35
|
+
};
|
|
36
|
+
CondorEffectRule.prototype.beforeItemMove = function (move) {
|
|
37
|
+
if ((0, rules_api_1.isMoveItemType)(MaterialType_1.MaterialType.EntityCard)(move) && move.location.type === LocationType_1.LocationType.PlayerDiscard) {
|
|
38
|
+
var entity = this.material(MaterialType_1.MaterialType.EntityCard).getItem(move.itemIndex);
|
|
39
|
+
return new Pantheon_1.Pantheon(this.game, this.player).getInvokeGains(entity.id.front, entity.location.y);
|
|
40
|
+
}
|
|
41
|
+
return [];
|
|
42
|
+
};
|
|
43
|
+
return CondorEffectRule;
|
|
44
|
+
}(SacrificeEffectRule_1.SacrificeEffectRule));
|
|
45
|
+
exports.CondorEffectRule = CondorEffectRule;
|
|
@@ -50,7 +50,7 @@ var CyclopsEffectRule = (function (_super) {
|
|
|
50
50
|
for (var _b = __values((0, rules_api_1.getNeighbors)(this.player, this.game.players)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
51
51
|
var neighbor = _c.value;
|
|
52
52
|
var pantheon = new Pantheon_1.Pantheon(this.game, neighbor);
|
|
53
|
-
var bonus = event.type === Effect_1.TriggerEventType.
|
|
53
|
+
var bonus = event.type === Effect_1.TriggerEventType.LineEvent ? pantheon.getBonusGem(event.y) : pantheon.getBonusFavor(event.x);
|
|
54
54
|
if (bonus.length) {
|
|
55
55
|
moves.push(this.customMove(CustomMoveType_1.CustomMoveType.ChoosePlayer, neighbor));
|
|
56
56
|
}
|
|
@@ -71,7 +71,7 @@ var CyclopsEffectRule = (function (_super) {
|
|
|
71
71
|
var moves = [new Pantheon_1.Pantheon(this.game, this.player).spendGems(1)];
|
|
72
72
|
var neighbor = move.data;
|
|
73
73
|
var event = this.getEffect().triggerEvent;
|
|
74
|
-
if (event.type === Effect_1.TriggerEventType.
|
|
74
|
+
if (event.type === Effect_1.TriggerEventType.LineEvent) {
|
|
75
75
|
moves.push(new Pantheon_1.Pantheon(this.game, neighbor).getBonusGem(event.y).moveItem({ type: LocationType_1.LocationType.PlayerGems, player: this.player }));
|
|
76
76
|
}
|
|
77
77
|
else {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { InvokeEffectRule } from '../../material/entity/PlaceCardEffectRule';
|
|
2
1
|
import { SacrificeEffectRule } from '../../material/entity/SacrificeEffectRule';
|
|
3
2
|
import { RuleId } from '../RuleId';
|
|
4
3
|
export declare class GorgonEffectRule extends SacrificeEffectRule {
|
|
@@ -6,6 +5,3 @@ export declare class GorgonEffectRule extends SacrificeEffectRule {
|
|
|
6
5
|
getCardsToSacrifice(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
7
6
|
onSacrifice(): import("@gamepark/rules-api").MaterialMove<number, number, number, number>[];
|
|
8
7
|
}
|
|
9
|
-
export declare class CobraInvokeEffect extends InvokeEffectRule {
|
|
10
|
-
getCardsToPlace(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
11
|
-
}
|
|
@@ -40,11 +40,8 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
40
40
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
41
41
|
};
|
|
42
42
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
|
-
exports.
|
|
44
|
-
var PlaceCardEffectRule_1 = require("../../material/entity/PlaceCardEffectRule");
|
|
43
|
+
exports.GorgonEffectRule = void 0;
|
|
45
44
|
var SacrificeEffectRule_1 = require("../../material/entity/SacrificeEffectRule");
|
|
46
|
-
var LocationType_1 = require("../../material/LocationType");
|
|
47
|
-
var MaterialType_1 = require("../../material/MaterialType");
|
|
48
45
|
var Pantheon_1 = require("../../material/Pantheon");
|
|
49
46
|
var RuleId_1 = require("../RuleId");
|
|
50
47
|
var GorgonEffectRule = (function (_super) {
|
|
@@ -65,14 +62,3 @@ var GorgonEffectRule = (function (_super) {
|
|
|
65
62
|
return GorgonEffectRule;
|
|
66
63
|
}(SacrificeEffectRule_1.SacrificeEffectRule));
|
|
67
64
|
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;
|
|
@@ -14,17 +14,6 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
14
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
15
|
};
|
|
16
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
17
|
var __values = (this && this.__values) || function(o) {
|
|
29
18
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
30
19
|
if (m) return m.call(o);
|
|
@@ -40,6 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
40
29
|
exports.HadesEffectRule = void 0;
|
|
41
30
|
var Entity_1 = require("../../material/Entity");
|
|
42
31
|
var SimultaneousMoveEffectRule_1 = require("../../material/entity/SimultaneousMoveEffectRule");
|
|
32
|
+
var LocationType_1 = require("../../material/LocationType");
|
|
43
33
|
var Pantheon_1 = require("../../material/Pantheon");
|
|
44
34
|
var HadesEffectRule = (function (_super) {
|
|
45
35
|
__extends(HadesEffectRule, _super);
|
|
@@ -60,7 +50,7 @@ var HadesEffectRule = (function (_super) {
|
|
|
60
50
|
var entity = entities.getItem(index);
|
|
61
51
|
var _g = entity.location, x = _g.x, y = _g.y;
|
|
62
52
|
if (y !== 2 && !(0, Entity_1.isGod)(entity.id.front) && pantheon.isFreeSpace({ x: x, y: y + 1 })) {
|
|
63
|
-
moves.push(entities.index(index).moveItem(
|
|
53
|
+
moves.push(entities.index(index).moveItem({ type: LocationType_1.LocationType.Pantheon, player: player, x: x, y: y + 1 }));
|
|
64
54
|
}
|
|
65
55
|
}
|
|
66
56
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CustomMove, Material } from '@gamepark/rules-api';
|
|
2
|
+
import { PlayerEffectRule } from '../../material/entity/Effect';
|
|
3
|
+
import { SimultaneousSacrificeEffectRule } from '../../material/entity/SimultaneousSacrificeEffectRule';
|
|
4
|
+
import { PlayerColor } from '../../PlayerColor';
|
|
5
|
+
import { RuleId } from '../RuleId';
|
|
6
|
+
export declare class IllapaEffectRule extends PlayerEffectRule {
|
|
7
|
+
ruleId: RuleId;
|
|
8
|
+
getPlayerMoves(): CustomMove<number>[];
|
|
9
|
+
onCustomMove(move: CustomMove): import("@gamepark/rules-api").MaterialMove<number, number, number, number>[];
|
|
10
|
+
getPlayersHavingToSacrifice(line: number): number[];
|
|
11
|
+
}
|
|
12
|
+
export declare class IllapaSacrificeRule extends SimultaneousSacrificeEffectRule {
|
|
13
|
+
getCardsToSacrifice(player: PlayerColor): Material;
|
|
14
|
+
}
|