@gamepark/mythologies 1.0.9 → 1.0.11
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.
|
@@ -31,10 +31,8 @@ export class PlaceCardEffectRule extends PlayerEffectRule {
|
|
|
31
31
|
getPlayerMoves(cardIndex = this.getEffect().cardIndex) {
|
|
32
32
|
const player = this.material(MaterialType.EntityCard).getItem(cardIndex).location.player;
|
|
33
33
|
const cards = this.getCardsToPlace(cardIndex);
|
|
34
|
-
const pantheon = new Pantheon(this.game, player);
|
|
35
34
|
return this.getAvailableDestinations(cardIndex).flatMap(({ x, y }) => {
|
|
36
|
-
|
|
37
|
-
return cardsICanPlace.moveItems({ type: LocationType.Pantheon, player, x, y });
|
|
35
|
+
return cards.moveItems({ type: LocationType.Pantheon, player, x, y });
|
|
38
36
|
});
|
|
39
37
|
}
|
|
40
38
|
getAvailableDestinations(_cardIndex) {
|
|
@@ -54,4 +52,13 @@ export class PlaceCardEffectRule extends PlayerEffectRule {
|
|
|
54
52
|
}
|
|
55
53
|
export class SummonEffectRule extends PlaceCardEffectRule {
|
|
56
54
|
isSummon = true;
|
|
55
|
+
getPlayerMoves(cardIndex = this.getEffect().cardIndex) {
|
|
56
|
+
const player = this.material(MaterialType.EntityCard).getItem(cardIndex).location.player;
|
|
57
|
+
const cards = this.getCardsToPlace(cardIndex);
|
|
58
|
+
const pantheon = new Pantheon(this.game, player);
|
|
59
|
+
return this.getAvailableDestinations(cardIndex).flatMap(({ x, y }) => {
|
|
60
|
+
const cardsICanPlace = cards.id((id) => pantheon.isLegalSpaceToSummon({ x, y }, id.front));
|
|
61
|
+
return cardsICanPlace.moveItems({ type: LocationType.Pantheon, player, x, y });
|
|
62
|
+
});
|
|
63
|
+
}
|
|
57
64
|
}
|
|
@@ -11,6 +11,7 @@ export declare class SupayEffectRule extends PlayerEffectRule {
|
|
|
11
11
|
getPlayerMoves(): MaterialMove[];
|
|
12
12
|
beforeItemMove(move: ItemMove): MaterialMove[];
|
|
13
13
|
afterItemMove(move: ItemMove): MaterialMove<number, number, number, number>[];
|
|
14
|
+
onEndEffect(): MaterialMove[];
|
|
14
15
|
}
|
|
15
16
|
export declare class SupaySacrificeRule extends SacrificeEffectRule {
|
|
16
17
|
getCardsToSacrifice(): Material;
|
|
@@ -31,6 +31,10 @@ export class SupayEffectRule extends PlayerEffectRule {
|
|
|
31
31
|
afterItemMove(move) {
|
|
32
32
|
return this.getRules().flatMap((rule) => rule.afterItemMove(move));
|
|
33
33
|
}
|
|
34
|
+
onEndEffect() {
|
|
35
|
+
new Pantheon(this.game, this.player).updateGrid();
|
|
36
|
+
return super.onEndEffect();
|
|
37
|
+
}
|
|
34
38
|
}
|
|
35
39
|
export class SupaySacrificeRule extends SacrificeEffectRule {
|
|
36
40
|
getCardsToSacrifice() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gamepark/mythologies",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"description": "The rules of Mythologies adapted for Game Park",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"@gamepark/rules-api": "~7.2.0",
|
|
29
29
|
"es-toolkit": "^1.44.0"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "5c5b2ef2ed4db67fdcd1bec7605ae811fd8cf51b"
|
|
32
32
|
}
|