@gamepark/skyrift 0.4.2 → 0.5.0

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.
Files changed (89) hide show
  1. package/dist/CustomMoveType.d.ts +2 -1
  2. package/dist/CustomMoveType.js +1 -0
  3. package/dist/Deck.d.ts +1 -0
  4. package/dist/Deck.js +1 -0
  5. package/dist/Memory.d.ts +10 -9
  6. package/dist/Memory.js +10 -9
  7. package/dist/SkyriftRules.d.ts +6 -2
  8. package/dist/SkyriftRules.js +6 -2
  9. package/dist/SkyriftSetup.js +2 -0
  10. package/dist/material/Card.d.ts +16 -0
  11. package/dist/material/Card.js +16 -0
  12. package/dist/material/CardProperties.js +32 -0
  13. package/dist/material/CardRule.d.ts +2 -1
  14. package/dist/material/CardRule.js +10 -3
  15. package/dist/material/OngoingEffect.d.ts +3 -1
  16. package/dist/material/OngoingEffect.js +2 -0
  17. package/dist/material/decks/BlackHive.d.ts +18 -0
  18. package/dist/material/decks/BlackHive.js +19 -0
  19. package/dist/material/decks/blackhive/CarefulExcavation.d.ts +20 -0
  20. package/dist/material/decks/blackhive/CarefulExcavation.js +31 -0
  21. package/dist/material/decks/blackhive/CaveIn.d.ts +14 -0
  22. package/dist/material/decks/blackhive/CaveIn.js +18 -0
  23. package/dist/material/decks/blackhive/CaveInEffectRule.d.ts +10 -0
  24. package/dist/material/decks/blackhive/CaveInEffectRule.js +55 -0
  25. package/dist/material/decks/blackhive/CrystalMining.d.ts +15 -0
  26. package/dist/material/decks/blackhive/CrystalMining.js +22 -0
  27. package/dist/material/decks/blackhive/CrystalMiningBonusEffectRule.d.ts +4 -0
  28. package/dist/material/decks/blackhive/CrystalMiningBonusEffectRule.js +10 -0
  29. package/dist/material/decks/blackhive/CrystalShaft.d.ts +15 -0
  30. package/dist/material/decks/blackhive/CrystalShaft.js +18 -0
  31. package/dist/material/decks/blackhive/CycleKeeper.d.ts +13 -0
  32. package/dist/material/decks/blackhive/CycleKeeper.js +15 -0
  33. package/dist/material/decks/blackhive/CycleKeeperEffectRule.d.ts +6 -0
  34. package/dist/material/decks/blackhive/CycleKeeperEffectRule.js +21 -0
  35. package/dist/material/decks/blackhive/DariusAstraSmith.d.ts +13 -0
  36. package/dist/material/decks/blackhive/DariusAstraSmith.js +15 -0
  37. package/dist/material/decks/blackhive/DarkSwarm.d.ts +13 -0
  38. package/dist/material/decks/blackhive/DarkSwarm.js +15 -0
  39. package/dist/material/decks/blackhive/DarkSwarmEffectRule.d.ts +6 -0
  40. package/dist/material/decks/blackhive/DarkSwarmEffectRule.js +18 -0
  41. package/dist/material/decks/blackhive/ElevatorOfTheAbyss.d.ts +15 -0
  42. package/dist/material/decks/blackhive/ElevatorOfTheAbyss.js +19 -0
  43. package/dist/material/decks/blackhive/ExplosiveKitty.d.ts +16 -0
  44. package/dist/material/decks/blackhive/ExplosiveKitty.js +19 -0
  45. package/dist/material/decks/blackhive/GromIronspike.d.ts +13 -0
  46. package/dist/material/decks/blackhive/GromIronspike.js +18 -0
  47. package/dist/material/decks/blackhive/GuntarRustypike.d.ts +20 -0
  48. package/dist/material/decks/blackhive/GuntarRustypike.js +28 -0
  49. package/dist/material/decks/blackhive/HiveMother.d.ts +13 -0
  50. package/dist/material/decks/blackhive/HiveMother.js +18 -0
  51. package/dist/material/decks/blackhive/LotharBlackclaw.d.ts +13 -0
  52. package/dist/material/decks/blackhive/LotharBlackclaw.js +22 -0
  53. package/dist/material/decks/blackhive/LotharBlackclawEffectRule.d.ts +4 -0
  54. package/dist/material/decks/blackhive/LotharBlackclawEffectRule.js +20 -0
  55. package/dist/material/decks/blackhive/OlgaStonecrusher.d.ts +13 -0
  56. package/dist/material/decks/blackhive/OlgaStonecrusher.js +15 -0
  57. package/dist/material/decks/blackhive/ShadowDealer.d.ts +15 -0
  58. package/dist/material/decks/blackhive/ShadowDealer.js +22 -0
  59. package/dist/material/decks/blackhive/UndergroundScourge.d.ts +13 -0
  60. package/dist/material/decks/blackhive/UndergroundScourge.js +15 -0
  61. package/dist/material/decks/gravehurt/CavernSkulker.d.ts +4 -1
  62. package/dist/material/decks/gravehurt/CavernSkulker.js +18 -5
  63. package/dist/material/decks/gravehurt/Doom.d.ts +5 -1
  64. package/dist/material/decks/gravehurt/Doom.js +16 -2
  65. package/dist/material/decks/gravehurt/Nosferatis.d.ts +2 -2
  66. package/dist/material/decks/gravehurt/Nosferatis.js +2 -2
  67. package/dist/material/decks/gravehurt/TheGreatToady.d.ts +2 -2
  68. package/dist/material/decks/gravehurt/TheGreatToady.js +2 -2
  69. package/dist/material/decks/heathblade/Armada.js +1 -1
  70. package/dist/material/decks/highwave/BoardingPartyEffectRule.d.ts +0 -1
  71. package/dist/material/decks/highwave/BoardingPartyEffectRule.js +0 -6
  72. package/dist/material/decks/highwave/EyeOfSky.d.ts +1 -1
  73. package/dist/material/decks/highwave/EyeOfSky.js +2 -2
  74. package/dist/rules/DestroyEffectRule.d.ts +1 -1
  75. package/dist/rules/DestroyEffectRule.js +8 -3
  76. package/dist/rules/EffectRule.js +1 -1
  77. package/dist/rules/EndPlayerTurnRule.js +3 -0
  78. package/dist/rules/MulliganEffectRule.d.ts +2 -1
  79. package/dist/rules/MulliganEffectRule.js +15 -4
  80. package/dist/rules/PlayCardRule.d.ts +0 -1
  81. package/dist/rules/PlayCardRule.js +1 -4
  82. package/dist/rules/PlayerHelper.d.ts +1 -0
  83. package/dist/rules/PlayerHelper.js +6 -1
  84. package/dist/rules/RuleId.d.ts +3 -1
  85. package/dist/rules/RuleId.js +3 -1
  86. package/dist/rules/SimultaneousEffectRule.d.ts +5 -0
  87. package/dist/rules/SimultaneousEffectRule.js +14 -0
  88. package/dist/rules/StartPlayerTurnRule.js +4 -1
  89. package/package.json +2 -2
