Ejemplo n.º 1
0
    public HeartOfTheWildfire() : base(
            new BlazingPresence()
            , PowerCard.For <AsphyxiatingSmoke>()
            , PowerCard.For <FlashFires>()
            , PowerCard.For <ThreateningFlames>()
            , PowerCard.For <FlamesFury>()
            )
    {
        (Presence as BlazingPresence).spirit = this;
        InnatePowers = new InnatePower[] {
            InnatePower.For <FireStorm>(),
            InnatePower.For <TheBurnedLandRegrows>()
        };


        Growth = new(
            new GrowthOption(
                new ReclaimAll(),
                new DrawPowerCard(1),
                new GainEnergy(1)
                ),
            new GrowthOption(
                new DrawPowerCard(1),
                new PlacePresence(3)
                ),
            new GrowthOption(
                new PlacePresence(1),
                new GainEnergy(2),
                new EnergyForFire()
                )
            );
    }
Ejemplo n.º 2
0
    public GrinningTricksterStirsUpTrouble()
        : base(
            new SpiritPresence(
                new PresenceTrack(Track.Energy1, Track.MoonEnergy, Track.Energy2, Track.AnyEnergy, Track.FireEnergy, Track.Energy3),
                new PresenceTrack(Track.Card2, Track.Push1Dahan, Track.Card3, Track.Card3, Track.Card4, Track.AirEnergy, Track.Card5)
                )
            , PowerCard.For <ImpersonateAuthority>()
            , PowerCard.For <InciteTheMob>()
            , PowerCard.For <OverenthusiasticArson>()
            , PowerCard.For <UnexpectedTigers>()
            )
    {
        // Growth
        this.Growth = new Growth(2,
                                 new GrowthOption(new GainEnergy(-1), new ReclaimAll(), new MovePresence(1))
        {
            GainEnergy = -1
        },
                                 new GrowthOption(new PlacePresence(2)),
                                 new GrowthOption(new DrawPowerCard()),
                                 new GrowthOption(new GainEnergyEqualToCardPlays())
                                 );

        // Innates
        InnatePowers = new InnatePower[] {
            InnatePower.For <LetsSeeWhatHappens>(),
            InnatePower.For <WhyDontYouAndThemFight>()
        };
    }
Ejemplo n.º 3
0
    public SharpFangs() : base(
            new SpiritPresence(
                new PresenceTrack(Track.Energy1, Track.AnimalEnergy, Track.PlantEnergy, Track.Energy2, Track.AnimalEnergy, Track.Energy3, Track.Energy4),
                new PresenceTrack(Track.Card2, Track.Card2, Track.Card3, Track.CardReclaim1, Track.Card4, Track.Card5Reclaim1)
                ),
            PowerCard.For <PreyOnTheBuilders>(),
            PowerCard.For <TeethGleamFromDarkness>(),
            PowerCard.For <TerrifyingChase>(),
            PowerCard.For <TooNearTheJungle>()
            )
    {
        var beastOrJungleRange3 = new PlacePresence(3, Target.BeastOrJungle);

        Growth = new Growth(2,
                            new GrowthOption(new ReclaimAll(), new GainEnergy(-1), new DrawPowerCard(1))
        {
            GainEnergy = -1
        },
                            new GrowthOption(beastOrJungleRange3),
                            new GrowthOption(new DrawPowerCard(1), new GainEnergy(1))
        {
            GainEnergy = 1
        },
                            new GrowthOption(new GainEnergy(3))
        {
            GainEnergy = 3
        }
                            );

        this.InnatePowers = new InnatePower[] {
            InnatePower.For <FrenziedAssult>(),
            InnatePower.For <RagingHunt>(),
        };
    }
