@gamepark/skyrift 0.2.6 → 0.2.8

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.
@@ -136,9 +136,11 @@ export class SkyriftRules extends SecretMaterialRules {
136
136
  moves.push(...deck.moveItems({ type: LocationType.PlayerHand, player }));
137
137
  }
138
138
  const discard = this.material(MaterialType.Card).location(LocationType.PlayerDiscard).player(player);
139
- moves.push(discard.moveItemsAtOnce({ type: LocationType.PlayerDeck, player }));
140
- moves.push(discard.shuffle());
141
- moves.push(this.customMove(CustomMoveType.Draw, { player, quantity: quantity - deck.length }));
139
+ if (discard.length > 0) {
140
+ moves.push(discard.moveItemsAtOnce({ type: LocationType.PlayerDeck, player }));
141
+ moves.push(discard.shuffle());
142
+ moves.push(this.customMove(CustomMoveType.Draw, { player, quantity: quantity - deck.length }));
143
+ }
142
144
  }
143
145
  }
144
146
  return moves;
@@ -10,6 +10,7 @@ export class ScallywagEffectRule extends DestroyEffectRule {
10
10
  const scallywagPower = this.cardRule.getPower();
11
11
  return this.material(MaterialType.Card)
12
12
  .location(LocationType.PlayArea)
13
+ .player(helper.foe)
13
14
  .id((id) => cardProperties[id.front].type === CardType.Creature)
14
15
  .index((index) => helper.getCardRule(index).getPower() < scallywagPower);
15
16
  }
@@ -21,7 +21,8 @@ export class PlayCardRule extends PlayerTurnRule {
21
21
  const playerHelper = new PlayerHelper(this.game);
22
22
  const powerTokensStash = this.material(MaterialType.PowerToken).location(LocationType.PlayerStash).player(this.player);
23
23
  if (powerTokensStash.getQuantity()) {
24
- for (const index of playerHelper.cardsInPlay.getIndexes()) {
24
+ const allCardsInPlay = this.material(MaterialType.Card).location(LocationType.PlayArea);
25
+ for (const index of allCardsInPlay.getIndexes()) {
25
26
  moves.push(powerTokensStash.moveItem({ type: LocationType.CardPowerTokens, parent: index }, 1));
26
27
  }
27
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gamepark/skyrift",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
4
4
  "description": "The rules of SkyRift adapted for Game Park",
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -30,5 +30,5 @@
30
30
  "es-toolkit": "^1.43.0",
31
31
  "vitest": "^4.0.15"
32
32
  },
33
- "gitHead": "f4247df7e26ccb814a329c77e4a747e2843994ce"
33
+ "gitHead": "2e5cefc3607beeb5e14a274e18c741360b2bfb5b"
34
34
  }