@@ -0,0 +1,6 @@
1
+ import { CustomMove } from '@gamepark/rules-api';
2
+ import { EffectRule } from '../../../rules/EffectRule';
3
+ export declare class CycleKeeperEffectRule extends EffectRule {
4
+ getPlayerMoves(): CustomMove[];
5
+ onCustomMove(move: CustomMove): import("@gamepark/rules-api").MaterialMove[];
6
+ }
@@ -0,0 +1,21 @@
1
+ import { CustomMoveType } from '../../../CustomMoveType';
2
+ import { Memory } from '../../../Memory';
3
+ import { CardSuit } from '../../CardSuit';
4
+ import { OngoingEffectType } from '../../OngoingEffect';
5
+ import { EffectRule } from '../../../rules/EffectRule';
6
+ export class CycleKeeperEffectRule extends EffectRule {
7
+ getPlayerMoves() {
8
+ return [
9
+ this.customMove(CustomMoveType.ChooseSuit, CardSuit.Day),
10
+ this.customMove(CustomMoveType.ChooseSuit, CardSuit.Night)
11
+ ];
12
+ }
13
+ onCustomMove(move) {
14
+ if (move.type === CustomMoveType.ChooseSuit) {
15
+ this.memorize(Memory.Suit, move.data);
16
+ this.cardRule.addOngoingEffect(OngoingEffectType.LockSuit);
17
+ return this.endEffect();
18
+ }
19
+ return super.onCustomMove(move);
20
+ }
21
+ }
@@ -0,0 +1,13 @@
1
+ import { CardRule } from '../../CardRule';
2
+ import { CardSuit } from '../../CardSuit';
3
+ import { CardType } from '../../CardType';
4
+ declare class DariusAstraSmithRule extends CardRule {
5
+ onEnters(): void;
6
+ }
7
+ export declare const DariusAstraSmith: {
8
+ power: number;
9
+ type: CardType;
10
+ suit: CardSuit;
11
+ rule: typeof DariusAstraSmithRule;
12
+ };
13
+ export {};
@@ -0,0 +1,15 @@
1
+ import { RuleId } from '../../../rules/RuleId';
2
+ import { CardRule } from '../../CardRule';
3
+ import { CardSuit } from '../../CardSuit';
4
+ import { CardType } from '../../CardType';
5
+ class DariusAstraSmithRule extends CardRule {
6
+ onEnters() {
7
+ this.addPendingEffect(RuleId.MulliganEffect);
8
+ }
9
+ }
10
+ export const DariusAstraSmith = {
11
+ power: 2,
12
+ type: CardType.Creature,
13
+ suit: CardSuit.Day,
14
+ rule: DariusAstraSmithRule
15
+ };
@@ -0,0 +1,13 @@
1
+ import { CardRule } from '../../CardRule';
2
+ import { CardSuit } from '../../CardSuit';
3
+ import { CardType } from '../../CardType';
4
+ declare class DarkSwarmRule extends CardRule {
5
+ onEnters(): void;
6
+ }
7
+ export declare const DarkSwarm: {
8
+ power: number;
9
+ type: CardType;
10
+ suit: CardSuit;
11
+ rule: typeof DarkSwarmRule;
12
+ };
13
+ export {};
@@ -0,0 +1,15 @@
1
+ import { CardRule } from '../../CardRule';
2
+ import { CardSuit } from '../../CardSuit';
3
+ import { CardType } from '../../CardType';
4
+ import { OngoingEffectType } from '../../OngoingEffect';
5
+ class DarkSwarmRule extends CardRule {
6
+ onEnters() {
7
+ this.addOngoingEffect(OngoingEffectType.PassTurn);
8
+ }
9
+ }
10
+ export const DarkSwarm = {
11
+ power: 1,
12
+ type: CardType.Creature,
13
+ suit: CardSuit.Night,
14
+ rule: DarkSwarmRule
15
+ };
@@ -0,0 +1,6 @@
1
+ import { MaterialMove } from '@gamepark/rules-api';
2
+ import { EffectRule } from '../../../rules/EffectRule';
3
+ export declare class DarkSwarmEffectRule extends EffectRule {
4
+ onRuleStart(): MaterialMove[];
5
+ onEndEffect(): MaterialMove[];
6
+ }
@@ -0,0 +1,18 @@
1
+ import { Memory } from '../../../Memory';
2
+ import { EffectRule } from '../../../rules/EffectRule';
3
+ import { PlayerHelper } from '../../../rules/PlayerHelper';
4
+ import { RuleId } from '../../../rules/RuleId';
5
+ export class DarkSwarmEffectRule extends EffectRule {
6
+ onRuleStart() {
7
+ return this.endEffect();
8
+ }
9
+ onEndEffect() {
10
+ this.memorize(Memory.PendingEffects, (effects) => effects.slice(1));
11
+ const pendingEffects = this.remind(Memory.PendingEffects);
12
+ if (pendingEffects.length > 0) {
13
+ return new PlayerHelper(this.game, this.player).startEffect(pendingEffects[0]);
14
+ }
15
+ const currentPlayer = this.remind(Memory.CurrentPlayer);
16
+ return [this.startPlayerTurn(RuleId.EndPlayerTurn, currentPlayer)];
17
+ }
18
+ }
@@ -0,0 +1,15 @@
1
+ import { CardRule } from '../../CardRule';
2
+ import { CardSuit } from '../../CardSuit';
3
+ import { CardType } from '../../CardType';
4
+ import { ReturnCardEffect } from '../../EffectTraits';
5
+ declare class ElevatorOfTheAbyssRule extends CardRule implements ReturnCardEffect {
6
+ onEnters(): void;
7
+ getReturnTargets(): import("@gamepark/rules-api").Material<number, number, number>;
8
+ }
9
+ export declare const ElevatorOfTheAbyss: {
10
+ power: number;
11
+ type: CardType;
12
+ suit: CardSuit;
13
+ rule: typeof ElevatorOfTheAbyssRule;
14
+ };
15
+ export {};
@@ -0,0 +1,19 @@
1
+ import { RuleId } from '../../../rules/RuleId';
2
+ import { CardRule } from '../../CardRule';
3
+ import { CardSuit } from '../../CardSuit';
4
+ import { CardType } from '../../CardType';
5
+ class ElevatorOfTheAbyssRule extends CardRule {
6
+ onEnters() {
7
+ this.addPendingEffect(RuleId.ReturnCardEffect);
8
+ this.addPendingEffect(RuleId.ChallengeEffect);
9
+ }
10
+ getReturnTargets() {
11
+ return this.creatures.player(this.player);
12
+ }
13
+ }
14
+ export const ElevatorOfTheAbyss = {
15
+ power: 1,
16
+ type: CardType.Action,
17
+ suit: CardSuit.Day,
18
+ rule: ElevatorOfTheAbyssRule
19
+ };
@@ -0,0 +1,16 @@
1
+ import { Material } from '@gamepark/rules-api';
2
+ import { CardRule } from '../../CardRule';
3
+ import { CardSuit } from '../../CardSuit';
4
+ import { CardType } from '../../CardType';
5
+ import { DestroyEffect } from '../../EffectTraits';
6
+ declare class ExplosiveKittyRule extends CardRule implements DestroyEffect {
7
+ onEnters(): void;
8
+ getDestroyTargets(): Material;
9
+ }
10
+ export declare const ExplosiveKitty: {
11
+ power: number;
12
+ type: CardType;
13
+ suit: CardSuit;
14
+ rule: typeof ExplosiveKittyRule;
15
+ };
16
+ export {};
@@ -0,0 +1,19 @@
1
+ import { RuleId } from '../../../rules/RuleId';
2
+ import { cardProperties } from '../../CardProperties';
3
+ import { CardRule } from '../../CardRule';
4
+ import { CardSuit } from '../../CardSuit';
5
+ import { CardType } from '../../CardType';
6
+ class ExplosiveKittyRule extends CardRule {
7
+ onEnters() {
8
+ this.addPendingEffect(RuleId.DestroyEffect);
9
+ }
10
+ getDestroyTargets() {
11
+ return this.playArea.id((id) => cardProperties[id.front].type === CardType.Action);
12
+ }
13
+ }
14
+ export const ExplosiveKitty = {
15
+ power: 1,
16
+ type: CardType.Action,
17
+ suit: CardSuit.Twilight,
18
+ rule: ExplosiveKittyRule
19
+ };
@@ -0,0 +1,13 @@
1
+ import { CardRule } from '../../CardRule';
2
+ import { CardSuit } from '../../CardSuit';
3
+ import { CardType } from '../../CardType';
4
+ declare class GromIronspikeRule extends CardRule {
5
+ canBePlayed(): boolean;
6
+ }
7
+ export declare const GromIronspike: {
8
+ power: number;
9
+ type: CardType;
10
+ suit: CardSuit;
11
+ rule: typeof GromIronspikeRule;
12
+ };
13
+ export {};
@@ -0,0 +1,18 @@
1
+ import { CardRule } from '../../CardRule';
2
+ import { CardSuit } from '../../CardSuit';
3
+ import { CardType } from '../../CardType';
4
+ import { PlayerHelper } from '../../../rules/PlayerHelper';
5
+ class GromIronspikeRule extends CardRule {
6
+ canBePlayed() {
7
+ if (!super.canBePlayed())
8
+ return false;
9
+ const foePower = new PlayerHelper(this.game, this.foe).getPower();
10
+ return foePower >= 12;
11
+ }
12
+ }
13
+ export const GromIronspike = {
14
+ power: 7,
15
+ type: CardType.Creature,
16
+ suit: CardSuit.Night,
17
+ rule: GromIronspikeRule
18
+ };
@@ -0,0 +1,20 @@
1
+ import { Material } from '@gamepark/rules-api';
2
+ import { Deck } from '../../../Deck';
3
+ import { Card } from '../../Card';
4
+ import { CardRule } from '../../CardRule';
5
+ import { CardSuit } from '../../CardSuit';
6
+ import { CardType } from '../../CardType';
7
+ import { DestroyEffect } from '../../EffectTraits';
8
+ declare class GuntarRustypikeRule extends CardRule implements DestroyEffect {
9
+ onEnters(): void;
10
+ onCardEnters(card: Card, side: Deck): void;
11
+ getDestroyTargets(): Material;
12
+ isAutoDestroy(): boolean;
13
+ }
14
+ export declare const GuntarRustypike: {
15
+ power: number;
16
+ type: CardType;
17
+ suit: CardSuit;
18
+ rule: typeof GuntarRustypikeRule;
19
+ };
20
+ export {};
@@ -0,0 +1,28 @@
1
+ import { RuleId } from '../../../rules/RuleId';
2
+ import { cardProperties } from '../../CardProperties';
3
+ import { CardRule } from '../../CardRule';
4
+ import { CardSuit } from '../../CardSuit';
5
+ import { CardType } from '../../CardType';
6
+ import { MaterialType } from '../../MaterialType';
7
+ class GuntarRustypikeRule extends CardRule {
8
+ onEnters() {
9
+ this.addPendingEffect(RuleId.DrawEffect);
10
+ }
11
+ onCardEnters(card, side) {
12
+ if (side === this.foe && cardProperties[card].type === CardType.Action) {
13
+ this.addPendingEffect(RuleId.DestroyEffect);
14
+ }
15
+ }
16
+ getDestroyTargets() {
17
+ return this.material(MaterialType.Card).index(this.index);
18
+ }
19
+ isAutoDestroy() {
20
+ return true;
21
+ }
22
+ }
23
+ export const GuntarRustypike = {
24
+ power: 5,
25
+ type: CardType.Creature,
26
+ suit: CardSuit.Day,
27
+ rule: GuntarRustypikeRule
28
+ };
@@ -0,0 +1,13 @@
1
+ import { CardRule } from '../../CardRule';
2
+ import { CardSuit } from '../../CardSuit';
3
+ import { CardType } from '../../CardType';
4
+ declare class HiveMotherRule extends CardRule {
5
+ canBePlayed(): boolean;
6
+ }
7
+ export declare const HiveMother: {
8
+ power: number;
9
+ type: CardType;
10
+ suit: CardSuit;
11
+ rule: typeof HiveMotherRule;
12
+ };
13
+ export {};
@@ -0,0 +1,18 @@
1
+ import { CardRule } from '../../CardRule';
2
+ import { CardSuit } from '../../CardSuit';
3
+ import { CardType } from '../../CardType';
4
+ import { PlayerHelper } from '../../../rules/PlayerHelper';
5
+ class HiveMotherRule extends CardRule {
6
+ canBePlayed() {
7
+ if (!super.canBePlayed())
8
+ return false;
9
+ const foePower = new PlayerHelper(this.game, this.foe).getPower();
10
+ return foePower >= 7;
11
+ }
12
+ }
13
+ export const HiveMother = {
14
+ power: 4,
15
+ type: CardType.Creature,
16
+ suit: CardSuit.Night,
17
+ rule: HiveMotherRule
18
+ };
@@ -0,0 +1,13 @@
1
+ import { CardRule } from '../../CardRule';
2
+ import { CardSuit } from '../../CardSuit';
3
+ import { CardType } from '../../CardType';
4
+ declare class LotharBlackclawRule extends CardRule {
5
+ onEnters(): void;
6
+ }
7
+ export declare const LotharBlackclaw: {
8
+ power: number;
9
+ type: CardType;
10
+ suit: CardSuit;
11
+ rule: typeof LotharBlackclawRule;
12
+ };
13
+ export {};
@@ -0,0 +1,22 @@
1
+ import { RuleId } from '../../../rules/RuleId';
2
+ import { CardRule } from '../../CardRule';
3
+ import { CardSuit } from '../../CardSuit';
4
+ import { CardType } from '../../CardType';
5
+ import { createCardRule } from '../../createCardRule';
6
+ class LotharBlackclawRule extends CardRule {
7
+ onEnters() {
8
+ this.addPendingEffect(RuleId.ChallengeEffect);
9
+ const creatures = this.creatures.player(this.player);
10
+ for (const index of creatures.getIndexes()) {
11
+ if (index !== this.index) {
12
+ createCardRule(this.game, index).onEnters?.();
13
+ }
14
+ }
15
+ }
16
+ }
17
+ export const LotharBlackclaw = {
18
+ power: 2,
19
+ type: CardType.Creature,
20
+ suit: CardSuit.Twilight,
21
+ rule: LotharBlackclawRule
22
+ };
@@ -0,0 +1,4 @@
1
+ import { EffectRule } from '../../../rules/EffectRule';
2
+ export declare class LotharBlackclawEffectRule extends EffectRule {
3
+ onRuleStart(): import("@gamepark/rules-api").MaterialMove[];
4
+ }
@@ -0,0 +1,20 @@
1
+ import { cardProperties } from '../../CardProperties';
2
+ import { createCardRule } from '../../createCardRule';
3
+ import { CardType } from '../../CardType';
4
+ import { LocationType } from '../../LocationType';
5
+ import { MaterialType } from '../../MaterialType';
6
+ import { EffectRule } from '../../../rules/EffectRule';
7
+ export class LotharBlackclawEffectRule extends EffectRule {
8
+ onRuleStart() {
9
+ const creatures = this.material(MaterialType.Card)
10
+ .location(LocationType.PlayArea)
11
+ .player(this.player)
12
+ .id((id) => cardProperties[id.front].type === CardType.Creature);
13
+ for (const index of creatures.getIndexes()) {
14
+ if (index !== this.effectCardIndex) {
15
+ createCardRule(this.game, index).onEnters?.();
16
+ }
17
+ }
18
+ return this.endEffect();
19
+ }
20
+ }
@@ -0,0 +1,13 @@
1
+ import { CardRule } from '../../CardRule';
2
+ import { CardSuit } from '../../CardSuit';
3
+ import { CardType } from '../../CardType';
4
+ declare class OlgaStonecrusherRule extends CardRule {
5
+ onEnters(): void;
6
+ }
7
+ export declare const OlgaStonecrusher: {
8
+ power: number;
9
+ type: CardType;
10
+ suit: CardSuit;
11
+ rule: typeof OlgaStonecrusherRule;
12
+ };
13
+ export {};
@@ -0,0 +1,15 @@
1
+ import { RuleId } from '../../../rules/RuleId';
2
+ import { CardRule } from '../../CardRule';
3
+ import { CardSuit } from '../../CardSuit';
4
+ import { CardType } from '../../CardType';
5
+ class OlgaStonecrusherRule extends CardRule {
6
+ onEnters() {
7
+ this.addPendingEffect(RuleId.StunEffect);
8
+ }
9
+ }
10
+ export const OlgaStonecrusher = {
11
+ power: 4,
12
+ type: CardType.Creature,
13
+ suit: CardSuit.Night,
14
+ rule: OlgaStonecrusherRule
15
+ };
@@ -0,0 +1,15 @@
1
+ import { CardRule } from '../../CardRule';
2
+ import { CardSuit } from '../../CardSuit';
3
+ import { CardType } from '../../CardType';
4
+ import { DrawEffect } from '../../EffectTraits';
5
+ declare class ShadowDealerRule extends CardRule implements DrawEffect {
6
+ onEnters(): void;
7
+ getDrawCount(): 1 | 0;
8
+ }
9
+ export declare const ShadowDealer: {
10
+ power: number;
11
+ type: CardType;
12
+ suit: CardSuit;
13
+ rule: typeof ShadowDealerRule;
14
+ };
15
+ export {};
@@ -0,0 +1,22 @@
1
+ import { RuleId } from '../../../rules/RuleId';
2
+ import { CardRule } from '../../CardRule';
3
+ import { CardSuit } from '../../CardSuit';
4
+ import { CardType } from '../../CardType';
5
+ import { LocationType } from '../../LocationType';
6
+ import { MaterialType } from '../../MaterialType';
7
+ class ShadowDealerRule extends CardRule {
8
+ onEnters() {
9
+ this.addPendingEffect(RuleId.DrawEffect);
10
+ }
11
+ getDrawCount() {
12
+ const myHand = this.material(MaterialType.Card).location(LocationType.PlayerHand).player(this.player).length;
13
+ const foeHand = this.material(MaterialType.Card).location(LocationType.PlayerHand).player(this.foe).length;
14
+ return myHand < foeHand ? 1 : 0;
15
+ }
16
+ }
17
+ export const ShadowDealer = {
18
+ power: 3,
19
+ type: CardType.Creature,
20
+ suit: CardSuit.Day,
21
+ rule: ShadowDealerRule
22
+ };
@@ -0,0 +1,13 @@
1
+ import { CardRule } from '../../CardRule';
2
+ import { CardSuit } from '../../CardSuit';
3
+ import { CardType } from '../../CardType';
4
+ declare class UndergroundScourgeRule extends CardRule {
5
+ onEnters(): void;
6
+ }
7
+ export declare const UndergroundScourge: {
8
+ power: number;
9
+ type: CardType;
10
+ suit: CardSuit;
11
+ rule: typeof UndergroundScourgeRule;
12
+ };
13
+ export {};
@@ -0,0 +1,15 @@
1
+ import { RuleId } from '../../../rules/RuleId';
2
+ import { CardRule } from '../../CardRule';
3
+ import { CardSuit } from '../../CardSuit';
4
+ import { CardType } from '../../CardType';
5
+ class UndergroundScourgeRule extends CardRule {
6
+ onEnters() {
7
+ this.addPendingEffect(RuleId.StashPowerTokensEffect);
8
+ }
9
+ }
10
+ export const UndergroundScourge = {
11
+ power: 3,
12
+ type: CardType.Creature,
13
+ suit: CardSuit.Day,
14
+ rule: UndergroundScourgeRule
15
+ };
@@ -1,10 +1,13 @@
1
1
  import { CardSuit } from '../../CardSuit';
