@gamepark/mythologies 0.12.3 → 0.12.5
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 +3 -3
- package/dist/MythologiesRules.js +2 -2
- package/dist/material/Entity.d.ts +4 -4
- package/dist/material/Entity.js +4 -4
- package/dist/material/LocationType.d.ts +3 -1
- package/dist/material/LocationType.js +2 -0
- package/dist/material/Pantheon.js +1 -3
- package/dist/material/entity/EntityDescription.js +8 -8
- package/dist/material/entity/egyptian/Ammout.d.ts +2 -0
- package/dist/material/entity/egyptian/Ammout.js +9 -0
- package/dist/material/entity/egyptian/Scarab.d.ts +2 -0
- package/dist/material/entity/egyptian/Scarab.js +20 -0
- package/dist/material/entity/hindu/Ganesha.d.ts +2 -0
- package/dist/material/entity/hindu/Ganesha.js +18 -0
- package/dist/material/entity/inca/Mamacocha.d.ts +2 -0
- package/dist/material/entity/inca/Mamacocha.js +20 -0
- package/dist/rules/RuleId.d.ts +1 -1
- package/dist/rules/RuleId.js +1 -1
- package/dist/rules/effects/AmmoutEffectRule.d.ts +6 -0
- package/dist/rules/effects/AmmoutEffectRule.js +15 -0
- package/dist/rules/effects/DullahanEffectRule.js +3 -5
- package/dist/rules/effects/ResolveEffectsRule.d.ts +2 -2
- package/dist/rules/effects/ResolveEffectsRule.js +9 -4
- package/package.json +5 -5
|
@@ -5,7 +5,7 @@ import { PlayerColor } from './PlayerColor';
|
|
|
5
5
|
import { ChooseDraftTokenRule } from './rules/ChooseDraftTokenRule';
|
|
6
6
|
import { DrawDestinyCardRule } from './rules/DrawDestinyCardRule';
|
|
7
7
|
import { AlfEffectRule } from './rules/effects/AlfEffectRule';
|
|
8
|
-
import {
|
|
8
|
+
import { AmmoutEffectRule } from './rules/effects/AmmoutEffectRule';
|
|
9
9
|
import { AnubisEffectRule } from './rules/effects/AnubisEffectRule';
|
|
10
10
|
import { AthenaEffectRule } from './rules/effects/AthenaEffectRule';
|
|
11
11
|
import { BennuEffectRule } from './rules/effects/BennuEffectRule';
|
|
@@ -84,7 +84,7 @@ export declare class MythologiesRules extends SecretMaterialRules<PlayerColor, M
|
|
|
84
84
|
28: typeof SphinxEffectRule;
|
|
85
85
|
29: typeof CobraEffectRule;
|
|
86
86
|
30: typeof CobraSummonEffect;
|
|
87
|
-
31: typeof
|
|
87
|
+
31: typeof AmmoutEffectRule;
|
|
88
88
|
32: typeof BennuEffectRule;
|
|
89
89
|
33: typeof VishnuEffectRule;
|
|
90
90
|
34: typeof ShivaEffectRule;
|
|
@@ -143,7 +143,7 @@ export declare class MythologiesRules extends SecretMaterialRules<PlayerColor, M
|
|
|
143
143
|
6: (item: MaterialItem, player?: PlayerColor) => string[];
|
|
144
144
|
};
|
|
145
145
|
4: {
|
|
146
|
-
5: import("@gamepark/rules-api").HidingStrategy
|
|
146
|
+
5: import("@gamepark/rules-api").HidingStrategy<number, number>;
|
|
147
147
|
17: (item: MaterialItem) => string[];
|
|
148
148
|
};
|
|
149
149
|
10: {
|
package/dist/MythologiesRules.js
CHANGED
|
@@ -9,7 +9,7 @@ import { Memory } from './Memory';
|
|
|
9
9
|
import { ChooseDraftTokenRule } from './rules/ChooseDraftTokenRule';
|
|
10
10
|
import { DrawDestinyCardRule } from './rules/DrawDestinyCardRule';
|
|
11
11
|
import { AlfEffectRule } from './rules/effects/AlfEffectRule';
|
|
12
|
-
import {
|
|
12
|
+
import { AmmoutEffectRule } from './rules/effects/AmmoutEffectRule';
|
|
13
13
|
import { AnubisEffectRule } from './rules/effects/AnubisEffectRule';
|
|
14
14
|
import { AthenaEffectRule } from './rules/effects/AthenaEffectRule';
|
|
15
15
|
import { BennuEffectRule } from './rules/effects/BennuEffectRule';
|
|
@@ -89,7 +89,7 @@ export class MythologiesRules extends SecretMaterialRules {
|
|
|
89
89
|
[RuleId.SphinxEffect]: SphinxEffectRule,
|
|
90
90
|
[RuleId.CobraEffect]: CobraEffectRule,
|
|
91
91
|
[RuleId.CobraSummonEffect]: CobraSummonEffect,
|
|
92
|
-
[RuleId.
|
|
92
|
+
[RuleId.AmmoutEffect]: AmmoutEffectRule,
|
|
93
93
|
[RuleId.BennuEffect]: BennuEffectRule,
|
|
94
94
|
[RuleId.VishnuEffect]: VishnuEffectRule,
|
|
95
95
|
[RuleId.ShivaEffect]: ShivaEffectRule,
|
|
@@ -27,16 +27,16 @@ export declare enum Entity {
|
|
|
27
27
|
Osiris = 22,
|
|
28
28
|
Anubis = 23,
|
|
29
29
|
Isis = 24,
|
|
30
|
-
|
|
30
|
+
Scarab = 25,
|
|
31
31
|
Mummy = 26,
|
|
32
32
|
Sphinx = 27,
|
|
33
33
|
Cobra = 28,
|
|
34
|
-
|
|
34
|
+
Ammout = 29,
|
|
35
35
|
Bennu = 30,
|
|
36
36
|
Brahma = 31,
|
|
37
37
|
Vishnu = 32,
|
|
38
38
|
Shiva = 33,
|
|
39
|
-
|
|
39
|
+
Ganesha = 34,
|
|
40
40
|
Asura = 35,
|
|
41
41
|
Naga = 36,
|
|
42
42
|
Rakshasa = 37,
|
|
@@ -44,7 +44,7 @@ export declare enum Entity {
|
|
|
44
44
|
Vetala = 39,
|
|
45
45
|
Kinnara = 40,
|
|
46
46
|
Viracocha = 41,
|
|
47
|
-
|
|
47
|
+
Mamacocha = 42,
|
|
48
48
|
Illapa = 43,
|
|
49
49
|
Inti = 44,
|
|
50
50
|
Puma = 45,
|
package/dist/material/Entity.js
CHANGED
|
@@ -24,16 +24,16 @@ export var Entity;
|
|
|
24
24
|
Entity[Entity["Osiris"] = 22] = "Osiris";
|
|
25
25
|
Entity[Entity["Anubis"] = 23] = "Anubis";
|
|
26
26
|
Entity[Entity["Isis"] = 24] = "Isis";
|
|
27
|
-
Entity[Entity["
|
|
27
|
+
Entity[Entity["Scarab"] = 25] = "Scarab";
|
|
28
28
|
Entity[Entity["Mummy"] = 26] = "Mummy";
|
|
29
29
|
Entity[Entity["Sphinx"] = 27] = "Sphinx";
|
|
30
30
|
Entity[Entity["Cobra"] = 28] = "Cobra";
|
|
31
|
-
Entity[Entity["
|
|
31
|
+
Entity[Entity["Ammout"] = 29] = "Ammout";
|
|
32
32
|
Entity[Entity["Bennu"] = 30] = "Bennu";
|
|
33
33
|
Entity[Entity["Brahma"] = 31] = "Brahma";
|
|
34
34
|
Entity[Entity["Vishnu"] = 32] = "Vishnu";
|
|
35
35
|
Entity[Entity["Shiva"] = 33] = "Shiva";
|
|
36
|
-
Entity[Entity["
|
|
36
|
+
Entity[Entity["Ganesha"] = 34] = "Ganesha";
|
|
37
37
|
Entity[Entity["Asura"] = 35] = "Asura";
|
|
38
38
|
Entity[Entity["Naga"] = 36] = "Naga";
|
|
39
39
|
Entity[Entity["Rakshasa"] = 37] = "Rakshasa";
|
|
@@ -41,7 +41,7 @@ export var Entity;
|
|
|
41
41
|
Entity[Entity["Vetala"] = 39] = "Vetala";
|
|
42
42
|
Entity[Entity["Kinnara"] = 40] = "Kinnara";
|
|
43
43
|
Entity[Entity["Viracocha"] = 41] = "Viracocha";
|
|
44
|
-
Entity[Entity["
|
|
44
|
+
Entity[Entity["Mamacocha"] = 42] = "Mamacocha";
|
|
45
45
|
Entity[Entity["Illapa"] = 43] = "Illapa";
|
|
46
46
|
Entity[Entity["Inti"] = 44] = "Inti";
|
|
47
47
|
Entity[Entity["Puma"] = 45] = "Puma";
|
|
@@ -23,6 +23,8 @@ export declare enum LocationType {
|
|
|
23
23
|
PlayerDiscard = 22,
|
|
24
24
|
PlayerSelectedCards = 23,
|
|
25
25
|
GameHelpArea = 24,
|
|
26
|
-
CardsCount = 25
|
|
26
|
+
CardsCount = 25,
|
|
27
|
+
SummonGainIcon = 26,
|
|
28
|
+
EntityEffect = 27
|
|
27
29
|
}
|
|
28
30
|
export declare const isInSanctuary: (type?: LocationType) => type is LocationType.SanctuaryCreatureSpot | LocationType.SanctuaryGodSpot;
|
|
@@ -25,5 +25,7 @@ export var LocationType;
|
|
|
25
25
|
LocationType[LocationType["PlayerSelectedCards"] = 23] = "PlayerSelectedCards";
|
|
26
26
|
LocationType[LocationType["GameHelpArea"] = 24] = "GameHelpArea";
|
|
27
27
|
LocationType[LocationType["CardsCount"] = 25] = "CardsCount";
|
|
28
|
+
LocationType[LocationType["SummonGainIcon"] = 26] = "SummonGainIcon";
|
|
29
|
+
LocationType[LocationType["EntityEffect"] = 27] = "EntityEffect";
|
|
28
30
|
})(LocationType || (LocationType = {}));
|
|
29
31
|
export const isInSanctuary = (type) => type === LocationType.SanctuaryCreatureSpot || type === LocationType.SanctuaryGodSpot;
|
|
@@ -206,9 +206,7 @@ export class Pantheon extends MaterialRulesPart {
|
|
|
206
206
|
onSummon(move) {
|
|
207
207
|
const moves = [];
|
|
208
208
|
const card = this.material(MaterialType.EntityCard).index(move.itemIndex).getItem();
|
|
209
|
-
const entity = card.id.front;
|
|
210
|
-
if (!entity)
|
|
211
|
-
return [];
|
|
209
|
+
const entity = card.id.front ?? (move.reveal?.id).front;
|
|
212
210
|
for (const player of this.game.players) {
|
|
213
211
|
if (player !== this.player) {
|
|
214
212
|
const favorTax = new Pantheon(this.game, player).getFavorTax(move.location);
|
|
@@ -20,8 +20,8 @@ import { SunWukong } from './chinese/SunWukong';
|
|
|
20
20
|
import { Tianlong } from './chinese/Tianlong';
|
|
21
21
|
import { YanluoWang } from './chinese/YanluoWang';
|
|
22
22
|
import { Anubis } from './egyptian/Anubis';
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
23
|
+
import { Ammout } from './egyptian/Ammout';
|
|
24
|
+
import { Scarab } from './egyptian/Scarab';
|
|
25
25
|
import { Bennu } from './egyptian/Bennu';
|
|
26
26
|
import { Cobra } from './egyptian/Cobra';
|
|
27
27
|
import { Isis } from './egyptian/Isis';
|
|
@@ -41,7 +41,7 @@ import { Poseidon } from './greek/Poseidon';
|
|
|
41
41
|
import { Zeus } from './greek/Zeus';
|
|
42
42
|
import { Asura } from './hindu/Asura';
|
|
43
43
|
import { Brahma } from './hindu/Brahma';
|
|
44
|
-
import {
|
|
44
|
+
import { Ganesha } from './hindu/Ganesha';
|
|
45
45
|
import { Garuda } from './hindu/Garuda';
|
|
46
46
|
import { Kinnara } from './hindu/Kinnara';
|
|
47
47
|
import { Naga } from './hindu/Naga';
|
|
@@ -54,7 +54,7 @@ import { Caiman } from './inca/Caiman';
|
|
|
54
54
|
import { Condor } from './inca/Condor';
|
|
55
55
|
import { Illapa } from './inca/Illapa';
|
|
56
56
|
import { Inti } from './inca/Inti';
|
|
57
|
-
import {
|
|
57
|
+
import { Mamacocha } from './inca/Mamacocha';
|
|
58
58
|
import { Puma } from './inca/Puma';
|
|
59
59
|
import { Supay } from './inca/Supay';
|
|
60
60
|
import { Ukuku } from './inca/Ukuku';
|
|
@@ -106,16 +106,16 @@ export const entities = {
|
|
|
106
106
|
[Entity.Osiris]: Osiris,
|
|
107
107
|
[Entity.Anubis]: Anubis,
|
|
108
108
|
[Entity.Isis]: Isis,
|
|
109
|
-
[Entity.
|
|
109
|
+
[Entity.Scarab]: Scarab,
|
|
110
110
|
[Entity.Mummy]: Mummy,
|
|
111
111
|
[Entity.Sphinx]: Sphinx,
|
|
112
112
|
[Entity.Cobra]: Cobra,
|
|
113
|
-
[Entity.
|
|
113
|
+
[Entity.Ammout]: Ammout,
|
|
114
114
|
[Entity.Bennu]: Bennu,
|
|
115
115
|
[Entity.Brahma]: Brahma,
|
|
116
116
|
[Entity.Vishnu]: Vishnu,
|
|
117
117
|
[Entity.Shiva]: Shiva,
|
|
118
|
-
[Entity.
|
|
118
|
+
[Entity.Ganesha]: Ganesha,
|
|
119
119
|
[Entity.Asura]: Asura,
|
|
120
120
|
[Entity.Naga]: Naga,
|
|
121
121
|
[Entity.Rakshasa]: Rakshasa,
|
|
@@ -123,7 +123,7 @@ export const entities = {
|
|
|
123
123
|
[Entity.Vetala]: Vetala,
|
|
124
124
|
[Entity.Kinnara]: Kinnara,
|
|
125
125
|
[Entity.Viracocha]: Viracocha,
|
|
126
|
-
[Entity.
|
|
126
|
+
[Entity.Mamacocha]: Mamacocha,
|
|
127
127
|
[Entity.Illapa]: Illapa,
|
|
128
128
|
[Entity.Inti]: Inti,
|
|
129
129
|
[Entity.Puma]: Puma,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { isCreature } from '../../Entity';
|
|
2
|
+
import { Pantheon } from '../../Pantheon';
|
|
3
|
+
import { isSacrificed } from '../Effect';
|
|
4
|
+
import { PlayerEffectRule } from '../PlayerEffectRule';
|
|
5
|
+
export const Scarab = {
|
|
6
|
+
summon: [{ favor: 1 }, { gem: 1 }, {}],
|
|
7
|
+
effects: [
|
|
8
|
+
{
|
|
9
|
+
replaceSacrifice: (card) => isCreature(card.id.front)
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
trigger: isSacrificed,
|
|
13
|
+
rule: class ScarabEffectRule extends PlayerEffectRule {
|
|
14
|
+
playEffect() {
|
|
15
|
+
return [new Pantheon(this.game, this.player).gainGems(2)];
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { LocationType } from '../../LocationType';
|
|
2
|
+
import { MaterialType } from '../../MaterialType';
|
|
3
|
+
import { Pantheon } from '../../Pantheon';
|
|
4
|
+
import { isEndOfGame } from '../Effect';
|
|
5
|
+
import { PlayerEffectRule } from '../PlayerEffectRule';
|
|
6
|
+
export const Ganesha = {
|
|
7
|
+
summon: [{ gem: 1 }, { gem: 1 }, {}],
|
|
8
|
+
effect: {
|
|
9
|
+
trigger: isEndOfGame,
|
|
10
|
+
rule: class GaneshaEffectRule extends PlayerEffectRule {
|
|
11
|
+
playEffect() {
|
|
12
|
+
const cardsInDiscard = this.material(MaterialType.EntityCard).location(LocationType.PlayerDiscard).player(this.player).length;
|
|
13
|
+
const pantheon = new Pantheon(this.game, this.player);
|
|
14
|
+
return cardsInDiscard > 0 ? [pantheon.gainFavor(Math.min(cardsInDiscard, 5))] : [];
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { isCreature } from '../../Entity';
|
|
2
|
+
import { Pantheon } from '../../Pantheon';
|
|
3
|
+
import { isEndOfGame } from '../Effect';
|
|
4
|
+
import { PlayerEffectRule } from '../PlayerEffectRule';
|
|
5
|
+
export const Mamacocha = {
|
|
6
|
+
summon: [{}, { favor: 1 }, { gem: 2 }],
|
|
7
|
+
effect: {
|
|
8
|
+
trigger: isEndOfGame,
|
|
9
|
+
rule: class MamacochaEffectRule extends PlayerEffectRule {
|
|
10
|
+
playEffect() {
|
|
11
|
+
const pantheon = new Pantheon(this.game, this.player);
|
|
12
|
+
const hasCreature = pantheon.visibleEntities
|
|
13
|
+
.location((l) => l.y === 0)
|
|
14
|
+
.getItems()
|
|
15
|
+
.some((item) => isCreature(item.id.front));
|
|
16
|
+
return hasCreature ? [] : [pantheon.gainFavor(3)];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
};
|
package/dist/rules/RuleId.d.ts
CHANGED
package/dist/rules/RuleId.js
CHANGED
|
@@ -27,7 +27,7 @@ export var RuleId;
|
|
|
27
27
|
RuleId[RuleId["SphinxEffect"] = 28] = "SphinxEffect";
|
|
28
28
|
RuleId[RuleId["CobraEffect"] = 29] = "CobraEffect";
|
|
29
29
|
RuleId[RuleId["CobraSummonEffect"] = 30] = "CobraSummonEffect";
|
|
30
|
-
RuleId[RuleId["
|
|
30
|
+
RuleId[RuleId["AmmoutEffect"] = 31] = "AmmoutEffect";
|
|
31
31
|
RuleId[RuleId["BennuEffect"] = 32] = "BennuEffect";
|
|
32
32
|
RuleId[RuleId["VishnuEffect"] = 33] = "VishnuEffect";
|
|
33
33
|
RuleId[RuleId["ShivaEffect"] = 34] = "ShivaEffect";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SummonEffectRule } from '../../material/entity/PlaceCardEffectRule';
|
|
2
|
+
import { RuleId } from '../RuleId';
|
|
3
|
+
export declare class AmmoutEffectRule extends SummonEffectRule {
|
|
4
|
+
ruleId: RuleId;
|
|
5
|
+
getCardsToPlace(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { entityMythology } from '../../material/Entity';
|
|
2
|
+
import { SummonEffectRule } from '../../material/entity/PlaceCardEffectRule';
|
|
3
|
+
import { LocationType } from '../../material/LocationType';
|
|
4
|
+
import { MaterialType } from '../../material/MaterialType';
|
|
5
|
+
import { Pantheon } from '../../material/Pantheon';
|
|
6
|
+
import { RuleId } from '../RuleId';
|
|
7
|
+
export class AmmoutEffectRule extends SummonEffectRule {
|
|
8
|
+
ruleId = RuleId.AmmoutEffect;
|
|
9
|
+
getCardsToPlace() {
|
|
10
|
+
const mythologies = new Pantheon(this.game, this.player).missingMythologies;
|
|
11
|
+
return this.material(MaterialType.EntityCard)
|
|
12
|
+
.location(LocationType.PlayerDiscard)
|
|
13
|
+
.id((id) => mythologies.includes(entityMythology(id.front)));
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -6,13 +6,11 @@ import { RuleId } from '../RuleId';
|
|
|
6
6
|
export class DullahanEffectRule extends MoveEffectRule {
|
|
7
7
|
ruleId = RuleId.DullahanEffect;
|
|
8
8
|
onRuleStart() {
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
.filter((item) => pantheon.isAbleToMove(item))
|
|
12
|
-
.getIndexes();
|
|
13
|
-
if (targetEntitiesAbleToMove.length === 0) {
|
|
9
|
+
const moveCardsMoves = this.getMoveCardsMoves();
|
|
10
|
+
if (moveCardsMoves.length === 0) {
|
|
14
11
|
return [this.customMove(CustomMoveType.EndEffect)];
|
|
15
12
|
}
|
|
13
|
+
const targetEntitiesAbleToMove = moveCardsMoves.map((move) => move.itemIndex);
|
|
16
14
|
this.memorize(Memory.TargetEntities, targetEntitiesAbleToMove);
|
|
17
15
|
this.memorize(Memory.EffectCount, targetEntitiesAbleToMove.length);
|
|
18
16
|
const moves = this.getPlayerMoves();
|
|
@@ -3,9 +3,9 @@ import { CardEffect, PlayerPendingEffects } from '../../material/entity/Effect';
|
|
|
3
3
|
import { RuleId } from '../RuleId';
|
|
4
4
|
export declare class ResolveEffectsRule extends PlayerTurnRule {
|
|
5
5
|
startEffectsResolution(): import("@gamepark/rules-api").StartRule<RuleId.ResolveEffects>[] | import("@gamepark/rules-api").StartPlayerTurn<import("../../PlayerColor").PlayerColor, RuleId.ResolveEffects>[];
|
|
6
|
-
isAutoEffects(): boolean;
|
|
6
|
+
isAutoEffects(pendingEffects: PlayerPendingEffects): boolean;
|
|
7
7
|
onRuleStart(_move: RuleMove, previousRule: RuleStep): MaterialMove[];
|
|
8
|
-
getPendingEffects(): PlayerPendingEffects;
|
|
8
|
+
getPendingEffects(): PlayerPendingEffects | undefined;
|
|
9
9
|
getPlayerMoves(): CustomMove[] | import("@gamepark/rules-api").MoveItem<number, number, number>[];
|
|
10
10
|
beforeItemMove(move: ItemMove): CustomMove[];
|
|
11
11
|
onCustomMove(move: CustomMove): MaterialMove[];
|
|
@@ -12,13 +12,15 @@ import { RuleId } from '../RuleId';
|
|
|
12
12
|
export class ResolveEffectsRule extends PlayerTurnRule {
|
|
13
13
|
startEffectsResolution() {
|
|
14
14
|
const pendingEffects = this.getPendingEffects();
|
|
15
|
-
if (
|
|
15
|
+
if (!pendingEffects) {
|
|
16
|
+
throw new Error('Unexpected state: startEffectsResolution without pending effects');
|
|
17
|
+
}
|
|
18
|
+
if (this.isAutoEffects(pendingEffects)) {
|
|
16
19
|
return [this.startRule(RuleId.ResolveEffects)];
|
|
17
20
|
}
|
|
18
21
|
return [this.startPlayerTurn(RuleId.ResolveEffects, pendingEffects.player)];
|
|
19
22
|
}
|
|
20
|
-
isAutoEffects() {
|
|
21
|
-
const pendingEffects = this.getPendingEffects();
|
|
23
|
+
isAutoEffects(pendingEffects) {
|
|
22
24
|
switch (pendingEffects.type) {
|
|
23
25
|
case PendingEffectsType.CardsEffects:
|
|
24
26
|
return pendingEffects.effects.every((effect) => effect.auto);
|
|
@@ -33,6 +35,9 @@ export class ResolveEffectsRule extends PlayerTurnRule {
|
|
|
33
35
|
this.memorize(Memory.PendingRule, previousRule);
|
|
34
36
|
}
|
|
35
37
|
const pendingEffects = this.getPendingEffects();
|
|
38
|
+
if (!pendingEffects) {
|
|
39
|
+
throw new Error('Unexpected state: start ResolveEffectsRule without pending effects');
|
|
40
|
+
}
|
|
36
41
|
if (pendingEffects.type === PendingEffectsType.SummonGain) {
|
|
37
42
|
return [...new Pantheon(this.game, this.player).getSummonGains(pendingEffects.entity, pendingEffects.line), this.customMove(CustomMoveType.EndEffect)];
|
|
38
43
|
}
|
|
@@ -79,7 +84,7 @@ export class ResolveEffectsRule extends PlayerTurnRule {
|
|
|
79
84
|
const pendingEffects = this.getPendingEffects();
|
|
80
85
|
if (isMoveItem(move) &&
|
|
81
86
|
(move.itemType === MaterialType.GemToken || move.itemType === MaterialType.FavorToken) &&
|
|
82
|
-
pendingEffects
|
|
87
|
+
pendingEffects?.type === PendingEffectsType.BonusGains) {
|
|
83
88
|
const item = this.material(move.itemType).getItem(move.itemIndex);
|
|
84
89
|
if (item.location.type === LocationType.PantheonColumnBonus) {
|
|
85
90
|
pendingEffects.columns = pendingEffects.columns.filter((column) => column !== item.location.x);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gamepark/mythologies",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.5",
|
|
4
4
|
"description": "The rules of Mythologies adapted for Game Park",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"@gamepark/rules-api": ">=7",
|
|
25
|
-
"es-toolkit": "^1.
|
|
25
|
+
"es-toolkit": "^1.44.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@gamepark/rules-api": "~7.
|
|
29
|
-
"es-toolkit": "^1.
|
|
28
|
+
"@gamepark/rules-api": "~7.2.0",
|
|
29
|
+
"es-toolkit": "^1.44.0"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "610c9b10a35cf3cd109092a2bee80a11451121f5"
|
|
32
32
|
}
|