@gamepark/mythologies 0.4.0 → 0.5.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/Memory.d.ts +9 -6
- package/dist/Memory.js +9 -6
- package/dist/MythologiesRules.d.ts +42 -32
- package/dist/MythologiesRules.js +10 -0
- package/dist/MythologiesSetup.js +1 -1
- package/dist/material/Entity.d.ts +5 -1
- package/dist/material/Entity.js +1 -1
- package/dist/material/Mythology.d.ts +0 -1
- package/dist/material/Mythology.js +1 -3
- package/dist/material/Pantheon.d.ts +11 -6
- package/dist/material/Pantheon.js +97 -48
- package/dist/material/entity/Effect.d.ts +20 -12
- package/dist/material/entity/Effect.js +4 -5
- package/dist/material/entity/EntityDescription.d.ts +2 -0
- package/dist/material/entity/EntityDescription.js +6 -3
- package/dist/material/entity/MoveEffectRule.d.ts +4 -1
- package/dist/material/entity/MoveEffectRule.js +53 -6
- package/dist/material/entity/PlaceCardEffectRule.js +4 -27
- package/dist/material/entity/SacrificeEffectRule.d.ts +2 -1
- package/dist/material/entity/SacrificeEffectRule.js +15 -37
- package/dist/material/entity/SimultaneousMoveEffectRule.d.ts +8 -2
- package/dist/material/entity/SimultaneousMoveEffectRule.js +43 -11
- package/dist/material/entity/SimultaneousSacrificeEffectRule.d.ts +1 -0
- package/dist/material/entity/SimultaneousSacrificeEffectRule.js +12 -35
- package/dist/material/entity/celtic/Banshee.js +33 -1
- package/dist/material/entity/celtic/Brigid.js +34 -1
- package/dist/material/entity/celtic/Cernunnos.js +37 -1
- package/dist/material/entity/celtic/Dagda.js +43 -1
- package/dist/material/entity/celtic/Dullahan.js +7 -1
- package/dist/material/entity/celtic/Fairy.d.ts +2 -0
- package/dist/material/entity/celtic/Fairy.js +12 -0
- package/dist/material/entity/celtic/Kelpie.js +33 -1
- package/dist/material/entity/celtic/Leprechaun.js +7 -1
- package/dist/material/entity/celtic/Morrigan.js +6 -1
- package/dist/material/entity/celtic/Selkie.js +12 -1
- package/dist/material/entity/egyptian/Beetle.js +19 -13
- package/dist/material/entity/hindu/Naga.js +36 -30
- package/dist/material/entity/norse/Troll.js +4 -1
- package/dist/material/entity/zulu/Tokoloshe.js +22 -17
- package/dist/rules/PlaceCardsRule.js +3 -2
- package/dist/rules/RuleId.d.ts +37 -32
- package/dist/rules/RuleId.js +37 -32
- package/dist/rules/effects/AthenaEffectRule.js +29 -1
- package/dist/rules/effects/CentaurEffectRule.d.ts +5 -3
- package/dist/rules/effects/CentaurEffectRule.js +90 -14
- package/dist/rules/effects/CondorEffectRule.d.ts +1 -1
- package/dist/rules/effects/CondorEffectRule.js +5 -1
- package/dist/rules/effects/DullahanEffectRule.d.ts +11 -0
- package/dist/rules/effects/DullahanEffectRule.js +73 -0
- package/dist/rules/effects/FairyEffectRule.d.ts +10 -0
- package/dist/rules/effects/FairyEffectRule.js +55 -0
- package/dist/rules/effects/FenrirEffectRule.js +2 -1
- package/dist/rules/effects/GarudaEffectRule.d.ts +1 -1
- package/dist/rules/effects/GarudaEffectRule.js +3 -2
- package/dist/rules/effects/GorgonEffectRule.d.ts +1 -1
- package/dist/rules/effects/GorgonEffectRule.js +2 -26
- package/dist/rules/effects/HadesEffectRule.d.ts +8 -4
- package/dist/rules/effects/HadesEffectRule.js +12 -50
- package/dist/rules/effects/IdloziEffectRule.d.ts +2 -2
- package/dist/rules/effects/IdloziEffectRule.js +4 -1
- package/dist/rules/effects/IllapaEffectRule.d.ts +1 -1
- package/dist/rules/effects/IllapaEffectRule.js +1 -1
- package/dist/rules/effects/JiangshiEffectRule.d.ts +1 -1
- package/dist/rules/effects/JiangshiEffectRule.js +6 -27
- package/dist/rules/effects/LeprechaunEffectRule.d.ts +9 -0
- package/dist/rules/effects/LeprechaunEffectRule.js +49 -0
- package/dist/rules/effects/MultipleSimultaneousMoveEffectRule.d.ts +13 -0
- package/dist/rules/effects/MultipleSimultaneousMoveEffectRule.js +160 -0
- package/dist/rules/effects/PermanentEffectsRule.d.ts +7 -0
- package/dist/rules/effects/PermanentEffectsRule.js +54 -0
- package/dist/rules/effects/QilinEffectRule.js +6 -5
- package/dist/rules/effects/RaEffectRule.d.ts +8 -4
- package/dist/rules/effects/RaEffectRule.js +12 -50
- package/dist/rules/effects/ResolveEffectsRule.js +1 -1
- package/dist/rules/effects/SelkieEffectRule.d.ts +8 -0
- package/dist/rules/effects/SelkieEffectRule.js +44 -0
- package/dist/rules/effects/ShivaEffectRule.d.ts +2 -2
- package/dist/rules/effects/ShivaEffectRule.js +16 -36
- package/dist/rules/effects/SphinxEffectRule.d.ts +2 -2
- package/dist/rules/effects/SphinxEffectRule.js +4 -1
- package/dist/rules/effects/TianlongEffectRule.d.ts +2 -3
- package/dist/rules/effects/TianlongEffectRule.js +33 -39
- package/dist/rules/effects/TriggerEffectsRule.d.ts +1 -1
- package/dist/rules/effects/TriggerEffectsRule.js +36 -18
- package/dist/rules/effects/VetalaEffectRule.d.ts +3 -2
- package/dist/rules/effects/VetalaEffectRule.js +10 -5
- package/dist/rules/effects/ViracochaEffectRule.d.ts +1 -1
- package/dist/rules/effects/ViracochaEffectRule.js +2 -26
- package/package.json +2 -2
|
@@ -25,6 +25,31 @@ var __values = (this && this.__values) || function(o) {
|
|
|
25
25
|
};
|
|
26
26
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
27
27
|
};
|
|
28
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
29
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
30
|
+
if (!m) return o;
|
|
31
|
+
var i = m.call(o), r, ar = [], e;
|
|
32
|
+
try {
|
|
33
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
34
|
+
}
|
|
35
|
+
catch (error) { e = { error: error }; }
|
|
36
|
+
finally {
|
|
37
|
+
try {
|
|
38
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
39
|
+
}
|
|
40
|
+
finally { if (e) throw e.error; }
|
|
41
|
+
}
|
|
42
|
+
return ar;
|
|
43
|
+
};
|
|
44
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
45
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
46
|
+
if (ar || !(i in from)) {
|
|
47
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
48
|
+
ar[i] = from[i];
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
52
|
+
};
|
|
28
53
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
54
|
exports.AthenaEffectRule = void 0;
|
|
30
55
|
var CustomMoveType_1 = require("../../CustomMoveType");
|
|
@@ -33,6 +58,7 @@ var LocationType_1 = require("../../material/LocationType");
|
|
|
33
58
|
var MaterialType_1 = require("../../material/MaterialType");
|
|
34
59
|
var Pantheon_1 = require("../../material/Pantheon");
|
|
35
60
|
var RuleId_1 = require("../RuleId");
|
|
61
|
+
var TriggerEffectsRule_1 = require("./TriggerEffectsRule");
|
|
36
62
|
var AthenaEffectRule = (function (_super) {
|
|
37
63
|
__extends(AthenaEffectRule, _super);
|
|
38
64
|
function AthenaEffectRule() {
|
|
@@ -93,9 +119,11 @@ var AthenaEffectRule = (function (_super) {
|
|
|
93
119
|
return piles;
|
|
94
120
|
};
|
|
95
121
|
AthenaEffectRule.prototype.onCustomMove = function (move) {
|
|
122
|
+
var _a;
|
|
96
123
|
if (move.type === CustomMoveType_1.CustomMoveType.EndEffect) {
|
|
97
124
|
var pantheon = new Pantheon_1.Pantheon(this.game, this.player);
|
|
98
|
-
|
|
125
|
+
(_a = new TriggerEffectsRule_1.TriggerEffectsRule(this.game)).triggerEffects.apply(_a, __spreadArray([], __read(pantheon.updateGrid()), false));
|
|
126
|
+
return pantheon.gainBonus();
|
|
99
127
|
}
|
|
100
128
|
return [];
|
|
101
129
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Location, Material, XYCoordinates } from '@gamepark/rules-api';
|
|
1
|
+
import { ItemMove, Location, Material, MaterialMove, MoveItem, XYCoordinates } from '@gamepark/rules-api';
|
|
2
2
|
import { MoveEffectRule } from '../../material/entity/MoveEffectRule';
|
|
3
3
|
import { SimultaneousSacrificeEffectRule } from '../../material/entity/SimultaneousSacrificeEffectRule';
|
|
4
4
|
import { PlayerColor } from '../../PlayerColor';
|
|
@@ -7,8 +7,10 @@ export declare class CentaurEffectRule extends MoveEffectRule {
|
|
|
7
7
|
ruleId: RuleId;
|
|
8
8
|
getMovingCards(effectCardIndex?: number): Material;
|
|
9
9
|
isLegalDestination(space: XYCoordinates, cardLocation: Location): boolean;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
onCardMoved(): never[];
|
|
11
|
+
onCardSacrificed(move: MoveItem): MaterialMove<number, number, number, number>[];
|
|
12
|
+
afterItemMove(move: ItemMove): MaterialMove<number, number, number, number>[];
|
|
13
|
+
startSacrificeEffect(): MaterialMove<number, number, number, number>[];
|
|
12
14
|
}
|
|
13
15
|
export declare class CentaurEffectSacrificeRule extends SimultaneousSacrificeEffectRule {
|
|
14
16
|
getCardsToSacrifice(player: PlayerColor): Material;
|
|
@@ -14,16 +14,55 @@ 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
|
+
};
|
|
42
|
+
var __values = (this && this.__values) || function(o) {
|
|
43
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
44
|
+
if (m) return m.call(o);
|
|
45
|
+
if (o && typeof o.length === "number") return {
|
|
46
|
+
next: function () {
|
|
47
|
+
if (o && i >= o.length) o = void 0;
|
|
48
|
+
return { value: o && o[i++], done: !o };
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
52
|
+
};
|
|
17
53
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
54
|
exports.CentaurEffectSacrificeRule = exports.CentaurEffectRule = void 0;
|
|
19
55
|
var rules_api_1 = require("@gamepark/rules-api");
|
|
56
|
+
var CustomMoveType_1 = require("../../CustomMoveType");
|
|
20
57
|
var Entity_1 = require("../../material/Entity");
|
|
21
58
|
var MoveEffectRule_1 = require("../../material/entity/MoveEffectRule");
|
|
22
59
|
var SimultaneousSacrificeEffectRule_1 = require("../../material/entity/SimultaneousSacrificeEffectRule");
|
|
60
|
+
var LocationType_1 = require("../../material/LocationType");
|
|
23
61
|
var MaterialType_1 = require("../../material/MaterialType");
|
|
24
62
|
var Pantheon_1 = require("../../material/Pantheon");
|
|
25
63
|
var Memory_1 = require("../../Memory");
|
|
26
64
|
var RuleId_1 = require("../RuleId");
|
|
65
|
+
var TriggerEffectsRule_1 = require("./TriggerEffectsRule");
|
|
27
66
|
var CentaurEffectRule = (function (_super) {
|
|
28
67
|
__extends(CentaurEffectRule, _super);
|
|
29
68
|
function CentaurEffectRule() {
|
|
@@ -38,24 +77,61 @@ var CentaurEffectRule = (function (_super) {
|
|
|
38
77
|
CentaurEffectRule.prototype.isLegalDestination = function (space, cardLocation) {
|
|
39
78
|
return (0, rules_api_1.areAdjacentSquares)(space, cardLocation);
|
|
40
79
|
};
|
|
41
|
-
CentaurEffectRule.prototype.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
80
|
+
CentaurEffectRule.prototype.onCardMoved = function () {
|
|
81
|
+
return [];
|
|
82
|
+
};
|
|
83
|
+
CentaurEffectRule.prototype.onCardSacrificed = function (move) {
|
|
84
|
+
_super.prototype.onCardSacrificed.call(this, move);
|
|
85
|
+
if (!this.remind(Memory_1.Memory.EntityMoved, this.player)) {
|
|
86
|
+
this.memorize(Memory_1.Memory.EntityMoved, true, this.player);
|
|
87
|
+
return this.startSacrificeEffect();
|
|
88
|
+
}
|
|
89
|
+
return [];
|
|
90
|
+
};
|
|
91
|
+
CentaurEffectRule.prototype.afterItemMove = function (move) {
|
|
92
|
+
if ((0, rules_api_1.isMoveItemType)(MaterialType_1.MaterialType.EntityCard)(move) && move.location.type === LocationType_1.LocationType.Pantheon) {
|
|
93
|
+
return this.startSacrificeEffect();
|
|
94
|
+
}
|
|
95
|
+
return [];
|
|
96
|
+
};
|
|
97
|
+
CentaurEffectRule.prototype.startSacrificeEffect = function () {
|
|
98
|
+
var _a, e_1, _b;
|
|
99
|
+
var _this = this;
|
|
100
|
+
var pantheon = new Pantheon_1.Pantheon(this.game, this.player);
|
|
101
|
+
(_a = new TriggerEffectsRule_1.TriggerEffectsRule(this.game)).triggerEffects.apply(_a, __spreadArray([], __read(pantheon.updateGrid()), false));
|
|
102
|
+
var centaur = this.getEffect().cardIndex;
|
|
103
|
+
var centaurLine = this.material(MaterialType_1.MaterialType.EntityCard).getItem(centaur).location.y;
|
|
104
|
+
var moves = pantheon.gainBonus();
|
|
105
|
+
var sacrificingPlayers = this.game.players.filter(function (player) { return new Pantheon_1.Pantheon(_this.game, player).visibleEntities.index(function (index) { return index !== centaur; }).location(function (l) { return l.y === centaurLine; }).length > 0; });
|
|
106
|
+
var playersToActivate = [];
|
|
107
|
+
var sacrificeRule = new CentaurEffectSacrificeRule(this.game);
|
|
108
|
+
try {
|
|
109
|
+
for (var sacrificingPlayers_1 = __values(sacrificingPlayers), sacrificingPlayers_1_1 = sacrificingPlayers_1.next(); !sacrificingPlayers_1_1.done; sacrificingPlayers_1_1 = sacrificingPlayers_1.next()) {
|
|
110
|
+
var player = sacrificingPlayers_1_1.value;
|
|
111
|
+
var legalMoves = sacrificeRule.getActivePlayerLegalMoves(player);
|
|
112
|
+
if (legalMoves.length === 1) {
|
|
113
|
+
moves.push(legalMoves[0]);
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
playersToActivate.push(player);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
121
|
+
finally {
|
|
122
|
+
try {
|
|
123
|
+
if (sacrificingPlayers_1_1 && !sacrificingPlayers_1_1.done && (_b = sacrificingPlayers_1.return)) _b.call(sacrificingPlayers_1);
|
|
124
|
+
}
|
|
125
|
+
finally { if (e_1) throw e_1.error; }
|
|
126
|
+
}
|
|
127
|
+
if (playersToActivate.length) {
|
|
128
|
+
moves.push(this.startSimultaneousRule(RuleId_1.RuleId.CentaurEffectSacrifice, playersToActivate));
|
|
46
129
|
}
|
|
47
130
|
else {
|
|
48
|
-
|
|
131
|
+
moves.push(this.customMove(CustomMoveType_1.CustomMoveType.EndEffect));
|
|
49
132
|
}
|
|
133
|
+
return moves;
|
|
50
134
|
};
|
|
51
|
-
Object.defineProperty(CentaurEffectRule.prototype, "playersHavingToSacrifice", {
|
|
52
|
-
get: function () {
|
|
53
|
-
var _this = this;
|
|
54
|
-
return this.game.players.filter(function (player) { return new Pantheon_1.Pantheon(_this.game, player).grid[_this.card.location.y].filter(Entity_1.isCreature).length > (player === _this.player ? 1 : 0); });
|
|
55
|
-
},
|
|
56
|
-
enumerable: false,
|
|
57
|
-
configurable: true
|
|
58
|
-
});
|
|
59
135
|
return CentaurEffectRule;
|
|
60
136
|
}(MoveEffectRule_1.MoveEffectRule));
|
|
61
137
|
exports.CentaurEffectRule = CentaurEffectRule;
|
|
@@ -4,5 +4,5 @@ import { RuleId } from '../RuleId';
|
|
|
4
4
|
export declare class CondorEffectRule extends SacrificeEffectRule {
|
|
5
5
|
ruleId: RuleId;
|
|
6
6
|
getCardsToSacrifice(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
7
|
-
onSacrifice(move: MoveItem): MaterialMove[];
|
|
7
|
+
onSacrifice(move: MoveItem): MaterialMove<number, number, number, number>[];
|
|
8
8
|
}
|
|
@@ -17,6 +17,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.CondorEffectRule = void 0;
|
|
19
19
|
var rules_api_1 = require("@gamepark/rules-api");
|
|
20
|
+
var CustomMoveType_1 = require("../../CustomMoveType");
|
|
20
21
|
var SacrificeEffectRule_1 = require("../../material/entity/SacrificeEffectRule");
|
|
21
22
|
var MaterialType_1 = require("../../material/MaterialType");
|
|
22
23
|
var Pantheon_1 = require("../../material/Pantheon");
|
|
@@ -34,7 +35,10 @@ var CondorEffectRule = (function (_super) {
|
|
|
34
35
|
};
|
|
35
36
|
CondorEffectRule.prototype.onSacrifice = function (move) {
|
|
36
37
|
var entity = this.material(MaterialType_1.MaterialType.EntityCard).getItem(move.itemIndex);
|
|
37
|
-
|
|
38
|
+
var pantheon = new Pantheon_1.Pantheon(this.game, this.player);
|
|
39
|
+
var moves = pantheon.getInvokeGains(entity.id.front, entity.location.y);
|
|
40
|
+
moves.push(this.customMove(CustomMoveType_1.CustomMoveType.EndEffect));
|
|
41
|
+
return moves;
|
|
38
42
|
};
|
|
39
43
|
return CondorEffectRule;
|
|
40
44
|
}(SacrificeEffectRule_1.SacrificeEffectRule));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Location, MaterialMove, MoveItem, XYCoordinates } from '@gamepark/rules-api';
|
|
2
|
+
import { MoveEffectRule } from '../../material/entity/MoveEffectRule';
|
|
3
|
+
import { RuleId } from '../RuleId';
|
|
4
|
+
export declare class DullahanEffectRule extends MoveEffectRule {
|
|
5
|
+
ruleId: RuleId;
|
|
6
|
+
onRuleStart(): MaterialMove<number, number, number, number>[];
|
|
7
|
+
getTargetEntities(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
8
|
+
isLegalDestination(space: XYCoordinates, cardLocation: Location): boolean;
|
|
9
|
+
onCardMoved(move: MoveItem): MaterialMove<number, number, number, number>[];
|
|
10
|
+
onRuleEnd(): never[];
|
|
11
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
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.DullahanEffectRule = void 0;
|
|
19
|
+
var CustomMoveType_1 = require("../../CustomMoveType");
|
|
20
|
+
var MoveEffectRule_1 = require("../../material/entity/MoveEffectRule");
|
|
21
|
+
var Pantheon_1 = require("../../material/Pantheon");
|
|
22
|
+
var Memory_1 = require("../../Memory");
|
|
23
|
+
var RuleId_1 = require("../RuleId");
|
|
24
|
+
var DullahanEffectRule = (function (_super) {
|
|
25
|
+
__extends(DullahanEffectRule, _super);
|
|
26
|
+
function DullahanEffectRule() {
|
|
27
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
28
|
+
_this.ruleId = RuleId_1.RuleId.DullahanEffect;
|
|
29
|
+
return _this;
|
|
30
|
+
}
|
|
31
|
+
DullahanEffectRule.prototype.onRuleStart = function () {
|
|
32
|
+
var pantheon = new Pantheon_1.Pantheon(this.game, this.player);
|
|
33
|
+
var targetEntitiesAbleToMove = this.getTargetEntities()
|
|
34
|
+
.filter(function (item) { return pantheon.isAbleToMove(item); })
|
|
35
|
+
.getIndexes();
|
|
36
|
+
if (targetEntitiesAbleToMove.length === 0) {
|
|
37
|
+
return [this.customMove(CustomMoveType_1.CustomMoveType.EndEffect)];
|
|
38
|
+
}
|
|
39
|
+
this.memorize(Memory_1.Memory.TargetEntities, targetEntitiesAbleToMove);
|
|
40
|
+
this.memorize(Memory_1.Memory.EffectCount, targetEntitiesAbleToMove.length);
|
|
41
|
+
var moves = this.getPlayerMoves();
|
|
42
|
+
if (moves.length === targetEntitiesAbleToMove.length) {
|
|
43
|
+
return moves;
|
|
44
|
+
}
|
|
45
|
+
return [];
|
|
46
|
+
};
|
|
47
|
+
DullahanEffectRule.prototype.getTargetEntities = function () {
|
|
48
|
+
return new Pantheon_1.Pantheon(this.game, this.player).visibleEntities.location(function (l) { return l.y === 1; });
|
|
49
|
+
};
|
|
50
|
+
DullahanEffectRule.prototype.isLegalDestination = function (space, cardLocation) {
|
|
51
|
+
return cardLocation.x === space.x && cardLocation.y === space.y - 1;
|
|
52
|
+
};
|
|
53
|
+
DullahanEffectRule.prototype.onCardMoved = function (move) {
|
|
54
|
+
var moves = [];
|
|
55
|
+
var pantheon = new Pantheon_1.Pantheon(this.game, this.player);
|
|
56
|
+
if (pantheon.visibleEntities.location(function (l) { return l.x === move.location.x && l.y === move.location.y; }).length > 0) {
|
|
57
|
+
moves.push(pantheon.gainGems(1));
|
|
58
|
+
}
|
|
59
|
+
this.memorize(Memory_1.Memory.TargetEntities, function (entities) { return entities.filter(function (index) { return index !== move.itemIndex; }); });
|
|
60
|
+
var count = this.memorize(Memory_1.Memory.EffectCount, function (count) { return count - 1; });
|
|
61
|
+
if (count === 0) {
|
|
62
|
+
moves.push(this.customMove(CustomMoveType_1.CustomMoveType.EndEffect));
|
|
63
|
+
}
|
|
64
|
+
return moves;
|
|
65
|
+
};
|
|
66
|
+
DullahanEffectRule.prototype.onRuleEnd = function () {
|
|
67
|
+
this.forget(Memory_1.Memory.TargetEntities);
|
|
68
|
+
this.forget(Memory_1.Memory.EffectCount);
|
|
69
|
+
return _super.prototype.onRuleEnd.call(this);
|
|
70
|
+
};
|
|
71
|
+
return DullahanEffectRule;
|
|
72
|
+
}(MoveEffectRule_1.MoveEffectRule));
|
|
73
|
+
exports.DullahanEffectRule = DullahanEffectRule;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MaterialMove } from '@gamepark/rules-api';
|
|
2
|
+
import { SacrificeEffectRule } from '../../material/entity/SacrificeEffectRule';
|
|
3
|
+
import { RuleId } from '../RuleId';
|
|
4
|
+
export declare class FairyEffectRule extends SacrificeEffectRule {
|
|
5
|
+
ruleId: RuleId;
|
|
6
|
+
playEffect(): MaterialMove[];
|
|
7
|
+
getCardsToSacrifice(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
8
|
+
onSacrifice(): MaterialMove<number, number, number, number>[];
|
|
9
|
+
onRuleEnd(): never[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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.FairyEffectRule = void 0;
|
|
19
|
+
var CustomMoveType_1 = require("../../CustomMoveType");
|
|
20
|
+
var SacrificeEffectRule_1 = require("../../material/entity/SacrificeEffectRule");
|
|
21
|
+
var MaterialType_1 = require("../../material/MaterialType");
|
|
22
|
+
var Pantheon_1 = require("../../material/Pantheon");
|
|
23
|
+
var Memory_1 = require("../../Memory");
|
|
24
|
+
var RuleId_1 = require("../RuleId");
|
|
25
|
+
var FairyEffectRule = (function (_super) {
|
|
26
|
+
__extends(FairyEffectRule, _super);
|
|
27
|
+
function FairyEffectRule() {
|
|
28
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
29
|
+
_this.ruleId = RuleId_1.RuleId.FairyEffect;
|
|
30
|
+
return _this;
|
|
31
|
+
}
|
|
32
|
+
FairyEffectRule.prototype.playEffect = function () {
|
|
33
|
+
var _a = this.card.location, x = _a.x, y = _a.y;
|
|
34
|
+
var targets = new Pantheon_1.Pantheon(this.game, this.player).visibleEntities.location(function (l) { return l.y === y && l.x !== x; }).sort(function (item) { return item.location.x; }).getIndexes();
|
|
35
|
+
this.memorize(Memory_1.Memory.FairyTargets, targets);
|
|
36
|
+
return _super.prototype.playEffect.call(this);
|
|
37
|
+
};
|
|
38
|
+
FairyEffectRule.prototype.getCardsToSacrifice = function () {
|
|
39
|
+
return this.material(MaterialType_1.MaterialType.EntityCard).index(this.remind(Memory_1.Memory.FairyTargets)[0]);
|
|
40
|
+
};
|
|
41
|
+
FairyEffectRule.prototype.onSacrifice = function () {
|
|
42
|
+
var moves = [new Pantheon_1.Pantheon(this.game, this.player).gainGems(2)];
|
|
43
|
+
var targets = this.memorize(Memory_1.Memory.FairyTargets, function (targets) { return targets.slice(1); });
|
|
44
|
+
if (!targets.length) {
|
|
45
|
+
moves.push(this.customMove(CustomMoveType_1.CustomMoveType.EndEffect));
|
|
46
|
+
}
|
|
47
|
+
return moves;
|
|
48
|
+
};
|
|
49
|
+
FairyEffectRule.prototype.onRuleEnd = function () {
|
|
50
|
+
this.forget(Memory_1.Memory.FairyTargets);
|
|
51
|
+
return [];
|
|
52
|
+
};
|
|
53
|
+
return FairyEffectRule;
|
|
54
|
+
}(SacrificeEffectRule_1.SacrificeEffectRule));
|
|
55
|
+
exports.FairyEffectRule = FairyEffectRule;
|
|
@@ -28,6 +28,7 @@ var __values = (this && this.__values) || function(o) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.FenrirEffectRule = exports.FenrirChoiceRule = void 0;
|
|
30
30
|
var rules_api_1 = require("@gamepark/rules-api");
|
|
31
|
+
var CustomMoveType_1 = require("../../CustomMoveType");
|
|
31
32
|
var Effect_1 = require("../../material/entity/Effect");
|
|
32
33
|
var MaterialType_1 = require("../../material/MaterialType");
|
|
33
34
|
var Pantheon_1 = require("../../material/Pantheon");
|
|
@@ -41,7 +42,7 @@ var FenrirChoiceRule = (function (_super) {
|
|
|
41
42
|
return _this;
|
|
42
43
|
}
|
|
43
44
|
FenrirChoiceRule.prototype.getPlayerMoves = function () {
|
|
44
|
-
var moves = this.
|
|
45
|
+
var moves = [this.customMove(CustomMoveType_1.CustomMoveType.EndEffect)];
|
|
45
46
|
var pantheon = new Pantheon_1.Pantheon(this.game, this.player);
|
|
46
47
|
if (pantheon.gems && this.getAffectedPlayers().length) {
|
|
47
48
|
moves.push(pantheon.spendGems(1));
|
|
@@ -5,5 +5,5 @@ export declare class GarudaEffectRule extends SacrificeEffectRule {
|
|
|
5
5
|
ruleId: RuleId;
|
|
6
6
|
onRuleStart(): MaterialMove<number, number, number, number>[];
|
|
7
7
|
getCardsToSacrifice(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
8
|
-
onSacrifice():
|
|
8
|
+
onSacrifice(): import("@gamepark/rules-api").CustomMove<number>[];
|
|
9
9
|
}
|
|
@@ -41,6 +41,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
41
41
|
};
|
|
42
42
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
43
|
exports.GarudaEffectRule = void 0;
|
|
44
|
+
var CustomMoveType_1 = require("../../CustomMoveType");
|
|
44
45
|
var Entity_1 = require("../../material/Entity");
|
|
45
46
|
var SacrificeEffectRule_1 = require("../../material/entity/SacrificeEffectRule");
|
|
46
47
|
var Pantheon_1 = require("../../material/Pantheon");
|
|
@@ -56,7 +57,7 @@ var GarudaEffectRule = (function (_super) {
|
|
|
56
57
|
GarudaEffectRule.prototype.onRuleStart = function () {
|
|
57
58
|
var count = this.getCardsToSacrifice().length;
|
|
58
59
|
if (!count)
|
|
59
|
-
return this.
|
|
60
|
+
return [this.customMove(CustomMoveType_1.CustomMoveType.EndEffect)];
|
|
60
61
|
this.memorize(Memory_1.Memory.GarudaSacrificeCount, count);
|
|
61
62
|
var moves = [new Pantheon_1.Pantheon(this.game, this.player).gainGems(count)];
|
|
62
63
|
var playerMoves = this.getPlayerMoves();
|
|
@@ -76,7 +77,7 @@ var GarudaEffectRule = (function (_super) {
|
|
|
76
77
|
}
|
|
77
78
|
else {
|
|
78
79
|
this.forget(Memory_1.Memory.GarudaSacrificeCount);
|
|
79
|
-
return this.
|
|
80
|
+
return [this.customMove(CustomMoveType_1.CustomMoveType.EndEffect)];
|
|
80
81
|
}
|
|
81
82
|
};
|
|
82
83
|
return GarudaEffectRule;
|
|
@@ -3,5 +3,5 @@ import { RuleId } from '../RuleId';
|
|
|
3
3
|
export declare class GorgonEffectRule extends SacrificeEffectRule {
|
|
4
4
|
ruleId: RuleId;
|
|
5
5
|
getCardsToSacrifice(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
6
|
-
onSacrifice(): import("@gamepark/rules-api").
|
|
6
|
+
onSacrifice(): (import("@gamepark/rules-api").CustomMove<number> | import("@gamepark/rules-api").CreateItem<number, number, number>)[];
|
|
7
7
|
}
|
|
@@ -14,33 +14,9 @@ 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
|
-
};
|
|
42
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
18
|
exports.GorgonEffectRule = void 0;
|
|
19
|
+
var CustomMoveType_1 = require("../../CustomMoveType");
|
|
44
20
|
var SacrificeEffectRule_1 = require("../../material/entity/SacrificeEffectRule");
|
|
45
21
|
var Pantheon_1 = require("../../material/Pantheon");
|
|
46
22
|
var RuleId_1 = require("../RuleId");
|
|
@@ -57,7 +33,7 @@ var GorgonEffectRule = (function (_super) {
|
|
|
57
33
|
};
|
|
58
34
|
GorgonEffectRule.prototype.onSacrifice = function () {
|
|
59
35
|
var pantheon = new Pantheon_1.Pantheon(this.game, this.player);
|
|
60
|
-
return
|
|
36
|
+
return [pantheon.gainGems(2), this.customMove(CustomMoveType_1.CustomMoveType.EndEffect)];
|
|
61
37
|
};
|
|
62
38
|
return GorgonEffectRule;
|
|
63
39
|
}(SacrificeEffectRule_1.SacrificeEffectRule));
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { Location, XYCoordinates } from '@gamepark/rules-api';
|
|
2
|
+
import { PlayerColor } from '../../PlayerColor';
|
|
3
|
+
import { RuleId } from '../RuleId';
|
|
4
|
+
import { MultipleSimultaneousMoveEffectRule } from './MultipleSimultaneousMoveEffectRule';
|
|
5
|
+
export declare class HadesEffectRule extends MultipleSimultaneousMoveEffectRule {
|
|
6
|
+
ruleId: RuleId;
|
|
7
|
+
getTargetEntities(player: PlayerColor): import("@gamepark/rules-api").Material<number, number, number>;
|
|
8
|
+
isLegalDestination(space: XYCoordinates, cardLocation: Location): boolean;
|
|
5
9
|
}
|
|
@@ -14,64 +14,26 @@ 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 __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
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
18
|
exports.HadesEffectRule = void 0;
|
|
30
19
|
var Entity_1 = require("../../material/Entity");
|
|
31
|
-
var SimultaneousMoveEffectRule_1 = require("../../material/entity/SimultaneousMoveEffectRule");
|
|
32
|
-
var LocationType_1 = require("../../material/LocationType");
|
|
33
20
|
var Pantheon_1 = require("../../material/Pantheon");
|
|
21
|
+
var RuleId_1 = require("../RuleId");
|
|
22
|
+
var MultipleSimultaneousMoveEffectRule_1 = require("./MultipleSimultaneousMoveEffectRule");
|
|
34
23
|
var HadesEffectRule = (function (_super) {
|
|
35
24
|
__extends(HadesEffectRule, _super);
|
|
36
25
|
function HadesEffectRule() {
|
|
37
|
-
|
|
26
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
27
|
+
_this.ruleId = RuleId_1.RuleId.HadesEffect;
|
|
28
|
+
return _this;
|
|
38
29
|
}
|
|
39
|
-
HadesEffectRule.prototype.
|
|
40
|
-
var
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
var pantheon = new Pantheon_1.Pantheon(this.game, player);
|
|
46
|
-
var entities = pantheon.visibleEntities;
|
|
47
|
-
try {
|
|
48
|
-
for (var _e = (e_2 = void 0, __values(entities.getIndexes())), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
49
|
-
var index = _f.value;
|
|
50
|
-
var entity = entities.getItem(index);
|
|
51
|
-
var _g = entity.location, x = _g.x, y = _g.y;
|
|
52
|
-
if (y !== 2 && !(0, Entity_1.isGod)(entity.id.front) && pantheon.isFreeSpace({ x: x, y: y + 1 })) {
|
|
53
|
-
moves.push(entities.index(index).moveItem({ type: LocationType_1.LocationType.Pantheon, player: player, x: x, y: y + 1 }));
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
58
|
-
finally {
|
|
59
|
-
try {
|
|
60
|
-
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
|
|
61
|
-
}
|
|
62
|
-
finally { if (e_2) throw e_2.error; }
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
67
|
-
finally {
|
|
68
|
-
try {
|
|
69
|
-
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
70
|
-
}
|
|
71
|
-
finally { if (e_1) throw e_1.error; }
|
|
72
|
-
}
|
|
73
|
-
return moves;
|
|
30
|
+
HadesEffectRule.prototype.getTargetEntities = function (player) {
|
|
31
|
+
var pantheon = new Pantheon_1.Pantheon(this.game, player);
|
|
32
|
+
return pantheon.visibleEntities.id(function (id) { return !(0, Entity_1.isGod)(id.front); }).location(function (l) { return l.y < 2 && pantheon.isFreeSpace({ x: l.x, y: l.y + 1 }); });
|
|
33
|
+
};
|
|
34
|
+
HadesEffectRule.prototype.isLegalDestination = function (space, cardLocation) {
|
|
35
|
+
return cardLocation.x === space.x && cardLocation.y === space.y - 1;
|
|
74
36
|
};
|
|
75
37
|
return HadesEffectRule;
|
|
76
|
-
}(
|
|
38
|
+
}(MultipleSimultaneousMoveEffectRule_1.MultipleSimultaneousMoveEffectRule));
|
|
77
39
|
exports.HadesEffectRule = HadesEffectRule;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Location, Material,
|
|
1
|
+
import { Location, Material, MoveItem, XYCoordinates } from '@gamepark/rules-api';
|
|
2
2
|
import { MoveEffectRule } from '../../material/entity/MoveEffectRule';
|
|
3
3
|
import { RuleId } from '../RuleId';
|
|
4
4
|
export declare class IdloziEffectRule extends MoveEffectRule {
|
|
5
5
|
ruleId: RuleId;
|
|
6
6
|
getMovingCards(effectCardIndex: number): Material;
|
|
7
7
|
isLegalDestination(space: XYCoordinates, cardLocation: Location): boolean;
|
|
8
|
-
onCardMoved(move: MoveItem): MaterialMove[];
|
|
8
|
+
onCardMoved(move: MoveItem): import("@gamepark/rules-api").MaterialMove<number, number, number, number>[];
|
|
9
9
|
}
|
|
@@ -16,6 +16,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
16
16
|
})();
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.IdloziEffectRule = void 0;
|
|
19
|
+
var CustomMoveType_1 = require("../../CustomMoveType");
|
|
19
20
|
var Entity_1 = require("../../material/Entity");
|
|
20
21
|
var MoveEffectRule_1 = require("../../material/entity/MoveEffectRule");
|
|
21
22
|
var MaterialType_1 = require("../../material/MaterialType");
|
|
@@ -36,7 +37,9 @@ var IdloziEffectRule = (function (_super) {
|
|
|
36
37
|
};
|
|
37
38
|
IdloziEffectRule.prototype.onCardMoved = function (move) {
|
|
38
39
|
var entity = this.material(MaterialType_1.MaterialType.EntityCard).getItem(move.itemIndex).id.front;
|
|
39
|
-
|
|
40
|
+
var moves = new Pantheon_1.Pantheon(this.game, this.player).getInvokeGains(entity, move.location.y);
|
|
41
|
+
moves.push(this.customMove(CustomMoveType_1.CustomMoveType.EndEffect));
|
|
42
|
+
return moves;
|
|
40
43
|
};
|
|
41
44
|
return IdloziEffectRule;
|
|
42
45
|
}(MoveEffectRule_1.MoveEffectRule));
|
|
@@ -6,7 +6,7 @@ import { RuleId } from '../RuleId';
|
|
|
6
6
|
export declare class IllapaEffectRule extends PlayerEffectRule {
|
|
7
7
|
ruleId: RuleId;
|
|
8
8
|
getPlayerMoves(): CustomMove<number>[];
|
|
9
|
-
onCustomMove(move: CustomMove): import("@gamepark/rules-api").
|
|
9
|
+
onCustomMove(move: CustomMove): CustomMove<number>[] | import("@gamepark/rules-api").StartSimultaneousRule<number, RuleId.IllapaSacrifice>[];
|
|
10
10
|
getPlayersHavingToSacrifice(line: number): number[];
|
|
11
11
|
}
|
|
12
12
|
export declare class IllapaSacrificeRule extends SimultaneousSacrificeEffectRule {
|
|
@@ -43,7 +43,7 @@ var IllapaEffectRule = (function (_super) {
|
|
|
43
43
|
return [this.startSimultaneousRule(RuleId_1.RuleId.IllapaSacrifice, players)];
|
|
44
44
|
}
|
|
45
45
|
else {
|
|
46
|
-
return
|
|
46
|
+
return [this.customMove(CustomMoveType_1.CustomMoveType.EndEffect)];
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
return [];
|
|
@@ -4,5 +4,5 @@ import { RuleId } from '../RuleId';
|
|
|
4
4
|
export declare class JiangshiEffectRule extends PlayerEffectRule {
|
|
5
5
|
ruleId: RuleId;
|
|
6
6
|
getPlayerMoves(): MaterialMove[];
|
|
7
|
-
beforeItemMove(move: ItemMove):
|
|
7
|
+
beforeItemMove(move: ItemMove): (import("@gamepark/rules-api").CustomMove<number> | import("@gamepark/rules-api").CreateItem<number, number, number>)[];
|
|
8
8
|
}
|