Ejemplo n.º 4
0
    public Bringer() : base(
            new SpiritPresence(
                new PresenceTrack(Track.Energy2, Track.AirEnergy, Track.Energy3, Track.MoonEnergy, Track.Energy4, Track.AnyEnergy, Track.Energy5),
                new PresenceTrack(Track.Card2, Track.Card2, Track.Card2, Track.Card3, Track.Card3, Track.AnyEnergy)
                ),
            PowerCard.For <CallOnMidnightsDream>(),
            PowerCard.For <DreadApparitions>(),
            PowerCard.For <DreamsOfTheDahan>(),
            PowerCard.For <PredatoryNightmares>()
            )
    {
        Growth = new(
            // reclaim, +1 power card
            new GrowthOption(new ReclaimAll(), new DrawPowerCard(1)),
            // reclaim 1, add presence range 0
            new GrowthOption(new ReclaimN(), new PlacePresence(0)),
            // +1 power card, +1 pressence range 1
            new GrowthOption(new DrawPowerCard(1), new PlacePresence(1)),
            // add presense range Dahan or Invadors, +2 energy
            new GrowthOption(new GainEnergy(2), new PlacePresence(4, Target.DahanOrInvaders))
            );

        this.InnatePowers = new InnatePower[] {
            InnatePower.For <SpiritsMayYetDream>(),
            InnatePower.For <NightTerrors>()
        };
    }
Ejemplo n.º 5
0
    public void ReturningKeeperPresence_PushesDahan()
    {
        var fix = new ConfigurableTestFixture {
            Spirit = new Keeper()
        };
        var space            = fix.Board[5];
        var dahanDestination = space.Adjacent.First();

        // Given: Keeper has a destroyed presence
        fix.Spirit.Presence.Destroyed = 1;

        //   And: a presence on target space.
        fix.Spirit.Presence.Adjust(space, 1);

        //   And: Dahan on space
        fix.InitTokens(space, "1D@2");

        //  When: play the card
        var task = PowerCard.For <SkiesHeraldTheSeasonOfReturn>().ActivateAsync(fix.SelfCtx);

        // target space
        fix.Choose(space);

        // Then: Should Push Dahan (per keeper's Sacred Site)
        fix.Choose("D@2");
        fix.Choose(dahanDestination);
        //  And: May Gather up to 2 dahan (per the card)
        fix.Choose("D@2 on " + dahanDestination.Text);         // "Gather up to 2 Dahan"
        //  And: May push 1 blight
        // no blight to push

        task.IsCompletedSuccessfully.ShouldBeTrue();
    }
Ejemplo n.º 6
0
    public Keeper() : base(
            new KeeperPresence(),
            // PowerCard.For<SkyStretchesToShore>(),
            PowerCard.For <BoonOfGrowingPower>(),
            PowerCard.For <RegrowFromRoots>(),
            PowerCard.For <SacrosanctWilderness>(),
            PowerCard.For <ToweringWrath>()
            )
    {
        (Presence as KeeperPresence).spirit = this;

        Growth = new Growth(2,
                            new GrowthOption(new ReclaimAll(), new GainEnergy(1))
        {
            GainEnergy = 1
        },
                            new GrowthOption(new DrawPowerCard(1)),
                            new GrowthOption(new GainEnergy(1), new PlacePresence(3, Target.PresenceOrWilds))
        {
            GainEnergy = 1
        },
                            new GrowthOption(new GainEnergy(-3), new DrawPowerCard(1), new PlacePresence(3, Target.NoBlight))
        {
            GainEnergy = -3
        }
                            );

        InnatePowers = new InnatePower[] {
            InnatePower.For <PunishThoseWhoTrespass>(),
            InnatePower.For <SpreadingWilds>(),
        };
    }
Ejemplo n.º 7
0
    public Thunderspeaker() : base(
            new SpiritPresence(
                new PresenceTrack(Track.Energy1, Track.AirEnergy, Track.Energy2, Track.FireEnergy, Track.SunEnergy, Track.Energy3),
                new PresenceTrack(Track.Card1, Track.Card2, Track.Card2, Track.Card3, Track.CardReclaim1, Track.Card3, Track.Card4)
                ),
            PowerCard.For <ManifestationOfPowerAndGlory>(),
            PowerCard.For <SuddenAmbush>(),
            PowerCard.For <VoiceOfThunder>(),
            PowerCard.For <WordsOfWarning>()
            )
    {
        Growth = new(
            new GrowthOption(
                new ReclaimAll(),
                new DrawPowerCard(1),
                new DrawPowerCard(1)
                ),
            new GrowthOption(
                new PlacePresence(2, Target.Dahan),
                new PlacePresence(1, Target.Dahan)
                ),
            new GrowthOption(
                new PlacePresence(1),
                new GainEnergy(4)
                )
            );

        this.InnatePowers = new InnatePower[] {
            InnatePower.For <GatherTheWarriors>(),
            InnatePower.For <LeadTheFuriousAssult>(),
        };
    }
