@gamepark/skyrift 0.1.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 (183) hide show
  1. package/dist/CustomMoveType.d.ts +9 -0
  2. package/dist/CustomMoveType.js +10 -0
  3. package/dist/Deck.d.ts +4 -0
  4. package/dist/Deck.js +5 -0
  5. package/dist/Memory.d.ts +10 -0
  6. package/dist/Memory.js +11 -0
  7. package/dist/SkyriftOptions.d.ts +10 -0
  8. package/dist/SkyriftOptions.js +11 -0
  9. package/dist/SkyriftRules.d.ts +90 -0
  10. package/dist/SkyriftRules.js +140 -0
  11. package/dist/SkyriftSetup.d.ts +12 -0
  12. package/dist/SkyriftSetup.js +40 -0
  13. package/dist/index.d.ts +3 -0
  14. package/dist/index.js +3 -0
  15. package/dist/material/Card.d.ts +39 -0
  16. package/dist/material/Card.js +35 -0
  17. package/dist/material/CardProperties.d.ts +14 -0
  18. package/dist/material/CardProperties.js +67 -0
  19. package/dist/material/CardRule.d.ts +36 -0
  20. package/dist/material/CardRule.js +113 -0
  21. package/dist/material/CardSuit.d.ts +5 -0
  22. package/dist/material/CardSuit.js +6 -0
  23. package/dist/material/CardTag.d.ts +5 -0
  24. package/dist/material/CardTag.js +6 -0
  25. package/dist/material/CardType.d.ts +4 -0
  26. package/dist/material/CardType.js +5 -0
  27. package/dist/material/Effect.d.ts +4 -0
  28. package/dist/material/Effect.js +1 -0
  29. package/dist/material/LocationType.d.ts +14 -0
  30. package/dist/material/LocationType.js +15 -0
  31. package/dist/material/MaterialType.d.ts +6 -0
  32. package/dist/material/MaterialType.js +7 -0
  33. package/dist/material/decks/HearthBlade.d.ts +18 -0
  34. package/dist/material/decks/HearthBlade.js +19 -0
  35. package/dist/material/decks/HighWave.d.ts +18 -0
  36. package/dist/material/decks/HighWave.js +19 -0
  37. package/dist/material/decks/heathblade/ArcherRule.d.ts +6 -0
  38. package/dist/material/decks/heathblade/ArcherRule.js +15 -0
  39. package/dist/material/decks/heathblade/Armada.d.ts +14 -0
  40. package/dist/material/decks/heathblade/Armada.js +16 -0
  41. package/dist/material/decks/heathblade/ArmadaEffectRule.d.ts +7 -0
  42. package/dist/material/decks/heathblade/ArmadaEffectRule.js +17 -0
  43. package/dist/material/decks/heathblade/Confluence.d.ts +17 -0
  44. package/dist/material/decks/heathblade/Confluence.js +19 -0
  45. package/dist/material/decks/heathblade/CoverOfNight.d.ts +13 -0
  46. package/dist/material/decks/heathblade/CoverOfNight.js +12 -0
  47. package/dist/material/decks/heathblade/CoverOfNightEffectRule.d.ts +4 -0
  48. package/dist/material/decks/heathblade/CoverOfNightEffectRule.js +4 -0
  49. package/dist/material/decks/heathblade/ElaraBlazingArrow.d.ts +14 -0
  50. package/dist/material/decks/heathblade/ElaraBlazingArrow.js +13 -0
  51. package/dist/material/decks/heathblade/Harvest.d.ts +13 -0
  52. package/dist/material/decks/heathblade/Harvest.js +12 -0
  53. package/dist/material/decks/heathblade/HarvestEffectRule.d.ts +4 -0
  54. package/dist/material/decks/heathblade/HarvestEffectRule.js +6 -0
  55. package/dist/material/decks/heathblade/HedgeKnight.d.ts +15 -0
  56. package/dist/material/decks/heathblade/HedgeKnight.js +18 -0
  57. package/dist/material/decks/heathblade/LoyalSquire.d.ts +14 -0
  58. package/dist/material/decks/heathblade/LoyalSquire.js +16 -0
  59. package/dist/material/decks/heathblade/LoyalSquireEffectRule.d.ts +6 -0
  60. package/dist/material/decks/heathblade/LoyalSquireEffectRule.js +14 -0
  61. package/dist/material/decks/heathblade/Nightguard.d.ts +13 -0
  62. package/dist/material/decks/heathblade/Nightguard.js +22 -0
  63. package/dist/material/decks/heathblade/OzmaTheMage.d.ts +17 -0
  64. package/dist/material/decks/heathblade/OzmaTheMage.js +28 -0
  65. package/dist/material/decks/heathblade/OzmaTheMageEffectRule.d.ts +4 -0
  66. package/dist/material/decks/heathblade/OzmaTheMageEffectRule.js +20 -0
  67. package/dist/material/decks/heathblade/PrincessLitha.d.ts +17 -0
  68. package/dist/material/decks/heathblade/PrincessLitha.js +28 -0
  69. package/dist/material/decks/heathblade/PrincessLithaEffectRule.d.ts +6 -0
  70. package/dist/material/decks/heathblade/PrincessLithaEffectRule.js +15 -0
  71. package/dist/material/decks/heathblade/RobbinsMasterOfArms.d.ts +15 -0
  72. package/dist/material/decks/heathblade/RobbinsMasterOfArms.js +14 -0
  73. package/dist/material/decks/heathblade/RobbinsMasterOfArmsEffectRule.d.ts +5 -0
  74. package/dist/material/decks/heathblade/RobbinsMasterOfArmsEffectRule.js +29 -0
  75. package/dist/material/decks/heathblade/Sacrifice.d.ts +13 -0
  76. package/dist/material/decks/heathblade/Sacrifice.js +12 -0
  77. package/dist/material/decks/heathblade/SacrificeEffectRule.d.ts +10 -0
  78. package/dist/material/decks/heathblade/SacrificeEffectRule.js +48 -0
  79. package/dist/material/decks/heathblade/Shadowbolt.d.ts +15 -0
  80. package/dist/material/decks/heathblade/Shadowbolt.js +14 -0
  81. package/dist/material/decks/heathblade/SoulBlade.d.ts +13 -0
  82. package/dist/material/decks/heathblade/SoulBlade.js +12 -0
  83. package/dist/material/decks/heathblade/SoulBladeEffectRule.d.ts +5 -0
  84. package/dist/material/decks/heathblade/SoulBladeEffectRule.js +15 -0
  85. package/dist/material/decks/heathblade/WatchTower.d.ts +14 -0
  86. package/dist/material/decks/heathblade/WatchTower.js +16 -0
  87. package/dist/material/decks/heathblade/WatchTowerEffectRule.d.ts +4 -0
  88. package/dist/material/decks/heathblade/WatchTowerEffectRule.js +13 -0
  89. package/dist/material/decks/heathblade/WoodSlinger.d.ts +15 -0
  90. package/dist/material/decks/heathblade/WoodSlinger.js +14 -0
  91. package/dist/material/decks/highwave/AeliaSteadyHand.d.ts +13 -0
  92. package/dist/material/decks/highwave/AeliaSteadyHand.js +12 -0
  93. package/dist/material/decks/highwave/BoardingParty.d.ts +13 -0
  94. package/dist/material/decks/highwave/BoardingParty.js +12 -0
  95. package/dist/material/decks/highwave/BoardingPartyEffectRule.d.ts +10 -0
  96. package/dist/material/decks/highwave/BoardingPartyEffectRule.js +59 -0
  97. package/dist/material/decks/highwave/BrassDragon.d.ts +15 -0
  98. package/dist/material/decks/highwave/BrassDragon.js +14 -0
  99. package/dist/material/decks/highwave/CannonCardRule.d.ts +4 -0
  100. package/dist/material/decks/highwave/CannonCardRule.js +19 -0
  101. package/dist/material/decks/highwave/DarkBlazer.d.ts +15 -0
  102. package/dist/material/decks/highwave/DarkBlazer.js +14 -0
  103. package/dist/material/decks/highwave/DarkBlazerEffectRule.d.ts +4 -0
  104. package/dist/material/decks/highwave/DarkBlazerEffectRule.js +4 -0
  105. package/dist/material/decks/highwave/DawnsDoom.d.ts +15 -0
  106. package/dist/material/decks/highwave/DawnsDoom.js +14 -0
  107. package/dist/material/decks/highwave/DawnsDoomEffectRule.d.ts +4 -0
  108. package/dist/material/decks/highwave/DawnsDoomEffectRule.js +14 -0
  109. package/dist/material/decks/highwave/LongJawsSilver.d.ts +15 -0
  110. package/dist/material/decks/highwave/LongJawsSilver.js +19 -0
  111. package/dist/material/decks/highwave/MistyGunner.d.ts +14 -0
  112. package/dist/material/decks/highwave/MistyGunner.js +13 -0
  113. package/dist/material/decks/highwave/OttoPouchy.d.ts +13 -0
  114. package/dist/material/decks/highwave/OttoPouchy.js +12 -0
  115. package/dist/material/decks/highwave/OttoPouchyEffectRule.d.ts +4 -0
  116. package/dist/material/decks/highwave/OttoPouchyEffectRule.js +9 -0
  117. package/dist/material/decks/highwave/PowderMonkey.d.ts +16 -0
  118. package/dist/material/decks/highwave/PowderMonkey.js +19 -0
  119. package/dist/material/decks/highwave/PowderMonkeyEffectRule.d.ts +5 -0
  120. package/dist/material/decks/highwave/PowderMonkeyEffectRule.js +13 -0
  121. package/dist/material/decks/highwave/RicoSkeye.d.ts +16 -0
  122. package/dist/material/decks/highwave/RicoSkeye.js +20 -0
  123. package/dist/material/decks/highwave/RicoSkeyeEffectRule.d.ts +7 -0
  124. package/dist/material/decks/highwave/RicoSkeyeEffectRule.js +21 -0
  125. package/dist/material/decks/highwave/SaltyDog.d.ts +13 -0
  126. package/dist/material/decks/highwave/SaltyDog.js +12 -0
  127. package/dist/material/decks/highwave/SaltyDogEffectRule.d.ts +4 -0
  128. package/dist/material/decks/highwave/SaltyDogEffectRule.js +26 -0
  129. package/dist/material/decks/highwave/Scallywag.d.ts +13 -0
  130. package/dist/material/decks/highwave/Scallywag.js +12 -0
  131. package/dist/material/decks/highwave/ScallywagEffectRule.d.ts +5 -0
  132. package/dist/material/decks/highwave/ScallywagEffectRule.js +13 -0
  133. package/dist/material/decks/highwave/Skupper.d.ts +13 -0
  134. package/dist/material/decks/highwave/Skupper.js +12 -0
  135. package/dist/material/decks/highwave/SkupperEffectRule.d.ts +5 -0
  136. package/dist/material/decks/highwave/SkupperEffectRule.js +12 -0
  137. package/dist/material/decks/highwave/SurpriseLoot.d.ts +13 -0
  138. package/dist/material/decks/highwave/SurpriseLoot.js +12 -0
  139. package/dist/material/decks/highwave/SurpriseLootEffectRule.d.ts +4 -0
  140. package/dist/material/decks/highwave/SurpriseLootEffectRule.js +13 -0
  141. package/dist/material/decks/highwave/TreasureMap.d.ts +14 -0
  142. package/dist/material/decks/highwave/TreasureMap.js +15 -0
  143. package/dist/material/decks/highwave/TropicalRuffian.d.ts +13 -0
  144. package/dist/material/decks/highwave/TropicalRuffian.js +12 -0
  145. package/dist/rules/ChallengeRule.d.ts +7 -0
  146. package/dist/rules/ChallengeRule.js +23 -0
  147. package/dist/rules/DestroyEffectRule.d.ts +8 -0
  148. package/dist/rules/DestroyEffectRule.js +21 -0
  149. package/dist/rules/DiscardEffectRule.d.ts +10 -0
  150. package/dist/rules/DiscardEffectRule.js +35 -0
  151. package/dist/rules/DrawEffectRule.d.ts +6 -0
  152. package/dist/rules/DrawEffectRule.js +15 -0
  153. package/dist/rules/EffectRule.d.ts +7 -0
  154. package/dist/rules/EffectRule.js +41 -0
  155. package/dist/rules/EndRoundRule.d.ts +4 -0
  156. package/dist/rules/EndRoundRule.js +47 -0
  157. package/dist/rules/GainCrystalEffectRule.d.ts +5 -0
  158. package/dist/rules/GainCrystalEffectRule.js +8 -0
  159. package/dist/rules/MayChallengeRule.d.ts +6 -0
  160. package/dist/rules/MayChallengeRule.js +17 -0
  161. package/dist/rules/PlayCardRule.d.ts +9 -0
  162. package/dist/rules/PlayCardRule.js +92 -0
  163. package/dist/rules/PlayerHelper.d.ts +13 -0
  164. package/dist/rules/PlayerHelper.js +36 -0
  165. package/dist/rules/PrepareNextRoundRule.d.ts +7 -0
  166. package/dist/rules/PrepareNextRoundRule.js +24 -0
  167. package/dist/rules/PutPowerTokenEffectRule.d.ts +8 -0
  168. package/dist/rules/PutPowerTokenEffectRule.js +24 -0
  169. package/dist/rules/ReturnCardRule.d.ts +9 -0
  170. package/dist/rules/ReturnCardRule.js +27 -0
  171. package/dist/rules/RuleId.d.ts +34 -0
  172. package/dist/rules/RuleId.js +36 -0
  173. package/dist/rules/StartPlayerTurnRule.d.ts +4 -0
  174. package/dist/rules/StartPlayerTurnRule.js +42 -0
  175. package/dist/rules/StartRoundRule.d.ts +5 -0
  176. package/dist/rules/StartRoundRule.js +12 -0
  177. package/dist/rules/StashPowerTokenEffectRule.d.ts +6 -0
  178. package/dist/rules/StashPowerTokenEffectRule.js +20 -0
  179. package/dist/rules/StealCrystalEffectRule.d.ts +5 -0
  180. package/dist/rules/StealCrystalEffectRule.js +13 -0
  181. package/dist/rules/StunCardRule.d.ts +9 -0
  182. package/dist/rules/StunCardRule.js +40 -0
  183. package/package.json +33 -0
