public void RevealedTokens_GainElements()
        {
            var fxt = new GameFixture()
                      .WithSpirit(new ShiftingMemoryOfAges())
                      .Start();

            // Given: a space that will ravage and lose tokens
            TargetSpaceCtx space = fxt.TargetSpace("A5");

            space.Tokens.AdjustDefault(Invader.Explorer, 1);
            space.Tokens.Dahan.Init(2);
            var terrain = new[] { Terrain.Wetland, Terrain.Sand, Terrain.Jungle, Terrain.Mountain }.First(space.Space.Is);

            fxt.gameState.InvaderDeck.Ravage.Add(new InvaderCard(terrain));
            //   But: will not build nor explore
            fxt.gameState.InvaderDeck.Build.Clear();
            fxt.gameState.InvaderDeck.Explore.Clear();

            //  And: user grows (+9 energy)
            fxt.user.Growth_SelectsOption(3);
            fxt.spirit.InitElementsFromPresence();
            fxt.spirit.GetAvailableActions(Phase.Fast).Count().ShouldBe(1);

            //   And: enough elements to trigger level-2 innate  (2 moon,1 air)
            fxt.spirit.Elements[Element.Moon] = 2;
            fxt.spirit.Elements[Element.Air]  = 1;
            fxt.spirit.Elements.BuildElementString().ShouldBe("2 moon 1 air");

            // Buy slow card (so we don't wrap to next turn)
            fxt.user.PlaysCard(BoonOfAncientMemories.Name);

            //  When: triggers Observe the Ever-changing World (SUT) (level 2 Observe)
            fxt.user.SelectsFastAction($"Learn the Invaders' Tactics,({ObserveTheEverChangingWorld.Name})");
            fxt.user.TargetsLand(ObserveTheEverChangingWorld.Name, "(A5),A7,A8");

            //   And: is done with Fast
            fxt.user.IsDoneWith(Phase.Fast);

            var dec = fxt.spirit.Action.GetCurrent();

            if (dec.Prompt == "Select Slow to resolve:")
            {
                _ = dec.ToString();
            }
            else
            {
                //  Then: Asks user to prepare element
                fxt.user.AssertDecisionX("Prepare Element (A5)", "Sun,Moon,Fire,Air,Water,(Earth),Plant,Animal");
            }

            fxt.gameState.Phase.ShouldBe(Phase.Slow);
        }
Exemplo n.º 2
0
        public void NoInvaderDamageToDahan_NoBadlandDamageToDahan()
        {
            var fxt = new GameFixture()
                      .Start();

            // Given: a space to ravage on.
            var space  = fxt.board[5];
            var tokens = fxt.gameState.Tokens[space];

            fxt.gameState.InvaderDeck.Ravage.Add(InvaderCardEx.For(space));

            // And: disable ravage on A2 which has the same space
            fxt.gameState.SkipRavage(fxt.board[2]);

            //  And: 1 bad lands, 1 explorer, 1 dahan, 1 defend
            tokens.Badlands.Init(1);
            tokens.InitDefault(Invader.Explorer, 1);
            tokens.InitDefault(TokenType.Dahan, 1);
            tokens.Defend.Add(1);
            tokens.Summary.ShouldBe("1D@2,1E@1,1G,1M");

            // When: Grow, Skip Buy, then Ravage
            fxt.user.Growth_SelectsOption("ReclaimAll");
            fxt.user.IsDoneBuyingCards();

            //  Then: ravage happened
            fxt.gameState.RoundNumber.ShouldBe(2);
            fxt.ravages.Count.ShouldBe(1);
            var ravage = fxt.ravages[0];

            tokens.Dahan.Count.ShouldBe(1);

            //   And: no damage applied to dahan
            ravage.defenderDamageFromAttackers.ShouldBe(0);
            ravage.dahanDestroyed.ShouldBe(0);
            ravage.startingDefenders.Total.ShouldBe(1);
        }