Ejemplo n.º 8
0
        public void SingleBuild(bool playsCard, string result)
        {
            var(user, ctx) = TestSpirit.SetupGame(PowerCard.For <RitesOfTheLandsRejection>());

            // Given: find a space with 1 explorer
            var spaceCtx = ctx.AllSpaces
                           .Select(ctx.Target)
                           .First(sc => sc.Tokens.InvaderSummary() == "1E@1");

            //   And: add Dahan (because card requires it)
            spaceCtx.Dahan.Init(1);

            // When: growing
            user.Grows();

            //  And: purchase test card
            user.PlaysCard(RitesOfTheLandsRejection.Name);
            if (playsCard)
            {
                user.SelectsFastAction(RitesOfTheLandsRejection.Name);
                user.TargetsLand_IgnoreOptions(spaceCtx.Space.Label);
                user.AssertDecisionX("Select Power Option", "{Stop build - 1 fear / (Dahan or T/C)},Push up to 3 dahan", "{}");
            }
            else
            {
                //  And: done with fast (no more cards..)
                user.IsDoneWith(Phase.Fast);
            }

            // Then: space should have a building
            System.Threading.Thread.Sleep(10);
            spaceCtx.Tokens.InvaderSummary().ShouldBe(result);
        }
Ejemplo n.º 9
0
        public void TerrorLevel3_RavageRemainsRavage()
        {
            var(user, ctx) = TestSpirit.SetupGame(PowerCard.For <CallToTrade>());

            // Elevate to Terror Level 3
            Given_TerrorLevelIs3(ctx);

            // Given: advance to 2nd round where we have a ravage
            user.DoesNothingForARound();

            // Given: a space that IS-RAVAGE but NOT-BUILD
            var spaceCtx = ctx.AllSpaces
                           .Select(ctx.Target)
                           .Last(s => s.MatchesRavageCard && !s.MatchesBuildCard);        // last stays away from city and ocean

            //  And: it has 3 explorers (in case dahan attacks during ravage, would still 1 left over
            Given_HasOnly3Explorers(spaceCtx);
            Given_Has2Dahan(spaceCtx);
            Given_NoSuroundingTowns(spaceCtx);
            Given_NoSuroundingDahan(spaceCtx);

            When_GrowsBuysAndActivatesCard(user, spaceCtx);

            // Then: Ravage remains - 3 explorers kill 1 dahan, remaining dahan kills 2 explorers
            spaceCtx.Tokens.InvaderSummary().ShouldBe("1E@1");
        }
Ejemplo n.º 10
0
        public void BuildAndRavage_BecomesTwoBuilds()
        {
            List <string> invaderLog = new List <string>();

            // Given: Going to Ravage / Build in Jungle
            var(user, ctx) = TestSpirit.SetupGame(PowerCard.For <CallToTrade>(), (gs) => {
                var jungleCard  = new InvaderCard(Terrain.Jungle);
                gs.InvaderDeck  = InvaderDeck.BuildTestDeck(jungleCard, jungleCard, jungleCard, jungleCard);
                gs.NewLogEntry += (s) => invaderLog.Add(s.Msg());
            });

            // Given: advance to 2nd round where we have a ravage
            user.DoesNothingForARound();
            invaderLog.Clear();

            // Given: a space that IS-RAVAGE AND BUILD
            var spaceCtx = ctx.AllSpaces
                           .Select(ctx.Target)
                           .Last(s => s.MatchesRavageCard && s.MatchesBuildCard);        // last stays away from city and ocean

            invaderLog.Add("Selected target:" + spaceCtx.Space.Label);

            //  And: it has 3 explorers (in case dahan attacks during ravage, would still 1 left over
            Given_HasOnly3Explorers(spaceCtx);
            Given_Has2Dahan(spaceCtx);
            Given_NoSuroundingTowns(spaceCtx);
            Given_NoSuroundingDahan(spaceCtx);

            When_GrowsBuysAndActivatesCard(user, spaceCtx);

            spaceCtx.Tokens.InvaderSummary().ShouldBe("1C@3,1T@2,4E@1");
        }
