@gamepark/mythologies 0.6.0 → 0.7.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/MythologiesRules.d.ts +8 -9
- package/dist/MythologiesRules.js +2 -3
- package/dist/material/Entity.d.ts +2 -2
- package/dist/material/Entity.js +2 -2
- package/dist/material/entity/EntityDescription.js +4 -4
- package/dist/material/entity/celtic/Banshee.js +8 -1
- package/dist/material/entity/egyptian/Ammit.d.ts +2 -0
- package/dist/material/entity/egyptian/Ammit.js +12 -0
- package/dist/material/entity/greek/Cyclops.js +7 -2
- package/dist/material/entity/greek/Poseidon.js +1 -1
- package/dist/material/entity/inca/Amaru.js +1 -1
- package/dist/material/entity/inca/Puma.d.ts +2 -0
- package/dist/material/entity/inca/Puma.js +36 -0
- package/dist/material/entity/zulu/Shembe.js +5 -5
- package/dist/rules/RuleId.d.ts +6 -7
- package/dist/rules/RuleId.js +6 -7
- package/dist/rules/effects/AmmitEffectRule.d.ts +6 -0
- package/dist/rules/effects/AmmitEffectRule.js +40 -0
- package/dist/rules/effects/CyclopsEffectRule.d.ts +1 -0
- package/dist/rules/effects/CyclopsEffectRule.js +9 -0
- package/dist/rules/effects/WerehyenaEffectRule.d.ts +5 -8
- package/dist/rules/effects/WerehyenaEffectRule.js +51 -7
- package/package.json +2 -2
|
@@ -5,9 +5,9 @@ import { PlayerColor } from './PlayerColor';
|
|
|
5
5
|
import { ChooseDraftTokenRule } from './rules/ChooseDraftTokenRule';
|
|
6
6
|
import { DrawDestinyCardRule } from './rules/DrawDestinyCardRule';
|
|
7
7
|
import { AlfEffectRule } from './rules/effects/AlfEffectRule';
|
|
8
|
+
import { AmmitEffectRule } from './rules/effects/AmmitEffectRule';
|
|
8
9
|
import { AnubisEffectRule } from './rules/effects/AnubisEffectRule';
|
|
9
10
|
import { AthenaEffectRule } from './rules/effects/AthenaEffectRule';
|
|
10
|
-
import { BabaiEffectRule } from './rules/effects/BabaiEffectRule';
|
|
11
11
|
import { BennuEffectRule } from './rules/effects/BennuEffectRule';
|
|
12
12
|
import { CaimanEffectRule } from './rules/effects/CaimanEffectRule';
|
|
13
13
|
import { CentaurEffectRule, CentaurEffectSacrificeRule } from './rules/effects/CentaurEffectRule';
|
|
@@ -47,7 +47,7 @@ import { TianlongEffectRule, TianlongOpponentsEffectRule } from './rules/effects
|
|
|
47
47
|
import { UkukuEffectRule, UkukuPlaceEffectRule } from './rules/effects/UkukuEffectRule';
|
|
48
48
|
import { VetalaEffectRule } from './rules/effects/VetalaEffectRule';
|
|
49
49
|
import { ViracochaEffectRule } from './rules/effects/ViracochaEffectRule';
|
|
50
|
-
import {
|
|
50
|
+
import { WerehyenaEffectRule } from './rules/effects/WerehyenaEffectRule';
|
|
51
51
|
import { YanluoWangEffectRule } from './rules/effects/YanluoWangEffectRule';
|
|
52
52
|
import { EndGameRule } from './rules/EndGameRule';
|
|
53
53
|
import { PlaceCardsRule } from './rules/PlaceCardsRule';
|
|
@@ -82,7 +82,7 @@ export declare class MythologiesRules extends SecretMaterialRules<PlayerColor, M
|
|
|
82
82
|
28: typeof SphinxEffectRule;
|
|
83
83
|
29: typeof CobraEffectRule;
|
|
84
84
|
30: typeof CobraInvokeEffect;
|
|
85
|
-
31: typeof
|
|
85
|
+
31: typeof AmmitEffectRule;
|
|
86
86
|
32: typeof BennuEffectRule;
|
|
87
87
|
33: typeof ShivaEffectRule;
|
|
88
88
|
34: typeof RakshasaEffectRule;
|
|
@@ -108,12 +108,11 @@ export declare class MythologiesRules extends SecretMaterialRules<PlayerColor, M
|
|
|
108
108
|
54: typeof InkosazanaEffectRule;
|
|
109
109
|
55: typeof ImpunduluEffectRule;
|
|
110
110
|
56: typeof WerehyenaEffectRule;
|
|
111
|
-
57: typeof
|
|
112
|
-
58: typeof
|
|
113
|
-
59: typeof
|
|
114
|
-
60: typeof
|
|
115
|
-
61: typeof
|
|
116
|
-
62: typeof DullahanEffectRule;
|
|
111
|
+
57: typeof IdloziEffectRule;
|
|
112
|
+
58: typeof FairyEffectRule;
|
|
113
|
+
59: typeof LeprechaunEffectRule;
|
|
114
|
+
60: typeof SelkieEffectRule;
|
|
115
|
+
61: typeof DullahanEffectRule;
|
|
117
116
|
};
|
|
118
117
|
locationsStrategies: {
|
|
119
118
|
2: {
|
package/dist/MythologiesRules.js
CHANGED
|
@@ -28,9 +28,9 @@ var Memory_1 = require("./Memory");
|
|
|
28
28
|
var ChooseDraftTokenRule_1 = require("./rules/ChooseDraftTokenRule");
|
|
29
29
|
var DrawDestinyCardRule_1 = require("./rules/DrawDestinyCardRule");
|
|
30
30
|
var AlfEffectRule_1 = require("./rules/effects/AlfEffectRule");
|
|
31
|
+
var AmmitEffectRule_1 = require("./rules/effects/AmmitEffectRule");
|
|
31
32
|
var AnubisEffectRule_1 = require("./rules/effects/AnubisEffectRule");
|
|
32
33
|
var AthenaEffectRule_1 = require("./rules/effects/AthenaEffectRule");
|
|
33
|
-
var BabaiEffectRule_1 = require("./rules/effects/BabaiEffectRule");
|
|
34
34
|
var BennuEffectRule_1 = require("./rules/effects/BennuEffectRule");
|
|
35
35
|
var CaimanEffectRule_1 = require("./rules/effects/CaimanEffectRule");
|
|
36
36
|
var CentaurEffectRule_1 = require("./rules/effects/CentaurEffectRule");
|
|
@@ -111,7 +111,7 @@ var MythologiesRules = (function (_super) {
|
|
|
111
111
|
_a[RuleId_1.RuleId.SphinxEffect] = SphinxEffectRule_1.SphinxEffectRule,
|
|
112
112
|
_a[RuleId_1.RuleId.CobraEffect] = CobraEffectRule_1.CobraEffectRule,
|
|
113
113
|
_a[RuleId_1.RuleId.CobraInvokeEffect] = CobraEffectRule_1.CobraInvokeEffect,
|
|
114
|
-
_a[RuleId_1.RuleId.
|
|
114
|
+
_a[RuleId_1.RuleId.AmmitEffect] = AmmitEffectRule_1.AmmitEffectRule,
|
|
115
115
|
_a[RuleId_1.RuleId.BennuEffect] = BennuEffectRule_1.BennuEffectRule,
|
|
116
116
|
_a[RuleId_1.RuleId.ShivaEffect] = ShivaEffectRule_1.ShivaEffectRule,
|
|
117
117
|
_a[RuleId_1.RuleId.RakshasaEffect] = RakshasaEffectRule_1.RakshasaEffectRule,
|
|
@@ -137,7 +137,6 @@ var MythologiesRules = (function (_super) {
|
|
|
137
137
|
_a[RuleId_1.RuleId.InkosazanaEffect] = InkosazanaEffectRule_1.InkosazanaEffectRule,
|
|
138
138
|
_a[RuleId_1.RuleId.ImpunduluEffect] = ImpunduluEffectRule_1.ImpunduluEffectRule,
|
|
139
139
|
_a[RuleId_1.RuleId.WerehyenaEffect] = WerehyenaEffectRule_1.WerehyenaEffectRule,
|
|
140
|
-
_a[RuleId_1.RuleId.WerehyenaCallEffect] = WerehyenaEffectRule_1.WerehyenaCallEffectRule,
|
|
141
140
|
_a[RuleId_1.RuleId.IdloziEffect] = IdloziEffectRule_1.IdloziEffectRule,
|
|
142
141
|
_a[RuleId_1.RuleId.FairyEffect] = FairyEffectRule_1.FairyEffectRule,
|
|
143
142
|
_a[RuleId_1.RuleId.LeprechaunEffect] = LeprechaunEffectRule_1.LeprechaunEffectRule,
|
|
@@ -31,7 +31,7 @@ export declare enum Entity {
|
|
|
31
31
|
Mummy = 26,
|
|
32
32
|
Sphinx = 27,
|
|
33
33
|
Cobra = 28,
|
|
34
|
-
|
|
34
|
+
Ammit = 29,
|
|
35
35
|
Bennu = 30,
|
|
36
36
|
Brahma = 31,
|
|
37
37
|
Vishnu = 32,
|
|
@@ -47,7 +47,7 @@ export declare enum Entity {
|
|
|
47
47
|
MamaQucha = 42,
|
|
48
48
|
Illapa = 43,
|
|
49
49
|
Inti = 44,
|
|
50
|
-
|
|
50
|
+
Puma = 45,
|
|
51
51
|
Amaru = 46,
|
|
52
52
|
Caiman = 47,
|
|
53
53
|
Condor = 48,
|
package/dist/material/Entity.js
CHANGED
|
@@ -31,7 +31,7 @@ var Entity;
|
|
|
31
31
|
Entity[Entity["Mummy"] = 26] = "Mummy";
|
|
32
32
|
Entity[Entity["Sphinx"] = 27] = "Sphinx";
|
|
33
33
|
Entity[Entity["Cobra"] = 28] = "Cobra";
|
|
34
|
-
Entity[Entity["
|
|
34
|
+
Entity[Entity["Ammit"] = 29] = "Ammit";
|
|
35
35
|
Entity[Entity["Bennu"] = 30] = "Bennu";
|
|
36
36
|
Entity[Entity["Brahma"] = 31] = "Brahma";
|
|
37
37
|
Entity[Entity["Vishnu"] = 32] = "Vishnu";
|
|
@@ -47,7 +47,7 @@ var Entity;
|
|
|
47
47
|
Entity[Entity["MamaQucha"] = 42] = "MamaQucha";
|
|
48
48
|
Entity[Entity["Illapa"] = 43] = "Illapa";
|
|
49
49
|
Entity[Entity["Inti"] = 44] = "Inti";
|
|
50
|
-
Entity[Entity["
|
|
50
|
+
Entity[Entity["Puma"] = 45] = "Puma";
|
|
51
51
|
Entity[Entity["Amaru"] = 46] = "Amaru";
|
|
52
52
|
Entity[Entity["Caiman"] = 47] = "Caiman";
|
|
53
53
|
Entity[Entity["Condor"] = 48] = "Condor";
|
|
@@ -24,7 +24,7 @@ var SunWukong_1 = require("./chinese/SunWukong");
|
|
|
24
24
|
var Tianlong_1 = require("./chinese/Tianlong");
|
|
25
25
|
var YanluoWang_1 = require("./chinese/YanluoWang");
|
|
26
26
|
var Anubis_1 = require("./egyptian/Anubis");
|
|
27
|
-
var
|
|
27
|
+
var Ammit_1 = require("./egyptian/Ammit");
|
|
28
28
|
var Beetle_1 = require("./egyptian/Beetle");
|
|
29
29
|
var Bennu_1 = require("./egyptian/Bennu");
|
|
30
30
|
var Cobra_1 = require("./egyptian/Cobra");
|
|
@@ -59,7 +59,7 @@ var Condor_1 = require("./inca/Condor");
|
|
|
59
59
|
var Illapa_1 = require("./inca/Illapa");
|
|
60
60
|
var Inti_1 = require("./inca/Inti");
|
|
61
61
|
var MamaQucha_1 = require("./inca/MamaQucha");
|
|
62
|
-
var
|
|
62
|
+
var Puma_1 = require("./inca/Puma");
|
|
63
63
|
var Supay_1 = require("./inca/Supay");
|
|
64
64
|
var Ukuku_1 = require("./inca/Ukuku");
|
|
65
65
|
var Viracocha_1 = require("./inca/Viracocha");
|
|
@@ -115,7 +115,7 @@ exports.entities = (_a = {},
|
|
|
115
115
|
_a[Entity_1.Entity.Mummy] = Mummy_1.Mummy,
|
|
116
116
|
_a[Entity_1.Entity.Sphinx] = Sphinx_1.Sphinx,
|
|
117
117
|
_a[Entity_1.Entity.Cobra] = Cobra_1.Cobra,
|
|
118
|
-
_a[Entity_1.Entity.
|
|
118
|
+
_a[Entity_1.Entity.Ammit] = Ammit_1.Ammit,
|
|
119
119
|
_a[Entity_1.Entity.Bennu] = Bennu_1.Bennu,
|
|
120
120
|
_a[Entity_1.Entity.Brahma] = Brahma_1.Brahma,
|
|
121
121
|
_a[Entity_1.Entity.Vishnu] = Vishnu_1.Vishnu,
|
|
@@ -131,7 +131,7 @@ exports.entities = (_a = {},
|
|
|
131
131
|
_a[Entity_1.Entity.MamaQucha] = MamaQucha_1.MamaQucha,
|
|
132
132
|
_a[Entity_1.Entity.Illapa] = Illapa_1.Illapa,
|
|
133
133
|
_a[Entity_1.Entity.Inti] = Inti_1.Inti,
|
|
134
|
-
_a[Entity_1.Entity.
|
|
134
|
+
_a[Entity_1.Entity.Puma] = Puma_1.Puma,
|
|
135
135
|
_a[Entity_1.Entity.Amaru] = Amaru_1.Amaru,
|
|
136
136
|
_a[Entity_1.Entity.Caiman] = Caiman_1.Caiman,
|
|
137
137
|
_a[Entity_1.Entity.Condor] = Condor_1.Condor,
|
|
@@ -28,9 +28,16 @@ exports.Banshee = {
|
|
|
28
28
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
29
29
|
}
|
|
30
30
|
BansheeEffectRule.prototype.playEffect = function () {
|
|
31
|
+
var moves = [];
|
|
31
32
|
var _a = this.card.location, x = _a.x, y = _a.y, player = _a.player;
|
|
32
33
|
var pantheon = new Pantheon_1.Pantheon(this.game, player);
|
|
33
|
-
|
|
34
|
+
if (pantheon.grid[y].every(function (entity, column) { return column !== x || !entity; })) {
|
|
35
|
+
moves.push(pantheon.gainFavor(1));
|
|
36
|
+
}
|
|
37
|
+
if (pantheon.grid.every(function (line, lineY) { return lineY !== y || !line[x]; })) {
|
|
38
|
+
moves.push(pantheon.gainGems(1));
|
|
39
|
+
}
|
|
40
|
+
return moves;
|
|
34
41
|
};
|
|
35
42
|
return BansheeEffectRule;
|
|
36
43
|
}(Effect_1.AutoEffectRule))
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Ammit = void 0;
|
|
4
|
+
var AmmitEffectRule_1 = require("../../../rules/effects/AmmitEffectRule");
|
|
5
|
+
var Effect_1 = require("../Effect");
|
|
6
|
+
exports.Ammit = {
|
|
7
|
+
invoke: [{}, {}, { gem: 2 }],
|
|
8
|
+
effect: {
|
|
9
|
+
trigger: Effect_1.isPlaced,
|
|
10
|
+
rule: AmmitEffectRule_1.AmmitEffectRule
|
|
11
|
+
}
|
|
12
|
+
};
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Cyclops = void 0;
|
|
4
|
+
var Memory_1 = require("../../../Memory");
|
|
5
|
+
var MythologiesRules_1 = require("../../../MythologiesRules");
|
|
4
6
|
var CyclopsEffectRule_1 = require("../../../rules/effects/CyclopsEffectRule");
|
|
5
7
|
var Effect_1 = require("../Effect");
|
|
6
8
|
exports.Cyclops = {
|
|
7
9
|
invoke: [{ favor: 1 }, { gem: 1 }, {}],
|
|
8
10
|
effect: {
|
|
9
|
-
trigger: function (event, card) {
|
|
11
|
+
trigger: function (event, card, game) {
|
|
12
|
+
var _a;
|
|
10
13
|
if (event.type !== Effect_1.TriggerEventType.LineEvent && event.type !== Effect_1.TriggerEventType.ColumnEvent)
|
|
11
14
|
return false;
|
|
12
|
-
var
|
|
15
|
+
var _b = card.getItem().location, x = _b.x, y = _b.y, player = _b.player;
|
|
13
16
|
if (event.eventType !== Effect_1.LineEventType.BonusGain || event.player !== player)
|
|
14
17
|
return false;
|
|
18
|
+
if ((_a = new MythologiesRules_1.MythologiesRules(game).remind(Memory_1.Memory.OncePerTurn)) === null || _a === void 0 ? void 0 : _a.includes(card.getIndex()))
|
|
19
|
+
return false;
|
|
15
20
|
return event.type === Effect_1.TriggerEventType.LineEvent ? event.y === y : event.x === x;
|
|
16
21
|
},
|
|
17
22
|
rule: CyclopsEffectRule_1.CyclopsEffectRule
|
|
@@ -22,7 +22,7 @@ var Entity_1 = require("../../Entity");
|
|
|
22
22
|
var Pantheon_1 = require("../../Pantheon");
|
|
23
23
|
var Effect_1 = require("../Effect");
|
|
24
24
|
exports.Poseidon = {
|
|
25
|
-
invoke: [{
|
|
25
|
+
invoke: [{}, { gem: 2 }, { favor: 1 }],
|
|
26
26
|
effect: {
|
|
27
27
|
trigger: function (event, card) {
|
|
28
28
|
return event.type === Effect_1.TriggerEventType.EntityPlaced && event.invoked && (0, Entity_1.isGod)(event.entity) && event.location.player === card.getItem().location.player;
|
|
@@ -29,7 +29,7 @@ exports.Amaru = {
|
|
|
29
29
|
}
|
|
30
30
|
AmaruEffectRule.prototype.playEffect = function () {
|
|
31
31
|
var pantheon = new Pantheon_1.Pantheon(this.game, this.player);
|
|
32
|
-
return
|
|
32
|
+
return [pantheon.gainGems(pantheon.mythologies.length)];
|
|
33
33
|
};
|
|
34
34
|
return AmaruEffectRule;
|
|
35
35
|
}(Effect_1.PlayerEffectRule))
|
|
@@ -0,0 +1,36 @@
|
|
|
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.Puma = void 0;
|
|
19
|
+
var Pantheon_1 = require("../../Pantheon");
|
|
20
|
+
var Effect_1 = require("../Effect");
|
|
21
|
+
exports.Puma = {
|
|
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(PumaEffectRule, _super);
|
|
27
|
+
function PumaEffectRule() {
|
|
28
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
29
|
+
}
|
|
30
|
+
PumaEffectRule.prototype.playEffect = function () {
|
|
31
|
+
return [new Pantheon_1.Pantheon(this.game, this.player).gainGems(1)];
|
|
32
|
+
};
|
|
33
|
+
return PumaEffectRule;
|
|
34
|
+
}(Effect_1.PlayerEffectRule))
|
|
35
|
+
}
|
|
36
|
+
};
|
|
@@ -16,7 +16,6 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
16
16
|
})();
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.Shembe = void 0;
|
|
19
|
-
var lodash_1 = require("lodash");
|
|
20
19
|
var Entity_1 = require("../../Entity");
|
|
21
20
|
var Mythology_1 = require("../../Mythology");
|
|
22
21
|
var Pantheon_1 = require("../../Pantheon");
|
|
@@ -32,10 +31,11 @@ exports.Shembe = {
|
|
|
32
31
|
}
|
|
33
32
|
ShembeEffectRule.prototype.playEffect = function () {
|
|
34
33
|
var pantheon = new Pantheon_1.Pantheon(this.game, this.player);
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
var mythologies = pantheon.mythologies.filter(function (mythology) {
|
|
35
|
+
return mythology !== Mythology_1.Mythology.Zulu &&
|
|
36
|
+
pantheon.visibleEntities.id(function (id) { return (0, Entity_1.isCreature)(id.front) && (0, Entity_1.entityMythology)(id.front) === mythology; }).length >= 2;
|
|
37
|
+
});
|
|
38
|
+
return mythologies.length > 0 ? [pantheon.gainFavor(mythologies.length * 2)] : [];
|
|
39
39
|
};
|
|
40
40
|
return ShembeEffectRule;
|
|
41
41
|
}(Effect_1.PlayerEffectRule))
|
package/dist/rules/RuleId.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export declare enum RuleId {
|
|
|
26
26
|
SphinxEffect = 28,
|
|
27
27
|
CobraEffect = 29,
|
|
28
28
|
CobraInvokeEffect = 30,
|
|
29
|
-
|
|
29
|
+
AmmitEffect = 31,
|
|
30
30
|
BennuEffect = 32,
|
|
31
31
|
ShivaEffect = 33,
|
|
32
32
|
RakshasaEffect = 34,
|
|
@@ -52,10 +52,9 @@ export declare enum RuleId {
|
|
|
52
52
|
InkosazanaEffect = 54,
|
|
53
53
|
ImpunduluEffect = 55,
|
|
54
54
|
WerehyenaEffect = 56,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
DullahanEffect = 62
|
|
55
|
+
IdloziEffect = 57,
|
|
56
|
+
FairyEffect = 58,
|
|
57
|
+
LeprechaunEffect = 59,
|
|
58
|
+
SelkieEffect = 60,
|
|
59
|
+
DullahanEffect = 61
|
|
61
60
|
}
|
package/dist/rules/RuleId.js
CHANGED
|
@@ -30,7 +30,7 @@ var RuleId;
|
|
|
30
30
|
RuleId[RuleId["SphinxEffect"] = 28] = "SphinxEffect";
|
|
31
31
|
RuleId[RuleId["CobraEffect"] = 29] = "CobraEffect";
|
|
32
32
|
RuleId[RuleId["CobraInvokeEffect"] = 30] = "CobraInvokeEffect";
|
|
33
|
-
RuleId[RuleId["
|
|
33
|
+
RuleId[RuleId["AmmitEffect"] = 31] = "AmmitEffect";
|
|
34
34
|
RuleId[RuleId["BennuEffect"] = 32] = "BennuEffect";
|
|
35
35
|
RuleId[RuleId["ShivaEffect"] = 33] = "ShivaEffect";
|
|
36
36
|
RuleId[RuleId["RakshasaEffect"] = 34] = "RakshasaEffect";
|
|
@@ -56,10 +56,9 @@ var RuleId;
|
|
|
56
56
|
RuleId[RuleId["InkosazanaEffect"] = 54] = "InkosazanaEffect";
|
|
57
57
|
RuleId[RuleId["ImpunduluEffect"] = 55] = "ImpunduluEffect";
|
|
58
58
|
RuleId[RuleId["WerehyenaEffect"] = 56] = "WerehyenaEffect";
|
|
59
|
-
RuleId[RuleId["
|
|
60
|
-
RuleId[RuleId["
|
|
61
|
-
RuleId[RuleId["
|
|
62
|
-
RuleId[RuleId["
|
|
63
|
-
RuleId[RuleId["
|
|
64
|
-
RuleId[RuleId["DullahanEffect"] = 62] = "DullahanEffect";
|
|
59
|
+
RuleId[RuleId["IdloziEffect"] = 57] = "IdloziEffect";
|
|
60
|
+
RuleId[RuleId["FairyEffect"] = 58] = "FairyEffect";
|
|
61
|
+
RuleId[RuleId["LeprechaunEffect"] = 59] = "LeprechaunEffect";
|
|
62
|
+
RuleId[RuleId["SelkieEffect"] = 60] = "SelkieEffect";
|
|
63
|
+
RuleId[RuleId["DullahanEffect"] = 61] = "DullahanEffect";
|
|
65
64
|
})(RuleId = exports.RuleId || (exports.RuleId = {}));
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { InvokeEffectRule } from '../../material/entity/PlaceCardEffectRule';
|
|
2
|
+
import { RuleId } from '../RuleId';
|
|
3
|
+
export declare class AmmitEffectRule extends InvokeEffectRule {
|
|
4
|
+
ruleId: RuleId;
|
|
5
|
+
getCardsToPlace(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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.AmmitEffectRule = void 0;
|
|
19
|
+
var Entity_1 = require("../../material/Entity");
|
|
20
|
+
var PlaceCardEffectRule_1 = require("../../material/entity/PlaceCardEffectRule");
|
|
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 AmmitEffectRule = (function (_super) {
|
|
26
|
+
__extends(AmmitEffectRule, _super);
|
|
27
|
+
function AmmitEffectRule() {
|
|
28
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
29
|
+
_this.ruleId = RuleId_1.RuleId.AmmitEffect;
|
|
30
|
+
return _this;
|
|
31
|
+
}
|
|
32
|
+
AmmitEffectRule.prototype.getCardsToPlace = function () {
|
|
33
|
+
var mythologies = new Pantheon_1.Pantheon(this.game, this.player).missingMythologies;
|
|
34
|
+
return this.material(MaterialType_1.MaterialType.EntityCard)
|
|
35
|
+
.location(LocationType_1.LocationType.PlayerDiscard)
|
|
36
|
+
.id(function (id) { return mythologies.includes((0, Entity_1.entityMythology)(id.front)); });
|
|
37
|
+
};
|
|
38
|
+
return AmmitEffectRule;
|
|
39
|
+
}(PlaceCardEffectRule_1.InvokeEffectRule));
|
|
40
|
+
exports.AmmitEffectRule = AmmitEffectRule;
|
|
@@ -3,6 +3,7 @@ import { PlayerEffectRule } from '../../material/entity/Effect';
|
|
|
3
3
|
import { RuleId } from '../RuleId';
|
|
4
4
|
export declare class CyclopsEffectRule extends PlayerEffectRule {
|
|
5
5
|
ruleId: RuleId;
|
|
6
|
+
onRuleStart(): MaterialMove<number, number, number, number>[];
|
|
6
7
|
getPlayerMoves(): MaterialMove<number, number, number, number>[];
|
|
7
8
|
onCustomMove(move: CustomMove): MaterialMove<number, number, number, number>[];
|
|
8
9
|
}
|
|
@@ -32,6 +32,7 @@ var CustomMoveType_1 = require("../../CustomMoveType");
|
|
|
32
32
|
var Effect_1 = require("../../material/entity/Effect");
|
|
33
33
|
var LocationType_1 = require("../../material/LocationType");
|
|
34
34
|
var Pantheon_1 = require("../../material/Pantheon");
|
|
35
|
+
var Memory_1 = require("../../Memory");
|
|
35
36
|
var RuleId_1 = require("../RuleId");
|
|
36
37
|
var CyclopsEffectRule = (function (_super) {
|
|
37
38
|
__extends(CyclopsEffectRule, _super);
|
|
@@ -40,6 +41,14 @@ var CyclopsEffectRule = (function (_super) {
|
|
|
40
41
|
_this.ruleId = RuleId_1.RuleId.CyclopsEffect;
|
|
41
42
|
return _this;
|
|
42
43
|
}
|
|
44
|
+
CyclopsEffectRule.prototype.onRuleStart = function () {
|
|
45
|
+
var _this = this;
|
|
46
|
+
this.memorize(Memory_1.Memory.OncePerTurn, function (indexes) {
|
|
47
|
+
if (indexes === void 0) { indexes = []; }
|
|
48
|
+
return indexes.concat(_this.getEffect().cardIndex);
|
|
49
|
+
});
|
|
50
|
+
return _super.prototype.onRuleStart.call(this);
|
|
51
|
+
};
|
|
43
52
|
CyclopsEffectRule.prototype.getPlayerMoves = function () {
|
|
44
53
|
var e_1, _a;
|
|
45
54
|
var moves = [this.customMove(CustomMoveType_1.CustomMoveType.EndEffect)];
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ItemMove } from '@gamepark/rules-api';
|
|
2
|
+
import { PlayerEffectRule } from '../../material/entity/Effect';
|
|
3
3
|
import { RuleId } from '../RuleId';
|
|
4
|
-
export declare class WerehyenaEffectRule extends
|
|
4
|
+
export declare class WerehyenaEffectRule extends PlayerEffectRule {
|
|
5
5
|
ruleId: RuleId;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
export declare class WerehyenaCallEffectRule extends PlaceCardEffectRule {
|
|
10
|
-
getCardsToPlace(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
6
|
+
getPlayerMoves(): import("@gamepark/rules-api").MaterialMove<number, number, number, number>[];
|
|
7
|
+
beforeItemMove(move: ItemMove): import("@gamepark/rules-api").MaterialMove<number, number, number, number>[];
|
|
11
8
|
}
|
|
@@ -14,9 +14,36 @@ 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 __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
|
+
};
|
|
17
42
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.
|
|
43
|
+
exports.WerehyenaEffectRule = void 0;
|
|
44
|
+
var rules_api_1 = require("@gamepark/rules-api");
|
|
19
45
|
var Entity_1 = require("../../material/Entity");
|
|
46
|
+
var Effect_1 = require("../../material/entity/Effect");
|
|
20
47
|
var PlaceCardEffectRule_1 = require("../../material/entity/PlaceCardEffectRule");
|
|
21
48
|
var SacrificeEffectRule_1 = require("../../material/entity/SacrificeEffectRule");
|
|
22
49
|
var LocationType_1 = require("../../material/LocationType");
|
|
@@ -29,15 +56,33 @@ var WerehyenaEffectRule = (function (_super) {
|
|
|
29
56
|
_this.ruleId = RuleId_1.RuleId.WerehyenaEffect;
|
|
30
57
|
return _this;
|
|
31
58
|
}
|
|
32
|
-
WerehyenaEffectRule.prototype.
|
|
33
|
-
return
|
|
59
|
+
WerehyenaEffectRule.prototype.getPlayerMoves = function () {
|
|
60
|
+
return __spreadArray(__spreadArray([], __read(new WerehyenaSacrificeEffectRule(this.game).getPlayerMoves()), false), __read(new WerehyenaCallEffectRule(this.game).getPlayerMoves()), false);
|
|
34
61
|
};
|
|
35
|
-
WerehyenaEffectRule.prototype.
|
|
36
|
-
|
|
62
|
+
WerehyenaEffectRule.prototype.beforeItemMove = function (move) {
|
|
63
|
+
if ((0, rules_api_1.isMoveItemType)(MaterialType_1.MaterialType.EntityCard)(move)) {
|
|
64
|
+
if (move.location.type === LocationType_1.LocationType.PlayerDiscard) {
|
|
65
|
+
return new WerehyenaSacrificeEffectRule(this.game).beforeItemMove(move);
|
|
66
|
+
}
|
|
67
|
+
else if (move.location.type === LocationType_1.LocationType.Pantheon) {
|
|
68
|
+
return new WerehyenaCallEffectRule(this.game).beforeItemMove(move);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return [];
|
|
37
72
|
};
|
|
38
73
|
return WerehyenaEffectRule;
|
|
39
|
-
}(
|
|
74
|
+
}(Effect_1.PlayerEffectRule));
|
|
40
75
|
exports.WerehyenaEffectRule = WerehyenaEffectRule;
|
|
76
|
+
var WerehyenaSacrificeEffectRule = (function (_super) {
|
|
77
|
+
__extends(WerehyenaSacrificeEffectRule, _super);
|
|
78
|
+
function WerehyenaSacrificeEffectRule() {
|
|
79
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
80
|
+
}
|
|
81
|
+
WerehyenaSacrificeEffectRule.prototype.getCardsToSacrifice = function () {
|
|
82
|
+
return _super.prototype.getCardsToSacrifice.call(this).id(function (id) { return (0, Entity_1.isCreature)(id.front); });
|
|
83
|
+
};
|
|
84
|
+
return WerehyenaSacrificeEffectRule;
|
|
85
|
+
}(SacrificeEffectRule_1.SacrificeEffectRule));
|
|
41
86
|
var WerehyenaCallEffectRule = (function (_super) {
|
|
42
87
|
__extends(WerehyenaCallEffectRule, _super);
|
|
43
88
|
function WerehyenaCallEffectRule() {
|
|
@@ -51,4 +96,3 @@ var WerehyenaCallEffectRule = (function (_super) {
|
|
|
51
96
|
};
|
|
52
97
|
return WerehyenaCallEffectRule;
|
|
53
98
|
}(PlaceCardEffectRule_1.PlaceCardEffectRule));
|
|
54
|
-
exports.WerehyenaCallEffectRule = WerehyenaCallEffectRule;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gamepark/mythologies",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "The rules of Mythologies adapted for Game Park",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"i18next": "^22.0.3",
|
|
30
30
|
"lodash": "^4.17.21"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "ad6cfe5b8d58ff7701ca5d7f5ae17f02914edfab"
|
|
33
33
|
}
|