@gamepark/mythologies 1.0.18 → 1.0.20
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 +2 -1
- package/dist/Memory.js +1 -0
- package/dist/MythologiesRules.d.ts +1 -1
- package/dist/MythologiesRules.js +10 -1
- package/dist/MythologiesSetup.js +1 -0
- package/dist/material/Pantheon.js +1 -1
- package/dist/material/entity/PlaceCardEffectRule.js +3 -1
- package/dist/rules/effects/CaimanEffectRule.d.ts +4 -2
- package/dist/rules/effects/CyclopsEffectRule.d.ts +2 -1
- package/dist/rules/effects/DullahanEffectRule.d.ts +2 -1
- package/dist/rules/effects/GarudaEffectRule.d.ts +4 -3
- package/dist/rules/effects/GorgonEffectRule.d.ts +2 -1
- package/dist/rules/effects/IllapaEffectRule.d.ts +2 -1
- package/dist/rules/effects/JiangshiEffectRule.d.ts +2 -1
- package/dist/rules/effects/LeprechaunEffectRule.d.ts +2 -1
- package/dist/rules/effects/OdinEffectRule.d.ts +3 -1
- package/dist/rules/effects/QilinEffectRule.d.ts +2 -1
- package/dist/rules/effects/RakshasaEffectRule.js +1 -2
- package/dist/rules/effects/ResolveEffectsRule.d.ts +3 -2
- package/dist/rules/effects/SelkieEffectRule.d.ts +2 -1
- package/dist/rules/effects/ShivaEffectRule.d.ts +2 -1
- package/dist/rules/effects/SupayEffectRule.d.ts +1 -1
- package/dist/rules/effects/TriggerEffectsRule.js +4 -4
- package/dist/rules/effects/VetalaEffectRule.d.ts +3 -2
- package/dist/rules/effects/ViracochaEffectRule.d.ts +2 -1
- package/dist/rules/effects/VishnuEffectRule.d.ts +2 -1
- package/dist/rules/effects/YanluoWangEffectRule.d.ts +2 -1
- package/package.json +3 -3
package/dist/Memory.d.ts
CHANGED
package/dist/Memory.js
CHANGED
|
@@ -12,4 +12,5 @@ export var Memory;
|
|
|
12
12
|
Memory[Memory["TargetMythology"] = 10] = "TargetMythology";
|
|
13
13
|
Memory[Memory["TargetPlane"] = 11] = "TargetPlane";
|
|
14
14
|
Memory[Memory["TargetLocations"] = 12] = "TargetLocations";
|
|
15
|
+
Memory[Memory["ExiledEntities"] = 13] = "ExiledEntities";
|
|
15
16
|
})(Memory || (Memory = {}));
|
|
@@ -153,7 +153,7 @@ export declare class MythologiesRules extends SecretMaterialRules<PlayerColor, M
|
|
|
153
153
|
};
|
|
154
154
|
keepMoveSecret(move: MaterialMove): boolean;
|
|
155
155
|
isPlayerDestiny(move: MoveItem): boolean;
|
|
156
|
-
beforeItemMove(move: ItemMove): MaterialMove<PlayerColor, MaterialType, LocationType, number>[];
|
|
156
|
+
beforeItemMove(move: ItemMove): MaterialMove<PlayerColor, MaterialType, LocationType, number, number>[];
|
|
157
157
|
getAutomaticMoves(): import("@gamepark/rules-api").StartRule<RuleId.ResolveEffects>[] | import("@gamepark/rules-api").StartPlayerTurn<PlayerColor, RuleId.ResolveEffects>[];
|
|
158
158
|
giveTime(): number;
|
|
159
159
|
getScore(player: PlayerColor): number;
|
package/dist/MythologiesRules.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FillGapStrategy, hideFront, hideFrontToOthers, hideItemId, isMoveItemType, PositiveSequenceStrategy, SecretMaterialRules, StackingStrategy } from '@gamepark/rules-api';
|
|
1
|
+
import { FillGapStrategy, hideFront, hideFrontToOthers, hideItemId, isDeleteItemType, isMoveItemType, PositiveSequenceStrategy, SecretMaterialRules, StackingStrategy } from '@gamepark/rules-api';
|
|
2
2
|
import { Destiny } from './material/Destiny';
|
|
3
3
|
import { isGod } from './material/Entity';
|
|
4
4
|
import { LineEventType, TriggerEventType } from './material/entity/Effect';
|
|
@@ -171,6 +171,15 @@ export class MythologiesRules extends SecretMaterialRules {
|
|
|
171
171
|
if (!this.game.rule)
|
|
172
172
|
return [];
|
|
173
173
|
const consequences = super.beforeItemMove(move);
|
|
174
|
+
if (isDeleteItemType(MaterialType.EntityCard)(move)) {
|
|
175
|
+
const exiled = this.remind(Memory.ExiledEntities);
|
|
176
|
+
if (exiled !== undefined) {
|
|
177
|
+
const entity = this.material(MaterialType.EntityCard).getItem(move.itemIndex).id.front;
|
|
178
|
+
if (entity) {
|
|
179
|
+
this.memorize(Memory.ExiledEntities, [...exiled, entity]);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
174
183
|
if (isMoveItemType(MaterialType.GemToken)(move) && move.location.type === LocationType.PlayerGems) {
|
|
175
184
|
const gem = this.material(MaterialType.GemToken).getItem(move.itemIndex).location;
|
|
176
185
|
const player = gem.player;
|
package/dist/MythologiesSetup.js
CHANGED
|
@@ -11,6 +11,7 @@ export class MythologiesSetup extends MaterialGameSetup {
|
|
|
11
11
|
Rules = MythologiesRules;
|
|
12
12
|
setupMaterial(options) {
|
|
13
13
|
this.memorize(Memory.PendingEffects, []);
|
|
14
|
+
this.memorize(Memory.ExiledEntities, []);
|
|
14
15
|
this.setupMythologies(this.getMythologies(options));
|
|
15
16
|
this.setupPlayers();
|
|
16
17
|
this.dealCreatures();
|
|
@@ -106,7 +106,7 @@ export class Pantheon extends MaterialRulesPart {
|
|
|
106
106
|
if (summoned) {
|
|
107
107
|
moves.push(...this.onSummon(move));
|
|
108
108
|
}
|
|
109
|
-
this.updateGrid(grid, { type: TriggerEventType.EntityPlaced, cardIndex: move.itemIndex, entity, location, summoned
|
|
109
|
+
this.updateGrid(grid, { type: TriggerEventType.EntityPlaced, cardIndex: move.itemIndex, entity, location, summoned });
|
|
110
110
|
return moves;
|
|
111
111
|
}
|
|
112
112
|
get isSummon() {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { isMoveItemType } from '@gamepark/rules-api';
|
|
2
2
|
import { CustomMoveType } from '../../CustomMoveType';
|
|
3
3
|
import { Memory } from '../../Memory';
|
|
4
|
+
import { isGod } from '../Entity';
|
|
4
5
|
import { LocationType } from '../LocationType';
|
|
5
6
|
import { MaterialType } from '../MaterialType';
|
|
6
7
|
import { Pantheon } from '../Pantheon';
|
|
@@ -30,7 +31,8 @@ export class PlaceCardEffectRule extends PlayerEffectRule {
|
|
|
30
31
|
}
|
|
31
32
|
getPlayerMoves(cardIndex = this.getEffect().cardIndex) {
|
|
32
33
|
const player = this.material(MaterialType.EntityCard).getItem(cardIndex).location.player;
|
|
33
|
-
const
|
|
34
|
+
const pantheon = new Pantheon(this.game, player);
|
|
35
|
+
const cards = this.getCardsToPlace(cardIndex).id((id) => !isGod(id.front) || pantheon.gems >= 4);
|
|
34
36
|
return this.getAvailableDestinations(cardIndex).flatMap(({ x, y }) => {
|
|
35
37
|
return cards.moveItems({ type: LocationType.Pantheon, player, x, y });
|
|
36
38
|
});
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { CustomMove, MaterialMove, MoveItem } from '@gamepark/rules-api';
|
|
2
|
+
import { CustomMoveType } from '../../CustomMoveType';
|
|
2
3
|
import { PlayerEffectRule } from '../../material/entity/PlayerEffectRule';
|
|
3
4
|
import { SacrificeEffectRule } from '../../material/entity/SacrificeEffectRule';
|
|
5
|
+
import { Mythology } from '../../material/Mythology';
|
|
4
6
|
import { RuleId } from '../RuleId';
|
|
5
7
|
export declare class CaimanEffectRule extends PlayerEffectRule {
|
|
6
8
|
ruleId: RuleId;
|
|
7
|
-
getPlayerMoves(): CustomMove[];
|
|
9
|
+
getPlayerMoves(): CustomMove<CustomMoveType.ChooseMythology, Mythology>[];
|
|
8
10
|
onCustomMove(move: CustomMove): MaterialMove[];
|
|
9
11
|
}
|
|
10
12
|
export declare class CaimanSacrificeEffectRule extends SacrificeEffectRule {
|
|
11
13
|
ruleId: RuleId;
|
|
12
|
-
onRuleStart():
|
|
14
|
+
onRuleStart(): MoveItem<number, number, number>[] | CustomMove<CustomMoveType.EndEffect, any>[];
|
|
13
15
|
getCardsToSacrifice(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
14
16
|
onSacrifice(move: MoveItem): MaterialMove[];
|
|
15
17
|
onRuleEnd(): never[];
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ItemMove, MaterialMove } from '@gamepark/rules-api';
|
|
2
|
+
import { CustomMoveType } from '../../CustomMoveType';
|
|
2
3
|
import { ColumnEvent, LineEvent } from '../../material/entity/Effect';
|
|
3
4
|
import { PlayerEffectRule } from '../../material/entity/PlayerEffectRule';
|
|
4
5
|
import { RuleId } from '../RuleId';
|
|
5
6
|
export declare class CyclopsEffectRule extends PlayerEffectRule {
|
|
6
7
|
ruleId: RuleId;
|
|
7
8
|
getPlayerMoves(): MaterialMove[];
|
|
8
|
-
afterItemMove(move: ItemMove): (import("@gamepark/rules-api").
|
|
9
|
+
afterItemMove(move: ItemMove): (import("@gamepark/rules-api").MoveItem<number, number, number> | import("@gamepark/rules-api").CustomMove<CustomMoveType.EndEffect, any>)[];
|
|
9
10
|
takeNeighborsBonus(event?: LineEvent | ColumnEvent): import("@gamepark/rules-api").MoveItem<number, number, number>[];
|
|
10
11
|
getBonus(event?: LineEvent | ColumnEvent): import("@gamepark/rules-api").Material<number, number, number>;
|
|
11
12
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Location, MaterialMove, MoveItem, XYCoordinates } from '@gamepark/rules-api';
|
|
2
|
+
import { CustomMoveType } from '../../CustomMoveType';
|
|
2
3
|
import { MoveEffectRule } from '../../material/entity/MoveEffectRule';
|
|
3
4
|
import { RuleId } from '../RuleId';
|
|
4
5
|
export declare class DullahanEffectRule extends MoveEffectRule {
|
|
@@ -8,6 +9,6 @@ export declare class DullahanEffectRule extends MoveEffectRule {
|
|
|
8
9
|
isLegalDestination(space: XYCoordinates, cardLocation: Location): boolean;
|
|
9
10
|
getPlayerMoves(): MaterialMove[];
|
|
10
11
|
onCardMoved(move: MoveItem): MaterialMove[];
|
|
11
|
-
onCardSacrificed(move: MoveItem): import("@gamepark/rules-api").CustomMove[];
|
|
12
|
+
onCardSacrificed(move: MoveItem): import("@gamepark/rules-api").CustomMove<CustomMoveType.EndEffect, any>[];
|
|
12
13
|
onRuleEnd(): never[];
|
|
13
14
|
}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { CustomMove, MaterialMove, MoveItem } from '@gamepark/rules-api';
|
|
2
|
+
import { CustomMoveType } from '../../CustomMoveType';
|
|
2
3
|
import { PlayerEffectRule } from '../../material/entity/PlayerEffectRule';
|
|
3
4
|
import { SacrificeEffectRule } from '../../material/entity/SacrificeEffectRule';
|
|
4
5
|
import { RuleId } from '../RuleId';
|
|
5
6
|
export declare class GarudaEffectRule extends PlayerEffectRule {
|
|
6
7
|
ruleId: RuleId;
|
|
7
|
-
getPlayerMoves(): CustomMove[];
|
|
8
|
+
getPlayerMoves(): CustomMove<CustomMoveType.ChoosePlan, number>[];
|
|
8
9
|
onCustomMove(move: CustomMove): MaterialMove[];
|
|
9
10
|
}
|
|
10
11
|
export declare class GarudaSacrificeRule extends SacrificeEffectRule {
|
|
11
12
|
ruleId: RuleId;
|
|
12
|
-
onRuleStart():
|
|
13
|
+
onRuleStart(): MoveItem<number, number, number>[] | CustomMove<CustomMoveType.EndEffect, any>[];
|
|
13
14
|
getCardsToSacrifice(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
14
|
-
onSacrifice(move: MoveItem): CustomMove[];
|
|
15
|
+
onSacrifice(move: MoveItem): CustomMove<CustomMoveType.EndEffect, any>[];
|
|
15
16
|
onRuleEnd(): never[];
|
|
16
17
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { MoveItem } from '@gamepark/rules-api';
|
|
2
|
+
import { CustomMoveType } from '../../CustomMoveType';
|
|
2
3
|
import { SacrificeEffectRule } from '../../material/entity/SacrificeEffectRule';
|
|
3
4
|
import { RuleId } from '../RuleId';
|
|
4
5
|
export declare class GorgonEffectRule extends SacrificeEffectRule {
|
|
5
6
|
ruleId: RuleId;
|
|
6
7
|
getCardsToSacrifice(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
7
|
-
onSacrifice(move: MoveItem): (import("@gamepark/rules-api").
|
|
8
|
+
onSacrifice(move: MoveItem): (import("@gamepark/rules-api").CreateItem<number, number, number> | import("@gamepark/rules-api").CustomMove<CustomMoveType.EndEffect, any>)[];
|
|
8
9
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { CustomMove, Material } from '@gamepark/rules-api';
|
|
2
|
+
import { CustomMoveType } from '../../CustomMoveType';
|
|
2
3
|
import { PlayerEffectRule } from '../../material/entity/PlayerEffectRule';
|
|
3
4
|
import { SimultaneousSacrificeEffectRule } from '../../material/entity/SimultaneousSacrificeEffectRule';
|
|
4
5
|
import { PlayerColor } from '../../PlayerColor';
|
|
5
6
|
import { RuleId } from '../RuleId';
|
|
6
7
|
export declare class IllapaEffectRule extends PlayerEffectRule {
|
|
7
8
|
ruleId: RuleId;
|
|
8
|
-
getPlayerMoves(): CustomMove[];
|
|
9
|
+
getPlayerMoves(): CustomMove<CustomMoveType.ChoosePlan, number>[];
|
|
9
10
|
onCustomMove(move: CustomMove): import("@gamepark/rules-api").MaterialMove[];
|
|
10
11
|
}
|
|
11
12
|
export declare class IllapaSacrificeRule extends SimultaneousSacrificeEffectRule {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ItemMove, MaterialMove } from '@gamepark/rules-api';
|
|
2
|
+
import { CustomMoveType } from '../../CustomMoveType';
|
|
2
3
|
import { PlayerEffectRule } from '../../material/entity/PlayerEffectRule';
|
|
3
4
|
import { RuleId } from '../RuleId';
|
|
4
5
|
export declare class JiangshiEffectRule extends PlayerEffectRule {
|
|
5
6
|
ruleId: RuleId;
|
|
6
7
|
getPlayerMoves(): MaterialMove[];
|
|
7
|
-
beforeItemMove(move: ItemMove): (import("@gamepark/rules-api").
|
|
8
|
+
beforeItemMove(move: ItemMove): (import("@gamepark/rules-api").CreateItem<number, number, number> | import("@gamepark/rules-api").CustomMove<CustomMoveType.EndEffect, any>)[];
|
|
8
9
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ItemMove } from '@gamepark/rules-api';
|
|
2
|
+
import { CustomMoveType } from '../../CustomMoveType';
|
|
2
3
|
import { PlayerEffectRule } from '../../material/entity/PlayerEffectRule';
|
|
3
4
|
import { RuleId } from '../RuleId';
|
|
4
5
|
export declare class LeprechaunEffectRule extends PlayerEffectRule {
|
|
5
6
|
ruleId: RuleId;
|
|
6
7
|
canPlayEffect(cardIndex: number): boolean;
|
|
7
8
|
getPlayerMoves(cardIndex?: number): import("@gamepark/rules-api").MoveItem<number, number, number>[];
|
|
8
|
-
afterItemMove(move: ItemMove): import("@gamepark/rules-api").CustomMove[];
|
|
9
|
+
afterItemMove(move: ItemMove): import("@gamepark/rules-api").CustomMove<CustomMoveType.EndEffect, any>[];
|
|
9
10
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { CustomMove, MaterialItem, PlayerTurnRule } from '@gamepark/rules-api';
|
|
2
|
+
import { CustomMoveType } from '../../CustomMoveType';
|
|
2
3
|
import { EntityId } from '../../material/Entity';
|
|
3
4
|
import { LocationType } from '../../material/LocationType';
|
|
4
5
|
import { MaterialType } from '../../material/MaterialType';
|
|
6
|
+
import { Mythology } from '../../material/Mythology';
|
|
5
7
|
import { PlayerColor } from '../../PlayerColor';
|
|
6
8
|
import { RuleId } from '../RuleId';
|
|
7
9
|
export declare class OdinEffectRule extends PlayerTurnRule {
|
|
8
|
-
getPlayerMoves(): CustomMove[];
|
|
10
|
+
getPlayerMoves(): CustomMove<CustomMoveType.ChooseMythology, Mythology>[];
|
|
9
11
|
onCustomMove(move: CustomMove): import("@gamepark/rules-api").StartRule<RuleId.DrawDestinyCard>[];
|
|
10
12
|
isCardRestricted(card: MaterialItem<MaterialType, LocationType, EntityId>, player?: PlayerColor): boolean;
|
|
11
13
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { CustomMove } from '@gamepark/rules-api';
|
|
2
|
+
import { CustomMoveType } from '../../CustomMoveType';
|
|
2
3
|
import { PlayerEffectRule } from '../../material/entity/PlayerEffectRule';
|
|
3
4
|
import { RuleId } from '../RuleId';
|
|
4
5
|
export declare class QilinEffectRule extends PlayerEffectRule {
|
|
5
6
|
ruleId: RuleId;
|
|
6
|
-
getPlayerMoves(): CustomMove[];
|
|
7
|
+
getPlayerMoves(): CustomMove<CustomMoveType.ChooseEntityCard, number>[];
|
|
7
8
|
onCustomMove(move: CustomMove): import("@gamepark/rules-api").MaterialMove[];
|
|
8
9
|
}
|
|
@@ -17,7 +17,6 @@ export class RakshasaEffectRule extends PlaceCardEffectRule {
|
|
|
17
17
|
}
|
|
18
18
|
getAvailableDestinations(cardIndex) {
|
|
19
19
|
const location = this.material(MaterialType.EntityCard).getItem(cardIndex).location;
|
|
20
|
-
|
|
21
|
-
return pantheon.isLegalSpaceToSummon(location) ? [location] : [];
|
|
20
|
+
return [location];
|
|
22
21
|
}
|
|
23
22
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CustomMove, ItemMove, MaterialMove, PlayerTurnRule, RuleMove, RuleStep } from '@gamepark/rules-api';
|
|
2
|
+
import { CustomMoveType } from '../../CustomMoveType';
|
|
2
3
|
import { CardEffect, PlayerPendingEffects } from '../../material/entity/Effect';
|
|
3
4
|
import { RuleId } from '../RuleId';
|
|
4
5
|
export declare class ResolveEffectsRule extends PlayerTurnRule {
|
|
@@ -6,8 +7,8 @@ export declare class ResolveEffectsRule extends PlayerTurnRule {
|
|
|
6
7
|
isAutoEffects(pendingEffects: PlayerPendingEffects): boolean;
|
|
7
8
|
onRuleStart(_move: RuleMove, previousRule: RuleStep): MaterialMove[];
|
|
8
9
|
getPendingEffects(): PlayerPendingEffects | undefined;
|
|
9
|
-
getPlayerMoves(): CustomMove[] | import("@gamepark/rules-api").MoveItem<number, number, number>[];
|
|
10
|
-
beforeItemMove(move: ItemMove): CustomMove[];
|
|
10
|
+
getPlayerMoves(): CustomMove<CustomMoveType.PlayEffect, CardEffect<import("../../material/entity/Effect").TriggerEvent>>[] | import("@gamepark/rules-api").MoveItem<number, number, number>[];
|
|
11
|
+
beforeItemMove(move: ItemMove): CustomMove<CustomMoveType.EndEffect, any>[];
|
|
11
12
|
onCustomMove(move: CustomMove): MaterialMove[];
|
|
12
13
|
onPlayEffect(effect: CardEffect): MaterialMove[];
|
|
13
14
|
playEffect(cardEffect: CardEffect): MaterialMove[];
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ItemMove } from '@gamepark/rules-api';
|
|
2
|
+
import { CustomMoveType } from '../../CustomMoveType';
|
|
2
3
|
import { PlayerEffectRule } from '../../material/entity/PlayerEffectRule';
|
|
3
4
|
import { RuleId } from '../RuleId';
|
|
4
5
|
export declare class SelkieEffectRule extends PlayerEffectRule {
|
|
5
6
|
ruleId: RuleId;
|
|
6
7
|
getPlayerMoves(): import("@gamepark/rules-api").CreateItem<number, number, number>[];
|
|
7
|
-
afterItemMove(move: ItemMove): import("@gamepark/rules-api").CustomMove[];
|
|
8
|
+
afterItemMove(move: ItemMove): import("@gamepark/rules-api").CustomMove<CustomMoveType.EndEffect, any>[];
|
|
8
9
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ItemMove, MaterialMove } from '@gamepark/rules-api';
|
|
2
|
+
import { CustomMoveType } from '../../CustomMoveType';
|
|
2
3
|
import { PlayerEffectRule } from '../../material/entity/PlayerEffectRule';
|
|
3
4
|
import { RuleId } from '../RuleId';
|
|
4
5
|
export declare class ShivaEffectRule extends PlayerEffectRule {
|
|
@@ -6,5 +7,5 @@ export declare class ShivaEffectRule extends PlayerEffectRule {
|
|
|
6
7
|
canPlayEffect(cardIndex: number): boolean;
|
|
7
8
|
onRuleStart(): MaterialMove[];
|
|
8
9
|
getPlayerMoves(cardIndex?: number): import("@gamepark/rules-api").MoveItemsAtOnce<number, number, number>[];
|
|
9
|
-
beforeItemMove(move: ItemMove): (import("@gamepark/rules-api").
|
|
10
|
+
beforeItemMove(move: ItemMove): (import("@gamepark/rules-api").CreateItem<number, number, number> | import("@gamepark/rules-api").CustomMove<CustomMoveType.EndEffect, any>)[];
|
|
10
11
|
}
|
|
@@ -10,7 +10,7 @@ export declare class SupayEffectRule extends PlayerEffectRule {
|
|
|
10
10
|
getRules(): (SupayMoveRule | SupaySacrificeRule)[];
|
|
11
11
|
getPlayerMoves(): MaterialMove[];
|
|
12
12
|
beforeItemMove(move: ItemMove): MaterialMove[];
|
|
13
|
-
afterItemMove(move: ItemMove): MaterialMove<number, number, number, number>[];
|
|
13
|
+
afterItemMove(move: ItemMove): MaterialMove<number, number, number, number, number>[];
|
|
14
14
|
onEndEffect(): MaterialMove[];
|
|
15
15
|
}
|
|
16
16
|
export declare class SupaySacrificeRule extends SacrificeEffectRule {
|
|
@@ -26,16 +26,16 @@ export class TriggerEffectsRule extends MaterialRulesPart {
|
|
|
26
26
|
if (event.type === TriggerEventType.EntityCrushed) {
|
|
27
27
|
const location = material.getItem(event.cardIndex).location;
|
|
28
28
|
if (location.player === player && !cards.some((card) => card.index === event.cardIndex)) {
|
|
29
|
-
cards.push({ index: event.cardIndex, location });
|
|
29
|
+
cards.push({ index: event.cardIndex, location, entity: event.card.id.front });
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
if (event.type === TriggerEventType.EntityPlaced && event.location.player === player && !cards.some((card) => card.index === event.cardIndex)) {
|
|
33
|
-
cards.push({ index: event.cardIndex, location: event.location });
|
|
33
|
+
cards.push({ index: event.cardIndex, location: event.location, entity: event.entity });
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
for (const triggerEvent of triggerEvents) {
|
|
37
|
-
for (const { index, location } of cards) {
|
|
38
|
-
pendingEffects.push(...this.getCardEffects(index, location, triggerEvent));
|
|
37
|
+
for (const { index, location, entity } of cards) {
|
|
38
|
+
pendingEffects.push(...this.getCardEffects(index, location, triggerEvent, entity));
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
return pendingEffects;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { MaterialItem, MaterialMove, MoveItem } from '@gamepark/rules-api';
|
|
2
|
+
import { CustomMoveType } from '../../CustomMoveType';
|
|
2
3
|
import { MoveEffectRule } from '../../material/entity/MoveEffectRule';
|
|
3
4
|
import { RuleId } from '../RuleId';
|
|
4
5
|
export declare class VetalaEffectRule extends MoveEffectRule {
|
|
@@ -6,7 +7,7 @@ export declare class VetalaEffectRule extends MoveEffectRule {
|
|
|
6
7
|
onRuleStart(): MaterialMove[];
|
|
7
8
|
getPlayerMoves(): MaterialMove[];
|
|
8
9
|
getAvailableDestinations(card: MaterialItem, cardIndex: number): import("@gamepark/rules-api").XYCoordinates[];
|
|
9
|
-
onCardMoved(): import("@gamepark/rules-api").CustomMove[];
|
|
10
|
-
onCardSacrificed(move: MoveItem): import("@gamepark/rules-api").CustomMove[];
|
|
10
|
+
onCardMoved(): import("@gamepark/rules-api").CustomMove<CustomMoveType.EndEffect, any>[];
|
|
11
|
+
onCardSacrificed(move: MoveItem): import("@gamepark/rules-api").CustomMove<CustomMoveType.EndEffect, any>[];
|
|
11
12
|
onRuleEnd(): never[];
|
|
12
13
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { MoveItem } from '@gamepark/rules-api';
|
|
2
|
+
import { CustomMoveType } from '../../CustomMoveType';
|
|
2
3
|
import { SacrificeEffectRule } from '../../material/entity/SacrificeEffectRule';
|
|
3
4
|
import { RuleId } from '../RuleId';
|
|
4
5
|
export declare class ViracochaEffectRule extends SacrificeEffectRule {
|
|
5
6
|
ruleId: RuleId;
|
|
6
7
|
getCardsToSacrifice(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
7
|
-
onSacrifice(move: MoveItem): (import("@gamepark/rules-api").
|
|
8
|
+
onSacrifice(move: MoveItem): (import("@gamepark/rules-api").CreateItem<number, number, number> | import("@gamepark/rules-api").CustomMove<CustomMoveType.EndEffect, any>)[];
|
|
8
9
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { CustomMove, MaterialMove } from '@gamepark/rules-api';
|
|
2
|
+
import { CustomMoveType } from '../../CustomMoveType';
|
|
2
3
|
import { PlayerEffectRule } from '../../material/entity/PlayerEffectRule';
|
|
3
4
|
import { RuleId } from '../RuleId';
|
|
4
5
|
export declare class VishnuEffectRule extends PlayerEffectRule {
|
|
5
6
|
ruleId: RuleId;
|
|
6
7
|
playEffect(): (import("@gamepark/rules-api").MoveItem<number, number, number> | import("@gamepark/rules-api").StartRule<RuleId>)[];
|
|
7
8
|
onRuleStart(): MaterialMove[];
|
|
8
|
-
getPlayerMoves(): CustomMove[];
|
|
9
|
+
getPlayerMoves(): CustomMove<CustomMoveType.ChooseEntityCard, number>[];
|
|
9
10
|
onCustomMove(move: CustomMove): MaterialMove[];
|
|
10
11
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ItemMove, MaterialMove } from '@gamepark/rules-api';
|
|
2
|
+
import { CustomMoveType } from '../../CustomMoveType';
|
|
2
3
|
import { PlayerEffectRule } from '../../material/entity/PlayerEffectRule';
|
|
3
4
|
import { RuleId } from '../RuleId';
|
|
4
5
|
export declare class YanluoWangEffectRule extends PlayerEffectRule {
|
|
5
6
|
ruleId: RuleId;
|
|
6
|
-
onRuleStart(): import("@gamepark/rules-api").CustomMove[];
|
|
7
|
+
onRuleStart(): import("@gamepark/rules-api").CustomMove<CustomMoveType.EndEffect, any>[];
|
|
7
8
|
getPlayerMoves(): MaterialMove[];
|
|
8
9
|
afterItemMove(move: ItemMove): import("@gamepark/rules-api").MoveItem<number, number, number>[];
|
|
9
10
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gamepark/mythologies",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.20",
|
|
4
4
|
"description": "The rules of Mythologies adapted for Game Park",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"es-toolkit": "^1.44.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@gamepark/rules-api": "~7.
|
|
28
|
+
"@gamepark/rules-api": "~7.6.0",
|
|
29
29
|
"es-toolkit": "^1.44.0"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "b649962b19027188e947f0996da7c1b3fd73efc4"
|
|
32
32
|
}
|