Ejemplo n.º 11
0
        public void OneRavage_ReplacedWithBuild()
        {
            var(user, ctx) = TestSpirit.SetupGame(PowerCard.For <CallToTrade>());

            // Given: advance to 2nd round where we have a ravage
            user.DoesNothingForARound();

            // Given: a space that IS-RAVAGE but NOT-BUILD
            var spaceCtx = ctx.AllSpaces
                           .Select(ctx.Target)
                           .Last(s => s.MatchesRavageCard && !s.MatchesBuildCard);        // last stays away from city and ocean

            //  And: it has 3 explorers (in case dahan attacks during ravage, would still 1 left over
            Given_HasOnly3Explorers(spaceCtx);
            Given_Has2Dahan(spaceCtx);
            Given_NoSuroundingTowns(spaceCtx);
            Given_NoSuroundingDahan(spaceCtx);

            string info = $"{spaceCtx.Space.Label} {ctx.GameState.InvaderDeck.Build.Single()} ";


            When_GrowsBuysAndActivatesCard(user, spaceCtx);

            // Then: Card converted ravage to a build
            spaceCtx.Tokens.InvaderSummary().ShouldBe("1T@2,3E@1");
        }
Ejemplo n.º 12
0
    public LightningsSwiftStrike() : base(
            new SpiritPresence(
                new PresenceTrack(Track.Energy1, Track.Energy1, Track.Energy2, Track.Energy2, Track.Energy3, Track.Energy4, Track.Energy4, Track.Energy5),
                new PresenceTrack(Track.Card2, Track.Card3, Track.Card4, Track.Card5, Track.Card6)
                ),
            PowerCard.For <HarbingersOfTheLightning>(),
            PowerCard.For <LightningsBoon>(),
            PowerCard.For <RagingStorm>(),
            PowerCard.For <ShatterHomesteads>()
            )
    {
        Growth = new(
            new GrowthOption(
                new ReclaimAll(),
                new DrawPowerCard(1),
                new GainEnergy(1)
                ),
            // +1 presence range 2, +1 presence range 0(
            new GrowthOption(
                new PlacePresence(2),
                new PlacePresence(0)
                ),
            // +1 presense range 1, +3 energy
            new GrowthOption(new GainEnergy(3), new PlacePresence(1))
            );

        this.InnatePowers = new InnatePower[] {
            InnatePower.For <ThunderingDestruction>()
        };
    }
Ejemplo n.º 13
0
        public void MementoRestoresDeck()
        {
            PowerCardDeck deck = new PowerCardDeck(new PowerCard[] {
                PowerCard.For <Drought>(),
                PowerCard.For <DevouringAnts>(),
                PowerCard.For <DriftDownIntoSlumber>(),
                PowerCard.For <EnticingSplendor>(),
                PowerCard.For <LureOfTheUnknown>(),
                PowerCard.For <NaturesResilience>(),
                PowerCard.For <PullBeneathTheHungryEarth>(),
                PowerCard.For <QuickenTheEarthsStruggles>(),
                PowerCard.For <RainOfBlood>(),
                PowerCard.For <SapTheStrengthOfMultitudes>(),
                PowerCard.For <SongOfSanctity>(),
                PowerCard.For <SteamVents>(),
                PowerCard.For <UncannyMelting>(),
            }, new Random());

            // Given: saving state
            var memento = deck.SaveToMemento();

            //   And: draw first 4 cards
            string originalFirstFourCards = deck.Flip(4).Select(c => c.Name).Join(",");

            //   And: draw some more we don't care about
            deck.Flip(4);

            //  When: restore state using memento
            deck.RestoreFrom(memento);

            //  Then: first 4 cards should be the same
            deck.Flip(4).Select(c => c.Name).Join(",").ShouldBe(originalFirstFourCards);
        }
