@gamepark/mythologies 0.12.1 → 0.12.2
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 +2 -2
- package/dist/MythologiesRules.js +2 -2
- package/dist/material/Pantheon.d.ts +5 -5
- package/dist/material/Pantheon.js +19 -19
- package/dist/material/Trial.d.ts +4 -4
- package/dist/material/Trial.js +11 -11
- package/dist/material/entity/Effect.d.ts +5 -5
- package/dist/material/entity/Effect.js +1 -1
- package/dist/material/entity/EntityDescription.d.ts +2 -2
- package/dist/material/entity/PlaceCardEffectRule.d.ts +2 -2
- package/dist/material/entity/PlaceCardEffectRule.js +3 -3
- package/dist/material/entity/celtic/Banshee.js +1 -1
- package/dist/material/entity/celtic/Brigid.js +1 -1
- package/dist/material/entity/celtic/Cernunnos.js +1 -1
- package/dist/material/entity/celtic/Dagda.js +1 -1
- package/dist/material/entity/celtic/Dullahan.js +1 -1
- package/dist/material/entity/celtic/Fairy.js +1 -1
- package/dist/material/entity/celtic/Kelpie.js +1 -1
- package/dist/material/entity/celtic/Leprechaun.js +1 -1
- package/dist/material/entity/celtic/Morrigan.js +1 -1
- package/dist/material/entity/celtic/Selkie.js +1 -1
- package/dist/material/entity/chinese/ChangE.js +1 -1
- package/dist/material/entity/chinese/Fenghuang.js +1 -1
- package/dist/material/entity/chinese/Jiangshi.js +1 -1
- package/dist/material/entity/chinese/Mogwai.js +1 -1
- package/dist/material/entity/chinese/Nian.js +1 -1
- package/dist/material/entity/chinese/Nuwa.js +1 -1
- package/dist/material/entity/chinese/Qilin.js +1 -1
- package/dist/material/entity/chinese/SunWukong.js +1 -1
- package/dist/material/entity/chinese/Tianlong.js +1 -1
- package/dist/material/entity/chinese/YanluoWang.js +1 -1
- package/dist/material/entity/egyptian/Ammit.js +1 -1
- package/dist/material/entity/egyptian/Anubis.js +1 -1
- package/dist/material/entity/egyptian/Beetle.js +1 -1
- package/dist/material/entity/egyptian/Bennu.js +1 -1
- package/dist/material/entity/egyptian/Cobra.js +1 -1
- package/dist/material/entity/egyptian/Isis.js +1 -1
- package/dist/material/entity/egyptian/Mummy.js +1 -1
- package/dist/material/entity/egyptian/Osiris.js +1 -1
- package/dist/material/entity/egyptian/Ra.js +1 -1
- package/dist/material/entity/egyptian/Sphinx.js +1 -1
- package/dist/material/entity/greek/Athena.js +1 -1
- package/dist/material/entity/greek/Centaur.js +1 -1
- package/dist/material/entity/greek/Chimera.js +1 -1
- package/dist/material/entity/greek/Cyclops.js +1 -1
- package/dist/material/entity/greek/Gorgon.js +1 -1
- package/dist/material/entity/greek/Griffin.js +1 -1
- package/dist/material/entity/greek/Hades.js +1 -1
- package/dist/material/entity/greek/Minotaur.js +1 -1
- package/dist/material/entity/greek/Poseidon.js +2 -2
- package/dist/material/entity/greek/Zeus.js +1 -1
- package/dist/material/entity/hindu/Asura.js +1 -1
- package/dist/material/entity/hindu/Brahma.js +1 -1
- package/dist/material/entity/hindu/Ganesh.js +1 -1
- package/dist/material/entity/hindu/Garuda.js +1 -1
- package/dist/material/entity/hindu/Kinnara.js +1 -1
- package/dist/material/entity/hindu/Naga.js +1 -1
- package/dist/material/entity/hindu/Rakshasa.js +1 -1
- package/dist/material/entity/hindu/Shiva.js +1 -1
- package/dist/material/entity/hindu/Vetala.js +1 -1
- package/dist/material/entity/hindu/Vishnu.js +1 -1
- package/dist/material/entity/inca/Amaru.js +1 -1
- package/dist/material/entity/inca/Caiman.js +1 -1
- package/dist/material/entity/inca/Condor.js +1 -1
- package/dist/material/entity/inca/Illapa.js +1 -1
- package/dist/material/entity/inca/Inti.js +1 -1
- package/dist/material/entity/inca/MamaQucha.js +1 -1
- package/dist/material/entity/inca/Puma.js +1 -1
- package/dist/material/entity/inca/Supay.js +1 -1
- package/dist/material/entity/inca/Ukuku.js +1 -1
- package/dist/material/entity/inca/Viracocha.js +1 -1
- package/dist/material/entity/norse/Alf.js +1 -1
- package/dist/material/entity/norse/Draugr.js +1 -1
- package/dist/material/entity/norse/Fenrir.js +1 -1
- package/dist/material/entity/norse/Freya.js +1 -1
- package/dist/material/entity/norse/Jotunn.js +1 -1
- package/dist/material/entity/norse/Loki.js +1 -1
- package/dist/material/entity/norse/Odin.js +1 -1
- package/dist/material/entity/norse/Thor.js +1 -1
- package/dist/material/entity/norse/Troll.js +1 -1
- package/dist/material/entity/norse/Valkyrie.js +1 -1
- package/dist/material/entity/zulu/Idlozi.js +1 -1
- package/dist/material/entity/zulu/Impundulu.js +1 -1
- package/dist/material/entity/zulu/Inkanyamba.js +1 -1
- package/dist/material/entity/zulu/Inkosazana.js +1 -1
- package/dist/material/entity/zulu/Shembe.js +1 -1
- package/dist/material/entity/zulu/Tokoloshe.js +1 -1
- package/dist/material/entity/zulu/Umvelinqangi.js +1 -1
- package/dist/material/entity/zulu/Unkulunkulu.js +2 -2
- package/dist/material/entity/zulu/Unwabu.js +1 -1
- package/dist/material/entity/zulu/Werehyena.js +1 -1
- package/dist/rules/PlaceCardsRule.d.ts +1 -1
- package/dist/rules/PlaceCardsRule.js +4 -4
- package/dist/rules/RuleId.d.ts +1 -1
- package/dist/rules/RuleId.js +1 -1
- package/dist/rules/effects/AmmitEffectRule.d.ts +2 -2
- package/dist/rules/effects/AmmitEffectRule.js +2 -2
- package/dist/rules/effects/AnubisEffectRule.d.ts +2 -2
- package/dist/rules/effects/AnubisEffectRule.js +2 -2
- package/dist/rules/effects/ChimeraEffectRule.d.ts +2 -2
- package/dist/rules/effects/ChimeraEffectRule.js +3 -3
- package/dist/rules/effects/CobraEffectRule.d.ts +3 -3
- package/dist/rules/effects/CobraEffectRule.js +3 -3
- package/dist/rules/effects/CondorEffectRule.js +1 -1
- package/dist/rules/effects/IdloziEffectRule.js +1 -1
- package/dist/rules/effects/ImpunduluEffectRule.d.ts +2 -2
- package/dist/rules/effects/ImpunduluEffectRule.js +2 -2
- package/dist/rules/effects/InkosazanaEffectRule.d.ts +2 -2
- package/dist/rules/effects/InkosazanaEffectRule.js +2 -2
- package/dist/rules/effects/RakshasaEffectRule.js +1 -1
- package/dist/rules/effects/ResolveEffectsRule.js +3 -3
- package/dist/rules/effects/SphinxEffectRule.js +1 -1
- package/dist/rules/effects/VishnuEffectRule.js +1 -1
- package/package.json +2 -2
|
@@ -12,7 +12,7 @@ import { BennuEffectRule } from './rules/effects/BennuEffectRule';
|
|
|
12
12
|
import { CaimanEffectRule } from './rules/effects/CaimanEffectRule';
|
|
13
13
|
import { CentaurEffectRule, CentaurEffectSacrificeRule } from './rules/effects/CentaurEffectRule';
|
|
14
14
|
import { ChimeraEffectRule } from './rules/effects/ChimeraEffectRule';
|
|
15
|
-
import { CobraEffectRule,
|
|
15
|
+
import { CobraEffectRule, CobraSummonEffect } from './rules/effects/CobraEffectRule';
|
|
16
16
|
import { CondorEffectRule } from './rules/effects/CondorEffectRule';
|
|
17
17
|
import { CyclopsEffectRule } from './rules/effects/CyclopsEffectRule';
|
|
18
18
|
import { DraugrEffectRule } from './rules/effects/DraugrEffectRule';
|
|
@@ -83,7 +83,7 @@ export declare class MythologiesRules extends SecretMaterialRules<PlayerColor, M
|
|
|
83
83
|
27: typeof AnubisEffectRule;
|
|
84
84
|
28: typeof SphinxEffectRule;
|
|
85
85
|
29: typeof CobraEffectRule;
|
|
86
|
-
30: typeof
|
|
86
|
+
30: typeof CobraSummonEffect;
|
|
87
87
|
31: typeof AmmitEffectRule;
|
|
88
88
|
32: typeof BennuEffectRule;
|
|
89
89
|
33: typeof VishnuEffectRule;
|
package/dist/MythologiesRules.js
CHANGED
|
@@ -16,7 +16,7 @@ import { BennuEffectRule } from './rules/effects/BennuEffectRule';
|
|
|
16
16
|
import { CaimanEffectRule } from './rules/effects/CaimanEffectRule';
|
|
17
17
|
import { CentaurEffectRule, CentaurEffectSacrificeRule } from './rules/effects/CentaurEffectRule';
|
|
18
18
|
import { ChimeraEffectRule } from './rules/effects/ChimeraEffectRule';
|
|
19
|
-
import { CobraEffectRule,
|
|
19
|
+
import { CobraEffectRule, CobraSummonEffect } from './rules/effects/CobraEffectRule';
|
|
20
20
|
import { CondorEffectRule } from './rules/effects/CondorEffectRule';
|
|
21
21
|
import { CyclopsEffectRule } from './rules/effects/CyclopsEffectRule';
|
|
22
22
|
import { DraugrEffectRule } from './rules/effects/DraugrEffectRule';
|
|
@@ -88,7 +88,7 @@ export class MythologiesRules extends SecretMaterialRules {
|
|
|
88
88
|
[RuleId.AnubisEffect]: AnubisEffectRule,
|
|
89
89
|
[RuleId.SphinxEffect]: SphinxEffectRule,
|
|
90
90
|
[RuleId.CobraEffect]: CobraEffectRule,
|
|
91
|
-
[RuleId.
|
|
91
|
+
[RuleId.CobraSummonEffect]: CobraSummonEffect,
|
|
92
92
|
[RuleId.AmmitEffect]: AmmitEffectRule,
|
|
93
93
|
[RuleId.BennuEffect]: BennuEffectRule,
|
|
94
94
|
[RuleId.VishnuEffect]: VishnuEffectRule,
|
|
@@ -10,8 +10,8 @@ export declare class Pantheon extends MaterialRulesPart {
|
|
|
10
10
|
get coveredEntities(): Material<number, number, number>;
|
|
11
11
|
get grid(): (Entity | undefined)[][];
|
|
12
12
|
private get indexGrid();
|
|
13
|
-
get
|
|
14
|
-
|
|
13
|
+
get legalSpacesToSummon(): XYCoordinates[];
|
|
14
|
+
isLegalSpaceToSummon(space: XYCoordinates): boolean;
|
|
15
15
|
getFavorTax(space: XYCoordinates): number;
|
|
16
16
|
getGemTax(space: XYCoordinates): number;
|
|
17
17
|
get legalSpaces(): XYCoordinates[];
|
|
@@ -25,7 +25,7 @@ export declare class Pantheon extends MaterialRulesPart {
|
|
|
25
25
|
get favor(): number;
|
|
26
26
|
loseFavor(quantity?: number): import("@gamepark/rules-api").DeleteItem<number>;
|
|
27
27
|
onCardPlaced(move: MoveItem): MaterialMove[];
|
|
28
|
-
get
|
|
28
|
+
get isSummon(): boolean;
|
|
29
29
|
updateGrid(gridAfter?: (number | null)[][]): TriggerEvent[];
|
|
30
30
|
private getEntitiesMoved;
|
|
31
31
|
private getEntitiesCrushed;
|
|
@@ -34,8 +34,8 @@ export declare class Pantheon extends MaterialRulesPart {
|
|
|
34
34
|
gainColumnBonus(x: number): MoveItem<number, number, number>[];
|
|
35
35
|
getBonusGem(y: number): Material<number, number, number>;
|
|
36
36
|
getBonusFavor(x: number): Material<number, number, number>;
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
onSummon(move: MoveItem): MaterialMove[];
|
|
38
|
+
getSummonGains(entity: Entity, line: number): MaterialMove[];
|
|
39
39
|
hasEntity(entity: Entity): boolean;
|
|
40
40
|
getPiles(predicate?: (space: XYCoordinates) => boolean): Material[];
|
|
41
41
|
getPile({ x, y }: XYCoordinates, fullPantheon?: Material<number, number, number>): Material;
|
|
@@ -38,10 +38,10 @@ export class Pantheon extends MaterialRulesPart {
|
|
|
38
38
|
return entity.length > 0 ? entity.getIndex() : null;
|
|
39
39
|
}));
|
|
40
40
|
}
|
|
41
|
-
get
|
|
42
|
-
return this.legalSpaces.filter((space) => this.
|
|
41
|
+
get legalSpacesToSummon() {
|
|
42
|
+
return this.legalSpaces.filter((space) => this.isLegalSpaceToSummon(space));
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
isLegalSpaceToSummon(space) {
|
|
45
45
|
const opponents = this.game.players.filter((player) => player !== this.player);
|
|
46
46
|
const favorTax = sumBy(opponents, (opponent) => new Pantheon(this.game, opponent).getFavorTax(space));
|
|
47
47
|
const gemTax = sumBy(opponents, (opponent) => new Pantheon(this.game, opponent).getGemTax(space));
|
|
@@ -101,19 +101,19 @@ export class Pantheon extends MaterialRulesPart {
|
|
|
101
101
|
grid[move.location.y][move.location.x] = move.itemIndex;
|
|
102
102
|
const triggerEffectsRule = new TriggerEffectsRule(this.game);
|
|
103
103
|
triggerEffectsRule.triggerCardEffect(move.itemIndex, location, { type: TriggerEventType.SelfPlaced, crush }, entity);
|
|
104
|
-
const
|
|
105
|
-
if (
|
|
106
|
-
moves.push(...this.
|
|
104
|
+
const summoned = this.isSummon;
|
|
105
|
+
if (summoned) {
|
|
106
|
+
moves.push(...this.onSummon(move));
|
|
107
107
|
}
|
|
108
108
|
const triggerEvents = this.updateGrid(grid);
|
|
109
|
-
triggerEvents.push({ type: TriggerEventType.EntityPlaced, cardIndex: move.itemIndex, entity, location,
|
|
109
|
+
triggerEvents.push({ type: TriggerEventType.EntityPlaced, cardIndex: move.itemIndex, entity, location, summoned: summoned });
|
|
110
110
|
if (triggerEvents.length) {
|
|
111
111
|
triggerEffectsRule.triggerEffects(...triggerEvents);
|
|
112
112
|
}
|
|
113
113
|
return moves;
|
|
114
114
|
}
|
|
115
|
-
get
|
|
116
|
-
return new MythologiesRules(this.game).delegate().
|
|
115
|
+
get isSummon() {
|
|
116
|
+
return new MythologiesRules(this.game).delegate().isSummon;
|
|
117
117
|
}
|
|
118
118
|
updateGrid(gridAfter = this.indexGrid) {
|
|
119
119
|
this.triggerBonusGains(gridAfter);
|
|
@@ -203,7 +203,7 @@ export class Pantheon extends MaterialRulesPart {
|
|
|
203
203
|
.player(this.player)
|
|
204
204
|
.location((l) => l.x === x);
|
|
205
205
|
}
|
|
206
|
-
|
|
206
|
+
onSummon(move) {
|
|
207
207
|
const moves = [];
|
|
208
208
|
const card = this.material(MaterialType.EntityCard).index(move.itemIndex).getItem();
|
|
209
209
|
const entity = card.id.front;
|
|
@@ -223,20 +223,20 @@ export class Pantheon extends MaterialRulesPart {
|
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
|
-
const
|
|
227
|
-
if (
|
|
228
|
-
this.remind(Memory.PendingEffects).unshift({ type: PendingEffectsType.
|
|
226
|
+
const summonGain = entities[entity].summon[move.location.y];
|
|
227
|
+
if (summonGain.favor || summonGain.gem) {
|
|
228
|
+
this.remind(Memory.PendingEffects).unshift({ type: PendingEffectsType.SummonGain, player: this.player, entity, line: move.location.y });
|
|
229
229
|
}
|
|
230
230
|
return moves;
|
|
231
231
|
}
|
|
232
|
-
|
|
232
|
+
getSummonGains(entity, line) {
|
|
233
233
|
const moves = [];
|
|
234
|
-
const
|
|
235
|
-
if (
|
|
236
|
-
moves.push(this.gainGems(
|
|
234
|
+
const summonGain = entities[entity].summon[line];
|
|
235
|
+
if (summonGain.gem) {
|
|
236
|
+
moves.push(this.gainGems(summonGain.gem));
|
|
237
237
|
}
|
|
238
|
-
if (
|
|
239
|
-
moves.push(this.gainFavor(
|
|
238
|
+
if (summonGain.favor) {
|
|
239
|
+
moves.push(this.gainFavor(summonGain.favor));
|
|
240
240
|
}
|
|
241
241
|
return moves;
|
|
242
242
|
}
|
package/dist/material/Trial.d.ts
CHANGED
|
@@ -8,10 +8,10 @@ export declare class Trial extends MaterialRulesPart {
|
|
|
8
8
|
passTrialOnLocation(player: PlayerColor, mythology: Mythology, searchLocation: (location: Partial<XYCoordinates>) => boolean): boolean;
|
|
9
9
|
getPantheon(player: PlayerColor): Pantheon;
|
|
10
10
|
getVisibleEntities(player: PlayerColor, searchLocation?: (location: Partial<XYCoordinates>) => boolean): import("@gamepark/rules-api").Material<number, number, number>;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
haveMoreSummonFavorThanNeighbor(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): boolean;
|
|
12
|
+
getSummonGains(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): import("./entity/EntityDescription").SummonGain[];
|
|
13
|
+
getSummonFavorGain(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): number;
|
|
14
|
+
getSummonGemsGain(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): number;
|
|
15
15
|
noEmptySpace(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): boolean;
|
|
16
16
|
countGods(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): number;
|
|
17
17
|
countCreatures(player: PlayerColor, searchLocation: (location: Partial<XYCoordinates>) => boolean): number;
|
package/dist/material/Trial.js
CHANGED
|
@@ -60,7 +60,7 @@ export class Trial extends MaterialRulesPart {
|
|
|
60
60
|
passTrialOnLocation(player, mythology, searchLocation) {
|
|
61
61
|
switch (mythology) {
|
|
62
62
|
case Mythology.Greek:
|
|
63
|
-
return this.
|
|
63
|
+
return this.haveMoreSummonFavorThanNeighbor(player, searchLocation);
|
|
64
64
|
case Mythology.Norse:
|
|
65
65
|
return this.noEmptySpace(player, searchLocation) && this.countGods(player, searchLocation) >= 1;
|
|
66
66
|
case Mythology.Egyptian:
|
|
@@ -74,7 +74,7 @@ export class Trial extends MaterialRulesPart {
|
|
|
74
74
|
case Mythology.Zulu:
|
|
75
75
|
return uniq(this.getMythologies(player, searchLocation)).length >= 3;
|
|
76
76
|
case Mythology.Celtic:
|
|
77
|
-
return this.
|
|
77
|
+
return this.getSummonGemsGain(player, searchLocation) >= 3;
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
getPantheon(player) {
|
|
@@ -84,20 +84,20 @@ export class Trial extends MaterialRulesPart {
|
|
|
84
84
|
const visibleEntities = this.getPantheon(player).visibleEntities;
|
|
85
85
|
return searchLocation ? visibleEntities.location(searchLocation) : visibleEntities;
|
|
86
86
|
}
|
|
87
|
-
|
|
88
|
-
const favor = this.
|
|
89
|
-
return getNeighbors(player, this.game.players).some((neighbor) => this.
|
|
87
|
+
haveMoreSummonFavorThanNeighbor(player, searchLocation) {
|
|
88
|
+
const favor = this.getSummonFavorGain(player, searchLocation);
|
|
89
|
+
return getNeighbors(player, this.game.players).some((neighbor) => this.getSummonFavorGain(neighbor, searchLocation) < favor);
|
|
90
90
|
}
|
|
91
|
-
|
|
91
|
+
getSummonGains(player, searchLocation) {
|
|
92
92
|
return this.getVisibleEntities(player, searchLocation)
|
|
93
93
|
.getItems()
|
|
94
|
-
.map((item) => entities[item.id.front].
|
|
94
|
+
.map((item) => entities[item.id.front].summon[item.location.y]);
|
|
95
95
|
}
|
|
96
|
-
|
|
97
|
-
return sumBy(this.
|
|
96
|
+
getSummonFavorGain(player, searchLocation) {
|
|
97
|
+
return sumBy(this.getSummonGains(player, searchLocation), (gain) => gain.favor ?? 0);
|
|
98
98
|
}
|
|
99
|
-
|
|
100
|
-
return sumBy(this.
|
|
99
|
+
getSummonGemsGain(player, searchLocation) {
|
|
100
|
+
return sumBy(this.getSummonGains(player, searchLocation), (gain) => gain.gem ?? 0);
|
|
101
101
|
}
|
|
102
102
|
noEmptySpace(player, searchLocation) {
|
|
103
103
|
return this.getPantheon(player).grid.every((line, y) => line.every((space, x) => space !== undefined || !searchLocation({ x, y })));
|
|
@@ -51,7 +51,7 @@ export type EntityPlaced = {
|
|
|
51
51
|
cardIndex: number;
|
|
52
52
|
entity: Entity;
|
|
53
53
|
location: Location;
|
|
54
|
-
|
|
54
|
+
summoned: boolean;
|
|
55
55
|
};
|
|
56
56
|
export declare const isPlaced: (event: TriggerEvent) => event is SelfPlaced;
|
|
57
57
|
export declare const isPlacedCrush: (event: TriggerEvent) => event is SelfPlaced;
|
|
@@ -98,10 +98,10 @@ export type EndOfTurn = {
|
|
|
98
98
|
};
|
|
99
99
|
export declare const isEndOfMyTurn: (event: TriggerEvent, { cardLocation }: TriggerEventContext) => event is EndOfTurn;
|
|
100
100
|
export type TriggerEvent = EndOfGameEvent | SelfPlaced | EntityPlaced | LineEvent | ColumnEvent | Infinite | EntityCrushed | EntitySacrificed | EntitiesMoved | EndOfTurn;
|
|
101
|
-
export type PlayerPendingEffects<Event extends TriggerEvent = TriggerEvent> = PlayerPendingCardsEffects<Event> |
|
|
101
|
+
export type PlayerPendingEffects<Event extends TriggerEvent = TriggerEvent> = PlayerPendingCardsEffects<Event> | SummonGainEffect | BonusGainEffects;
|
|
102
102
|
export declare enum PendingEffectsType {
|
|
103
103
|
CardsEffects = 1,
|
|
104
|
-
|
|
104
|
+
SummonGain = 2,
|
|
105
105
|
BonusGains = 3
|
|
106
106
|
}
|
|
107
107
|
export type PlayerPendingCardsEffects<Event extends TriggerEvent = TriggerEvent> = {
|
|
@@ -116,8 +116,8 @@ export type CardEffect<Event extends TriggerEvent = TriggerEvent> = {
|
|
|
116
116
|
auto: boolean;
|
|
117
117
|
count?: number;
|
|
118
118
|
};
|
|
119
|
-
export type
|
|
120
|
-
type: PendingEffectsType.
|
|
119
|
+
export type SummonGainEffect = {
|
|
120
|
+
type: PendingEffectsType.SummonGain;
|
|
121
121
|
player: PlayerColor;
|
|
122
122
|
entity: Entity;
|
|
123
123
|
line: number;
|
|
@@ -27,6 +27,6 @@ export const isEndOfMyTurn = (event, { cardLocation }) => event.type === Trigger
|
|
|
27
27
|
export var PendingEffectsType;
|
|
28
28
|
(function (PendingEffectsType) {
|
|
29
29
|
PendingEffectsType[PendingEffectsType["CardsEffects"] = 1] = "CardsEffects";
|
|
30
|
-
PendingEffectsType[PendingEffectsType["
|
|
30
|
+
PendingEffectsType[PendingEffectsType["SummonGain"] = 2] = "SummonGain";
|
|
31
31
|
PendingEffectsType[PendingEffectsType["BonusGains"] = 3] = "BonusGains";
|
|
32
32
|
})(PendingEffectsType || (PendingEffectsType = {}));
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Entity } from '../Entity';
|
|
2
2
|
import { Effect } from './Effect';
|
|
3
3
|
export type EntityDescription = {
|
|
4
|
-
|
|
4
|
+
summon: [SummonGain, SummonGain, SummonGain];
|
|
5
5
|
effect?: Effect;
|
|
6
6
|
effects?: Effect[];
|
|
7
7
|
};
|
|
8
8
|
export declare const getEffects: (entity?: Entity) => Effect[];
|
|
9
|
-
export type
|
|
9
|
+
export type SummonGain = {
|
|
10
10
|
gem?: number;
|
|
11
11
|
favor?: number;
|
|
12
12
|
};
|
|
@@ -11,7 +11,7 @@ export declare abstract class PlaceCardEffectRule extends PlayerEffectRule {
|
|
|
11
11
|
beforeItemMove(move: ItemMove): MaterialMove[];
|
|
12
12
|
onCardPlaced(move: MoveItem): MaterialMove[];
|
|
13
13
|
}
|
|
14
|
-
export declare abstract class
|
|
15
|
-
|
|
14
|
+
export declare abstract class SummonEffectRule extends PlaceCardEffectRule {
|
|
15
|
+
isSummon: boolean;
|
|
16
16
|
getAvailableDestinations(): XYCoordinates[];
|
|
17
17
|
}
|
|
@@ -50,9 +50,9 @@ export class PlaceCardEffectRule extends PlayerEffectRule {
|
|
|
50
50
|
return moves;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
export class
|
|
54
|
-
|
|
53
|
+
export class SummonEffectRule extends PlaceCardEffectRule {
|
|
54
|
+
isSummon = true;
|
|
55
55
|
getAvailableDestinations() {
|
|
56
|
-
return new Pantheon(this.game, this.player).
|
|
56
|
+
return new Pantheon(this.game, this.player).legalSpacesToSummon;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
@@ -2,7 +2,7 @@ import { Pantheon } from '../../Pantheon';
|
|
|
2
2
|
import { AutoEffectRule } from '../AutoEffectRule';
|
|
3
3
|
import { isPlaced } from '../Effect';
|
|
4
4
|
export const Banshee = {
|
|
5
|
-
|
|
5
|
+
summon: [{ gem: 1 }, {}, { favor: 1 }],
|
|
6
6
|
effect: {
|
|
7
7
|
trigger: isPlaced,
|
|
8
8
|
rule: class BansheeEffectRule extends AutoEffectRule {
|
|
@@ -3,7 +3,7 @@ import { Pantheon } from '../../Pantheon';
|
|
|
3
3
|
import { isPlaced } from '../Effect';
|
|
4
4
|
import { PlayerEffectRule } from '../PlayerEffectRule';
|
|
5
5
|
export const Brigid = {
|
|
6
|
-
|
|
6
|
+
summon: [{ favor: 2 }, { gem: 2 }, {}],
|
|
7
7
|
effect: {
|
|
8
8
|
trigger: isPlaced,
|
|
9
9
|
rule: class BrigidEffectRule extends PlayerEffectRule {
|
|
@@ -2,7 +2,7 @@ import { Pantheon } from '../../Pantheon';
|
|
|
2
2
|
import { isEndOfGame } from '../Effect';
|
|
3
3
|
import { PlayerEffectRule } from '../PlayerEffectRule';
|
|
4
4
|
export const Cernunnos = {
|
|
5
|
-
|
|
5
|
+
summon: [{}, { favor: 1 }, { gem: 2 }],
|
|
6
6
|
effect: {
|
|
7
7
|
trigger: isEndOfGame,
|
|
8
8
|
rule: class CernunnosEffectRule extends PlayerEffectRule {
|
|
@@ -2,7 +2,7 @@ import { Pantheon } from '../../Pantheon';
|
|
|
2
2
|
import { AutoEffectRule } from '../AutoEffectRule';
|
|
3
3
|
import { TriggerEventType } from '../Effect';
|
|
4
4
|
export const Dagda = {
|
|
5
|
-
|
|
5
|
+
summon: [{ gem: 2, favor: 1 }, { favor: 2 }, {}],
|
|
6
6
|
effect: {
|
|
7
7
|
trigger: (event, { cardLocation, game }) => {
|
|
8
8
|
const player = cardLocation.player;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DullahanEffectRule } from '../../../rules/effects/DullahanEffectRule';
|
|
2
2
|
import { isPlaced } from '../Effect';
|
|
3
3
|
export const Dullahan = {
|
|
4
|
-
|
|
4
|
+
summon: [{ gem: 1 }, {}, { gem: 1, favor: 1 }],
|
|
5
5
|
effect: {
|
|
6
6
|
trigger: isPlaced,
|
|
7
7
|
rule: DullahanEffectRule
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FairyEffectRule } from '../../../rules/effects/FairyEffectRule';
|
|
2
2
|
import { isPlaced } from '../Effect';
|
|
3
3
|
export const Fairy = {
|
|
4
|
-
|
|
4
|
+
summon: [{ favor: 1 }, { gem: 1 }, {}],
|
|
5
5
|
effect: {
|
|
6
6
|
trigger: isPlaced,
|
|
7
7
|
rule: FairyEffectRule
|
|
@@ -2,7 +2,7 @@ import { Pantheon } from '../../Pantheon';
|
|
|
2
2
|
import { AutoEffectRule } from '../AutoEffectRule';
|
|
3
3
|
import { isPlaced } from '../Effect';
|
|
4
4
|
export const Kelpie = {
|
|
5
|
-
|
|
5
|
+
summon: [{}, { gem: 1, favor: 1 }, { favor: 1 }],
|
|
6
6
|
effect: {
|
|
7
7
|
trigger: isPlaced,
|
|
8
8
|
rule: class KelpieEffectRule extends AutoEffectRule {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LeprechaunEffectRule } from '../../../rules/effects/LeprechaunEffectRule';
|
|
2
2
|
import { oncePerTurn } from '../Effect';
|
|
3
3
|
export const Leprechaun = {
|
|
4
|
-
|
|
4
|
+
summon: [{}, { favor: 1 }, {}],
|
|
5
5
|
effect: {
|
|
6
6
|
trigger: oncePerTurn,
|
|
7
7
|
rule: LeprechaunEffectRule
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const Morrigan = {
|
|
2
|
-
|
|
2
|
+
summon: [{ favor: 1 }, {}, { favor: 2 }],
|
|
3
3
|
effect: {
|
|
4
4
|
preventSacrifice: (card, effectCard) => card.location.y === effectCard.location.y,
|
|
5
5
|
preventMove: (card, effectCard) => card.location.y === effectCard.location.y,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SelkieEffectRule } from '../../../rules/effects/SelkieEffectRule';
|
|
2
2
|
import { isSacrificed } from '../Effect';
|
|
3
3
|
export const Selkie = {
|
|
4
|
-
|
|
4
|
+
summon: [{}, { gem: 2 }, { gem: 1 }],
|
|
5
5
|
effects: [
|
|
6
6
|
{
|
|
7
7
|
sacrificeInsteadOfMove: true
|
|
@@ -2,7 +2,7 @@ import { FenghuangEffectRule } from '../../../rules/effects/FenghuangEffectRule'
|
|
|
2
2
|
import { PlaceCardsRule } from '../../../rules/PlaceCardsRule';
|
|
3
3
|
import { isCrushed, isSacrificed } from '../Effect';
|
|
4
4
|
export const Fenghuang = {
|
|
5
|
-
|
|
5
|
+
summon: [{ favor: 1 }, {}, { gem: 1 }],
|
|
6
6
|
effect: {
|
|
7
7
|
trigger: (event, context) => (isCrushed(event, context) || isSacrificed(event, context)) && new PlaceCardsRule(context.game).isOncePerTurnAvailable(context.cardIndex),
|
|
8
8
|
rule: FenghuangEffectRule
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { JiangshiEffectRule } from '../../../rules/effects/JiangshiEffectRule';
|
|
2
2
|
import { isPlaced } from '../Effect';
|
|
3
3
|
export const Jiangshi = {
|
|
4
|
-
|
|
4
|
+
summon: [{ gem: 1 }, {}, { favor: 1 }],
|
|
5
5
|
effect: {
|
|
6
6
|
trigger: isPlaced,
|
|
7
7
|
rule: JiangshiEffectRule
|
|
@@ -2,7 +2,7 @@ import { Pantheon } from '../../Pantheon';
|
|
|
2
2
|
import { AutoEffectRule } from '../AutoEffectRule';
|
|
3
3
|
import { LineEventType, TriggerEventType } from '../Effect';
|
|
4
4
|
export const Mogwai = {
|
|
5
|
-
|
|
5
|
+
summon: [{}, { favor: 1 }, { gem: 1 }],
|
|
6
6
|
effect: {
|
|
7
7
|
trigger: (event, { cardLocation }) => (event.type === TriggerEventType.LineEvent && event.eventType === LineEventType.Completed && cardLocation.y === event.y) ||
|
|
8
8
|
(event.type === TriggerEventType.ColumnEvent && event.eventType === LineEventType.Completed && cardLocation.x === event.x),
|
|
@@ -3,7 +3,7 @@ import { Pantheon } from '../../Pantheon';
|
|
|
3
3
|
import { isPlaced } from '../Effect';
|
|
4
4
|
import { PlayerEffectRule } from '../PlayerEffectRule';
|
|
5
5
|
export const Nian = {
|
|
6
|
-
|
|
6
|
+
summon: [{}, { favor: 1 }, { gem: 1, favor: 1 }],
|
|
7
7
|
effect: {
|
|
8
8
|
trigger: isPlaced,
|
|
9
9
|
rule: class NianEffectRule extends PlayerEffectRule {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NuwaEffectRule } from '../../../rules/effects/NuwaEffectRule';
|
|
2
2
|
import { isPlaced } from '../Effect';
|
|
3
3
|
export const Nuwa = {
|
|
4
|
-
|
|
4
|
+
summon: [{ favor: 1 }, { favor: 1 }, {}],
|
|
5
5
|
effect: {
|
|
6
6
|
trigger: isPlaced,
|
|
7
7
|
rule: NuwaEffectRule
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { QilinEffectRule } from '../../../rules/effects/QilinEffectRule';
|
|
2
2
|
import { isPlaced } from '../Effect';
|
|
3
3
|
export const Qilin = {
|
|
4
|
-
|
|
4
|
+
summon: [{}, { gem: 1 }, { favor: 1 }],
|
|
5
5
|
effect: {
|
|
6
6
|
trigger: isPlaced,
|
|
7
7
|
rule: QilinEffectRule
|
|
@@ -3,7 +3,7 @@ import { Pantheon } from '../../Pantheon';
|
|
|
3
3
|
import { AutoEffectRule } from '../AutoEffectRule';
|
|
4
4
|
import { TriggerEventType } from '../Effect';
|
|
5
5
|
export const SunWukong = {
|
|
6
|
-
|
|
6
|
+
summon: [{ gem: 1 }, { favor: 2 }, { gem: 1 }],
|
|
7
7
|
effect: {
|
|
8
8
|
trigger: (effect, { cardLocation, game }) => effect.type === TriggerEventType.EntitiesMoved && areNeighbors(effect.player, cardLocation.player, game.players),
|
|
9
9
|
rule: class SunWukongEffectRule extends AutoEffectRule {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TianlongEffectRule } from '../../../rules/effects/TianlongEffectRule';
|
|
2
2
|
import { isPlaced } from '../Effect';
|
|
3
3
|
export const Tianlong = {
|
|
4
|
-
|
|
4
|
+
summon: [{ gem: 2 }, { favor: 1 }, {}],
|
|
5
5
|
effect: {
|
|
6
6
|
trigger: isPlaced,
|
|
7
7
|
rule: TianlongEffectRule
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { YanluoWangEffectRule } from '../../../rules/effects/YanluoWangEffectRule';
|
|
2
2
|
import { isEndOfGame } from '../Effect';
|
|
3
3
|
export const YanluoWang = {
|
|
4
|
-
|
|
4
|
+
summon: [{}, {}, { favor: 2 }],
|
|
5
5
|
effect: {
|
|
6
6
|
trigger: isEndOfGame,
|
|
7
7
|
rule: YanluoWangEffectRule
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AnubisEffectRule } from '../../../rules/effects/AnubisEffectRule';
|
|
2
2
|
import { isPlaced } from '../Effect';
|
|
3
3
|
export const Anubis = {
|
|
4
|
-
|
|
4
|
+
summon: [{}, {}, { favor: 2 }],
|
|
5
5
|
effect: {
|
|
6
6
|
trigger: isPlaced,
|
|
7
7
|
rule: AnubisEffectRule
|
|
@@ -3,7 +3,7 @@ import { Pantheon } from '../../Pantheon';
|
|
|
3
3
|
import { isSacrificed } from '../Effect';
|
|
4
4
|
import { PlayerEffectRule } from '../PlayerEffectRule';
|
|
5
5
|
export const Beetle = {
|
|
6
|
-
|
|
6
|
+
summon: [{ favor: 1 }, { gem: 1 }, {}],
|
|
7
7
|
effects: [
|
|
8
8
|
{
|
|
9
9
|
replaceSacrifice: (card) => isCreature(card.id.front)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BennuEffectRule } from '../../../rules/effects/BennuEffectRule';
|
|
2
2
|
import { isCrushed } from '../Effect';
|
|
3
3
|
export const Bennu = {
|
|
4
|
-
|
|
4
|
+
summon: [{ favor: 1 }, {}, { gem: 1 }],
|
|
5
5
|
effect: {
|
|
6
6
|
trigger: isCrushed,
|
|
7
7
|
rule: BennuEffectRule
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CobraEffectRule } from '../../../rules/effects/CobraEffectRule';
|
|
2
2
|
import { isPlaced } from '../Effect';
|
|
3
3
|
export const Cobra = {
|
|
4
|
-
|
|
4
|
+
summon: [{}, { gem: 1 }, { gem: 1 }],
|
|
5
5
|
effect: {
|
|
6
6
|
trigger: isPlaced,
|
|
7
7
|
rule: CobraEffectRule
|
|
@@ -3,7 +3,7 @@ import { Pantheon } from '../../Pantheon';
|
|
|
3
3
|
import { TriggerEventType } from '../Effect';
|
|
4
4
|
import { PlayerEffectRule } from '../PlayerEffectRule';
|
|
5
5
|
export const Isis = {
|
|
6
|
-
|
|
6
|
+
summon: [{ gem: 2 }, { gem: 2, favor: 1 }, {}],
|
|
7
7
|
effect: {
|
|
8
8
|
trigger: (event, { cardLocation, game }) => event.type === TriggerEventType.EntityCrushed && areNeighbors(cardLocation.player, event.card.location.player, game.players),
|
|
9
9
|
rule: class IsisEffectRule extends PlayerEffectRule {
|
|
@@ -2,7 +2,7 @@ import { Pantheon } from '../../Pantheon';
|
|
|
2
2
|
import { isPlaced } from '../Effect';
|
|
3
3
|
import { PlayerEffectRule } from '../PlayerEffectRule';
|
|
4
4
|
export const Mummy = {
|
|
5
|
-
|
|
5
|
+
summon: [{}, { gem: 1 }, { favor: 1 }],
|
|
6
6
|
effect: {
|
|
7
7
|
trigger: isPlaced,
|
|
8
8
|
rule: class MummyEffectRule extends PlayerEffectRule {
|
|
@@ -5,7 +5,7 @@ import { Pantheon } from '../../Pantheon';
|
|
|
5
5
|
import { isEndOfGame } from '../Effect';
|
|
6
6
|
import { PlayerEffectRule } from '../PlayerEffectRule';
|
|
7
7
|
export const Osiris = {
|
|
8
|
-
|
|
8
|
+
summon: [{}, { gem: 2 }, { favor: 1 }],
|
|
9
9
|
effect: {
|
|
10
10
|
trigger: isEndOfGame,
|
|
11
11
|
rule: class OsirisEffectRule extends PlayerEffectRule {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SphinxEffectRule } from '../../../rules/effects/SphinxEffectRule';
|
|
2
2
|
import { isPlaced } from '../Effect';
|
|
3
3
|
export const Sphinx = {
|
|
4
|
-
|
|
4
|
+
summon: [{ gem: 1 }, { gem: 1, favor: 1 }, {}],
|
|
5
5
|
effect: {
|
|
6
6
|
trigger: isPlaced,
|
|
7
7
|
rule: SphinxEffectRule
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AthenaEffectRule } from '../../../rules/effects/AthenaEffectRule';
|
|
2
2
|
import { isPlaced } from '../Effect';
|
|
3
3
|
export const Athena = {
|
|
4
|
-
|
|
4
|
+
summon: [{}, { favor: 1 }, {}],
|
|
5
5
|
effect: {
|
|
6
6
|
trigger: isPlaced,
|
|
7
7
|
rule: AthenaEffectRule
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CentaurEffectRule } from '../../../rules/effects/CentaurEffectRule';
|
|
2
2
|
import { isPlaced } from '../Effect';
|
|
3
3
|
export const Centaur = {
|
|
4
|
-
|
|
4
|
+
summon: [{ favor: 1 }, { gem: 1 }, {}],
|
|
5
5
|
effect: {
|
|
6
6
|
trigger: isPlaced,
|
|
7
7
|
rule: CentaurEffectRule
|