@gamepark/skyrift 0.2.2 → 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.
@@ -108,6 +108,6 @@ export class CardRule extends MaterialRulesPart {
108
108
  }
109
109
  permanentEffectTag = undefined;
110
110
  hasPermanentEffectOnTag(tag) {
111
- return this.permanentEffectTag === tag && !this.isStunned();
111
+ return this.permanentEffectTag === tag;
112
112
  }
113
113
  }
@@ -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(): MaterialMove[];
9
+ onLeave(): import("@gamepark/rules-api").MoveItem<number, number, number>[];
10
10
  }
11
11
  export declare const OzmaTheMage: {
12
12
  power: number;
@@ -6,19 +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 !== this.player && cardProperties[card].type === CardType.Action) {
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
- if (this.isStunned()) {
16
- return super.onLeave();
17
- }
18
- else {
19
- const powerTokens = this.material(MaterialType.PowerToken).location(LocationType.CardPowerTokens).parent(this.index);
20
- return [powerTokens.moveItem({ type: LocationType.PlayerStash, player: this.player }, powerTokens.getQuantity())];
21
- }
15
+ const powerTokens = this.material(MaterialType.PowerToken).location(LocationType.CardPowerTokens).parent(this.index);
16
+ return [powerTokens.moveItem({ type: LocationType.PlayerStash, player: this.player }, powerTokens.getQuantity())];
22
17
  }
23
18
  }
24
19
  export const OzmaTheMage = {
@@ -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
- if (!cardRule.isStunned()) {
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
- if (!cardRule.isStunned()) {
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 && !cardRule.isStunned() && !usedEffects.some((effect) => effect.cardIndex === cardRule.index)) {
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
- if (!otherCardRule.isStunned()) {
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
- if (!cardRule.isStunned()) {
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
- if (!cardRule.isStunned()) {
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));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gamepark/skyrift",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "The rules of SkyRift adapted for Game Park",
5
5
  "sideEffects": false,
6
6
  "type": "module",