Ejemplo n.º 14
0
    public LureOfTheDeepWilderness() : base(
            new SpiritPresence(
                new PresenceTrack(Track.Energy1, Track.Energy2, Track.MoonEnergy, Track.MkEnergy(3, Element.Plant), Track.MkEnergy(4, Element.Air), Track.Energy5Reclaim1),
                new PresenceTrack(Track.Card1, Track.Card2, Track.AnimalEnergy, Track.Card3, Track.Card4, Track.Card5Reclaim1)
                )
            , PowerCard.For <GiftOfTheUntamedWild>()
            , PowerCard.For <PerilsOfTheDeepestIsland>()
            , PowerCard.For <SoftlyBeckonEverInward>()
            , PowerCard.For <SwallowedByTheWilderness>()
            )
    {
        Growth = new Growth(
            new GrowthOption(new ReclaimAll(), new GainEnergy(1)),
            new GrowthOption(new PlacePresence(4, Target.Inland))
            ).Add(
            new GrowthOptionGroup(1,
                                  new GrowthOption(new Gain1Element(Element.Moon, Element.Air, Element.Plant), new GainEnergy(2)),
                                  new GrowthOption(new DrawPowerCard())
                                  )
            );

        Presence.IsValid = (s) => !s.IsOcean && !s.IsCoastal;

        InnatePowers = new InnatePower[] {
            InnatePower.For <ForsakeSocietyToChaseAfterDreams>(),
            InnatePower.For <NeverHeardFromAgain>()
        };
    }
Ejemplo n.º 15
0
    public ASpreadOfRampantGreen() : base(
            new RampantGreenPresence(),
            PowerCard.For <FieldsChokedWithGrowth>(),
            PowerCard.For <GiftOfProliferation>(),
            PowerCard.For <OvergrowInANight>(),
            PowerCard.For <StemTheFlowOfFreshWater>()
            )
    {
        // Special rules: steady regeneration

        Growth = new Growth(
            new GrowthOption(new PlacePresence(2, Target.JungleOrWetland))
            ).Add(new GrowthOptionGroup(1,
                                        // reclaim, +1 power card
                                        new GrowthOption(
                                            new ReclaimAll(),
                                            new DrawPowerCard(1)
                                            ),
                                        // +1 presense range 1, play +1 extra card this turn
                                        new GrowthOption(
                                            new PlacePresence(1),
                                            new PlayExtraCardThisTurn(1)
                                            ),
                                        // +1 power card, +3 energy
                                        new GrowthOption(
                                            new GainEnergy(3),
                                            new DrawPowerCard()
                                            )
                                        ));

        this.InnatePowers = new InnatePower[] {
            InnatePower.For <CreepersTearIntoMortar>(),
            InnatePower.For <AllEnvelopingGreen>(),
        };
    }
Ejemplo n.º 16
0
    public ManyMindsMoveAsOne()
        : base(
            new ManyMindsPresence(
                new PresenceTrack(Track.Energy0, Track.Energy1, Track.MkEnergy(Element.Air), Track.Energy2, Track.MkEnergy(Element.Animal), Track.Energy3, Track.Energy4),
                new PresenceTrack(Track.Card1, Track.Card2, CardBoost, Track.Card3, Track.Card3, Track.Card4, Track.Card5)
                )
            , PowerCard.For <ADreadfulTideOfScurryingFlesh>()
            , PowerCard.For <BoonOfSwarmingBedevilment>()
            , PowerCard.For <EverMultiplyingSwarm>()
            , PowerCard.For <GuideTheWayOnFeatheredWings>()
            , PowerCard.For <PursueWithScratchesPecksAndStings>()
            )
    {
        // Growth
        Growth = new Growth(
            new GrowthOption(new ReclaimAll(), new DrawPowerCard()),
            new GrowthOption(new PlacePresence(1), new PlacePresence(0)),
            new GrowthOption(new PlacePresenceAndBeast(), new GainEnergy(1), new Gather1Beast())
            );

        // Innates
        InnatePowers = new InnatePower[] {
            InnatePower.For <TheTeemingHostArrives>(),
            InnatePower.For <BesetAndConfoundTheInvaders>()
        };
    }
