public void Resurrect_BRM_017() { var game = new Game(new GameConfig { StartPlayer = 1, Player1HeroClass = CardClass.PRIEST, Player2HeroClass = CardClass.MAGE, FillDecks = true }); game.StartGame(); game.Player1.BaseMana = 10; game.Player2.BaseMana = 10; var testCard = Generic.DrawCard(game.CurrentPlayer, Cards.FromName("Resurrect")); Assert.AreEqual(5, game.CurrentPlayer.Hand.Count); game.Process(PlayCardTask.Spell(game.CurrentPlayer, testCard)); Assert.AreEqual(5, game.CurrentPlayer.Hand.Count); var minion = Generic.DrawCard(game.CurrentPlayer, Cards.FromName("Injured Blademaster")); game.Process(PlayCardTask.Minion(game.CurrentPlayer, minion)); game.Process(EndTurnTask.Any(game.CurrentPlayer)); var spell = Generic.DrawCard(game.CurrentPlayer, Cards.FromName("Fireball")); Assert.AreEqual(1, game.CurrentOpponent.Board.Count); game.Process(PlayCardTask.SpellTarget(game.CurrentPlayer, spell, minion)); Assert.AreEqual(0, game.CurrentOpponent.Board.Count); game.Process(EndTurnTask.Any(game.CurrentPlayer)); game.Process(PlayCardTask.Spell(game.CurrentPlayer, testCard)); Assert.AreEqual(1, game.CurrentPlayer.Board.Count); Assert.AreEqual(minion.Card.Id, game.CurrentPlayer.Board[0].Card.Id); Assert.AreEqual(7, ((Minion)game.CurrentPlayer.Board[0]).Health); }
public void SecretActivation() { var game = new Game(new GameConfig { StartPlayer = 1, Player1HeroClass = CardClass.HUNTER, Player2HeroClass = CardClass.ROGUE, FillDecks = true }); game.StartGame(); game.Player1.BaseMana = 10; game.Player2.BaseMana = 10; var minion1 = Generic.DrawCard(game.CurrentPlayer, Cards.FromName("Knife Juggler")); game.Process(PlayCardTask.Minion(game.CurrentPlayer, minion1)); var testCard = Generic.DrawCard(game.CurrentPlayer, Cards.FromName("Snake Trap")); game.Process(PlayCardTask.Spell(game.CurrentPlayer, testCard)); game.Process(EndTurnTask.Any(game.CurrentPlayer)); var minion2 = Generic.DrawCard(game.CurrentPlayer, Cards.FromName("Stonetusk Boar")); game.Process(PlayCardTask.Minion(game.CurrentPlayer, minion2)); game.Process(MinionAttackTask.Any(game.CurrentPlayer, minion2, minion1)); Assert.Equal(game.CurrentOpponent.Hero.Health > 27 ? 2 : 1, ((Minion)minion1).Health); }
public void SolemnVigil_BRM_001() { var game = new Game(new GameConfig { StartPlayer = 1, Player1HeroClass = CardClass.PALADIN, Player2HeroClass = CardClass.PALADIN, FillDecks = true }); game.StartGame(); game.Player1.BaseMana = 10; game.Player2.BaseMana = 10; var testCard = Generic.DrawCard(game.CurrentPlayer, Cards.FromName("Solemn Vigil")); var minion1 = Generic.DrawCard(game.CurrentPlayer, Cards.FromName("Stonetusk Boar")); game.Process(PlayCardTask.Minion(game.CurrentPlayer, minion1)); Assert.AreEqual(1, testCard.Enchants.Count); Assert.AreEqual(5, testCard.Cost); game.Process(EndTurnTask.Any(game.CurrentPlayer)); var minion2 = Generic.DrawCard(game.CurrentPlayer, Cards.FromName("Stonetusk Boar")); game.Process(PlayCardTask.Minion(game.CurrentPlayer, minion2)); game.Process(EndTurnTask.Any(game.CurrentPlayer)); Assert.AreEqual(5, testCard.Cost); Assert.AreEqual(6, game.CurrentPlayer.Hand.Count); game.Process(MinionAttackTask.Any(game.CurrentPlayer, minion1, minion2)); Assert.AreEqual(3, testCard.Cost); game.Process(PlayCardTask.Spell(game.CurrentPlayer, testCard)); Assert.AreEqual(7, game.CurrentPlayer.Hand.Count); }
public void BasicHealthAuraTest1() { var game = new Game(new GameConfig { StartPlayer = 1, Player1HeroClass = CardClass.PALADIN, Player2HeroClass = CardClass.MAGE, FillDecks = true, FillDecksPredictably = true }); game.Player1.BaseMana = 10; game.Player2.BaseMana = 10; game.StartGame(); IPlayable minion1 = Generic.DrawCard(game.CurrentPlayer, Cards.FromName("Stormwind Champion")); IPlayable minion2 = Generic.DrawCard(game.CurrentPlayer, Cards.FromName("Stormwind Champion")); IPlayable minion3 = Generic.DrawCard(game.CurrentPlayer, Cards.FromName("Shattered Sun Cleric")); game.Process(PlayCardTask.Minion(game.CurrentPlayer, minion1)); // 6/6 game.CurrentPlayer.UsedMana = 0; game.Process(PlayCardTask.Minion(game.CurrentPlayer, minion2)); // 7/7 game.CurrentPlayer.UsedMana = 0; game.Process(PlayCardTask.MinionTarget(game.CurrentPlayer, minion3, minion2)); game.CurrentPlayer.UsedMana = 0; game.Process(EndTurnTask.Any(game.CurrentPlayer)); // (7/7), (8/8), (5/4) IPlayable spell1 = Generic.DrawCard(game.CurrentPlayer, Cards.FromName("Flamestrike")); game.Process(PlayCardTask.Spell(game.CurrentPlayer, spell1)); // (7/3), (8/4) game.CurrentPlayer.UsedMana = 0; IPlayable spell2 = Generic.DrawCard(game.CurrentPlayer, Cards.FromName("Arcane Explosion")); game.Process(PlayCardTask.Spell(game.CurrentPlayer, spell2)); IPlayable spell3 = Generic.DrawCard(game.CurrentPlayer, Cards.FromName("Arcane Explosion")); game.Process(PlayCardTask.Spell(game.CurrentPlayer, spell3)); Assert.Equal(2, ((ICharacter)minion2).Health); // (7/1), (8/2) IPlayable spell4 = Generic.DrawCard(game.CurrentPlayer, Cards.FromName("Arcane Explosion")); game.Process(PlayCardTask.Spell(game.CurrentPlayer, spell4)); Assert.Equal(1, ((ICharacter)minion2).Health); // (7/1) Assert.Equal(Zone.PLAY, ((ICharacter)minion2).Zone.Type); }
public void BasicHealthAuraTest3() { var game = new Game(new GameConfig { StartPlayer = 1, Player1HeroClass = CardClass.PRIEST, Player2HeroClass = CardClass.WARLOCK, FillDecks = true, FillDecksPredictably = true }); game.StartGame(); game.Player1.BaseMana = 10; game.Player2.BaseMana = 10; var minion1 = (ICharacter)Generic.DrawCard(game.Player1, Cards.FromName("Murloc Raider")); var minion2 = (ICharacter)Generic.DrawCard(game.Player1, Cards.FromName("Murloc Warleader")); IPlayable minion3 = Generic.DrawCard(game.Player1, Cards.FromName("Stormwind Champion")); IPlayable minion4 = Generic.DrawCard(game.Player1, Cards.FromName("Ironbeak Owl")); IPlayable spell1 = Generic.DrawCard(game.Player1, Cards.FromName("Power Word: Shield")); game.Process(PlayCardTask.Minion(game.CurrentPlayer, minion1)); game.Player1.UsedMana = 0; game.Process(PlayCardTask.Minion(game.CurrentPlayer, minion2)); game.Player1.UsedMana = 0; game.Process(PlayCardTask.Minion(game.CurrentPlayer, minion3)); game.Player1.UsedMana = 0; game.Process(PlayCardTask.SpellTarget(game.CurrentPlayer, spell1, minion1)); Assert.Equal(4, minion1.Health); Assert.Equal(4, minion2.Health); Assert.Equal(6, ((ICharacter)minion3).Health); game.Process(PlayCardTask.MinionTarget(game.CurrentPlayer, minion4, minion2)); Assert.Equal(4, minion1.Health); Assert.Equal(4, minion2.Health); Assert.Equal(6, ((ICharacter)minion3).Health); Assert.Equal(2, ((ICharacter)minion4).Health); game.Process(EndTurnTask.Any(game.CurrentPlayer)); IPlayable spell2 = Generic.DrawCard(game.CurrentPlayer, Cards.FromName("Hellfire")); game.Process(PlayCardTask.Spell(game.CurrentPlayer, spell2)); Assert.Equal(1, minion1.Health); Assert.Equal(1, minion2.Health); Assert.Equal(3, ((ICharacter)minion3).Health); Assert.True(((ICharacter)minion4).IsDead); }
public void SecretActivation() { var game = new Game(new GameConfig { StartPlayer = 1, Player1HeroClass = CardClass.HUNTER, Player2HeroClass = CardClass.ROGUE, FillDecks = true, FillDecksPredictably = true }); game.StartGame(); game.Player1.BaseMana = 10; game.Player2.BaseMana = 10; IPlayable minion1 = Generic.DrawCard(game.CurrentPlayer, Cards.FromName("Knife Juggler")); game.Process(PlayCardTask.Minion(game.CurrentPlayer, minion1)); IPlayable testCard = Generic.DrawCard(game.CurrentPlayer, Cards.FromName("Snake Trap")); // Spawns 3 game.Process(PlayCardTask.Spell(game.CurrentPlayer, testCard)); game.Process(EndTurnTask.Any(game.CurrentPlayer)); IPlayable minion2 = Generic.DrawCard(game.CurrentPlayer, Cards.FromName("Stonetusk Boar")); game.Process(PlayCardTask.Minion(game.CurrentPlayer, minion2)); game.Process(MinionAttackTask.Any(game.CurrentPlayer, minion2, minion1)); Assert.Equal(4, game.CurrentOpponent.BoardZone.Count); if (game.CurrentPlayer.BoardZone.Count == 0) { // Minion was destroyed, so it's moved to graveyard with tags reset. Assert.Equal(1, game.CurrentPlayer.GraveyardZone.Count); Assert.Equal(game.CurrentOpponent.Hero.BaseHealth, game.CurrentOpponent.Hero.Health); Assert.Equal(game.CurrentPlayer.Hero.BaseHealth - 2, game.CurrentPlayer.Hero.Health); } else { // Minion was NOT destroyed, so it continued it's attack. Assert.Equal(0, game.CurrentPlayer.GraveyardZone.Count); Assert.Equal(game.CurrentOpponent.Hero.BaseHealth - 1, game.CurrentOpponent.Hero.Health); Assert.Equal(game.CurrentPlayer.Hero.BaseHealth - 3, game.CurrentPlayer.Hero.Health); } }
public void SecretOnlyOnce() { var game = new Game(new GameConfig { StartPlayer = 1, Player1HeroClass = CardClass.HUNTER, Player2HeroClass = CardClass.ROGUE, FillDecks = true }); game.StartGame(); game.Player1.BaseMana = 10; game.Player2.BaseMana = 10; var testCard1 = Generic.DrawCard(game.CurrentPlayer, Cards.FromName("Snake Trap")); game.Process(PlayCardTask.Spell(game.CurrentPlayer, testCard1)); var testCard2 = Generic.DrawCard(game.CurrentPlayer, Cards.FromName("Snake Trap")); game.Process(PlayCardTask.Spell(game.CurrentPlayer, testCard2)); Assert.Equal(1, game.CurrentPlayer.SecretZone.Count); }
public void SecretOrderOfPlay() { var game = new Game(new GameConfig { StartPlayer = 1, Player1HeroClass = CardClass.MAGE, Player1Deck = new List <Card>() { Cards.FromName("Vaporize"), Cards.FromName("Ice Barrier"), Cards.FromName("Stonetusk Boar") }, Player2HeroClass = CardClass.HUNTER, Player2Deck = new List <Card>() { Cards.FromName("Stonetusk Boar"), Cards.FromName("Freezing Trap"), Cards.FromName("Explosive Trap") }, Shuffle = false, FillDecks = true, FillDecksPredictably = true }); game.StartGame(); game.Player1.BaseMana = 10; game.Player2.BaseMana = 10; game.Process(PlayCardTask.Spell(game.CurrentPlayer, "Vaporize")); game.Process(PlayCardTask.Spell(game.CurrentPlayer, "Ice Barrier")); game.Process(EndTurnTask.Any(game.CurrentPlayer)); game.Process(PlayCardTask.Minion(game.CurrentPlayer, "Stonetusk Boar")); game.Process(MinionAttackTask.Any(game.CurrentPlayer, game.CurrentPlayer.BoardZone[0], game.CurrentOpponent.Hero)); Assert.Equal(8, game.CurrentOpponent.Hero.Armor); game.Process(PlayCardTask.Spell(game.CurrentPlayer, "Freezing Trap")); game.Process(PlayCardTask.Spell(game.CurrentPlayer, "Explosive Trap")); game.Process(EndTurnTask.Any(game.CurrentPlayer)); game.Process(PlayCardTask.Minion(game.CurrentPlayer, "Stonetusk Boar")); game.Process(MinionAttackTask.Any(game.CurrentPlayer, game.CurrentPlayer.BoardZone[0], game.CurrentOpponent.Hero)); Assert.Equal(30, game.CurrentOpponent.Hero.Health); }
public void Vanish_NEW1_004() { var game = new Game(new GameConfig { StartPlayer = 1, Player1HeroClass = CardClass.ROGUE, Player2HeroClass = CardClass.ROGUE, FillDecks = true, FillDecksPredictably = true }); game.StartGame(); game.Player1.BaseMana = 10; game.Player2.BaseMana = 10; int player1HandCount = game.CurrentPlayer.HandZone.Count; Assert.Equal(0, game.CurrentPlayer.BoardZone.Count); // player 1 plays 7 minions for (int i = 0; i < 7; i++) { IPlayable minion = Generic.DrawCard(game.CurrentPlayer, Cards.FromName("Wisp")); game.Process(PlayCardTask.Minion(game.CurrentPlayer, minion)); } Assert.Equal(7, game.CurrentPlayer.BoardZone.Count); // end turn game.Process(EndTurnTask.Any(game.CurrentPlayer)); // player 2 plays vanish IPlayable spell = Generic.DrawCard(game.CurrentPlayer, Cards.FromName("Vanish")); game.Process(PlayCardTask.Spell(game.CurrentPlayer, spell)); Assert.Equal(0, game.CurrentPlayer.Opponent.BoardZone.Count); Assert.Equal(10, game.CurrentPlayer.Opponent.HandZone.Count); }
public void LavaShock_BRM_011() { var game = new Game(new GameConfig { StartPlayer = 1, Player1HeroClass = CardClass.SHAMAN, Player2HeroClass = CardClass.SHAMAN, FillDecks = true }); game.StartGame(); game.Player1.BaseMana = 5; game.Player2.BaseMana = 5; var testCard = Generic.DrawCard(game.CurrentPlayer, Cards.FromName("Lava Shock")); var spell = Generic.DrawCard(game.CurrentPlayer, Cards.FromName("Ancestral Knowledge")); game.Process(PlayCardTask.Spell(game.CurrentPlayer, spell)); game.Process(EndTurnTask.Any(game.CurrentPlayer)); game.Process(EndTurnTask.Any(game.CurrentPlayer)); Assert.AreEqual(4, game.CurrentPlayer.RemainingMana); game.Process(PlayCardTask.SpellTarget(game.CurrentPlayer, testCard, game.CurrentOpponent.Hero)); Assert.AreEqual(4, game.CurrentPlayer.RemainingMana); Assert.AreEqual(28, game.CurrentOpponent.Hero.Health); }
public static void GameSplitTest() { Game game = null; bool goOnFlag = true; while (goOnFlag) { game = new Game(new GameConfig { StartPlayer = 1, Player1HeroClass = CardClass.PRIEST, Player1Deck = new List <Card>() { Cards.FromName("Loot Hoarder"), // 1 Cards.FromName("Loot Hoarder"), // 2 Cards.FromName("Huge Toad"), // 3 Cards.FromName("Mad Bomber"), // 4 Cards.FromName("Stonetusk Boar"), // 5 Cards.FromName("Magma Rager"), // 6 Cards.FromName("War Golem"), // 7 Cards.FromName("Reckless Rocketeer"), // 8 Cards.FromName("Wolfrider"), // 9 Cards.FromName("Sen'jin Shieldmasta"), // 10 Cards.FromName("Voodoo Doctor"), // 11 Cards.FromName("River Crocolisk"), // 12 Cards.FromName("Oasis Snapjaw"), // 13 Cards.FromName("Novice Engineer"), // 14 Cards.FromName("Core Hound"), // 15 Cards.FromName("Booty Bay Bodyguard"), // 16 Cards.FromName("Ogre Magi"), // 17 Cards.FromName("Chillwind Yeti"), // 18 Cards.FromName("Acidic Swamp Ooze"), // 19 Cards.FromName("Ironfur Grizzly"), // 20 Cards.FromName("Bluegill Warrior"), // 21 Cards.FromName("Murloc Tidehunter"), // 22 Cards.FromName("Frostwolf Grunt"), // 23 Cards.FromName("Ironforge Rifleman"), // 24 Cards.FromName("Kobold Geomancer"), // 25 Cards.FromName("Razorfen Hunter"), // 26 Cards.FromName("Gnomish Inventor"), // 27 Cards.FromName("Stormwind Knight"), // 28 Cards.FromName("Gurubashi Berserker"), // 29 Cards.FromName("Elven Archer"), // 30 }, Player2HeroClass = CardClass.HUNTER, Player2Deck = new List <Card>() { Cards.FromName("Loot Hoarder"), // 1 Cards.FromName("Loot Hoarder"), // 2 Cards.FromName("Huge Toad"), // 3 Cards.FromName("Mad Bomber"), // 4 Cards.FromName("Stonetusk Boar"), // 5 Cards.FromName("Magma Rager"), // 6 Cards.FromName("War Golem"), // 7 Cards.FromName("Reckless Rocketeer"), // 8 Cards.FromName("Wolfrider"), // 9 Cards.FromName("Sen'jin Shieldmasta"), // 10 Cards.FromName("Voodoo Doctor"), // 11 Cards.FromName("River Crocolisk"), // 12 Cards.FromName("Oasis Snapjaw"), // 13 Cards.FromName("Novice Engineer"), // 14 Cards.FromName("Core Hound"), // 15 Cards.FromName("Booty Bay Bodyguard"), // 16 Cards.FromName("Ogre Magi"), // 17 Cards.FromName("Chillwind Yeti"), // 18 Cards.FromName("Acidic Swamp Ooze"), // 19 Cards.FromName("Ironfur Grizzly"), // 20 Cards.FromName("Bluegill Warrior"), // 21 Cards.FromName("Murloc Tidehunter"), // 22 Cards.FromName("Frostwolf Grunt"), // 23 Cards.FromName("Ironforge Rifleman"), // 24 Cards.FromName("Kobold Geomancer"), // 25 Cards.FromName("Razorfen Hunter"), // 26 Cards.FromName("Gnomish Inventor"), // 27 Cards.FromName("Stormwind Knight"), // 28 Cards.FromName("Gurubashi Berserker"), // 29 Cards.FromName("Elven Archer"), // 30 }, FillDecks = false, Shuffle = false, Splitting = true }); game.StartGame(); game.Process(EndTurnTask.Any(game.CurrentPlayer)); game.Process(PlayCardTask.Spell(game.CurrentPlayer, game.CurrentPlayer.HandZone[4])); // Coin game.Process(PlayCardTask.Minion(game.CurrentPlayer, game.CurrentPlayer.HandZone[0])); // Loot Hoarder game.Process(EndTurnTask.Any(game.CurrentPlayer)); game.Process(PlayCardTask.Minion(game.CurrentPlayer, game.CurrentPlayer.HandZone[0])); // Loot Hoarder game.Process(EndTurnTask.Any(game.CurrentPlayer)); game.Process(PlayCardTask.Minion(game.CurrentPlayer, game.CurrentPlayer.HandZone[1])); // Huge Toad game.Process(EndTurnTask.Any(game.CurrentPlayer)); game.Process(PlayCardTask.Minion(game.CurrentPlayer, game.CurrentPlayer.HandZone[0])); // Loot Hoarder game.Process(EndTurnTask.Any(game.CurrentPlayer)); game.Process(PlayCardTask.Minion(game.CurrentPlayer, game.CurrentPlayer.HandZone[1])); // Mad Bomber //game.Process(PlayCardTask.Minion(game.CurrentPlayer, game.CurrentPlayer.Hand[2])); goOnFlag = false; } ShowLog(game, LogLevel.VERBOSE); }
public void IceBlock_EX1_295() { var game = new Game(new GameConfig { StartPlayer = 1, Player1HeroClass = CardClass.MAGE, Player2HeroClass = CardClass.MAGE, FillDecks = true, FillDecksPredictably = true }); game.StartGame(); game.Player1.BaseMana = 10; game.Player1.Hero.Health = 2; game.Player2.BaseMana = 10; IPlayable spell = Generic.DrawCard(game.CurrentPlayer, Cards.FromName("Ice Block")); game.Process(PlayCardTask.Spell(game.CurrentPlayer, spell)); Assert.Equal(1, game.CurrentPlayer.SecretZone.Count); //Assert.Equal(1, game.CurrentOpponent.Board.Triggers.Count); game.Process(EndTurnTask.Any(game.CurrentPlayer)); // play 2 charge minions IPlayable minion1 = Generic.DrawCard(game.CurrentPlayer, Cards.FromName("Stonetusk Boar")); IPlayable minion2 = Generic.DrawCard(game.CurrentPlayer, Cards.FromName("Stonetusk Boar")); IPlayable minion3 = Generic.DrawCard(game.CurrentPlayer, Cards.FromName("Bluegill Warrior")); game.Process(PlayCardTask.Minion(game.CurrentPlayer, minion1)); game.Process(PlayCardTask.Minion(game.CurrentPlayer, minion2)); game.Process(PlayCardTask.Minion(game.CurrentPlayer, minion3)); Assert.Equal(3, game.CurrentPlayer.BoardZone.Count); // minion 1 attacks hero that should NOT proc the secret game.Process(MinionAttackTask.Any(game.CurrentPlayer, (Minion)minion1, game.CurrentOpponent.Hero)); Assert.Equal(1, game.CurrentOpponent.Hero.Health); Assert.Equal(1, game.CurrentOpponent.SecretZone.Count); // adding one armor for next attack game.Player1.Hero.Armor = 1; Assert.Equal(1, game.CurrentOpponent.Hero.Armor); // minion 2 attacks hero that should proc the secret game.Process(MinionAttackTask.Any(game.CurrentPlayer, (Minion)minion2, game.CurrentOpponent.Hero)); Assert.Equal(0, game.CurrentOpponent.Hero.Armor); Assert.Equal(1, game.CurrentOpponent.Hero.Health); Assert.Equal(1, game.CurrentOpponent.SecretZone.Count); // adding one armor for next attack game.Player1.Hero.Armor = 1; Assert.Equal(1, game.CurrentOpponent.Hero.Armor); // minion 3 attacks hero that should proc the secret game.Process(MinionAttackTask.Any(game.CurrentPlayer, (Minion)minion3, game.CurrentOpponent.Hero)); Assert.Equal(1, game.CurrentOpponent.Hero.Armor); Assert.Equal(0, game.CurrentOpponent.SecretZone.Count); Assert.Equal(1, game.CurrentOpponent.Hero.Health); game.Process(EndTurnTask.Any(game.CurrentPlayer)); game.Process(EndTurnTask.Any(game.CurrentPlayer)); // minion 2 now kills opponent game.Process(MinionAttackTask.Any(game.CurrentPlayer, (Minion)minion3, game.CurrentOpponent.Hero)); Assert.True(game.CurrentOpponent.Hero.IsDead); }