public void When_laird_is_defeated_then_all_kobolds_in_hall_are_defeated()
        {
            // Arrange
            var context = new TestContext();
            var player = context.Player;
            var laird = context.CreateCard<KoboldHumanoid>("Drakeclan Laird");
            var ambusher = context.CreateCard<KoboldHumanoid>("Drakeclan Ambusher");
            var cutter = context.CreateCard<KoboldHumanoid>("Drakeclan Cutter");
            var shaman = context.CreateCard<KoboldHumanoid>("Drakeclan Shaman");
            var kobolds = new[] {laird, ambusher, cutter, shaman};
            context.SetTopOfDungeonDeck(kobolds);
            context.AdvanceMonsterToFirstRank(laird);
            var hand = Enumerable.Range(0, 6).Select(x => context.CreateCard<Criochan>("Criochan Captain")).ToArray();
            context.SetPlayerHand(hand);
            var startingXp = player.Xp;
            var startingVp = player.Vp;

            // Act
            context.WhenBattling(laird);
            player.DetermineBattleResult();

            // Assert
            kobolds.Each(x => Assert.That(player.Discard.Contains(x), "Discard does not contain {0}".Template(x.Name)));
            context.Game.Dungeon.Ranks.Each(r=> Assert.That(r.Card, Is.Not.Null, "Rank {0} is empty".Template(r.Number)));
            kobolds.Each(x => Assert.That(context.Game.Dungeon.Ranks.All(rank => rank.Card != x)));
            Assert.That(player.Xp, Is.EqualTo(startingXp + laird.Xp));
            Assert.That(player.Vp, Is.EqualTo(startingVp + kobolds.Sum(x => x.Vp)));
        }
Beispiel #2
0
        public void A_hero_not_armed_with_a_pike_is_not_immune_to_battle_effects()
        {
            // Arrange
            var context = new TestContext();
            var player = context.Player;
            var hero = context.CreateCard<Criochan>();
            var pike = context.CreateCard<Pike>();
            context.SetPlayerHand(hero, pike);
            var ettin = context.SetMonsterInFirstRank<OgreHumanoid>("Ettin");

            // Act
            context.WhenBattling(ettin);

            // Assert
            Assert.That(player.Hand, Has.No.Member(hero), "Ettin eats hero.");
        }
        public void When_laird_is_defeated_then_correct_monsters_are_discarded()
        {
            // Arrange
            var context = new TestContext();
            var player = context.Player;
            var ambusher = context.CreateCard<KoboldHumanoid>("Drakeclan Ambusher");
            var laird = context.CreateCard<KoboldHumanoid>("Drakeclan Laird");
            var phoenix = context.CreateCard<BurnmarkedFire>("Phoenix");
            var ogre = context.CreateCard<OgreHumanoid>("Ogre");
            context.SetDungeonHall(ambusher, laird, phoenix, ogre);
            var hand = Enumerable.Range(0, 6).Select(x => context.CreateCard<Criochan>("Criochan Captain")).ToArray();
            context.SetPlayerHand(hand);

            // Act
            context.WhenBattling(laird);
            player.DetermineBattleResult();

            // Assert
            var discardedMonsters = player.Discard.Where(c => c.Type == CardType.Monster);
            Assert.That(discardedMonsters, Has.Member(laird));
            Assert.That(discardedMonsters, Has.Member(ambusher));
            Assert.That(context.GetMonsterInRank(1), Is.SameAs(phoenix));
            Assert.That(context.GetMonsterInRank(2), Is.SameAs(ogre));
        }
Beispiel #4
0
        public void Pike_only_protects_the_hero_that_has_it_equipped()
        {
            // Arrange
            var context = new TestContext();
            var player = context.Player;
            var equippedHero = context.CreateCard<Criochan>();
            var unequippedHero = context.CreateCard<Criochan>();
            var pike = context.CreateCard<Pike>();
            context.SetPlayerHand(equippedHero, pike);
            var ettin = context.SetMonsterInFirstRank<OgreHumanoid>("Ettin");

            // Act
            context.HeroEquipsWeapon(equippedHero, pike);
            context.WhenBattling(ettin);

            // Assert
            Assert.That(player.Hand, Has.Member(equippedHero), "Pike should protect hero from Ettin.");
            Assert.That(player.Hand, Has.No.Member(unequippedHero), "Ettin eats unequipped hero.");
        }