Ejemplo n.º 17
0
    public async Task Repeat_BadlandsWorksOnSameTargetTwice()
    {
        var fix    = new ConfigurableTestFixture();
        var space1 = fix.Board[3];

        // Given: 2 sun, 3 fire, 3 earth
        fix.InitElements("2 sun,3 fire,3 earth");

        //  And: target land has 1 presence, 2 Cities
        fix.Spirit.Presence.Adjust(space1, 1);
        fix.InitTokens(space1, "3C@3");

        // When: play card
        var task = PowerCard.For <ForestsOfLivingObsidian>().ActivateAsync(fix.SelfCtx);

        //  And: targeting space 1
        fix.Choose(space1);
        fix.Choose("C@2");           // 3C@2 - Damage 1 of them (1 of 1)
        fix.GameState.Tokens[space1].Summary.ShouldBe("1C@1,2C@2,1M");

        //  And: targeting space 1 a 2nd time
        fix.Choose(space1);          // Should Kill the 1C@1, and reduce the 2C@2 to 2C@1
        fix.Choose("C@1");           // Kill 1st City
        fix.Choose("C@1");           // Kill 2nd City
        fix.GameState.Tokens[space1].Summary.ShouldBe("2M");

        task.IsCompletedSuccessfully.ShouldBeTrue();
    }
Ejemplo n.º 18
0
        public void IsFastAndCost1()
        {
            var suddenAmbush = PowerCard.For <SuddenAmbush>();

            suddenAmbush.DisplaySpeed.ShouldBe(Phase.Fast);
            suddenAmbush.Cost.ShouldBe(2);
        }
Ejemplo n.º 19
0
    public StarlightSeeksItsForm() : base(
            new SpiritPresence(
                new CompoundPresenceTrack(
                    new PresenceTrack(Track.Energy1, Track.Energy2, Track_PickElement, Track.Energy4),
                    new PresenceTrack(0, NewGrowth1),
                    new PresenceTrack(0, Track_Gain1Energy, NewGrowth3)               // missing +1 energies
                    ),
                new CompoundPresenceTrack(
                    new PresenceTrack(Track.Card2, Track_PickElement, Track_PickElement, Track.Card3),
                    new PresenceTrack(0, NewGrowth2),
                    new PresenceTrack(0, Track_Gain1Energy, NewGrowth4)               // !!! missing +1 energies
                    )
                )
            , PowerCard.For <BoonOfReimagining>()
            , PowerCard.For <GatherTheScatteredLightOfStars>()
            , PowerCard.For <PeaceOfTheNighttimeSky>()
            , PowerCard.For <ShapeTheSelfAnew>()
            )
    {
        Growth = new Growth(3,
                            new GrowthOption(new ReclaimN()),
                            new GrowthOption(new PlacePresence(0)),
                            new GrowthOption(new GainEnergy(1)),
                            new GrowthOption(new MovePresence(3))
                            );

        InnatePowers = new InnatePower[] {
            InnatePower.For <AirMovesEarthEndures>(),
            InnatePower.For <FireBurnsWaterSoothes>(),
            InnatePower.For <SiderealGuidance>(),
            InnatePower.For <WoodSeeksGrowthHumansSeekFreedom>(),
            InnatePower.For <StarsBlazeInTheDaytimeSky>(),
        };
    }
Ejemplo n.º 20
0
    public RiverSurges() : base(
            new RiverPresence(
                new PresenceTrack(Track.Energy1, Track.Energy2, Track.Energy2, Track.Energy3, Track.Energy4, Track.Energy4, Track.Energy5),
                new PresenceTrack(Track.Card1, Track.Card2, Track.Card2, Track.Card3, Track.CardReclaim1, Track.Card4, Track.Card5)
                ),
            PowerCard.For <BoonOfVigor>(),
            PowerCard.For <FlashFloods>(),
            PowerCard.For <RiversBounty>(),
            PowerCard.For <WashAway>()
            )
    {
        Growth = new(
            new GrowthOption(
                new ReclaimAll(),
                new DrawPowerCard(1),
                new GainEnergy(1)
                ),
            new GrowthOption(
                new PlacePresence(1),
                new PlacePresence(1)
                ),
            new GrowthOption(
                new DrawPowerCard(1),
                new PlacePresence(2)
                )
            );

        InnatePowers = new InnatePower[] {
            InnatePower.For <MassiveFlooding>()
        };
    }
