public void Stalker_ability_switches_adjacent_monsters() { // Arrange var context = new TestContext(); var stalker = context.CreateCard<Bhoidwood>("Bhoidwood Stalker"); context.SetPlayerHand(stalker); context.SetPlayerState(Phase.Dungeon); var monster1 = context.GetMonsterInRank(1); var monster2 = context.GetMonsterInRank(2); context.WhenSelectingCardsSelect(monster1); // Act context.UseAbilityOf(stalker); // Assert Assert.That(context.GetMonsterInRank(1), Is.SameAs(monster2)); Assert.That(context.GetMonsterInRank(2), Is.SameAs(monster1)); }
public void When_thundermage_bolter_discards_monster() { // Arrange var context = new TestContext(); var player = context.Player; context.SetPlayerState(Phase.Dungeon); var bolter = context.CreateCard<Thundermage>("Thundermage Bolter"); context.SetPlayerHand(bolter); var targetMonster = context.GetMonsterInRank(1); var startingXp = player.Xp; var startingVp = player.Vp; // Act context.UseAbilityOf(bolter); // Assert Assert.That(player.Discard.Contains(targetMonster)); Assert.That(player.Xp, Is.EqualTo(startingXp), "Using the Thundermage Bolter's ability does not generate XP"); Assert.That(player.Vp, Is.EqualTo(startingVp + targetMonster.Vp)); Assert.That(context.GetMonsterInRank(1), Is.Not.Null, "Dungeon hall should be refilled"); }
public void When_using_phoenix_trophy() { // Arrange var context = new TestContext(); var player = context.Player; context.SetPlayerState(Phase.Trophy); var phoenix = context.CreateCard<BurnmarkedFire>("Phoenix"); context.SetPlayerHand(phoenix); var startingXp = player.Xp; // Act context.UseAbilityOf(phoenix); player.EndTurn(); // Assert Assert.That(player.Xp, Is.EqualTo(startingXp + 3)); Assert.That(context.GetMonsterInRank(4), Is.SameAs(phoenix)); Assert.That(phoenix.Owner, Is.EqualTo(CardOwner.Dungeon)); }
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)); }