2
2
  import { CardTag } from '../../CardTag';
3
3
  import { CardType } from '../../CardType';
4
+ import { ReturnCardEffect } from '../../EffectTraits';
4
5
  import { UndeadRule } from './UndeadRule';
5
- declare class CavernSkulkerRule extends UndeadRule {
6
+ declare class CavernSkulkerRule extends UndeadRule implements ReturnCardEffect {
6
7
  onEnters(): void;
7
8
  onLeaves(): import("@gamepark/rules-api").MaterialMove[];
9
+ getReturnTargets(): import("@gamepark/rules-api").Material<number, number, number>;
10
+ isAutoReturn(): boolean;
8
11
  }
9
12
  export declare const CavernSkulker: {
10
13
  power: number;
@@ -1,3 +1,4 @@
1
+ import { Memory } from '../../../Memory';
1
2
  import { RuleId } from '../../../rules/RuleId';
2
3
  import { CardSuit } from '../../CardSuit';
3
4
  import { CardTag } from '../../CardTag';
@@ -10,11 +11,23 @@ class CavernSkulkerRule extends UndeadRule {
10
11
  this.addPendingEffect(RuleId.CavernSkulkerEffect);
11
12
  }
12
13
  onLeaves() {
13
- const underCards = this.material(MaterialType.Card).location(LocationType.UnderCard).parent(this.index);
14
- return [
15
- ...underCards.moveItems((item) => ({ type: LocationType.PlayerHand, player: item.id.back })),
16
- ...super.onLeaves()
17
- ];
14
+ if (this.remind(Memory.PendingEffects).length > 0) {
15
+ this.addPendingEffect(RuleId.ReturnCardEffect);
16
+ return super.onLeaves();
17
+ }
18
+ else {
19
+ const underCards = this.material(MaterialType.Card).location(LocationType.UnderCard).parent(this.index);
20
+ return [
21
+ ...underCards.moveItems((item) => ({ type: LocationType.PlayerHand, player: item.id.back })),
22
+ ...super.onLeaves()
23
+ ];
24
+ }
25
+ }
26
+ getReturnTargets() {
27
+ return this.material(MaterialType.Card).location(LocationType.UnderCard).parent(this.index);
28
+ }
29
+ isAutoReturn() {
30
+ return true;
18
31
  }
19
32
  }
20
33
  export const CavernSkulker = {
@@ -1,9 +1,13 @@
1
+ import { Material } from '@gamepark/rules-api';
1
2
  import { CardRule } from '../../CardRule';
2
3
  import { CardSuit } from '../../CardSuit';
3
4
  import { CardType } from '../../CardType';
4
- declare class DoomRule extends CardRule {
5
+ import { DestroyEffect } from '../../EffectTraits';
6
+ declare class DoomRule extends CardRule implements DestroyEffect {
5
7
  onEnters(): void;
6
8
  onLeaves(): import("@gamepark/rules-api").MaterialMove[];
9
+ getDestroyTargets(): Material;
10
+ isAutoDestroy(): boolean;
7
11
  }
8
12
  export declare const Doom: {
9
13
  power: number;
@@ -1,3 +1,4 @@
1
+ import { Memory } from '../../../Memory';
1
2
  import { RuleId } from '../../../rules/RuleId';
2
3
  import { CardRule } from '../../CardRule';
3
4
  import { CardSuit } from '../../CardSuit';
@@ -10,9 +11,22 @@ class DoomRule extends CardRule {
10
11
  this.addPendingEffect(RuleId.DoomEffect);
11
12
  }
12
13
  onLeaves() {
14
+ if (this.remind(Memory.PendingEffects).length > 0) {
15
+ this.addPendingEffect(RuleId.DestroyEffect);
16
+ return super.onLeaves();
17
+ }
18
+ else {
19
+ const doomTokens = this.material(MaterialType.SpecialToken).id(SpecialTokenType.Doom).location(LocationType.CardSpecialTokens);
20
+ const doomedIndexes = doomTokens.getItems().map((item) => item.location.parent);
21
+ return [...this.playArea.index(doomedIndexes).moveItems((item) => ({ type: LocationType.PlayerDiscard, player: item.id.back })), ...super.onLeaves()];
22
+ }
23
+ }
24
+ getDestroyTargets() {
13
25
  const doomTokens = this.material(MaterialType.SpecialToken).id(SpecialTokenType.Doom).location(LocationType.CardSpecialTokens);
14
- const doomedIndexes = doomTokens.getItems().map((item) => item.location.parent);
15
- return [...this.playArea.index(doomedIndexes).moveItems((item) => ({ type: LocationType.PlayerDiscard, player: item.id.back })), ...super.onLeaves()];
26
+ return this.playArea.index((index) => doomTokens.parent(index).length > 0);
27
+ }
28
+ isAutoDestroy() {
29
+ return true;
16
30
  }
17
31
  }
18
32
  export const Doom = {
@@ -1,11 +1,11 @@
1
1
  import { Material } from '@gamepark/rules-api';
2
2
  import { Deck } from '../../../Deck';
3
3
  import { Card } from '../../Card';
4
+ import { CardRule } from '../../CardRule';
4
5
  import { CardSuit } from '../../CardSuit';
5
6
  import { CardType } from '../../CardType';
6
7
  import { DestroyEffect } from '../../EffectTraits';
7
- import { UndeadRule } from './UndeadRule';
8
- declare class NosferatisRule extends UndeadRule implements DestroyEffect {
8
+ declare class NosferatisRule extends CardRule implements DestroyEffect {
9
9
  getPowerIfNotStunned(): number;
10
10
  onCardEnters(card: Card, side: Deck): void;
11
11
  getDestroyTargets(): Material;
@@ -1,10 +1,10 @@
1
1
  import { RuleId } from '../../../rules/RuleId';
2
2
  import { cardProperties } from '../../CardProperties';
3
+ import { CardRule } from '../../CardRule';
3
4
  import { CardSuit } from '../../CardSuit';
4
5
  import { CardType } from '../../CardType';
5
6
  import { MaterialType } from '../../MaterialType';
6
- import { UndeadRule } from './UndeadRule';
7
- class NosferatisRule extends UndeadRule {
7
+ class NosferatisRule extends CardRule {
8
8
  getPowerIfNotStunned() {
9
9
  const foeCreatures = this.creatures.player(this.foe);
10
10
  return super.getPowerIfNotStunned() + foeCreatures.length;
@@ -1,9 +1,9 @@
1
1
  import { Material } from '@gamepark/rules-api';
2
+ import { CardRule } from '../../CardRule';
2
3
  import { CardSuit } from '../../CardSuit';
3
4
  import { CardType } from '../../CardType';
4
5
  import { DiscardEffect, ReturnCardEffect } from '../../EffectTraits';
5
- import { UndeadRule } from './UndeadRule';
6
- declare class TheGreatToadyRule extends UndeadRule implements DiscardEffect, ReturnCardEffect {
6
+ declare class TheGreatToadyRule extends CardRule implements DiscardEffect, ReturnCardEffect {
7
7
  activate(): void;
8
8
  canDraw(): boolean;
9
9
  getDiscardTargets(): Material;
@@ -1,12 +1,12 @@
1
1
  import { RuleId } from '../../../rules/RuleId';
2
2
  import { cardProperties } from '../../CardProperties';
3
+ import { CardRule } from '../../CardRule';
3
4
  import { CardSuit } from '../../CardSuit';
4
5
  import { CardTag } from '../../CardTag';
5
6
  import { CardType } from '../../CardType';
6
7
  import { LocationType } from '../../LocationType';
7
8
  import { MaterialType } from '../../MaterialType';
8
- import { UndeadRule } from './UndeadRule';
9
- class TheGreatToadyRule extends UndeadRule {
9
+ class TheGreatToadyRule extends CardRule {
10
10
  activate() {
11
11
  if (this.canDraw()) {
12
12
  this.addPendingEffect(RuleId.DrawEffect);
@@ -7,7 +7,7 @@ class ArmadaRule extends CardRule {
7
7
  this.addPendingEffect(RuleId.ChallengeEffect);
8
8
  }
9
9
  onChallengeAccepted() {
10
- this.addPendingEffect(RuleId.ArmadaEffect);
10
+ this.addPendingEffect(RuleId.MulliganEffect);
11
11
  }
12
12
  }
13
13
  export const Armada = {