Ejemplo n.º 21
0
    public VolcanoLoomingHigh() : base(
            new VolcanoPresence(
                new PresenceTrack(Track.Energy1, Track.Energy2, Track.EarthEnergy, Track.Energy3, Track.Energy4, Track.Energy5),
                new PresenceTrack(Track.Card1, Track.MkCard(Element.Fire), Track.MkCard(Element.Earth), Track.Card2, Track.MkCard(Element.Air), Track.Card3, Track.MkCard(Element.Fire), Track.Card4)
                )
            , PowerCard.For <ExaltationOfMoltenStone>()
            , PowerCard.For <LavaFlows>()
            , PowerCard.For <PyroclasticBombardment>()
            , PowerCard.For <RainOfAsh>()
            )
    {
        Growth = new Growth(
            new GrowthOption(new ReclaimAll(), new DrawPowerCard(), new GainEnergy(3)),
            new GrowthOption(new PlacePresence(0, Target.Mountain), new PlacePresence(0, Target.Mountain)),
            new GrowthOption(new DrawPowerCard(), new PlacePresence(4, Target.Mountain), new PlayExtraCardThisTurn(1), new GainEnergy(2))
            );

        InnatePowers = new InnatePower[] {
            InnatePower.For <ExplosiveEruption>(),
            InnatePower.For <PoweredByTheFurnaceOfTheEarth>()
        };

        ((VolcanoPresence)(Presence)).SetSpirit(this);

        RangeCalc = new VolcanoTargetLandApi();
    }
Ejemplo n.º 22
0
    public async Task Repeat_BadlandsWorksOnBothTargets()
    {
        var fix    = new ConfigurableTestFixture();
        var space1 = fix.Board[3];
        var space2 = fix.Board[8];

        // Given: 2 sun, 3 fire, 3 earth
        fix.InitElements("2 sun,3 fire,3 earth");

        //  And: target land #1 has 1 presence, 3 explorers and 1 town
        fix.InitPresence(space1, 1);
        fix.InitTokens(space1, "3E@1,1T@2");

        //  And: target land #2 has the same (1 presence, 3 explorers and 1 town)
        fix.InitPresence(space2, 1);
        fix.InitTokens(space2, "3E@1,1T@2");

        // When: play card
        var task = PowerCard.For <ForestsOfLivingObsidian>().ActivateAsync(fix.SelfCtx);

        //  And: targeting space 1
        fix.Choose(space1);
        fix.Choose("T@1");         // Damage (1 remaining)

        //  And: targeting space 2
        fix.Choose(space2);
        fix.Choose("T@1");           // Damage (1 remaining)

        task.IsCompletedSuccessfully.ShouldBeTrue();
    }
Ejemplo n.º 23
0
 protected static void Given_PurchasedFakePowercards(Spirit otherSpirit, int expectedEnergyBonus)
 {
     for (int i = 0; i < expectedEnergyBonus; ++i)
     {
         var otherCard = PowerCard.For <SpiritIsland.Basegame.GiftOfLivingEnergy>();
         otherSpirit.InPlay.Add(otherCard);
         otherSpirit.AddActionFactory(otherCard);
     }
 }
Ejemplo n.º 24
0
 static Spirit InitSpirit()
 {
     return(new Keeper {
         CardDrawer = new PowerProgression(
             PowerCard.For <VeilTheNightsHunt>(),
             PowerCard.For <ReachingGrasp>()
             ),
     });
 }
Ejemplo n.º 25
0
 static Spirit InitSpirit()
 {
     return(new SharpFangs {
         CardDrawer = new PowerProgression(
             PowerCard.For <RainOfBlood>(),
             PowerCard.For <GnawingRootbiters>()
             ),
     });
 }
Ejemplo n.º 26
0
		static Spirit InitSpirit() {
			return new Ocean {
				CardDrawer = new PowerProgression(
					PowerCard.For<VeilTheNightsHunt>(),
					PowerCard.For<ReachingGrasp>(),
					PowerCard.For<Drought>(),
					PowerCard.For<ElementalBoon>()
				)
			};
		}
