@gamepark/mythologies 1.0.8 → 1.0.10
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 +1 -1
- package/dist/MythologiesRules.js +1 -1
- package/dist/material/entity/PlaceCardEffectRule.d.ts +1 -0
- package/dist/material/entity/PlaceCardEffectRule.js +10 -3
- package/dist/material/entity/SimultaneousEffectRule.js +3 -1
- package/dist/rules/effects/CentaurEffectRule.js +6 -1
- package/package.json +2 -2
|
@@ -139,7 +139,7 @@ export declare class MythologiesRules extends SecretMaterialRules<PlayerColor, M
|
|
|
139
139
|
hidingStrategies: {
|
|
140
140
|
2: {
|
|
141
141
|
2: import("@gamepark/rules-api").HidingStrategy<number, number>;
|
|
142
|
-
3:
|
|
142
|
+
3: (item: MaterialItem) => string[];
|
|
143
143
|
7: (item: MaterialItem, player?: PlayerColor) => string[];
|
|
144
144
|
6: (item: MaterialItem, player?: PlayerColor) => string[];
|
|
145
145
|
};
|
package/dist/MythologiesRules.js
CHANGED
|
@@ -144,7 +144,7 @@ export class MythologiesRules extends SecretMaterialRules {
|
|
|
144
144
|
hidingStrategies = {
|
|
145
145
|
[MaterialType.EntityCard]: {
|
|
146
146
|
[LocationType.GodsDeck]: hideFront,
|
|
147
|
-
[LocationType.CreaturesDeck]:
|
|
147
|
+
[LocationType.CreaturesDeck]: (item) => (item.location.rotation ? [] : ['id.front']),
|
|
148
148
|
[LocationType.SanctuaryGodSpot]: (item, player) => ((item.location.rotation ?? player) === player ? [] : ['id.front']),
|
|
149
149
|
[LocationType.SanctuaryCreatureSpot]: (item, player) => ((item.location.rotation ?? player) === player ? [] : ['id.front'])
|
|
150
150
|
},
|
|
@@ -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
|
}
|
|
@@ -20,7 +20,9 @@ export class SimultaneousEffectRule extends SimultaneousRule {
|
|
|
20
20
|
playersToActivate.push(player);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
if (playersToActivate.length) {
|
|
24
|
+
moves.push(this.startSimultaneousRule(this.ruleId, playersToActivate));
|
|
25
|
+
}
|
|
24
26
|
return moves;
|
|
25
27
|
}
|
|
26
28
|
onRuleStart() {
|
|
@@ -4,6 +4,7 @@ import { MoveEffectRule } from '../../material/entity/MoveEffectRule';
|
|
|
4
4
|
import { SimultaneousSacrificeEffectRule } from '../../material/entity/SimultaneousSacrificeEffectRule';
|
|
5
5
|
import { MaterialType } from '../../material/MaterialType';
|
|
6
6
|
import { Memory } from '../../Memory';
|
|
7
|
+
import { ResolveEffectsRule } from './ResolveEffectsRule';
|
|
7
8
|
import { RuleId } from '../RuleId';
|
|
8
9
|
export class CentaurEffectRule extends MoveEffectRule {
|
|
9
10
|
ruleId = RuleId.CentaurEffect;
|
|
@@ -16,7 +17,11 @@ export class CentaurEffectRule extends MoveEffectRule {
|
|
|
16
17
|
onEndEffect() {
|
|
17
18
|
this.memorize(Memory.EntityMoved, true);
|
|
18
19
|
this.updateGridAfterMoves();
|
|
19
|
-
|
|
20
|
+
const moves = new CentaurEffectSacrificeRule(this.game).playEffect();
|
|
21
|
+
if (!moves.length) {
|
|
22
|
+
moves.push(...new ResolveEffectsRule(this.game).onEndEffect());
|
|
23
|
+
}
|
|
24
|
+
return moves;
|
|
20
25
|
}
|
|
21
26
|
onCardSacrificed(move) {
|
|
22
27
|
if (this.remind(Memory.EntityMoved)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gamepark/mythologies",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
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": "4854b213bbf083d3090101d58aa54abcb15fea2f"
|
|
32
32
|
}
|