@gamepark/mythologies 0.3.1 → 0.4.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/Memory.d.ts +3 -1
- package/dist/Memory.js +2 -0
- package/dist/MythologiesRules.d.ts +11 -0
- package/dist/MythologiesRules.js +11 -0
- package/dist/material/Destiny.d.ts +1 -0
- package/dist/material/Destiny.js +10 -6
- package/dist/material/Entity.d.ts +5 -1
- package/dist/material/Entity.js +1 -1
- package/dist/material/Mythology.js +1 -1
- package/dist/material/Pantheon.d.ts +11 -7
- package/dist/material/Pantheon.js +98 -54
- package/dist/material/entity/Effect.d.ts +29 -14
- package/dist/material/entity/Effect.js +7 -2
- package/dist/material/entity/EntityDescription.d.ts +2 -0
- package/dist/material/entity/EntityDescription.js +6 -3
- package/dist/material/entity/MoveEffectRule.js +29 -1
- package/dist/material/entity/SacrificeEffectRule.d.ts +1 -0
- package/dist/material/entity/SacrificeEffectRule.js +13 -36
- package/dist/material/entity/SimultaneousMoveEffectRule.js +9 -5
- 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/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/Morrigan.js +6 -1
- package/dist/material/entity/chinese/SunWukong.js +1 -1
- package/dist/material/entity/egyptian/Beetle.js +19 -13
- package/dist/material/entity/hindu/Naga.js +36 -30
- package/dist/material/entity/hindu/Vishnu.js +2 -6
- package/dist/material/entity/norse/Troll.js +4 -1
- package/dist/material/entity/zulu/Idlozi.js +7 -1
- package/dist/material/entity/zulu/Impundulu.js +7 -1
- package/dist/material/entity/zulu/Inkanyamba.js +33 -1
- package/dist/material/entity/zulu/Inkosazana.js +7 -1
- package/dist/material/entity/zulu/Shembe.js +38 -1
- package/dist/material/entity/zulu/Tokoloshe.js +41 -1
- package/dist/material/entity/zulu/Umvelinqangi.js +39 -1
- package/dist/material/entity/zulu/Unkulunkulu.js +37 -1
- package/dist/material/entity/zulu/Unwabu.js +43 -1
- package/dist/material/entity/zulu/Werehyena.js +7 -1
- package/dist/rules/DrawDestinyCardRule.js +3 -4
- package/dist/rules/PlaceCardsRule.js +4 -2
- package/dist/rules/RuleId.d.ts +7 -1
- package/dist/rules/RuleId.js +6 -0
- package/dist/rules/effects/AthenaEffectRule.js +29 -1
- package/dist/rules/effects/CentaurEffectRule.js +29 -1
- package/dist/rules/effects/FairyEffectRule.d.ts +10 -0
- package/dist/rules/effects/FairyEffectRule.js +55 -0
- package/dist/rules/effects/IdloziEffectRule.d.ts +9 -0
- package/dist/rules/effects/IdloziEffectRule.js +43 -0
- package/dist/rules/effects/ImpunduluEffectRule.d.ts +7 -0
- package/dist/rules/effects/ImpunduluEffectRule.js +47 -0
- package/dist/rules/effects/InkosazanaEffectRule.d.ts +7 -0
- package/dist/rules/effects/InkosazanaEffectRule.js +46 -0
- package/dist/rules/effects/JiangshiEffectRule.js +5 -2
- 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/ResolveEffectsRule.js +1 -1
- package/dist/rules/effects/ShivaEffectRule.d.ts +1 -1
- package/dist/rules/effects/ShivaEffectRule.js +14 -10
- package/dist/rules/effects/TriggerEffectsRule.d.ts +1 -1
- package/dist/rules/effects/TriggerEffectsRule.js +36 -18
- package/dist/rules/effects/WerehyenaEffectRule.d.ts +11 -0
- package/dist/rules/effects/WerehyenaEffectRule.js +54 -0
- package/package.json +2 -2
package/dist/Memory.d.ts
CHANGED
package/dist/Memory.js
CHANGED
|
@@ -18,4 +18,6 @@ var Memory;
|
|
|
18
18
|
Memory[Memory["YanluoWangCount"] = 16] = "YanluoWangCount";
|
|
19
19
|
Memory[Memory["NuwaPlayerCreatures"] = 17] = "NuwaPlayerCreatures";
|
|
20
20
|
Memory[Memory["TianlongVector"] = 18] = "TianlongVector";
|
|
21
|
+
Memory[Memory["InkosazanaInvoke1"] = 19] = "InkosazanaInvoke1";
|
|
22
|
+
Memory[Memory["FairyTargets"] = 20] = "FairyTargets";
|
|
21
23
|
})(Memory = exports.Memory || (exports.Memory = {}));
|
|
@@ -16,13 +16,17 @@ import { CobraEffectRule, CobraInvokeEffect } from './rules/effects/CobraEffectR
|
|
|
16
16
|
import { CondorEffectRule } from './rules/effects/CondorEffectRule';
|
|
17
17
|
import { CyclopsEffectRule } from './rules/effects/CyclopsEffectRule';
|
|
18
18
|
import { DraugrEffectRule } from './rules/effects/DraugrEffectRule';
|
|
19
|
+
import { FairyEffectRule } from './rules/effects/FairyEffectRule';
|
|
19
20
|
import { FenghuangEffectRule } from './rules/effects/FenghuangEffectRule';
|
|
20
21
|
import { FenrirChoiceRule, FenrirEffectRule } from './rules/effects/FenrirEffectRule';
|
|
21
22
|
import { GarudaEffectRule } from './rules/effects/GarudaEffectRule';
|
|
22
23
|
import { GorgonEffectRule } from './rules/effects/GorgonEffectRule';
|
|
23
24
|
import { GriffinEffectRule } from './rules/effects/GriffinEffectRule';
|
|
24
25
|
import { HadesEffectRule } from './rules/effects/HadesEffectRule';
|
|
26
|
+
import { IdloziEffectRule } from './rules/effects/IdloziEffectRule';
|
|
25
27
|
import { IllapaEffectRule, IllapaSacrificeRule } from './rules/effects/IllapaEffectRule';
|
|
28
|
+
import { ImpunduluEffectRule } from './rules/effects/ImpunduluEffectRule';
|
|
29
|
+
import { InkosazanaEffectRule } from './rules/effects/InkosazanaEffectRule';
|
|
26
30
|
import { JiangshiEffectRule } from './rules/effects/JiangshiEffectRule';
|
|
27
31
|
import { KinnaraEffectRule, KinnaraPlaceEffectRule } from './rules/effects/KinnaraEffectRule';
|
|
28
32
|
import { MinotaurEffectRule } from './rules/effects/MinotaurEffectRule';
|
|
@@ -39,6 +43,7 @@ import { TianlongEffectRule, TianlongOpponentsEffectRule } from './rules/effects
|
|
|
39
43
|
import { UkukuEffectRule, UkukuPlaceEffectRule } from './rules/effects/UkukuEffectRule';
|
|
40
44
|
import { VetalaEffectRule } from './rules/effects/VetalaEffectRule';
|
|
41
45
|
import { ViracochaEffectRule } from './rules/effects/ViracochaEffectRule';
|
|
46
|
+
import { WerehyenaCallEffectRule, WerehyenaEffectRule } from './rules/effects/WerehyenaEffectRule';
|
|
42
47
|
import { YanluoWangEffectRule } from './rules/effects/YanluoWangEffectRule';
|
|
43
48
|
import { EndGameRule } from './rules/EndGameRule';
|
|
44
49
|
import { PlaceCardsRule } from './rules/PlaceCardsRule';
|
|
@@ -95,6 +100,12 @@ export declare class MythologiesRules extends SecretMaterialRules<PlayerColor, M
|
|
|
95
100
|
50: typeof QilinEffectRule;
|
|
96
101
|
51: typeof FenghuangEffectRule;
|
|
97
102
|
52: typeof JiangshiEffectRule;
|
|
103
|
+
53: typeof InkosazanaEffectRule;
|
|
104
|
+
54: typeof ImpunduluEffectRule;
|
|
105
|
+
55: typeof WerehyenaEffectRule;
|
|
106
|
+
56: typeof WerehyenaCallEffectRule;
|
|
107
|
+
57: typeof IdloziEffectRule;
|
|
108
|
+
58: typeof FairyEffectRule;
|
|
98
109
|
};
|
|
99
110
|
locationsStrategies: {
|
|
100
111
|
2: {
|
package/dist/MythologiesRules.js
CHANGED
|
@@ -39,13 +39,17 @@ var CobraEffectRule_1 = require("./rules/effects/CobraEffectRule");
|
|
|
39
39
|
var CondorEffectRule_1 = require("./rules/effects/CondorEffectRule");
|
|
40
40
|
var CyclopsEffectRule_1 = require("./rules/effects/CyclopsEffectRule");
|
|
41
41
|
var DraugrEffectRule_1 = require("./rules/effects/DraugrEffectRule");
|
|
42
|
+
var FairyEffectRule_1 = require("./rules/effects/FairyEffectRule");
|
|
42
43
|
var FenghuangEffectRule_1 = require("./rules/effects/FenghuangEffectRule");
|
|
43
44
|
var FenrirEffectRule_1 = require("./rules/effects/FenrirEffectRule");
|
|
44
45
|
var GarudaEffectRule_1 = require("./rules/effects/GarudaEffectRule");
|
|
45
46
|
var GorgonEffectRule_1 = require("./rules/effects/GorgonEffectRule");
|
|
46
47
|
var GriffinEffectRule_1 = require("./rules/effects/GriffinEffectRule");
|
|
47
48
|
var HadesEffectRule_1 = require("./rules/effects/HadesEffectRule");
|
|
49
|
+
var IdloziEffectRule_1 = require("./rules/effects/IdloziEffectRule");
|
|
48
50
|
var IllapaEffectRule_1 = require("./rules/effects/IllapaEffectRule");
|
|
51
|
+
var ImpunduluEffectRule_1 = require("./rules/effects/ImpunduluEffectRule");
|
|
52
|
+
var InkosazanaEffectRule_1 = require("./rules/effects/InkosazanaEffectRule");
|
|
49
53
|
var JiangshiEffectRule_1 = require("./rules/effects/JiangshiEffectRule");
|
|
50
54
|
var KinnaraEffectRule_1 = require("./rules/effects/KinnaraEffectRule");
|
|
51
55
|
var MinotaurEffectRule_1 = require("./rules/effects/MinotaurEffectRule");
|
|
@@ -63,6 +67,7 @@ var TriggerEffectsRule_1 = require("./rules/effects/TriggerEffectsRule");
|
|
|
63
67
|
var UkukuEffectRule_1 = require("./rules/effects/UkukuEffectRule");
|
|
64
68
|
var VetalaEffectRule_1 = require("./rules/effects/VetalaEffectRule");
|
|
65
69
|
var ViracochaEffectRule_1 = require("./rules/effects/ViracochaEffectRule");
|
|
70
|
+
var WerehyenaEffectRule_1 = require("./rules/effects/WerehyenaEffectRule");
|
|
66
71
|
var YanluoWangEffectRule_1 = require("./rules/effects/YanluoWangEffectRule");
|
|
67
72
|
var EndGameRule_1 = require("./rules/EndGameRule");
|
|
68
73
|
var PlaceCardsRule_1 = require("./rules/PlaceCardsRule");
|
|
@@ -124,6 +129,12 @@ var MythologiesRules = (function (_super) {
|
|
|
124
129
|
_a[RuleId_1.RuleId.QilinEffect] = QilinEffectRule_1.QilinEffectRule,
|
|
125
130
|
_a[RuleId_1.RuleId.FenghuangEffect] = FenghuangEffectRule_1.FenghuangEffectRule,
|
|
126
131
|
_a[RuleId_1.RuleId.JiangshiEffect] = JiangshiEffectRule_1.JiangshiEffectRule,
|
|
132
|
+
_a[RuleId_1.RuleId.InkosazanaEffect] = InkosazanaEffectRule_1.InkosazanaEffectRule,
|
|
133
|
+
_a[RuleId_1.RuleId.ImpunduluEffect] = ImpunduluEffectRule_1.ImpunduluEffectRule,
|
|
134
|
+
_a[RuleId_1.RuleId.WerehyenaEffect] = WerehyenaEffectRule_1.WerehyenaEffectRule,
|
|
135
|
+
_a[RuleId_1.RuleId.WerehyenaCallEffect] = WerehyenaEffectRule_1.WerehyenaCallEffectRule,
|
|
136
|
+
_a[RuleId_1.RuleId.IdloziEffect] = IdloziEffectRule_1.IdloziEffectRule,
|
|
137
|
+
_a[RuleId_1.RuleId.FairyEffect] = FairyEffectRule_1.FairyEffectRule,
|
|
127
138
|
_a);
|
|
128
139
|
_this.locationsStrategies = (_b = {},
|
|
129
140
|
_b[MaterialType_1.MaterialType.EntityCard] = (_c = {},
|
|
@@ -4,6 +4,7 @@ export declare class Destiny extends MaterialRulesPart {
|
|
|
4
4
|
getMythologyBoard(player: PlayerColor): import("@gamepark/rules-api").Material<number, number, number>;
|
|
5
5
|
getMythology(player: PlayerColor): import("./Mythology").Mythology;
|
|
6
6
|
getDestinyMap(destiny: number): PlayerColor[][];
|
|
7
|
+
get cardsWithoutToken(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
7
8
|
getAvailableEntities(player: PlayerColor): import("@gamepark/rules-api").Material<number, number, number>;
|
|
8
9
|
getBoardsWithoutPlayer(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
9
10
|
get creaturesOnTopOfDecks(): import("@gamepark/rules-api").Material<number, number, number>;
|
package/dist/material/Destiny.js
CHANGED
|
@@ -64,14 +64,18 @@ var Destiny = (function (_super) {
|
|
|
64
64
|
throw new Error("Unknown destiny card: ".concat(destiny));
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
|
+
Object.defineProperty(Destiny.prototype, "cardsWithoutToken", {
|
|
68
|
+
get: function () {
|
|
69
|
+
var tokensOnCards = this.material(MaterialType_1.MaterialType.DraftToken).location(LocationType_1.LocationType.OnEntityCard).getItems();
|
|
70
|
+
var cardsWithToken = tokensOnCards.map(function (item) { return item.location.parent; });
|
|
71
|
+
return this.material(MaterialType_1.MaterialType.EntityCard).index(function (index) { return !cardsWithToken.includes(index); });
|
|
72
|
+
},
|
|
73
|
+
enumerable: false,
|
|
74
|
+
configurable: true
|
|
75
|
+
});
|
|
67
76
|
Destiny.prototype.getAvailableEntities = function (player) {
|
|
68
|
-
var tokensOnCards = this.material(MaterialType_1.MaterialType.DraftToken).location(LocationType_1.LocationType.OnEntityCard).getItems();
|
|
69
|
-
var cardsWithToken = tokensOnCards.map(function (item) { return item.location.parent; });
|
|
70
77
|
var mythology = this.getMythologyBoard(player).getIndex();
|
|
71
|
-
return this.
|
|
72
|
-
.location(function (l) { return l.type === LocationType_1.LocationType.SanctuaryGodSpot || l.type === LocationType_1.LocationType.SanctuaryCreatureSpot; })
|
|
73
|
-
.parent(mythology)
|
|
74
|
-
.index(function (index) { return !cardsWithToken.includes(index); });
|
|
78
|
+
return this.cardsWithoutToken.location(function (l) { return l.type === LocationType_1.LocationType.SanctuaryGodSpot || l.type === LocationType_1.LocationType.SanctuaryCreatureSpot; }).parent(mythology);
|
|
75
79
|
};
|
|
76
80
|
Destiny.prototype.getBoardsWithoutPlayer = function () {
|
|
77
81
|
var _this = this;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { MaterialItem } from '../../../../rules-api';
|
|
2
|
+
import { PlayerColor } from '../PlayerColor';
|
|
3
|
+
import { LocationType } from './LocationType';
|
|
1
4
|
import { Mythology } from './Mythology';
|
|
2
5
|
export declare enum Entity {
|
|
3
6
|
Zeus = 1,
|
|
@@ -76,7 +79,7 @@ export declare enum Entity {
|
|
|
76
79
|
Morrigan = 74,
|
|
77
80
|
Kelpie = 75,
|
|
78
81
|
Banshee = 76,
|
|
79
|
-
|
|
82
|
+
Fairy = 77,
|
|
80
83
|
Leprechaun = 78,
|
|
81
84
|
Selkie = 79,
|
|
82
85
|
Dullahan = 80
|
|
@@ -92,6 +95,7 @@ export type EntityId = {
|
|
|
92
95
|
entityType: EntityType;
|
|
93
96
|
};
|
|
94
97
|
};
|
|
98
|
+
export type EntityItem = MaterialItem<PlayerColor, LocationType, EntityId>;
|
|
95
99
|
export declare const getEntityType: (entity: Entity) => EntityType;
|
|
96
100
|
export declare const isGod: (entity?: Entity) => boolean;
|
|
97
101
|
export declare const isCreature: (entity?: Entity) => boolean;
|
package/dist/material/Entity.js
CHANGED
|
@@ -79,7 +79,7 @@ var Entity;
|
|
|
79
79
|
Entity[Entity["Morrigan"] = 74] = "Morrigan";
|
|
80
80
|
Entity[Entity["Kelpie"] = 75] = "Kelpie";
|
|
81
81
|
Entity[Entity["Banshee"] = 76] = "Banshee";
|
|
82
|
-
Entity[Entity["
|
|
82
|
+
Entity[Entity["Fairy"] = 77] = "Fairy";
|
|
83
83
|
Entity[Entity["Leprechaun"] = 78] = "Leprechaun";
|
|
84
84
|
Entity[Entity["Selkie"] = 79] = "Selkie";
|
|
85
85
|
Entity[Entity["Dullahan"] = 80] = "Dullahan";
|
|
@@ -13,7 +13,7 @@ var Mythology;
|
|
|
13
13
|
Mythology[Mythology["Zulu"] = 6] = "Zulu";
|
|
14
14
|
Mythology[Mythology["Celtic"] = 7] = "Celtic";
|
|
15
15
|
})(Mythology = exports.Mythology || (exports.Mythology = {}));
|
|
16
|
-
exports.availableMythologies = (0, rules_api_1.getEnumValues)(Mythology).filter(function (mythology) { return mythology <
|
|
16
|
+
exports.availableMythologies = (0, rules_api_1.getEnumValues)(Mythology).filter(function (mythology) { return mythology < 7; });
|
|
17
17
|
var SanctuarySide;
|
|
18
18
|
(function (SanctuarySide) {
|
|
19
19
|
SanctuarySide[SanctuarySide["Left"] = 0] = "Left";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Material, MaterialGame, MaterialItem, MaterialMove, MaterialRulesPart, MoveItem, XYCoordinates } from '@gamepark/rules-api';
|
|
2
2
|
import { PlayerColor } from '../PlayerColor';
|
|
3
|
-
import { Entity } from './Entity';
|
|
3
|
+
import { Entity, EntityItem } from './Entity';
|
|
4
|
+
import { TriggerEvent } from './entity/Effect';
|
|
4
5
|
export declare class Pantheon extends MaterialRulesPart {
|
|
5
6
|
private player;
|
|
6
7
|
constructor(game: MaterialGame, player: PlayerColor);
|
|
@@ -11,7 +12,7 @@ export declare class Pantheon extends MaterialRulesPart {
|
|
|
11
12
|
private get indexGrid();
|
|
12
13
|
get legalSpacesToInvoke(): XYCoordinates[];
|
|
13
14
|
isLegalSpaceToInvoke(space: XYCoordinates): boolean;
|
|
14
|
-
|
|
15
|
+
getFavorTax(space: XYCoordinates): number;
|
|
15
16
|
get legalSpaces(): XYCoordinates[];
|
|
16
17
|
isLegalSpace({ x, y }: XYCoordinates, grid?: (Entity | undefined)[][]): boolean;
|
|
17
18
|
isFreeSpace({ x, y }: XYCoordinates): boolean;
|
|
@@ -24,9 +25,10 @@ export declare class Pantheon extends MaterialRulesPart {
|
|
|
24
25
|
loseFavor(quantity?: number): import("@gamepark/rules-api").DeleteItem<number>;
|
|
25
26
|
onCardPlaced(move: MoveItem): MaterialMove<number, number, number, number>[];
|
|
26
27
|
get isInvoke(): boolean;
|
|
27
|
-
updateGrid(gridAfter?: (number | null)[][]):
|
|
28
|
-
private
|
|
29
|
-
private
|
|
28
|
+
updateGrid(gridAfter?: (number | null)[][]): TriggerEvent[];
|
|
29
|
+
private getEntitiesMoved;
|
|
30
|
+
private getEntitiesCrushed;
|
|
31
|
+
gainBonus(grid?: (number | null)[][]): MaterialMove<number, number, number, number>[];
|
|
30
32
|
gainLineBonus(y: number): MoveItem<number, number, number>[];
|
|
31
33
|
gainColumnBonus(x: number): MoveItem<number, number, number>[];
|
|
32
34
|
getBonusGem(y: number): Material<number, number, number>;
|
|
@@ -35,9 +37,11 @@ export declare class Pantheon extends MaterialRulesPart {
|
|
|
35
37
|
getInvokeGains(entity: Entity, line: number): MaterialMove<number, number, number, number>[];
|
|
36
38
|
hasEntity(entity: Entity): boolean;
|
|
37
39
|
getPiles(predicate?: (space: XYCoordinates) => boolean): Material[];
|
|
38
|
-
isAbleToMove(entity:
|
|
40
|
+
isAbleToMove(entity: EntityItem): boolean;
|
|
39
41
|
get mythologies(): import("./Mythology").Mythology[];
|
|
40
42
|
get missingMythologies(): import("./Mythology").Mythology[];
|
|
41
|
-
onEntitySacrificed(card: Material):
|
|
43
|
+
onEntitySacrificed(card: Material): void;
|
|
42
44
|
hasCrushed(card: MaterialItem): boolean;
|
|
45
|
+
isOpponentOngoingEffect(): boolean;
|
|
46
|
+
replaceSacrifice(cards: EntityItem[]): Material<number, number, number>;
|
|
43
47
|
}
|
|
@@ -56,6 +56,7 @@ var rules_api_1 = require("@gamepark/rules-api");
|
|
|
56
56
|
var lodash_1 = require("lodash");
|
|
57
57
|
var Memory_1 = require("../Memory");
|
|
58
58
|
var MythologiesRules_1 = require("../MythologiesRules");
|
|
59
|
+
var PermanentEffectsRule_1 = require("../rules/effects/PermanentEffectsRule");
|
|
59
60
|
var TriggerEffectsRule_1 = require("../rules/effects/TriggerEffectsRule");
|
|
60
61
|
var Entity_1 = require("./Entity");
|
|
61
62
|
var Effect_1 = require("./entity/Effect");
|
|
@@ -92,7 +93,7 @@ var Pantheon = (function (_super) {
|
|
|
92
93
|
var allCards = this.material(MaterialType_1.MaterialType.EntityCard).location(LocationType_1.LocationType.Pantheon).player(this.player);
|
|
93
94
|
return allCards.location(function (_a) {
|
|
94
95
|
var x = _a.x, y = _a.y, z = _a.z;
|
|
95
|
-
return z < allCards.location(function (l) { return l.x === x && l.y === y; }).length;
|
|
96
|
+
return z < allCards.location(function (l) { return l.x === x && l.y === y; }).length - 1;
|
|
96
97
|
});
|
|
97
98
|
},
|
|
98
99
|
enumerable: false,
|
|
@@ -128,16 +129,14 @@ var Pantheon = (function (_super) {
|
|
|
128
129
|
configurable: true
|
|
129
130
|
});
|
|
130
131
|
Pantheon.prototype.isLegalSpaceToInvoke = function (space) {
|
|
131
|
-
var trollOpponents = this.getOpponentsWithTrollAt(space);
|
|
132
|
-
return !trollOpponents.length || this.favor >= trollOpponents.length;
|
|
133
|
-
};
|
|
134
|
-
Pantheon.prototype.getOpponentsWithTrollAt = function (_a) {
|
|
135
132
|
var _this = this;
|
|
136
|
-
var
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
133
|
+
var opponents = this.game.players.filter(function (player) { return player !== _this.player; });
|
|
134
|
+
var favorTax = (0, lodash_1.sumBy)(opponents, function (opponent) { return new Pantheon(_this.game, opponent).getFavorTax(space); });
|
|
135
|
+
return this.favor >= favorTax;
|
|
136
|
+
};
|
|
137
|
+
Pantheon.prototype.getFavorTax = function (space) {
|
|
138
|
+
return (0, lodash_1.sumBy)(this.visibleEntities.getItems(), function (card) {
|
|
139
|
+
return (0, lodash_1.sumBy)((0, EntityDescription_1.getEffects)(card.id.front), function (effect) { var _a, _b, _c; return (_c = (_b = (_a = effect).favorTax) === null || _b === void 0 ? void 0 : _b.call(_a, space, card)) !== null && _c !== void 0 ? _c : 0; });
|
|
141
140
|
});
|
|
142
141
|
};
|
|
143
142
|
Object.defineProperty(Pantheon.prototype, "legalSpaces", {
|
|
@@ -154,7 +153,8 @@ var Pantheon = (function (_super) {
|
|
|
154
153
|
Pantheon.prototype.isLegalSpace = function (_a, grid) {
|
|
155
154
|
var x = _a.x, y = _a.y;
|
|
156
155
|
if (grid === void 0) { grid = this.grid; }
|
|
157
|
-
|
|
156
|
+
var card = this.visibleEntities.location(function (l) { return l.x === x && l.y === y; }).getItem();
|
|
157
|
+
return !card || (!(0, Entity_1.isGod)(grid[y][x]) && new PermanentEffectsRule_1.PermanentEffectsRule(this.game).canCrush(card));
|
|
158
158
|
};
|
|
159
159
|
Pantheon.prototype.isFreeSpace = function (_a) {
|
|
160
160
|
var x = _a.x, y = _a.y;
|
|
@@ -206,21 +206,14 @@ var Pantheon = (function (_super) {
|
|
|
206
206
|
}
|
|
207
207
|
var grid = this.indexGrid;
|
|
208
208
|
grid[move.location.y][move.location.x] = move.itemIndex;
|
|
209
|
-
moves.push.apply(moves, __spreadArray([], __read(this.
|
|
209
|
+
moves.push.apply(moves, __spreadArray([], __read(this.gainBonus(grid)), false));
|
|
210
210
|
var triggerEffectsRule = new TriggerEffectsRule_1.TriggerEffectsRule(this.game);
|
|
211
|
-
var crushed = this.allCards.location(function (l) { return l.x === move.location.x && l.y === move.location.y; }).maxBy(function (item) { return item.location.z; });
|
|
212
211
|
triggerEffectsRule.triggerCardEffect(card, { type: Effect_1.TriggerEventType.SelfPlaced, location: location });
|
|
213
|
-
var
|
|
214
|
-
if (
|
|
212
|
+
var triggerEvents = this.updateGrid(grid);
|
|
213
|
+
if (this.isInvoke) {
|
|
215
214
|
moves.push.apply(moves, __spreadArray([], __read(this.onInvoke(move)), false));
|
|
216
|
-
}
|
|
217
|
-
var triggerEvents = [];
|
|
218
|
-
if (invoke) {
|
|
219
215
|
triggerEvents.push({ type: Effect_1.TriggerEventType.EntityInvoked, cardIndex: move.itemIndex, entity: entity, cardLocation: location });
|
|
220
216
|
}
|
|
221
|
-
if (crushed.length) {
|
|
222
|
-
triggerEvents.push({ type: Effect_1.TriggerEventType.EntityCrushed, card: crushed.getItem(), cardIndex: crushed.getIndex() });
|
|
223
|
-
}
|
|
224
217
|
if (triggerEvents.length) {
|
|
225
218
|
triggerEffectsRule.triggerEffects.apply(triggerEffectsRule, __spreadArray([], __read(triggerEvents), false));
|
|
226
219
|
}
|
|
@@ -234,47 +227,80 @@ var Pantheon = (function (_super) {
|
|
|
234
227
|
configurable: true
|
|
235
228
|
});
|
|
236
229
|
Pantheon.prototype.updateGrid = function (gridAfter) {
|
|
237
|
-
var _a;
|
|
230
|
+
var e_1, _a;
|
|
231
|
+
var _b;
|
|
238
232
|
if (gridAfter === void 0) { gridAfter = this.indexGrid; }
|
|
239
|
-
var gridBefore = (
|
|
233
|
+
var gridBefore = (_b = this.remind(Memory_1.Memory.PlayerGrid, this.player)) !== null && _b !== void 0 ? _b : this.indexGrid;
|
|
240
234
|
this.memorize(Memory_1.Memory.PlayerGrid, gridAfter, this.player);
|
|
241
|
-
|
|
242
|
-
|
|
235
|
+
var triggerEvents = [];
|
|
236
|
+
var entitiesMoved = this.getEntitiesMoved(gridBefore, gridAfter);
|
|
237
|
+
if (entitiesMoved.length) {
|
|
238
|
+
triggerEvents.push({ type: Effect_1.TriggerEventType.EntitiesMoved, player: this.player, entities: entitiesMoved });
|
|
239
|
+
}
|
|
240
|
+
var entitiesCrushed = this.getEntitiesCrushed(gridBefore, gridAfter);
|
|
241
|
+
try {
|
|
242
|
+
for (var entitiesCrushed_1 = __values(entitiesCrushed), entitiesCrushed_1_1 = entitiesCrushed_1.next(); !entitiesCrushed_1_1.done; entitiesCrushed_1_1 = entitiesCrushed_1.next()) {
|
|
243
|
+
var cardIndex = entitiesCrushed_1_1.value;
|
|
244
|
+
triggerEvents.push({ type: Effect_1.TriggerEventType.EntityCrushed, card: this.material(MaterialType_1.MaterialType.EntityCard).getItem(cardIndex), cardIndex: cardIndex });
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
248
|
+
finally {
|
|
249
|
+
try {
|
|
250
|
+
if (entitiesCrushed_1_1 && !entitiesCrushed_1_1.done && (_a = entitiesCrushed_1.return)) _a.call(entitiesCrushed_1);
|
|
251
|
+
}
|
|
252
|
+
finally { if (e_1) throw e_1.error; }
|
|
243
253
|
}
|
|
244
254
|
for (var y = 0; y < 3; y++) {
|
|
245
255
|
if (gridBefore[y].some(function (item) { return item === null; }) && gridAfter[y].every(function (item) { return item !== null; })) {
|
|
246
|
-
|
|
256
|
+
triggerEvents.push({ type: Effect_1.TriggerEventType.LineEvent, eventType: Effect_1.LineEventType.Completed, player: this.player, y: y });
|
|
247
257
|
}
|
|
248
258
|
}
|
|
249
259
|
var _loop_1 = function (x) {
|
|
250
260
|
if (gridBefore.some(function (line) { return line[x] === null; }) && gridAfter.every(function (line) { return line[x] !== null; })) {
|
|
251
|
-
|
|
261
|
+
triggerEvents.push({ type: Effect_1.TriggerEventType.ColumnEvent, eventType: Effect_1.LineEventType.Completed, player: this_1.player, x: x });
|
|
252
262
|
}
|
|
253
263
|
};
|
|
254
264
|
var this_1 = this;
|
|
255
265
|
for (var x = 0; x < 3; x++) {
|
|
256
266
|
_loop_1(x);
|
|
257
267
|
}
|
|
258
|
-
return
|
|
268
|
+
return triggerEvents;
|
|
259
269
|
};
|
|
260
|
-
Pantheon.prototype.
|
|
270
|
+
Pantheon.prototype.getEntitiesMoved = function (before, after) {
|
|
271
|
+
var entities = [];
|
|
261
272
|
for (var y = 0; y < 3; y++) {
|
|
262
273
|
var _loop_2 = function (x) {
|
|
263
274
|
var cardIndex = before[y][x];
|
|
264
275
|
if (cardIndex !== null && cardIndex !== after[y][x] && after.some(function (line) { return line.includes(cardIndex); })) {
|
|
265
|
-
|
|
276
|
+
entities.push(cardIndex);
|
|
266
277
|
}
|
|
267
278
|
};
|
|
268
279
|
for (var x = 0; x < 3; x++) {
|
|
269
|
-
|
|
270
|
-
if (typeof state_1 === "object")
|
|
271
|
-
return state_1.value;
|
|
280
|
+
_loop_2(x);
|
|
272
281
|
}
|
|
273
282
|
}
|
|
274
|
-
return
|
|
283
|
+
return entities;
|
|
284
|
+
};
|
|
285
|
+
Pantheon.prototype.getEntitiesCrushed = function (before, after) {
|
|
286
|
+
var entities = [];
|
|
287
|
+
var allCardsIndexes = this.allCards.getIndexes();
|
|
288
|
+
for (var y = 0; y < 3; y++) {
|
|
289
|
+
var _loop_3 = function (x) {
|
|
290
|
+
var cardIndex = before[y][x];
|
|
291
|
+
if (cardIndex !== null && !after.some(function (line) { return line.includes(cardIndex); }) && allCardsIndexes.includes(cardIndex)) {
|
|
292
|
+
entities.push(cardIndex);
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
for (var x = 0; x < 3; x++) {
|
|
296
|
+
_loop_3(x);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
return entities;
|
|
275
300
|
};
|
|
276
301
|
Pantheon.prototype.gainBonus = function (grid) {
|
|
277
|
-
var
|
|
302
|
+
var e_2, _a, e_3, _b;
|
|
303
|
+
if (grid === void 0) { grid = this.indexGrid; }
|
|
278
304
|
var moves = [];
|
|
279
305
|
var fullLines = (0, lodash_1.range)(0, 3).filter(function (y) { return !grid[y].includes(null); });
|
|
280
306
|
try {
|
|
@@ -283,12 +309,12 @@ var Pantheon = (function (_super) {
|
|
|
283
309
|
moves.push.apply(moves, __spreadArray([], __read(this.gainLineBonus(y)), false));
|
|
284
310
|
}
|
|
285
311
|
}
|
|
286
|
-
catch (
|
|
312
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
287
313
|
finally {
|
|
288
314
|
try {
|
|
289
315
|
if (fullLines_1_1 && !fullLines_1_1.done && (_a = fullLines_1.return)) _a.call(fullLines_1);
|
|
290
316
|
}
|
|
291
|
-
finally { if (
|
|
317
|
+
finally { if (e_2) throw e_2.error; }
|
|
292
318
|
}
|
|
293
319
|
var fullColumns = (0, lodash_1.range)(0, 3).filter(function (x) { return grid.every(function (line) { return line[x] !== null; }); });
|
|
294
320
|
try {
|
|
@@ -297,12 +323,12 @@ var Pantheon = (function (_super) {
|
|
|
297
323
|
moves.push.apply(moves, __spreadArray([], __read(this.gainColumnBonus(x)), false));
|
|
298
324
|
}
|
|
299
325
|
}
|
|
300
|
-
catch (
|
|
326
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
301
327
|
finally {
|
|
302
328
|
try {
|
|
303
329
|
if (fullColumns_1_1 && !fullColumns_1_1.done && (_b = fullColumns_1.return)) _b.call(fullColumns_1);
|
|
304
330
|
}
|
|
305
|
-
finally { if (
|
|
331
|
+
finally { if (e_3) throw e_3.error; }
|
|
306
332
|
}
|
|
307
333
|
return moves;
|
|
308
334
|
};
|
|
@@ -327,26 +353,30 @@ var Pantheon = (function (_super) {
|
|
|
327
353
|
.location(function (l) { return l.x === x; });
|
|
328
354
|
};
|
|
329
355
|
Pantheon.prototype.onInvoke = function (move) {
|
|
330
|
-
var
|
|
356
|
+
var e_4, _a;
|
|
331
357
|
var moves = [];
|
|
332
358
|
var card = this.material(MaterialType_1.MaterialType.EntityCard).index(move.itemIndex).getItem();
|
|
333
359
|
var entity = card.id.front;
|
|
334
360
|
if (!entity)
|
|
335
361
|
return [];
|
|
336
|
-
var trollOpponents = this.getOpponentsWithTrollAt(move.location);
|
|
337
362
|
var favor = this.material(MaterialType_1.MaterialType.FavorToken).location(LocationType_1.LocationType.PlayerFavor).player(this.player);
|
|
338
363
|
try {
|
|
339
|
-
for (var
|
|
340
|
-
var
|
|
341
|
-
|
|
364
|
+
for (var _b = __values(this.game.players), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
365
|
+
var player = _c.value;
|
|
366
|
+
if (player !== this.player) {
|
|
367
|
+
var favorTax = new Pantheon(this.game, player).getFavorTax(move.location);
|
|
368
|
+
if (favorTax > 0) {
|
|
369
|
+
moves.push(favor.moveItem({ type: LocationType_1.LocationType.PlayerFavor, player: player }, favorTax));
|
|
370
|
+
}
|
|
371
|
+
}
|
|
342
372
|
}
|
|
343
373
|
}
|
|
344
|
-
catch (
|
|
374
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
345
375
|
finally {
|
|
346
376
|
try {
|
|
347
|
-
if (
|
|
377
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
348
378
|
}
|
|
349
|
-
finally { if (
|
|
379
|
+
finally { if (e_4) throw e_4.error; }
|
|
350
380
|
}
|
|
351
381
|
moves.push.apply(moves, __spreadArray([], __read(this.getInvokeGains(entity, move.location.y)), false));
|
|
352
382
|
return moves;
|
|
@@ -370,8 +400,8 @@ var Pantheon = (function (_super) {
|
|
|
370
400
|
var piles = [];
|
|
371
401
|
var myEntities = this.material(MaterialType_1.MaterialType.EntityCard).player(this.player);
|
|
372
402
|
var fullPantheon = myEntities.location(LocationType_1.LocationType.Pantheon);
|
|
373
|
-
var
|
|
374
|
-
var
|
|
403
|
+
var _loop_4 = function (x) {
|
|
404
|
+
var _loop_5 = function (y) {
|
|
375
405
|
if (predicate({ x: x, y: y })) {
|
|
376
406
|
var pile = fullPantheon.location(function (l) { return l.x === x && l.y === y; }).sort(function (item) { return item.location.z; });
|
|
377
407
|
if (pile.length > 0) {
|
|
@@ -380,16 +410,16 @@ var Pantheon = (function (_super) {
|
|
|
380
410
|
}
|
|
381
411
|
};
|
|
382
412
|
for (var y = 0; y < 3; y++) {
|
|
383
|
-
|
|
413
|
+
_loop_5(y);
|
|
384
414
|
}
|
|
385
415
|
};
|
|
386
416
|
for (var x = 0; x < 3; x++) {
|
|
387
|
-
|
|
417
|
+
_loop_4(x);
|
|
388
418
|
}
|
|
389
419
|
return piles;
|
|
390
420
|
};
|
|
391
421
|
Pantheon.prototype.isAbleToMove = function (entity) {
|
|
392
|
-
return
|
|
422
|
+
return new PermanentEffectsRule_1.PermanentEffectsRule(this.game).canMove(entity);
|
|
393
423
|
};
|
|
394
424
|
Object.defineProperty(Pantheon.prototype, "mythologies", {
|
|
395
425
|
get: function () {
|
|
@@ -409,12 +439,26 @@ var Pantheon = (function (_super) {
|
|
|
409
439
|
configurable: true
|
|
410
440
|
});
|
|
411
441
|
Pantheon.prototype.onEntitySacrificed = function (card) {
|
|
412
|
-
|
|
413
|
-
|
|
442
|
+
var _a;
|
|
443
|
+
var effects = this.updateGrid();
|
|
444
|
+
effects.push({ type: Effect_1.TriggerEventType.EntitySacrificed, card: card.getItem(), cardIndex: card.getIndex() });
|
|
445
|
+
(_a = new TriggerEffectsRule_1.TriggerEffectsRule(this.game)).triggerEffects.apply(_a, __spreadArray([], __read(effects), false));
|
|
414
446
|
};
|
|
415
447
|
Pantheon.prototype.hasCrushed = function (card) {
|
|
416
448
|
return this.allCards.location(function (l) { return l.x === card.location.x && l.y === card.location.y && l.z < card.location.z; }).length > 0;
|
|
417
449
|
};
|
|
450
|
+
Pantheon.prototype.isOpponentOngoingEffect = function () {
|
|
451
|
+
var ongoingEffect = this.remind(Memory_1.Memory.OngoingEffect);
|
|
452
|
+
if (!ongoingEffect)
|
|
453
|
+
return false;
|
|
454
|
+
var effectOwner = this.material(MaterialType_1.MaterialType.EntityCard).getItem(ongoingEffect.cardIndex).location.player;
|
|
455
|
+
return this.player !== effectOwner;
|
|
456
|
+
};
|
|
457
|
+
Pantheon.prototype.replaceSacrifice = function (cards) {
|
|
458
|
+
return this.visibleEntities.filter(function (item) {
|
|
459
|
+
return (0, EntityDescription_1.getEffects)(item.id.front).some(function (effect) { return !(0, Effect_1.isTriggeredEffect)(effect) && cards.some(function (card) { var _a; return (_a = effect.replaceSacrifice) === null || _a === void 0 ? void 0 : _a.call(effect, card, item); }); });
|
|
460
|
+
});
|
|
461
|
+
};
|
|
418
462
|
return Pantheon;
|
|
419
463
|
}(rules_api_1.MaterialRulesPart));
|
|
420
464
|
exports.Pantheon = Pantheon;
|
|
@@ -1,14 +1,21 @@
|
|
|
1
|
-
import { Location, Material, MaterialGame,
|
|
1
|
+
import { Location, Material, MaterialGame, MaterialMove, MaterialRulesPart, PlayerTurnRule, SimultaneousRule, XYCoordinates } from '@gamepark/rules-api';
|
|
2
2
|
import { PlayerColor } from '../../PlayerColor';
|
|
3
3
|
import { RuleId } from '../../rules/RuleId';
|
|
4
|
-
import { Entity, EntityId } from '../Entity';
|
|
5
|
-
|
|
6
|
-
import { MaterialType } from '../MaterialType';
|
|
7
|
-
export type Effect = {
|
|
4
|
+
import { Entity, EntityId, EntityItem } from '../Entity';
|
|
5
|
+
export type TriggeredEffect = {
|
|
8
6
|
trigger: (event: TriggerEvent, card: Material, game: MaterialGame) => boolean;
|
|
9
7
|
rule: new (game: MaterialGame) => EffectRule;
|
|
10
8
|
auto?: boolean;
|
|
11
9
|
};
|
|
10
|
+
export declare const isTriggeredEffect: (effect: Effect) => effect is TriggeredEffect;
|
|
11
|
+
export type PermanentEffect = {
|
|
12
|
+
preventSacrifice?: (card: EntityItem, effectCard: EntityItem) => boolean;
|
|
13
|
+
preventMove?: (card: EntityItem, effectCard: EntityItem) => boolean;
|
|
14
|
+
preventCrush?: (card: EntityItem, effectCard: EntityItem) => boolean;
|
|
15
|
+
replaceSacrifice?: (card: EntityItem, effectCard: EntityItem) => boolean;
|
|
16
|
+
favorTax?: (space: XYCoordinates, card: EntityItem) => number;
|
|
17
|
+
};
|
|
18
|
+
export type Effect = TriggeredEffect | PermanentEffect;
|
|
12
19
|
interface EffectRule {
|
|
13
20
|
canPlayEffect(cardIndex: number): boolean;
|
|
14
21
|
playEffect(): MaterialMove[];
|
|
@@ -18,7 +25,7 @@ export declare abstract class PlayerEffectRule extends PlayerTurnRule implements
|
|
|
18
25
|
ruleId?: RuleId;
|
|
19
26
|
playEffect(): MaterialMove[];
|
|
20
27
|
onRuleStart(): MaterialMove<number, number, number, number>[];
|
|
21
|
-
get card(): MaterialItem<number, number, EntityId>;
|
|
28
|
+
get card(): import("@gamepark/rules-api").MaterialItem<number, number, EntityId>;
|
|
22
29
|
getEffect<Event extends TriggerEvent>(): PendingEffect<Event>;
|
|
23
30
|
endEffect(): MaterialMove[];
|
|
24
31
|
}
|
|
@@ -28,7 +35,7 @@ export declare abstract class SimultaneousEffectRule extends SimultaneousRule im
|
|
|
28
35
|
playEffect(): MaterialMove[];
|
|
29
36
|
getAffectedPlayers(): PlayerColor[];
|
|
30
37
|
isOpponent(player: PlayerColor): boolean;
|
|
31
|
-
get card(): MaterialItem<number, number, EntityId>;
|
|
38
|
+
get card(): import("@gamepark/rules-api").MaterialItem<number, number, EntityId>;
|
|
32
39
|
getEffect<Event extends TriggerEvent>(): PendingEffect<Event>;
|
|
33
40
|
getMovesAfterPlayersDone(): MaterialMove[];
|
|
34
41
|
}
|
|
@@ -36,7 +43,7 @@ export declare abstract class AutoEffectRule extends MaterialRulesPart implement
|
|
|
36
43
|
canPlayEffect: () => boolean;
|
|
37
44
|
abstract playEffect(): MaterialMove[];
|
|
38
45
|
getEffect<Event extends TriggerEvent>(): PendingEffect<Event>;
|
|
39
|
-
get card(): MaterialItem<number, number, EntityId>;
|
|
46
|
+
get card(): import("@gamepark/rules-api").MaterialItem<number, number, EntityId>;
|
|
40
47
|
get player(): PlayerColor;
|
|
41
48
|
}
|
|
42
49
|
export declare enum TriggerEventType {
|
|
@@ -48,7 +55,8 @@ export declare enum TriggerEventType {
|
|
|
48
55
|
Infinite = 6,
|
|
49
56
|
EntityCrushed = 7,
|
|
50
57
|
EntitySacrificed = 8,
|
|
51
|
-
|
|
58
|
+
EntitiesMoved = 9,
|
|
59
|
+
EndOfTurn = 10
|
|
52
60
|
}
|
|
53
61
|
export type SelfPlaced = {
|
|
54
62
|
type: TriggerEventType.SelfPlaced;
|
|
@@ -87,23 +95,30 @@ export type Infinite = {
|
|
|
87
95
|
export declare const oncePerTurn: (event: TriggerEvent) => event is Infinite;
|
|
88
96
|
export type EntityCrushed = {
|
|
89
97
|
type: TriggerEventType.EntityCrushed;
|
|
90
|
-
card:
|
|
98
|
+
card: EntityItem;
|
|
91
99
|
cardIndex: number;
|
|
92
100
|
};
|
|
93
101
|
export declare const isCrushed: (event: TriggerEvent, card: Material) => event is EntityCrushed;
|
|
94
102
|
export type EntitySacrificed = {
|
|
95
103
|
type: TriggerEventType.EntitySacrificed;
|
|
96
|
-
card:
|
|
104
|
+
card: EntityItem;
|
|
97
105
|
cardIndex: number;
|
|
98
106
|
};
|
|
99
107
|
export declare const isSacrificed: (event: TriggerEvent, card: Material) => event is EntityCrushed;
|
|
100
|
-
export type
|
|
101
|
-
type: TriggerEventType.
|
|
108
|
+
export type EntitiesMoved = {
|
|
109
|
+
type: TriggerEventType.EntitiesMoved;
|
|
110
|
+
player: PlayerColor;
|
|
111
|
+
entities: number[];
|
|
112
|
+
};
|
|
113
|
+
export type EndOfTurn = {
|
|
114
|
+
type: TriggerEventType.EndOfTurn;
|
|
102
115
|
player: PlayerColor;
|
|
103
116
|
};
|
|
104
|
-
export
|
|
117
|
+
export declare const isEndOfMyTurn: (event: TriggerEvent, card: Material) => event is EndOfTurn;
|
|
118
|
+
export type TriggerEvent = EndOfGameEvent | SelfPlaced | EntityInvoked | LineEvent | ColumnEvent | Infinite | EntityCrushed | EntitySacrificed | EntitiesMoved | EndOfTurn;
|
|
105
119
|
export type PendingEffect<Event extends TriggerEvent = TriggerEvent> = {
|
|
106
120
|
cardIndex: number;
|
|
121
|
+
effectIndex: number;
|
|
107
122
|
triggerEvent: Event;
|
|
108
123
|
auto: boolean;
|
|
109
124
|
};
|