@gamepark/mythologies 1.0.13 → 1.0.15
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.
|
@@ -144,7 +144,7 @@ export declare class MythologiesRules extends SecretMaterialRules<PlayerColor, M
|
|
|
144
144
|
6: (item: MaterialItem, player?: PlayerColor) => string[];
|
|
145
145
|
};
|
|
146
146
|
4: {
|
|
147
|
-
5: import("@gamepark/rules-api").HidingStrategy
|
|
147
|
+
5: import("@gamepark/rules-api").HidingStrategy<number, number>;
|
|
148
148
|
17: (item: MaterialItem) => string[];
|
|
149
149
|
};
|
|
150
150
|
10: {
|
|
@@ -9,7 +9,7 @@ export declare class GarudaEffectRule extends PlayerEffectRule {
|
|
|
9
9
|
}
|
|
10
10
|
export declare class GarudaSacrificeRule extends SacrificeEffectRule {
|
|
11
11
|
ruleId: RuleId;
|
|
12
|
-
onRuleStart():
|
|
12
|
+
onRuleStart(): CustomMove[] | MoveItem<number, number, number>[];
|
|
13
13
|
getCardsToSacrifice(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
14
14
|
onSacrifice(move: MoveItem): CustomMove[];
|
|
15
15
|
onRuleEnd(): never[];
|
|
@@ -13,8 +13,22 @@ export class GarudaEffectRule extends PlayerEffectRule {
|
|
|
13
13
|
}
|
|
14
14
|
onCustomMove(move) {
|
|
15
15
|
if (move.type === CustomMoveType.ChoosePlan) {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
const plan = move.data;
|
|
17
|
+
this.memorize(Memory.TargetPlane, plan);
|
|
18
|
+
const pantheon = new Pantheon(this.game, this.player);
|
|
19
|
+
const gemCount = pantheon.visibleEntities.location((l) => l.y === plan).length;
|
|
20
|
+
const creatureCount = pantheon.visibleEntities.id((id) => isCreature(id.front)).location((l) => l.y === plan).length;
|
|
21
|
+
const moves = [];
|
|
22
|
+
if (gemCount) {
|
|
23
|
+
moves.push(pantheon.gainGems(gemCount));
|
|
24
|
+
}
|
|
25
|
+
if (creatureCount) {
|
|
26
|
+
moves.push(this.startRule(RuleId.GarudaSacrifice));
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
moves.push(this.customMove(CustomMoveType.EndEffect));
|
|
30
|
+
}
|
|
31
|
+
return moves;
|
|
18
32
|
}
|
|
19
33
|
return super.onCustomMove(move);
|
|
20
34
|
}
|
|
@@ -26,12 +40,11 @@ export class GarudaSacrificeRule extends SacrificeEffectRule {
|
|
|
26
40
|
if (!count)
|
|
27
41
|
return [this.customMove(CustomMoveType.EndEffect)];
|
|
28
42
|
this.memorize(Memory.EffectCount, count);
|
|
29
|
-
const moves = [new Pantheon(this.game, this.player).gainGems(count)];
|
|
30
43
|
const playerMoves = this.getPlayerMoves();
|
|
31
44
|
if (playerMoves.length === count) {
|
|
32
|
-
|
|
45
|
+
return playerMoves;
|
|
33
46
|
}
|
|
34
|
-
return
|
|
47
|
+
return [];
|
|
35
48
|
}
|
|
36
49
|
getCardsToSacrifice() {
|
|
37
50
|
const pantheon = new Pantheon(this.game, this.player);
|
|
@@ -40,7 +40,7 @@ export class ResolveEffectsRule extends PlayerTurnRule {
|
|
|
40
40
|
}
|
|
41
41
|
if (pendingEffects.type === PendingEffectsType.SummonGain) {
|
|
42
42
|
this.memorize(Memory.PendingEffects, (effects) => effects.slice(1));
|
|
43
|
-
return [...new Pantheon(this.game,
|
|
43
|
+
return [...new Pantheon(this.game, pendingEffects.player).getSummonGains(pendingEffects.entity, pendingEffects.line), this.customMove(CustomMoveType.EndEffect)];
|
|
44
44
|
}
|
|
45
45
|
const moves = this.getPlayerMoves();
|
|
46
46
|
if (moves.length === 1) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gamepark/mythologies",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
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.4.1",
|
|
29
29
|
"es-toolkit": "^1.44.0"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "214dbf3d9235eda59b4fbb5912f34cce66a1dca2"
|
|
32
32
|
}
|