Ejemplo n.º 27
0
        protected TestInvaderDeckSequence_Base()
        {
            var powerCard = PowerCard.For <CallToTend>();

            var(userLocal, ctxLocal) = TestSpirit.SetupGame(powerCard, gs => {
                gs.NewLogEntry += RecordLogItem;                 // (s) => log.Enqueue(s.Msg);
            });
            user = userLocal;
            ctx  = ctxLocal;
            log.Clear();             // skip over initial Explorer setup
        }
Ejemplo n.º 28
0
 static Spirit InitSpirit()
 {
     return(new Thunderspeaker {
         CardDrawer = new PowerProgression(
             PowerCard.For <VeilTheNightsHunt>(),
             PowerCard.For <ReachingGrasp>(),
             //PowerCard.For<WrapInWingsOfSunlight>(),      // Major
             PowerCard.For <Drought>(),
             PowerCard.For <ElementalBoon>()
             ),
     });
 }
Ejemplo n.º 29
0
        public void StopsAllInvaderActions()
        {
            List <string> invaderLog = new List <string>();

            var(user, ctx) = TestSpirit.SetupGame(PowerCard.For <IndomitableClaim>(), (gs) => {
                var jungleCard  = new InvaderCard(Terrain.Jungle);
                gs.InvaderDeck  = InvaderDeck.BuildTestDeck(jungleCard, jungleCard, jungleCard, jungleCard);
                gs.NewLogEntry += (s) => invaderLog.Add(s.Msg());
            });

            // Given: there a ravage card
            user.Grows();
            user.IsDoneBuyingCards();
            invaderLog.Clear();

            // and: there is a space that IS-RAVAGE AND BUILD (aka: Jungle - see above)
            var spaceCtx = ctx.AllSpaces
                           .Select(ctx.Target)
                           .Last(s => s.MatchesRavageCard && s.MatchesBuildCard);        // last stays away from city and ocean

            invaderLog.Add("Selected target:" + spaceCtx.Space.Label);

            // And: we have a presence in that land
            ctx.Self.Presence.PlaceOn(spaceCtx.Space, spaceCtx.GameState);

            //  And: it has 3 explorers
            spaceCtx.Tokens.InitDefault(Invader.Explorer, 3);
            spaceCtx.Tokens.InitDefault(Invader.Town, 0);
            spaceCtx.Tokens.InitDefault(Invader.City, 0);               // if we had to advance cards, might have buit a city
            spaceCtx.Tokens.InvaderSummary().ShouldBe("3E@1", "Unable to init to 3 exploreres.");
            //  And 2 dahan
            spaceCtx.Dahan.Init(2);

            // When: grows and purchases card
            user.Grows();
            user.PlaysCard(IndomitableClaim.Name);

            //  And: has enough elements to trigger the bonus
            ctx.Self.Elements[Element.Sun]   = 2;
            ctx.Self.Elements[Element.Earth] = 3;

            //  When: Activates Card
            user.SelectsFastAction(IndomitableClaim.Name);
            user.TargetsLand_IgnoreOptions(spaceCtx.Space.Label);
            user.PullsPresenceFromTrack(ctx.Self.Presence.Energy.RevealOptions.Single());

            // Then: nothing changed
            spaceCtx.Tokens.InvaderSummary().ShouldBe("3E@1", "should be same that we started with");

            // Make sure that we actually executed the Ravage Build / Explore Bit
            invaderLog.Count(s => s.Contains("Exploring")).ShouldBeGreaterThan(0);
        }
Ejemplo n.º 30
0
        public void TargettingOceanAsWetLand(bool hasOcean, string expectedOptions)
        {
            var gs = GetGame(hasOcean);

            gs.Phase = Phase.Fast;

            river.Presence.Move(board[5], board[2], gs);               // move it to A2
            Assert_Options("A2", river.Presence.Spaces, "river starting presence");

            // Talons ofLightning - Range 1
            _ = PowerCard.For <TalonsOfLightning>().ActivateAsync(river.BindMyPower(gs));

            Assert_Options(expectedOptions, river.Action.GetCurrent().Options, hasOcean ? "include ocean" : "exclude ocean");