@gamepark/skyrift 0.2.1 → 0.2.3
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/SkyriftRules.js +1 -3
- package/dist/material/CardRule.js +1 -1
- package/dist/material/decks/heathblade/OzmaTheMage.d.ts +1 -1
- package/dist/material/decks/heathblade/OzmaTheMage.js +2 -6
- package/dist/material/decks/heathblade/SoulBladeEffectRule.js +1 -1
- package/dist/material/decks/highwave/ScallywagEffectRule.js +3 -0
- package/dist/rules/EndRoundRule.js +2 -6
- package/dist/rules/PlayCardRule.js +2 -4
- package/dist/rules/StartPlayerTurnRule.js +2 -6
- package/package.json +1 -1
package/dist/SkyriftRules.js
CHANGED
|
@@ -99,9 +99,7 @@ export class SkyriftRules extends SecretMaterialRules {
|
|
|
99
99
|
const origin = this.material(MaterialType.Card).getItem(move.itemIndex).location;
|
|
100
100
|
if (origin.type === LocationType.PlayArea && move.location.type !== LocationType.PlayArea) {
|
|
101
101
|
const cardRule = new PlayerHelper(this.game).getCardRule(move.itemIndex);
|
|
102
|
-
|
|
103
|
-
moves.push(...cardRule.onLeave());
|
|
104
|
-
}
|
|
102
|
+
moves.push(...cardRule.onLeave());
|
|
105
103
|
}
|
|
106
104
|
}
|
|
107
105
|
return moves;
|
|
@@ -6,7 +6,7 @@ import { CardSuit } from '../../CardSuit';
|
|
|
6
6
|
import { CardType } from '../../CardType';
|
|
7
7
|
declare class OzmaTheMageRule extends CardRule {
|
|
8
8
|
onCardEnters(card: Card, side: Deck): MaterialMove[];
|
|
9
|
-
onLeave():
|
|
9
|
+
onLeave(): import("@gamepark/rules-api").MoveItem<number, number, number>[];
|
|
10
10
|
}
|
|
11
11
|
export declare const OzmaTheMage: {
|
|
12
12
|
power: number;
|
|
@@ -6,18 +6,14 @@ import { LocationType } from '../../LocationType';
|
|
|
6
6
|
import { MaterialType } from '../../MaterialType';
|
|
7
7
|
class OzmaTheMageRule extends CardRule {
|
|
8
8
|
onCardEnters(card, side) {
|
|
9
|
-
if (side
|
|
9
|
+
if (side === this.player && cardProperties[card].type === CardType.Action) {
|
|
10
10
|
this.addPendingEffect();
|
|
11
11
|
}
|
|
12
12
|
return [];
|
|
13
13
|
}
|
|
14
14
|
onLeave() {
|
|
15
|
-
const moves = this.removeStunTokens();
|
|
16
15
|
const powerTokens = this.material(MaterialType.PowerToken).location(LocationType.CardPowerTokens).parent(this.index);
|
|
17
|
-
|
|
18
|
-
moves.push(powerTokens.moveItem({ type: LocationType.PlayerStash, player: this.player }, powerTokens.getQuantity()));
|
|
19
|
-
}
|
|
20
|
-
return moves;
|
|
16
|
+
return [powerTokens.moveItem({ type: LocationType.PlayerStash, player: this.player }, powerTokens.getQuantity())];
|
|
21
17
|
}
|
|
22
18
|
}
|
|
23
19
|
export const OzmaTheMage = {
|
|
@@ -10,6 +10,6 @@ export class SoulBladeEffectRule extends DestroyEffectRule {
|
|
|
10
10
|
return this.material(MaterialType.Card)
|
|
11
11
|
.location(LocationType.PlayArea)
|
|
12
12
|
.id((id) => cardProperties[id.front].type === CardType.Creature)
|
|
13
|
-
.index((index) => helper.getCardRule(index).getPower()
|
|
13
|
+
.index((index) => helper.getCardRule(index).getPower() >= 4);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { DestroyEffectRule } from '../../../rules/DestroyEffectRule';
|
|
2
2
|
import { PlayerHelper } from '../../../rules/PlayerHelper';
|
|
3
|
+
import { cardProperties } from '../../CardProperties';
|
|
4
|
+
import { CardType } from '../../CardType';
|
|
3
5
|
import { LocationType } from '../../LocationType';
|
|
4
6
|
import { MaterialType } from '../../MaterialType';
|
|
5
7
|
export class ScallywagEffectRule extends DestroyEffectRule {
|
|
@@ -8,6 +10,7 @@ export class ScallywagEffectRule extends DestroyEffectRule {
|
|
|
8
10
|
const scallywagPower = this.cardRule.getPower();
|
|
9
11
|
return this.material(MaterialType.Card)
|
|
10
12
|
.location(LocationType.PlayArea)
|
|
13
|
+
.id((id) => cardProperties[id.front].type === CardType.Creature)
|
|
11
14
|
.index((index) => helper.getCardRule(index).getPower() < scallywagPower);
|
|
12
15
|
}
|
|
13
16
|
}
|
|
@@ -25,15 +25,11 @@ export class EndRoundRule extends PlayerTurnRule {
|
|
|
25
25
|
.getIndexes();
|
|
26
26
|
for (const cardIndex of loserCards) {
|
|
27
27
|
const cardRule = new PlayerHelper(this.game, loser).getCardRule(cardIndex);
|
|
28
|
-
|
|
29
|
-
moves.push(...cardRule.onRoundEnd(false));
|
|
30
|
-
}
|
|
28
|
+
moves.push(...cardRule.onRoundEnd(false));
|
|
31
29
|
}
|
|
32
30
|
for (const cardIndex of winnerCards) {
|
|
33
31
|
const cardRule = new PlayerHelper(this.game, winner).getCardRule(cardIndex);
|
|
34
|
-
|
|
35
|
-
moves.push(...cardRule.onRoundEnd(true));
|
|
36
|
-
}
|
|
32
|
+
moves.push(...cardRule.onRoundEnd(true));
|
|
37
33
|
}
|
|
38
34
|
const pendingEffects = this.remind(Memory.PendingEffects);
|
|
39
35
|
if (pendingEffects.length === 0) {
|
|
@@ -27,7 +27,7 @@ export class PlayCardRule extends PlayerTurnRule {
|
|
|
27
27
|
}
|
|
28
28
|
const usedEffects = this.remind(Memory.OncePerTurnEffects);
|
|
29
29
|
for (const cardRule of playerHelper.cardRules) {
|
|
30
|
-
if (cardRule.oncePerTurnEffect && !
|
|
30
|
+
if (cardRule.oncePerTurnEffect && !usedEffects.some((effect) => effect.cardIndex === cardRule.index)) {
|
|
31
31
|
moves.push(this.customMove(CustomMoveType.ActivateCard, cardRule.index));
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -56,9 +56,7 @@ export class PlayCardRule extends PlayerTurnRule {
|
|
|
56
56
|
for (const cardIndex of cardsInPlay.getIndexes()) {
|
|
57
57
|
if (cardIndex !== move.itemIndex) {
|
|
58
58
|
const otherCardRule = new PlayerHelper(this.game, this.player).getCardRule(cardIndex);
|
|
59
|
-
|
|
60
|
-
moves.push(...otherCardRule.onCardEnters(cardRule.card, move.location.player));
|
|
61
|
-
}
|
|
59
|
+
moves.push(...otherCardRule.onCardEnters(cardRule.card, move.location.player));
|
|
62
60
|
}
|
|
63
61
|
}
|
|
64
62
|
moves.push(...cardRule.onEnters());
|
|
@@ -19,14 +19,10 @@ export class StartPlayerTurnRule extends PlayerTurnRule {
|
|
|
19
19
|
.filter((card) => cardProperties[card.id.front].type === CardType.Action);
|
|
20
20
|
moves.push(...actionCards.moveItems({ type: LocationType.PlayerDiscard, player: this.player }));
|
|
21
21
|
for (const cardRule of new PlayerHelper(this.game, this.player).cardRules) {
|
|
22
|
-
|
|
23
|
-
moves.push(...cardRule.onPlayerTurnStart(this.player));
|
|
24
|
-
}
|
|
22
|
+
moves.push(...cardRule.onPlayerTurnStart(this.player));
|
|
25
23
|
}
|
|
26
24
|
for (const cardRule of new PlayerHelper(this.game, this.nextPlayer).cardRules) {
|
|
27
|
-
|
|
28
|
-
moves.push(...cardRule.onPlayerTurnStart(this.player));
|
|
29
|
-
}
|
|
25
|
+
moves.push(...cardRule.onPlayerTurnStart(this.player));
|
|
30
26
|
}
|
|
31
27
|
const stunTokens = this.material(MaterialType.StunToken).location(LocationType.CardStunTokens);
|
|
32
28
|
moves.push(...stunTokens.deleteItems(1));
|