@@ -0,0 +1,22 @@
1
+ import { cardProperties } from '../../CardProperties';
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 NightguardRule extends CardRule {
8
+ getPowerIfNotStunned() {
9
+ const creatures = this.material(MaterialType.Card)
10
+ .location(LocationType.PlayArea)
11
+ .id((id) => cardProperties[id.front].type === CardType.Creature);
12
+ const myCreatures = creatures.player(this.player).length;
13
+ const opponentCreatures = creatures.player((p) => p !== this.player).length;
14
+ return super.getPowerIfNotStunned() + (opponentCreatures > myCreatures ? 3 : 0);
15
+ }
16
+ }
17
+ export const Nightguard = {
18
+ power: 2,
19
+ type: CardType.Creature,
20
+ suit: CardSuit.Night,
21
+ rule: NightguardRule
22
+ };
@@ -0,0 +1,17 @@
1
+ import { MaterialMove } 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
+ declare class OzmaTheMageRule extends CardRule {
8
+ onCardEnters(card: Card, side: Deck): MaterialMove[];
9
+ onLeave(): MaterialMove[];
10
+ }
11
+ export declare const OzmaTheMage: {
12
+ power: number;
13
+ type: CardType;
14
+ suit: CardSuit;
15
+ rule: typeof OzmaTheMageRule;
16
+ };
17
+ export {};
@@ -0,0 +1,28 @@
1
+ import { cardProperties } from '../../CardProperties';
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 OzmaTheMageRule extends CardRule {
8
+ onCardEnters(card, side) {
9
+ if (side !== this.player && cardProperties[card].type === CardType.Action) {
10
+ this.addPendingEffect();
11
+ }
12
+ return [];
13
+ }
14
+ onLeave() {
15
+ const moves = this.removeStunTokens();
16
+ const powerTokens = this.material(MaterialType.PowerToken).location(LocationType.CardPowerTokens).parent(this.index);
17
+ if (powerTokens.getQuantity() > 0) {
18
+ moves.push(powerTokens.moveItem({ type: LocationType.PlayerStash, player: this.player }, powerTokens.getQuantity()));
19
+ }
20
+ return moves;
21
+ }
22
+ }
23
+ export const OzmaTheMage = {
24
+ power: 1,
25
+ type: CardType.Creature,
26
+ suit: CardSuit.Twilight,
27
+ rule: OzmaTheMageRule
28
+ };
@@ -0,0 +1,4 @@
1
+ import { EffectRule } from '../../../rules/EffectRule';
2
+ export declare class OzmaTheMageEffectRule extends EffectRule {
3
+ onRuleStart(): import("@gamepark/rules-api").MaterialMove[];
4
+ }
@@ -0,0 +1,20 @@
1
+ import { EffectRule } from '../../../rules/EffectRule';
2
+ import { Memory } from '../../../Memory';
3
+ import { LocationType } from '../../LocationType';
4
+ import { MaterialType } from '../../MaterialType';
5
+ export class OzmaTheMageEffectRule extends EffectRule {
6
+ onRuleStart() {
7
+ const ozmaIndex = this.remind(Memory.PendingEffects)[0].cardIndex;
8
+ return [
9
+ this.material(MaterialType.PowerToken)
10
+ .location(LocationType.PowerTokenStock)
11
+ .createItem({
12
+ location: {
13
+ type: LocationType.CardPowerTokens,
14
+ parent: ozmaIndex
15
+ }
16
+ }),
17
+ ...this.endEffect()
18
+ ];
19
+ }
20
+ }
@@ -0,0 +1,17 @@
1
+ import { MaterialMove } from '@gamepark/rules-api';
2
+ import { CardRule } from '../../CardRule';
3
+ import { CardSuit } from '../../CardSuit';
4
+ import { CardTag } from '../../CardTag';
5
+ import { CardType } from '../../CardType';
6
+ declare class PrincessLithaRule extends CardRule {
7
+ getPowerIfNotStunned(): number;
8
+ onWinRound(): MaterialMove[];
9
+ }
10
+ export declare const PrincessLitha: {
11
+ power: number;
12
+ type: CardType;
13
+ tag: CardTag;
14
+ suit: CardSuit;
15
+ rule: typeof PrincessLithaRule;
16
+ };
17
+ export {};
@@ -0,0 +1,28 @@
1
+ import { cardProperties } from '../../CardProperties';
2
+ import { CardRule } from '../../CardRule';
3
+ import { CardSuit } from '../../CardSuit';
4
+ import { CardTag } from '../../CardTag';
5
+ import { CardType } from '../../CardType';
6
+ import { LocationType } from '../../LocationType';
7
+ import { MaterialType } from '../../MaterialType';
8
+ class PrincessLithaRule extends CardRule {
9
+ getPowerIfNotStunned() {
10
+ const otherCreaturesCount = this.material(MaterialType.Card)
11
+ .location(LocationType.PlayArea)
12
+ .player(this.player)
13
+ .id((id) => cardProperties[id.front].type === CardType.Creature)
14
+ .length - 1;
15
+ return super.getPowerIfNotStunned() + otherCreaturesCount;
16
+ }
17
+ onWinRound() {
18
+ this.addPendingEffect();
19
+ return [];
20
+ }
21
+ }
22
+ export const PrincessLitha = {
23
+ power: 2,
24
+ type: CardType.Creature,
25
+ tag: CardTag.Knight,
26
+ suit: CardSuit.Day,
27
+ rule: PrincessLithaRule
28
+ };
@@ -0,0 +1,6 @@
1
+ import { CustomMove } from '@gamepark/rules-api';
2
+ import { EffectRule } from '../../../rules/EffectRule';
3
+ export declare class PrincessLithaEffectRule extends EffectRule {
4
+ getPlayerMoves(): CustomMove[];
5
+ onCustomMove(move: CustomMove): import("@gamepark/rules-api").MaterialMove[];
6
+ }
@@ -0,0 +1,15 @@
1
+ import { CustomMoveType } from '../../../CustomMoveType';
2
+ import { Memory } from '../../../Memory';
3
+ import { EffectRule } from '../../../rules/EffectRule';
4
+ export class PrincessLithaEffectRule extends EffectRule {
5
+ getPlayerMoves() {
6
+ return this.game.players.map((player) => this.customMove(CustomMoveType.ChoosePlayer, player));
7
+ }
8
+ onCustomMove(move) {
9
+ if (move.type === CustomMoveType.ChoosePlayer) {
10
+ this.memorize(Memory.NextRoundStartPlayer, move.data);
11
+ return this.endEffect();
12
+ }
13
+ return [];
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ import { CardRule } from '../../CardRule';
2
+ import { CardSuit } from '../../CardSuit';
3
+ import { CardTag } from '../../CardTag';
4
+ import { CardType } from '../../CardType';
5
+ declare class RobbinsMasterOfArmsRule extends CardRule {
6
+ entersEffect: boolean;
7
+ }
8
+ export declare const RobbinsMasterOfArms: {
9
+ power: number;
10
+ type: CardType;
11
+ tag: CardTag;
12
+ suit: CardSuit;
13
+ rule: typeof RobbinsMasterOfArmsRule;
14
+ };
15
+ export {};
@@ -0,0 +1,14 @@
1
+ import { CardRule } from '../../CardRule';
2
+ import { CardSuit } from '../../CardSuit';
3
+ import { CardTag } from '../../CardTag';
4
+ import { CardType } from '../../CardType';
5
+ class RobbinsMasterOfArmsRule extends CardRule {
6
+ entersEffect = true;
7
+ }
8
+ export const RobbinsMasterOfArms = {
9
+ power: 3,
10
+ type: CardType.Creature,
11
+ tag: CardTag.Knight,
12
+ suit: CardSuit.Day,
13
+ rule: RobbinsMasterOfArmsRule
14
+ };
@@ -0,0 +1,5 @@
1
+ import { MaterialMove } from '@gamepark/rules-api';
2
+ import { EffectRule } from '../../../rules/EffectRule';
3
+ export declare class RobbinsMasterOfArmsEffectRule extends EffectRule {
4
+ onRuleStart(): MaterialMove[];
5
+ }
@@ -0,0 +1,29 @@
1
+ import { Memory } from '../../../Memory';
2
+ import { cardProperties } from '../../CardProperties';
3
+ import { CardType } from '../../CardType';
4
+ import { LocationType } from '../../LocationType';
5
+ import { MaterialType } from '../../MaterialType';
6
+ import { EffectRule } from '../../../rules/EffectRule';
7
+ export class RobbinsMasterOfArmsEffectRule extends EffectRule {
8
+ onRuleStart() {
9
+ const moves = [];
10
+ const robbinsIndex = this.remind(Memory.PendingEffects)[0].cardIndex;
11
+ const otherCreatures = this.material(MaterialType.Card)
12
+ .location(LocationType.PlayArea)
13
+ .player(this.player)
14
+ .id((id) => cardProperties[id.front].type === CardType.Creature)
15
+ .getIndexes()
16
+ .filter(index => index !== robbinsIndex);
17
+ for (const creatureIndex of otherCreatures) {
18
+ moves.push(this.material(MaterialType.PowerToken)
19
+ .location(LocationType.PowerTokenStock)
20
+ .createItem({
21
+ location: {
22
+ type: LocationType.CardPowerTokens,
23
+ parent: creatureIndex
24
+ }
25
+ }));
26
+ }
27
+ return [...moves, ...this.endEffect()];
28
+ }
29
+ }
@@ -0,0 +1,13 @@
1
+ import { CardRule } from '../../CardRule';
2
+ import { CardSuit } from '../../CardSuit';
3
+ import { CardType } from '../../CardType';
4
+ declare class SacrificeRule extends CardRule {
5
+ entersEffect: boolean;
6
+ }
7
+ export declare const Sacrifice: {
8
+ power: number;
9
+ type: CardType;
10
+ suit: CardSuit;
11
+ rule: typeof SacrificeRule;
12
+ };
13
+ export {};
@@ -0,0 +1,12 @@
1
+ import { CardRule } from '../../CardRule';
2
+ import { CardSuit } from '../../CardSuit';
3
+ import { CardType } from '../../CardType';
4
+ class SacrificeRule extends CardRule {
5
+ entersEffect = true;
6
+ }
7
+ export const Sacrifice = {
8
+ power: 4,
9
+ type: CardType.Action,
10
+ suit: CardSuit.Night,
11
+ rule: SacrificeRule
12
+ };
@@ -0,0 +1,10 @@
1
+ import { ItemMove, Material, MaterialMove } from '@gamepark/rules-api';
2
+ import { DestroyEffectRule } from '../../../rules/DestroyEffectRule';
3
+ export declare class SacrificeEffectRule extends DestroyEffectRule {
4
+ onRuleStart(): never[];
5
+ get isSacrificeStep(): boolean;
6
+ getPlayerMoves(): MaterialMove[];
7
+ getTargets(): Material;
8
+ afterItemMove(move: ItemMove): MaterialMove[];
9
+ onRuleEnd(): never[];
10
+ }
@@ -0,0 +1,48 @@
1
+ import { isMoveItemType } from '@gamepark/rules-api';
2
+ import { CustomMoveType } from '../../../CustomMoveType';
3
+ import { Memory } from '../../../Memory';
4
+ import { DestroyEffectRule } from '../../../rules/DestroyEffectRule';
5
+ import { cardProperties } from '../../CardProperties';
6
+ import { CardType } from '../../CardType';
7
+ import { LocationType } from '../../LocationType';
8
+ import { MaterialType } from '../../MaterialType';
9
+ export class SacrificeEffectRule extends DestroyEffectRule {
10
+ onRuleStart() {
11
+ this.memorize(Memory.EffectCount, 0);
12
+ return [];
13
+ }
14
+ get isSacrificeStep() {
15
+ return this.remind(Memory.EffectCount) === 0;
16
+ }
17
+ getPlayerMoves() {
18
+ const moves = super.getPlayerMoves();
19
+ if (this.isSacrificeStep) {
20
+ moves.push(this.customMove(CustomMoveType.EndEffect));
21
+ }
22
+ return moves;
23
+ }
24
+ getTargets() {
25
+ const creatures = this.material(MaterialType.Card)
26
+ .location(LocationType.PlayArea)
27
+ .id((id) => cardProperties[id.front].type === CardType.Creature);
28
+ if (this.isSacrificeStep) {
29
+ return creatures.player(this.player);
30
+ }
31
+ else {
32
+ return creatures;
33
+ }
34
+ }
35
+ afterItemMove(move) {
36
+ if (isMoveItemType(MaterialType.Card)(move) && move.location.type === LocationType.PlayerDiscard) {
37
+ const count = this.memorize(Memory.EffectCount, (count) => count + 1);
38
+ if (count > 1 || this.getTargets().length === 0) {
39
+ return this.endEffect();
40
+ }
41
+ }
42
+ return [];
43
+ }
44
+ onRuleEnd() {
45
+ this.forget(Memory.EffectCount);
46
+ return [];
47
+ }
48
+ }
@@ -0,0 +1,15 @@
1
+ import { CardSuit } from '../../CardSuit';
2
+ import { CardTag } from '../../CardTag';
3
+ import { CardType } from '../../CardType';
4
+ import { ArcherRule } from './ArcherRule';
5
+ declare class ShadowboltRule extends ArcherRule {
6
+ powerBonus: number;
7
+ }
8
+ export declare const Shadowbolt: {
9
+ power: number;
10
+ type: CardType;
11
+ tag: CardTag;
12
+ suit: CardSuit;
13
+ rule: typeof ShadowboltRule;
14
+ };
15
+ export {};
@@ -0,0 +1,14 @@
1
+ import { CardSuit } from '../../CardSuit';
2
+ import { CardTag } from '../../CardTag';
3
+ import { CardType } from '../../CardType';
4
+ import { ArcherRule } from './ArcherRule';
5
+ class ShadowboltRule extends ArcherRule {
6
+ powerBonus = 3;
7
+ }
8
+ export const Shadowbolt = {
9
+ power: 2,
10
+ type: CardType.Creature,
11
+ tag: CardTag.Archer,
12
+ suit: CardSuit.Night,
13
+ rule: ShadowboltRule
14
+ };
@@ -0,0 +1,13 @@
1
+ import { CardRule } from '../../CardRule';
2
+ import { CardSuit } from '../../CardSuit';
3
+ import { CardType } from '../../CardType';
4
+ declare class SoulBladeRule extends CardRule {
5
+ entersEffect: boolean;
6
+ }
7
+ export declare const SoulBlade: {
8
+ power: number;
9
+ type: CardType;
10
+ suit: CardSuit;
11
+ rule: typeof SoulBladeRule;
12
+ };
13
+ export {};
@@ -0,0 +1,12 @@
1
+ import { CardRule } from '../../CardRule';
2
+ import { CardSuit } from '../../CardSuit';
3
+ import { CardType } from '../../CardType';
4
+ class SoulBladeRule extends CardRule {
5
+ entersEffect = true;
6
+ }
7
+ export const SoulBlade = {
8
+ power: 2,
9
+ type: CardType.Action,
10
+ suit: CardSuit.Day,
11
+ rule: SoulBladeRule
12
+ };
@@ -0,0 +1,5 @@
1
+ import { Material } from '@gamepark/rules-api';
2
+ import { DestroyEffectRule } from '../../../rules/DestroyEffectRule';
3
+ export declare class SoulBladeEffectRule extends DestroyEffectRule {
4
+ getTargets(): Material;
5
+ }
@@ -0,0 +1,15 @@
1
+ import { DestroyEffectRule } from '../../../rules/DestroyEffectRule';
2
+ import { PlayerHelper } from '../../../rules/PlayerHelper';
3
+ import { cardProperties } from '../../CardProperties';
4
+ import { CardType } from '../../CardType';
5
+ import { LocationType } from '../../LocationType';
6
+ import { MaterialType } from '../../MaterialType';
7
+ export class SoulBladeEffectRule extends DestroyEffectRule {
8
+ getTargets() {
9
+ const helper = new PlayerHelper(this.game);
10
+ return this.material(MaterialType.Card)
11
+ .location(LocationType.PlayArea)
12
+ .id((id) => cardProperties[id.front].type === CardType.Creature)
13
+ .index((index) => helper.getCardRule(index).getPower() <= 4);
14
+ }
15
+ }
@@ -0,0 +1,14 @@
1
+ import { CardRule } from '../../CardRule';
2
+ import { CardSuit } from '../../CardSuit';
3
+ import { CardType } from '../../CardType';
4
+ declare class WatchTowerRule extends CardRule {
5
+ challenge: boolean;
6
+ onChallengeAccepted(): import("@gamepark/rules-api").CustomMove[];
7
+ }
8
+ export declare const WatchTower: {
9
+ power: number;
10
+ type: CardType;
11
+ suit: CardSuit;
12
+ rule: typeof WatchTowerRule;
13
+ };
14
+ export {};
@@ -0,0 +1,16 @@
1
+ import { CardRule } from '../../CardRule';
2
+ import { CardSuit } from '../../CardSuit';
3
+ import { CardType } from '../../CardType';
4
+ class WatchTowerRule extends CardRule {
5
+ challenge = true;
6
+ onChallengeAccepted() {
7
+ this.addPendingEffect();
8
+ return super.onChallengeAccepted();
9
+ }
10
+ }
11
+ export const WatchTower = {
12
+ power: 2,
13
+ type: CardType.Action,
14
+ suit: CardSuit.Night,
15
+ rule: WatchTowerRule
16
+ };
@@ -0,0 +1,4 @@
1
+ import { DrawEffectRule } from '../../../rules/DrawEffectRule';
2
+ export declare class WatchTowerEffectRule extends DrawEffectRule {
3
+ getDrawCount(): number;
4
+ }
@@ -0,0 +1,13 @@
1
+ import { DrawEffectRule } from '../../../rules/DrawEffectRule';
2
+ import { cardProperties } from '../../CardProperties';
3
+ import { CardType } from '../../CardType';
4
+ import { LocationType } from '../../LocationType';
5
+ import { MaterialType } from '../../MaterialType';
6
+ export class WatchTowerEffectRule extends DrawEffectRule {
7
+ getDrawCount() {
8
+ const creatures = this.material(MaterialType.Card)
9
+ .location(LocationType.PlayArea)
10
+ .id((id) => cardProperties[id.front].type === CardType.Creature);
11
+ return creatures.length - 2 * creatures.player(this.player).length;
12
+ }
13
+ }
@@ -0,0 +1,15 @@
1
+ import { CardSuit } from '../../CardSuit';
2
+ import { CardTag } from '../../CardTag';
3
+ import { CardType } from '../../CardType';
4
+ import { ArcherRule } from './ArcherRule';
5
+ declare class WoodSlingerRule extends ArcherRule {
6
+ powerBonus: number;
7
+ }
8
+ export declare const WoodSlinger: {
9
+ power: number;
10
+ type: CardType;
11
+ tag: CardTag;
12
+ suit: CardSuit;
13
+ rule: typeof WoodSlingerRule;
14
+ };
15
+ export {};
@@ -0,0 +1,14 @@
1
+ import { CardSuit } from '../../CardSuit';
2
+ import { CardTag } from '../../CardTag';
3
+ import { CardType } from '../../CardType';
4
+ import { ArcherRule } from './ArcherRule';
5
+ class WoodSlingerRule extends ArcherRule {
6
+ powerBonus = 2;
7
+ }
8
+ export const WoodSlinger = {
9
+ power: 2,
10
+ type: CardType.Creature,
11
+ tag: CardTag.Archer,
12
+ suit: CardSuit.Twilight,
13
+ rule: WoodSlingerRule
14
+ };
@@ -0,0 +1,13 @@
1
+ import { CardRule } from '../../CardRule';
2
+ import { CardSuit } from '../../CardSuit';
3
+ import { CardType } from '../../CardType';
4
+ declare class AeliaSteadyHandRule extends CardRule {
5
+ oncePerTurnEffect: boolean;
6
+ }
7
+ export declare const AeliaSteadyHand: {
8
+ power: number;
9
+ type: CardType;
10
+ suit: CardSuit;
11
+ rule: typeof AeliaSteadyHandRule;
12
+ };
13
+ export {};
@@ -0,0 +1,12 @@
1
+ import { CardRule } from '../../CardRule';
2
+ import { CardSuit } from '../../CardSuit';
3
+ import { CardType } from '../../CardType';
4
+ class AeliaSteadyHandRule extends CardRule {
5
+ oncePerTurnEffect = true;
6
+ }
7
+ export const AeliaSteadyHand = {
8
+ power: 2,
9
+ type: CardType.Creature,
10
+ suit: CardSuit.Day,
11
+ rule: AeliaSteadyHandRule
12
+ };
@@ -0,0 +1,13 @@
1
+ import { CardRule } from '../../CardRule';
2
+ import { CardSuit } from '../../CardSuit';
3
+ import { CardType } from '../../CardType';
4
+ declare class BoardingPartyRule extends CardRule {
5
+ entersEffect: boolean;
6
+ }
7
+ export declare const BoardingParty: {
8
+ power: number;
9
+ type: CardType;
10
+ suit: CardSuit;
11
+ rule: typeof BoardingPartyRule;
12
+ };
13
+ export {};
@@ -0,0 +1,12 @@
1
+ import { CardRule } from '../../CardRule';
2
+ import { CardSuit } from '../../CardSuit';
3
+ import { CardType } from '../../CardType';
4
+ class BoardingPartyRule extends CardRule {
5
+ entersEffect = true;
6
+ }
7
+ export const BoardingParty = {
8
+ power: 2,
9
+ type: CardType.Action,
10
+ suit: CardSuit.Night,
11
+ rule: BoardingPartyRule
12
+ };
@@ -0,0 +1,10 @@
1
+ import { CustomMove, ItemMove } from '@gamepark/rules-api';
2
+ import { DestroyEffectRule } from '../../../rules/DestroyEffectRule';
3
+ export declare class BoardingPartyEffectRule extends DestroyEffectRule {
4
+ onRuleStart(): never[];
5
+ get isBoardingPlayer(): boolean;
6
+ getPlayerMoves(): import("@gamepark/rules-api").MaterialMove[];
7
+ getTargets(): import("@gamepark/rules-api").Material<number, number, number>;
8
+ afterItemMove(move: ItemMove): import("@gamepark/rules-api").MaterialMove[];
9
+ onCustomMove(move: CustomMove): import("@gamepark/rules-api").MaterialMove[];
10
+ }
@@ -0,0 +1,59 @@
1
+ import { isMoveItemType } from '@gamepark/rules-api';
2
+ import { CustomMoveType } from '../../../CustomMoveType';
3
+ import { Memory } from '../../../Memory';
4
+ import { DestroyEffectRule } from '../../../rules/DestroyEffectRule';
5
+ import { RuleId } from '../../../rules/RuleId';
6
+ import { cardProperties } from '../../CardProperties';
7
+ import { CardType } from '../../CardType';
8
+ import { LocationType } from '../../LocationType';
9
+ import { MaterialType } from '../../MaterialType';
10
+ export class BoardingPartyEffectRule extends DestroyEffectRule {
11
+ onRuleStart() {
12
+ if (this.isBoardingPlayer) {
13
+ this.memorize(Memory.EffectCount, 0);
14
+ }
15
+ return [];
16
+ }
17
+ get isBoardingPlayer() {
18
+ return this.remind(Memory.CurrentPlayer) === this.player;
19
+ }
20
+ getPlayerMoves() {
21
+ const moves = super.getPlayerMoves();
22
+ if (this.isBoardingPlayer) {
23
+ moves.push(this.customMove(CustomMoveType.Pass));
24
+ }
25
+ return moves;
26
+ }
27
+ getTargets() {
28
+ return this.material(MaterialType.Card)
29
+ .location(LocationType.PlayArea)
30
+ .id((id) => cardProperties[id.front].type === CardType.Creature)
31
+ .player(this.player);
32
+ }
33
+ afterItemMove(move) {
34
+ if (isMoveItemType(MaterialType.Card)(move) && move.location.type === LocationType.PlayerDiscard) {
35
+ if (this.isBoardingPlayer) {
36
+ this.memorize(Memory.EffectCount, (count) => count + 1);
37
+ }
38
+ else {
39
+ const count = this.memorize(Memory.EffectCount, (count) => count - 1);
40
+ if (!count || !this.getTargets().length) {
41
+ this.forget(Memory.EffectCount);
42
+ return this.endEffect();
43
+ }
44
+ }
45
+ }
46
+ return [];
47
+ }
48
+ onCustomMove(move) {
49
+ if (move.type === CustomMoveType.Pass) {
50
+ if (this.remind(Memory.EffectCount)) {
51
+ return [this.startPlayerTurn(RuleId.BoardingPartyEffect, this.nextPlayer)];
52
+ }
53
+ else {
54
+ return this.endEffect();
55
+ }
56
+ }
57
+ return super.onCustomMove(move);
58
+ }
59
+ }
@@ -0,0 +1,15 @@
1
+ import { CardSuit } from '../../CardSuit';
2
+ import { CardTag } from '../../CardTag';
3
+ import { CardType } from '../../CardType';
4
+ import { CannonCardRule } from './CannonCardRule';
5
+ declare class BrassDragonRule extends CannonCardRule {
6
+ challenge: boolean;
7
+ }
8
+ export declare const BrassDragon: {
9
+ power: number;
10
+ type: CardType;
11
+ tag: CardTag;
12
+ suit: CardSuit;
13
+ rule: typeof BrassDragonRule;
14
+ };
15
+ export {};