@gamepark/skyrift 0.2.8 → 0.3.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.
- package/dist/Deck.d.ts +1 -0
- package/dist/Deck.js +1 -0
- package/dist/Memory.d.ts +2 -1
- package/dist/Memory.js +1 -0
- package/dist/SkyriftRules.d.ts +35 -14
- package/dist/SkyriftRules.js +42 -15
- package/dist/SkyriftSetup.js +3 -0
- package/dist/material/Card.d.ts +26 -10
- package/dist/material/Card.js +26 -10
- package/dist/material/CardProperties.js +52 -20
- package/dist/material/CardRule.d.ts +3 -2
- package/dist/material/CardRule.js +14 -0
- package/dist/material/OngoingEffect.d.ts +8 -0
- package/dist/material/OngoingEffect.js +5 -0
- package/dist/material/decks/HearthBlade.js +4 -4
- package/dist/material/decks/HighWave.js +10 -10
- package/dist/material/decks/WinSands.d.ts +18 -0
- package/dist/material/decks/WinSands.js +19 -0
- package/dist/material/decks/heathblade/Confluence.js +1 -1
- package/dist/material/decks/heathblade/Harvest.js +1 -1
- package/dist/material/decks/heathblade/OzmaTheMageEffectRule.js +1 -3
- package/dist/material/decks/heathblade/RobbinsMasterOfArmsEffectRule.js +1 -3
- package/dist/material/decks/highwave/BonnyTheGunner.d.ts +14 -0
- package/dist/material/decks/highwave/BonnyTheGunner.js +13 -0
- package/dist/material/decks/highwave/CannonCardRule.js +5 -3
- package/dist/material/decks/highwave/DarkArmageddon.d.ts +15 -0
- package/dist/material/decks/highwave/DarkArmageddon.js +14 -0
- package/dist/material/decks/highwave/DarkArmageddonEffectRule.d.ts +4 -0
- package/dist/material/decks/highwave/DarkArmageddonEffectRule.js +4 -0
- package/dist/material/decks/highwave/EyeOfSky.d.ts +16 -0
- package/dist/material/decks/highwave/EyeOfSky.js +20 -0
- package/dist/material/decks/highwave/EyeOfSkyEffectRule.d.ts +7 -0
- package/dist/material/decks/highwave/EyeOfSkyEffectRule.js +21 -0
- package/dist/material/decks/highwave/FortunesCourse.d.ts +14 -0
- package/dist/material/decks/highwave/FortunesCourse.js +15 -0
- package/dist/material/decks/highwave/GoldenApocalypse.d.ts +15 -0
- package/dist/material/decks/highwave/GoldenApocalypse.js +14 -0
- package/dist/material/decks/highwave/OscarScullion.d.ts +13 -0
- package/dist/material/decks/highwave/OscarScullion.js +12 -0
- package/dist/material/decks/highwave/OscarScullionEffectRule.d.ts +5 -0
- package/dist/material/decks/highwave/OscarScullionEffectRule.js +12 -0
- package/dist/material/decks/highwave/OttoFactotum.d.ts +13 -0
- package/dist/material/decks/highwave/OttoFactotum.js +12 -0
- package/dist/material/decks/highwave/OttoFactotumEffectRule.d.ts +4 -0
- package/dist/material/decks/highwave/OttoFactotumEffectRule.js +9 -0
- package/dist/material/decks/highwave/RiggingRaiders.d.ts +13 -0
- package/dist/material/decks/highwave/RiggingRaiders.js +12 -0
- package/dist/material/decks/highwave/RiggingRaidersEffectRule.d.ts +5 -0
- package/dist/material/decks/highwave/RiggingRaidersEffectRule.js +17 -0
- package/dist/material/decks/highwave/SeaScorcher.d.ts +16 -0
- package/dist/material/decks/highwave/SeaScorcher.js +19 -0
- package/dist/material/decks/highwave/SeaScorcherEffectRule.d.ts +5 -0
- package/dist/material/decks/highwave/SeaScorcherEffectRule.js +13 -0
- package/dist/material/decks/highwave/TideRover.d.ts +13 -0
- package/dist/material/decks/highwave/TideRover.js +12 -0
- package/dist/material/decks/highwave/TideRoverEffectRule.d.ts +4 -0
- package/dist/material/decks/highwave/TideRoverEffectRule.js +26 -0
- package/dist/material/decks/highwave/TropicalRuffian.js +1 -1
- package/dist/material/decks/winsands/AbiSnakeCharmer.d.ts +13 -0
- package/dist/material/decks/winsands/AbiSnakeCharmer.js +12 -0
- package/dist/material/decks/winsands/AbiSnakeCharmerEffectRule.d.ts +7 -0
- package/dist/material/decks/winsands/AbiSnakeCharmerEffectRule.js +33 -0
- package/dist/material/decks/winsands/AncientCurse.d.ts +16 -0
- package/dist/material/decks/winsands/AncientCurse.js +23 -0
- package/dist/material/decks/winsands/Catadjinn.d.ts +14 -0
- package/dist/material/decks/winsands/Catadjinn.js +24 -0
- package/dist/material/decks/winsands/CreatureBonusCardRule.d.ts +4 -0
- package/dist/material/decks/winsands/CreatureBonusCardRule.js +14 -0
- package/dist/material/decks/winsands/DeathTrap.d.ts +14 -0
- package/dist/material/decks/winsands/DeathTrap.js +16 -0
- package/dist/material/decks/winsands/DeathTrapEffectRule.d.ts +4 -0
- package/dist/material/decks/winsands/DeathTrapEffectRule.js +18 -0
- package/dist/material/decks/winsands/DesertRaider.d.ts +13 -0
- package/dist/material/decks/winsands/DesertRaider.js +12 -0
- package/dist/material/decks/winsands/DesertRaiderEffectRule.d.ts +4 -0
- package/dist/material/decks/winsands/DesertRaiderEffectRule.js +17 -0
- package/dist/material/decks/winsands/DuneWardrums.d.ts +12 -0
- package/dist/material/decks/winsands/DuneWardrums.js +22 -0
- package/dist/material/decks/winsands/ErgDeathslayer.d.ts +13 -0
- package/dist/material/decks/winsands/ErgDeathslayer.js +19 -0
- package/dist/material/decks/winsands/MalikShadowtracker.d.ts +14 -0
- package/dist/material/decks/winsands/MalikShadowtracker.js +16 -0
- package/dist/material/decks/winsands/MalikShadowtrackerEffectRule.d.ts +4 -0
- package/dist/material/decks/winsands/MalikShadowtrackerEffectRule.js +13 -0
- package/dist/material/decks/winsands/Metamorph.d.ts +14 -0
- package/dist/material/decks/winsands/Metamorph.js +15 -0
- package/dist/material/decks/winsands/MushaFakir.d.ts +15 -0
- package/dist/material/decks/winsands/MushaFakir.js +16 -0
- package/dist/material/decks/winsands/OasisShaman.d.ts +13 -0
- package/dist/material/decks/winsands/OasisShaman.js +12 -0
- package/dist/material/decks/winsands/OasisShamanEffectRule.d.ts +8 -0
- package/dist/material/decks/winsands/OasisShamanEffectRule.js +33 -0
- package/dist/material/decks/winsands/SandWalkers.d.ts +17 -0
- package/dist/material/decks/winsands/SandWalkers.js +26 -0
- package/dist/material/decks/winsands/SandWalkersEffectRule.d.ts +5 -0
- package/dist/material/decks/winsands/SandWalkersEffectRule.js +25 -0
- package/dist/material/decks/winsands/StarlightBazaar.d.ts +13 -0
- package/dist/material/decks/winsands/StarlightBazaar.js +12 -0
- package/dist/material/decks/winsands/StarlightBazaarEffectRule.d.ts +4 -0
- package/dist/material/decks/winsands/StarlightBazaarEffectRule.js +6 -0
- package/dist/material/decks/winsands/Vandals.d.ts +13 -0
- package/dist/material/decks/winsands/Vandals.js +12 -0
- package/dist/material/decks/winsands/VandalsEffectRule.d.ts +4 -0
- package/dist/material/decks/winsands/VandalsEffectRule.js +14 -0
- package/dist/material/decks/winsands/WindWrath.d.ts +13 -0
- package/dist/material/decks/winsands/WindWrath.js +12 -0
- package/dist/material/decks/winsands/WindWrathEffectRule.d.ts +5 -0
- package/dist/material/decks/winsands/WindWrathEffectRule.js +20 -0
- package/dist/material/decks/winsands/WishLamp.d.ts +13 -0
- package/dist/material/decks/winsands/WishLamp.js +12 -0
- package/dist/material/decks/winsands/WishLampEffectRule.d.ts +10 -0
- package/dist/material/decks/winsands/WishLampEffectRule.js +46 -0
- package/dist/rules/EffectRule.d.ts +1 -0
- package/dist/rules/EffectRule.js +4 -2
- package/dist/rules/PlayCardRule.js +4 -19
- package/dist/rules/PlayerHelper.d.ts +2 -1
- package/dist/rules/PlayerHelper.js +32 -0
- package/dist/rules/PrepareNextRoundRule.js +1 -0
- package/dist/rules/RuleId.d.ts +20 -8
- package/dist/rules/RuleId.js +20 -8
- package/package.json +2 -2
|
@@ -0,0 +1,24 @@
|
|
|
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 CatadjinnRule extends CardRule {
|
|
8
|
+
challenge = true;
|
|
9
|
+
getPowerIfNotStunned() {
|
|
10
|
+
const nonNightCards = this.material(MaterialType.Card)
|
|
11
|
+
.location(LocationType.PlayArea)
|
|
12
|
+
.id((id) => {
|
|
13
|
+
const suit = cardProperties[id.front].suit;
|
|
14
|
+
return suit === CardSuit.Twilight || suit === CardSuit.Day;
|
|
15
|
+
});
|
|
16
|
+
return Math.max(0, super.getPowerIfNotStunned() - nonNightCards.length);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export const Catadjinn = {
|
|
20
|
+
power: 6,
|
|
21
|
+
type: CardType.Creature,
|
|
22
|
+
suit: CardSuit.Night,
|
|
23
|
+
rule: CatadjinnRule
|
|
24
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { cardProperties } from '../../CardProperties';
|
|
2
|
+
import { CardRule } from '../../CardRule';
|
|
3
|
+
import { CardType } from '../../CardType';
|
|
4
|
+
import { LocationType } from '../../LocationType';
|
|
5
|
+
import { MaterialType } from '../../MaterialType';
|
|
6
|
+
export class CreatureBonusCardRule extends CardRule {
|
|
7
|
+
getPowerIfNotStunned() {
|
|
8
|
+
const myCreatures = this.material(MaterialType.Card)
|
|
9
|
+
.location(LocationType.PlayArea)
|
|
10
|
+
.player(this.player)
|
|
11
|
+
.id((id) => cardProperties[id.front].type === CardType.Creature);
|
|
12
|
+
return super.getPowerIfNotStunned() + myCreatures.length - 1;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MaterialMove } from '@gamepark/rules-api';
|
|
2
|
+
import { CardRule } from '../../CardRule';
|
|
3
|
+
import { CardSuit } from '../../CardSuit';
|
|
4
|
+
import { CardType } from '../../CardType';
|
|
5
|
+
declare class DeathTrapRule extends CardRule {
|
|
6
|
+
onEnters(): MaterialMove[];
|
|
7
|
+
}
|
|
8
|
+
export declare const DeathTrap: {
|
|
9
|
+
power: number;
|
|
10
|
+
type: CardType;
|
|
11
|
+
suit: CardSuit;
|
|
12
|
+
rule: typeof DeathTrapRule;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CardRule } from '../../CardRule';
|
|
2
|
+
import { CardSuit } from '../../CardSuit';
|
|
3
|
+
import { CardType } from '../../CardType';
|
|
4
|
+
import { OngoingEffectType } from '../../OngoingEffect';
|
|
5
|
+
class DeathTrapRule extends CardRule {
|
|
6
|
+
onEnters() {
|
|
7
|
+
this.addOngoingEffect(OngoingEffectType.DeathTrap);
|
|
8
|
+
return [];
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export const DeathTrap = {
|
|
12
|
+
power: 2,
|
|
13
|
+
type: CardType.Action,
|
|
14
|
+
suit: CardSuit.Twilight,
|
|
15
|
+
rule: DeathTrapRule
|
|
16
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Memory } from '../../../Memory';
|
|
2
|
+
import { EffectRule } from '../../../rules/EffectRule';
|
|
3
|
+
import { LocationType } from '../../LocationType';
|
|
4
|
+
import { MaterialType } from '../../MaterialType';
|
|
5
|
+
export class DeathTrapEffectRule extends EffectRule {
|
|
6
|
+
onRuleStart() {
|
|
7
|
+
const currentPlayer = this.remind(Memory.CurrentPlayer);
|
|
8
|
+
const cardsPlayed = this.remind(Memory.CardsPlayed, currentPlayer);
|
|
9
|
+
const targetIndex = cardsPlayed[cardsPlayed.length - 1];
|
|
10
|
+
return [
|
|
11
|
+
this.material(MaterialType.Card).index(targetIndex).moveItem({
|
|
12
|
+
type: LocationType.PlayerDiscard,
|
|
13
|
+
player: currentPlayer
|
|
14
|
+
}),
|
|
15
|
+
...this.endEffect()
|
|
16
|
+
];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CardRule } from '../../CardRule';
|
|
2
|
+
import { CardSuit } from '../../CardSuit';
|
|
3
|
+
import { CardType } from '../../CardType';
|
|
4
|
+
declare class DesertRaiderRule extends CardRule {
|
|
5
|
+
entersEffect: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const DesertRaider: {
|
|
8
|
+
power: number;
|
|
9
|
+
type: CardType;
|
|
10
|
+
suit: CardSuit;
|
|
11
|
+
rule: typeof DesertRaiderRule;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CardRule } from '../../CardRule';
|
|
2
|
+
import { CardSuit } from '../../CardSuit';
|
|
3
|
+
import { CardType } from '../../CardType';
|
|
4
|
+
class DesertRaiderRule extends CardRule {
|
|
5
|
+
entersEffect = true;
|
|
6
|
+
}
|
|
7
|
+
export const DesertRaider = {
|
|
8
|
+
power: 5,
|
|
9
|
+
type: CardType.Creature,
|
|
10
|
+
suit: CardSuit.Day,
|
|
11
|
+
rule: DesertRaiderRule
|
|
12
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { EffectRule } from '../../../rules/EffectRule';
|
|
2
|
+
import { LocationType } from '../../LocationType';
|
|
3
|
+
import { MaterialType } from '../../MaterialType';
|
|
4
|
+
export class DesertRaiderEffectRule extends EffectRule {
|
|
5
|
+
onRuleStart() {
|
|
6
|
+
return [
|
|
7
|
+
this.material(MaterialType.StunToken).createItem({
|
|
8
|
+
location: {
|
|
9
|
+
type: LocationType.CardStunTokens,
|
|
10
|
+
parent: this.effectCardIndex
|
|
11
|
+
},
|
|
12
|
+
quantity: 1
|
|
13
|
+
}),
|
|
14
|
+
...this.endEffect()
|
|
15
|
+
];
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CardRule } from '../../CardRule';
|
|
2
|
+
import { CardSuit } from '../../CardSuit';
|
|
3
|
+
import { CardType } from '../../CardType';
|
|
4
|
+
export declare class DuneWardrumsRule extends CardRule {
|
|
5
|
+
getPowerIfNotStunned(): number;
|
|
6
|
+
}
|
|
7
|
+
export declare const DuneWardrums: {
|
|
8
|
+
power: number;
|
|
9
|
+
type: CardType;
|
|
10
|
+
suit: CardSuit;
|
|
11
|
+
rule: typeof DuneWardrumsRule;
|
|
12
|
+
};
|
|
@@ -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
|
+
export class DuneWardrumsRule extends CardRule {
|
|
8
|
+
getPowerIfNotStunned() {
|
|
9
|
+
const myCreatures = this.material(MaterialType.Card)
|
|
10
|
+
.location(LocationType.PlayArea)
|
|
11
|
+
.player(this.player)
|
|
12
|
+
.id((id) => cardProperties[id.front].type === CardType.Creature);
|
|
13
|
+
const bonus = this.properties.type === CardType.Creature ? myCreatures.length - 1 : myCreatures.length;
|
|
14
|
+
return super.getPowerIfNotStunned() + bonus;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export const DuneWardrums = {
|
|
18
|
+
power: 2,
|
|
19
|
+
type: CardType.Action,
|
|
20
|
+
suit: CardSuit.Day,
|
|
21
|
+
rule: DuneWardrumsRule
|
|
22
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CardRule } from '../../CardRule';
|
|
2
|
+
import { CardSuit } from '../../CardSuit';
|
|
3
|
+
import { CardType } from '../../CardType';
|
|
4
|
+
declare class ErgDeathslayerRule extends CardRule {
|
|
5
|
+
canBePlayed(): boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const ErgDeathslayer: {
|
|
8
|
+
power: number;
|
|
9
|
+
type: CardType;
|
|
10
|
+
suit: CardSuit;
|
|
11
|
+
rule: typeof ErgDeathslayerRule;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CardRule } from '../../CardRule';
|
|
2
|
+
import { CardSuit } from '../../CardSuit';
|
|
3
|
+
import { CardType } from '../../CardType';
|
|
4
|
+
import { LocationType } from '../../LocationType';
|
|
5
|
+
import { MaterialType } from '../../MaterialType';
|
|
6
|
+
class ErgDeathslayerRule extends CardRule {
|
|
7
|
+
canBePlayed() {
|
|
8
|
+
const otherCardsInPlay = this.material(MaterialType.Card)
|
|
9
|
+
.location(LocationType.PlayArea)
|
|
10
|
+
.player(this.player);
|
|
11
|
+
return otherCardsInPlay.length === 0 && super.canBePlayed();
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export const ErgDeathslayer = {
|
|
15
|
+
power: 5,
|
|
16
|
+
type: CardType.Creature,
|
|
17
|
+
suit: CardSuit.Day,
|
|
18
|
+
rule: ErgDeathslayerRule
|
|
19
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MaterialMove } from '@gamepark/rules-api';
|
|
2
|
+
import { CardRule } from '../../CardRule';
|
|
3
|
+
import { CardSuit } from '../../CardSuit';
|
|
4
|
+
import { CardType } from '../../CardType';
|
|
5
|
+
declare class MalikShadowtrackerRule extends CardRule {
|
|
6
|
+
onEnters(): MaterialMove[];
|
|
7
|
+
}
|
|
8
|
+
export declare const MalikShadowtracker: {
|
|
9
|
+
power: number;
|
|
10
|
+
type: CardType;
|
|
11
|
+
suit: CardSuit;
|
|
12
|
+
rule: typeof MalikShadowtrackerRule;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CardRule } from '../../CardRule';
|
|
2
|
+
import { CardSuit } from '../../CardSuit';
|
|
3
|
+
import { CardType } from '../../CardType';
|
|
4
|
+
import { OngoingEffectType } from '../../OngoingEffect';
|
|
5
|
+
class MalikShadowtrackerRule extends CardRule {
|
|
6
|
+
onEnters() {
|
|
7
|
+
this.addOngoingEffect(OngoingEffectType.ForcedSuit);
|
|
8
|
+
return [];
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export const MalikShadowtracker = {
|
|
12
|
+
power: 2,
|
|
13
|
+
type: CardType.Creature,
|
|
14
|
+
suit: CardSuit.Twilight,
|
|
15
|
+
rule: MalikShadowtrackerRule
|
|
16
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Memory } from '../../../Memory';
|
|
2
|
+
import { EffectRule } from '../../../rules/EffectRule';
|
|
3
|
+
import { CardSuit } from '../../CardSuit';
|
|
4
|
+
import { OngoingEffectType } from '../../OngoingEffect';
|
|
5
|
+
export class MalikShadowtrackerEffectRule extends EffectRule {
|
|
6
|
+
onRuleStart() {
|
|
7
|
+
this.memorize(Memory.OngoingEffects, (effects) => [
|
|
8
|
+
...effects,
|
|
9
|
+
{ type: OngoingEffectType.ForcedSuit, player: this.nextPlayer, suit: CardSuit.Twilight }
|
|
10
|
+
]);
|
|
11
|
+
return this.endEffect();
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MaterialMove } from '@gamepark/rules-api';
|
|
2
|
+
import { CardSuit } from '../../CardSuit';
|
|
3
|
+
import { CardType } from '../../CardType';
|
|
4
|
+
import { DuneWardrumsRule } from './DuneWardrums';
|
|
5
|
+
declare class MetamorphRule extends DuneWardrumsRule {
|
|
6
|
+
onWinRound(): MaterialMove[];
|
|
7
|
+
}
|
|
8
|
+
export declare const Metamorph: {
|
|
9
|
+
power: number;
|
|
10
|
+
type: CardType;
|
|
11
|
+
suit: CardSuit;
|
|
12
|
+
rule: typeof MetamorphRule;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CardSuit } from '../../CardSuit';
|
|
2
|
+
import { CardType } from '../../CardType';
|
|
3
|
+
import { DuneWardrumsRule } from './DuneWardrums';
|
|
4
|
+
class MetamorphRule extends DuneWardrumsRule {
|
|
5
|
+
onWinRound() {
|
|
6
|
+
this.addPendingEffect();
|
|
7
|
+
return [];
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export const Metamorph = {
|
|
11
|
+
power: 1,
|
|
12
|
+
type: CardType.Creature,
|
|
13
|
+
suit: CardSuit.Day,
|
|
14
|
+
rule: MetamorphRule
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { MaterialMove } from '@gamepark/rules-api';
|
|
2
|
+
import { CardRule } from '../../CardRule';
|
|
3
|
+
import { CardSuit } from '../../CardSuit';
|
|
4
|
+
import { CardType } from '../../CardType';
|
|
5
|
+
declare class MushaFakirRule extends CardRule {
|
|
6
|
+
entersEffect: boolean;
|
|
7
|
+
onLoseRound(): MaterialMove[];
|
|
8
|
+
}
|
|
9
|
+
export declare const MushaFakir: {
|
|
10
|
+
power: number;
|
|
11
|
+
type: CardType;
|
|
12
|
+
suit: CardSuit;
|
|
13
|
+
rule: typeof MushaFakirRule;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CardRule } from '../../CardRule';
|
|
2
|
+
import { CardSuit } from '../../CardSuit';
|
|
3
|
+
import { CardType } from '../../CardType';
|
|
4
|
+
class MushaFakirRule extends CardRule {
|
|
5
|
+
entersEffect = true;
|
|
6
|
+
onLoseRound() {
|
|
7
|
+
this.addPendingEffect();
|
|
8
|
+
return [];
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export const MushaFakir = {
|
|
12
|
+
power: 2,
|
|
13
|
+
type: CardType.Creature,
|
|
14
|
+
suit: CardSuit.Night,
|
|
15
|
+
rule: MushaFakirRule
|
|
16
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CardRule } from '../../CardRule';
|
|
2
|
+
import { CardSuit } from '../../CardSuit';
|
|
3
|
+
import { CardType } from '../../CardType';
|
|
4
|
+
declare class OasisShamanRule extends CardRule {
|
|
5
|
+
entersEffect: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const OasisShaman: {
|
|
8
|
+
power: number;
|
|
9
|
+
type: CardType;
|
|
10
|
+
suit: CardSuit;
|
|
11
|
+
rule: typeof OasisShamanRule;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CardRule } from '../../CardRule';
|
|
2
|
+
import { CardSuit } from '../../CardSuit';
|
|
3
|
+
import { CardType } from '../../CardType';
|
|
4
|
+
class OasisShamanRule extends CardRule {
|
|
5
|
+
entersEffect = true;
|
|
6
|
+
}
|
|
7
|
+
export const OasisShaman = {
|
|
8
|
+
power: 1,
|
|
9
|
+
type: CardType.Creature,
|
|
10
|
+
suit: CardSuit.Twilight,
|
|
11
|
+
rule: OasisShamanRule
|
|
12
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ItemMove, MaterialMove } from '@gamepark/rules-api';
|
|
2
|
+
import { EffectRule } from '../../../rules/EffectRule';
|
|
3
|
+
export declare class OasisShamanEffectRule extends EffectRule {
|
|
4
|
+
onRuleStart(): MaterialMove[];
|
|
5
|
+
getPlayerMoves(): MaterialMove[];
|
|
6
|
+
get handCards(): import("@gamepark/rules-api").Material<number, number, number>;
|
|
7
|
+
afterItemMove(move: ItemMove): MaterialMove[];
|
|
8
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { isMoveItemType } from '@gamepark/rules-api';
|
|
2
|
+
import { PlayerHelper } from '../../../rules/PlayerHelper';
|
|
3
|
+
import { EffectRule } from '../../../rules/EffectRule';
|
|
4
|
+
import { cardProperties } from '../../CardProperties';
|
|
5
|
+
import { LocationType } from '../../LocationType';
|
|
6
|
+
import { MaterialType } from '../../MaterialType';
|
|
7
|
+
export class OasisShamanEffectRule extends EffectRule {
|
|
8
|
+
onRuleStart() {
|
|
9
|
+
if (!this.handCards.length) {
|
|
10
|
+
return this.endEffect();
|
|
11
|
+
}
|
|
12
|
+
return [];
|
|
13
|
+
}
|
|
14
|
+
getPlayerMoves() {
|
|
15
|
+
return this.handCards.moveItems((item) => ({
|
|
16
|
+
type: LocationType.PlayArea,
|
|
17
|
+
player: this.player,
|
|
18
|
+
id: cardProperties[item.id.front].type
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
get handCards() {
|
|
22
|
+
return this.material(MaterialType.Card)
|
|
23
|
+
.location(LocationType.PlayerHand)
|
|
24
|
+
.player(this.player);
|
|
25
|
+
}
|
|
26
|
+
afterItemMove(move) {
|
|
27
|
+
if (isMoveItemType(MaterialType.Card)(move) && move.location.type === LocationType.PlayArea) {
|
|
28
|
+
const moves = new PlayerHelper(this.game, this.player).onCardPlayed(move.itemIndex);
|
|
29
|
+
return [...moves, ...this.endEffect()];
|
|
30
|
+
}
|
|
31
|
+
return [];
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -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 SandWalkersRule extends CardRule {
|
|
8
|
+
entersEffect: boolean;
|
|
9
|
+
onCardEnters(card: Card, side: Deck): MaterialMove[];
|
|
10
|
+
}
|
|
11
|
+
export declare const SandWalkers: {
|
|
12
|
+
power: number;
|
|
13
|
+
type: CardType;
|
|
14
|
+
suit: CardSuit;
|
|
15
|
+
rule: typeof SandWalkersRule;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
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 SandWalkersRule extends CardRule {
|
|
8
|
+
entersEffect = true;
|
|
9
|
+
onCardEnters(card, side) {
|
|
10
|
+
if (side === this.player && cardProperties[card].type === CardType.Creature) {
|
|
11
|
+
return [
|
|
12
|
+
this.material(MaterialType.Card).index(this.index).moveItem({
|
|
13
|
+
type: LocationType.PlayerHand,
|
|
14
|
+
player: this.player
|
|
15
|
+
})
|
|
16
|
+
];
|
|
17
|
+
}
|
|
18
|
+
return [];
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export const SandWalkers = {
|
|
22
|
+
power: 1,
|
|
23
|
+
type: CardType.Action,
|
|
24
|
+
suit: CardSuit.Day,
|
|
25
|
+
rule: SandWalkersRule
|
|
26
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { EffectRule } from '../../../rules/EffectRule';
|
|
2
|
+
import { cardProperties } from '../../CardProperties';
|
|
3
|
+
import { CardType } from '../../CardType';
|
|
4
|
+
import { LocationType } from '../../LocationType';
|
|
5
|
+
import { MaterialType } from '../../MaterialType';
|
|
6
|
+
export class SandWalkersEffectRule extends EffectRule {
|
|
7
|
+
onRuleStart() {
|
|
8
|
+
const moves = [];
|
|
9
|
+
const myCreatures = this.material(MaterialType.Card)
|
|
10
|
+
.location(LocationType.PlayArea)
|
|
11
|
+
.player(this.player)
|
|
12
|
+
.id((id) => cardProperties[id.front].type === CardType.Creature);
|
|
13
|
+
for (const creatureIndex of myCreatures.getIndexes()) {
|
|
14
|
+
moves.push(this.material(MaterialType.PowerToken)
|
|
15
|
+
.location(LocationType.PowerTokenStock)
|
|
16
|
+
.createItem({
|
|
17
|
+
location: {
|
|
18
|
+
type: LocationType.CardPowerTokens,
|
|
19
|
+
parent: creatureIndex
|
|
20
|
+
}
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
23
|
+
return [...moves, ...this.endEffect()];
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CardRule } from '../../CardRule';
|
|
2
|
+
import { CardSuit } from '../../CardSuit';
|
|
3
|
+
import { CardType } from '../../CardType';
|
|
4
|
+
declare class StarlightBazaarRule extends CardRule {
|
|
5
|
+
entersEffect: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const StarlightBazaar: {
|
|
8
|
+
power: number;
|
|
9
|
+
type: CardType;
|
|
10
|
+
suit: CardSuit;
|
|
11
|
+
rule: typeof StarlightBazaarRule;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CardRule } from '../../CardRule';
|
|
2
|
+
import { CardSuit } from '../../CardSuit';
|
|
3
|
+
import { CardType } from '../../CardType';
|
|
4
|
+
class StarlightBazaarRule extends CardRule {
|
|
5
|
+
entersEffect = true;
|
|
6
|
+
}
|
|
7
|
+
export const StarlightBazaar = {
|
|
8
|
+
power: 1,
|
|
9
|
+
type: CardType.Action,
|
|
10
|
+
suit: CardSuit.Night,
|
|
11
|
+
rule: StarlightBazaarRule
|
|
12
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CardSuit } from '../../CardSuit';
|
|
2
|
+
import { CardType } from '../../CardType';
|
|
3
|
+
import { DuneWardrumsRule } from './DuneWardrums';
|
|
4
|
+
declare class VandalsRule extends DuneWardrumsRule {
|
|
5
|
+
oncePerTurnEffect: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const Vandals: {
|
|
8
|
+
power: number;
|
|
9
|
+
type: CardType;
|
|
10
|
+
suit: CardSuit;
|
|
11
|
+
rule: typeof VandalsRule;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CardSuit } from '../../CardSuit';
|
|
2
|
+
import { CardType } from '../../CardType';
|
|
3
|
+
import { DuneWardrumsRule } from './DuneWardrums';
|
|
4
|
+
class VandalsRule extends DuneWardrumsRule {
|
|
5
|
+
oncePerTurnEffect = true;
|
|
6
|
+
}
|
|
7
|
+
export const Vandals = {
|
|
8
|
+
power: 1,
|
|
9
|
+
type: CardType.Creature,
|
|
10
|
+
suit: CardSuit.Night,
|
|
11
|
+
rule: VandalsRule
|
|
12
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DrawEffectRule } from '../../../rules/DrawEffectRule';
|
|
2
|
+
import { LocationType } from '../../LocationType';
|
|
3
|
+
import { MaterialType } from '../../MaterialType';
|
|
4
|
+
export class VandalsEffectRule extends DrawEffectRule {
|
|
5
|
+
onRuleStart() {
|
|
6
|
+
return [
|
|
7
|
+
this.material(MaterialType.Card).index(this.effectCardIndex).moveItem({
|
|
8
|
+
type: LocationType.PlayerDiscard,
|
|
9
|
+
player: this.player
|
|
10
|
+
}),
|
|
11
|
+
...super.onRuleStart()
|
|
12
|
+
];
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CardRule } from '../../CardRule';
|
|
2
|
+
import { CardSuit } from '../../CardSuit';
|
|
3
|
+
import { CardType } from '../../CardType';
|
|
4
|
+
declare class WindWrathRule extends CardRule {
|
|
5
|
+
entersEffect: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const WindWrath: {
|
|
8
|
+
power: number;
|
|
9
|
+
type: CardType;
|
|
10
|
+
suit: CardSuit;
|
|
11
|
+
rule: typeof WindWrathRule;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CardRule } from '../../CardRule';
|
|
2
|
+
import { CardSuit } from '../../CardSuit';
|
|
3
|
+
import { CardType } from '../../CardType';
|
|
4
|
+
class WindWrathRule extends CardRule {
|
|
5
|
+
entersEffect = true;
|
|
6
|
+
}
|
|
7
|
+
export const WindWrath = {
|
|
8
|
+
power: 2,
|
|
9
|
+
type: CardType.Action,
|
|
10
|
+
suit: CardSuit.Twilight,
|
|
11
|
+
rule: WindWrathRule
|
|
12
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CustomMoveType } from '../../../CustomMoveType';
|
|
2
|
+
import { EffectRule } from '../../../rules/EffectRule';
|
|
3
|
+
import { LocationType } from '../../LocationType';
|
|
4
|
+
import { MaterialType } from '../../MaterialType';
|
|
5
|
+
export class WindWrathEffectRule extends EffectRule {
|
|
6
|
+
onRuleStart() {
|
|
7
|
+
const moves = [];
|
|
8
|
+
const playerHand = this.material(MaterialType.Card).location(LocationType.PlayerHand).player(this.player);
|
|
9
|
+
const foeHand = this.material(MaterialType.Card).location(LocationType.PlayerHand).player(this.nextPlayer);
|
|
10
|
+
if (playerHand.length > 0) {
|
|
11
|
+
moves.push(playerHand.moveItemsAtOnce({ type: LocationType.PlayerDiscard, player: this.player }));
|
|
12
|
+
moves.push(this.customMove(CustomMoveType.Draw, { player: this.player, quantity: playerHand.length }));
|
|
13
|
+
}
|
|
14
|
+
if (foeHand.length > 0) {
|
|
15
|
+
moves.push(foeHand.moveItemsAtOnce({ type: LocationType.PlayerDiscard, player: this.nextPlayer }));
|
|
16
|
+
moves.push(this.customMove(CustomMoveType.Draw, { player: this.nextPlayer, quantity: foeHand.length }));
|
|
17
|
+
}
|
|
18
|
+
return [...moves, ...this.endEffect()];
|
|
19
|
+
}
|
|
20
|
+
}
|