Exemplo n.º 1
0
    def test_trades_obj_smoke(self):
        me = [BloodfenRaptor(), RiverCrocolisk()]
        opp = [Wisp(), WarGolem()]

        trades = self.make_trades(me, opp)

        self.assertEqual(len(trades.trades()), 6)
Exemplo n.º 2
0
    def test_setup_smoke(self):
        game = TestHelpers().make_game()

        self.add_minions(game, 0, Wisp(), WarGolem())
        self.add_minions(game, 1, BloodfenRaptor())

        self.assertEqual(2, len(game.players[0].minions))
        self.assertEqual(1, len(game.players[1].minions))
Exemplo n.º 3
0
    def test_trades_smart2(self):
        me = self.make_cards(Voidwalker())
        opp = self.make_cards(Wisp(), ChillwindYeti())

        trades = self.make_trades(me, opp)

        self.assertEqual(len(trades.trades()), 3)
        self.assertEqual(trades.trades()[0].opp_minion.name, "Wisp")
Exemplo n.º 4
0
    def test_trades_smart(self):
        me = self.make_cards(MagmaRager())
        opp = self.make_cards(Wisp(), ChillwindYeti())

        trades = self.make_trades(me, opp)

        self.assertEqual(len(trades.trades()), 3)
        self.assertEqual(trades.trades()[0].opp_minion.name, "Chillwind Yeti")
Exemplo n.º 5
0
    def test_trades_smart2(self):
        game = self.make_game()
        me = self.make_cards(game.current_player, Voidwalker())
        opp = self.make_cards(game.other_player, Wisp(), ChillwindYeti())

        trades = self.make_trades(me, opp)

        self.assertEqual(len(trades.trades()), 3)
        self.assertEqual(trades.trades()[0].opp_minion.name, "Wisp")
Exemplo n.º 6
0
    def test_will_play_three_cards(self):
        game = TestHelpers().make_game()

        self.set_hand(game, 0, Wisp(), ArgentSquire(), DireWolfAlpha())
        self.set_mana(game, 0, 3)

        game.play_single_turn()

        self.assert_minions(game.players[0], "Wisp", "Argent Squire", "Dire Wolf Alpha")
Exemplo n.º 7
0
    def test_will_respect_taunt(self):
        game = TestHelpers().make_game()

        self.add_minions(game, 1, Wisp(), GoldshireFootman())
        self.add_minions(game, 0, BloodfenRaptor())

        self.make_all_active(game)
        game.play_single_turn()

        self.assert_minions(game.players[1], "Wisp")
        self.assert_minions(game.players[0], "Bloodfen Raptor")
Exemplo n.º 8
0
    def test_basic_trade(self):
        game = TestHelpers().make_game()

        self.add_minions(game, 1, Wisp(), WarGolem())
        self.add_minions(game, 0, BloodfenRaptor())

        self.make_all_active(game)
        game.play_single_turn()

        self.assert_minions(game.players[1], "War Golem")
        self.assert_minions(game.players[0], "Bloodfen Raptor")
Exemplo n.º 9
0
    def test_will_attack_twice(self):
        game = TestHelpers().make_game()

        self.add_minions(game, 1, Wisp(), GoldshireFootman())
        self.add_minions(game, 0, BloodfenRaptor(), RiverCrocolisk())

        self.make_all_active(game)
        game.play_single_turn()

        self.assert_minions(game.players[1])
        self.assert_minions(game.players[0], "Bloodfen Raptor",
                            "River Crocolisk")
Exemplo n.º 10
0
    def test_abusive(self):
        game = TestHelpers().make_game()

        self.set_hand(game, 0, AbusiveSergeant())
        self.set_board(game, 0, Wisp())
        self.set_board(game, 1, RiverCrocolisk())

        self.make_all_active(game)
        game.play_single_turn()

        self.assert_minions(game.players[0], "Abusive Sergeant")
        self.assert_minions(game.players[1])
Exemplo n.º 11
0
    def test_commando_attacks_enemy(self):
        game = TestHelpers().make_game()

        self.set_hand(game, 0, StormpikeCommando())
        self.set_board(game, 0, Wisp())
        self.set_board(game, 1, BloodfenRaptor())
        self.set_mana(game, 0, 5)

        self.make_all_active(game)
        game.play_single_turn()

        self.assert_minions(game.players[0], "Wisp", "Stormpike Commando")
        self.assert_minions(game.players[1])
Exemplo n.º 12
0
    def test_cleric(self):
        game = TestHelpers().make_game()

        self.set_hand(game, 0, ShatteredSunCleric())
        self.set_board(game, 0, Wisp())
        self.set_board(game, 1, BloodfenRaptor())
        self.set_mana(game, 0, 3)

        self.make_all_active(game)
        game.play_single_turn()

        self.assert_minions(game.players[0], "Shattered Sun Cleric")
        self.assert_minions(game.players[1])
Exemplo n.º 13
0
    def test_will_attack_minion_and_face(self):
        game = TestHelpers().make_game()

        self.add_minions(game, 1, Wisp())
        self.add_minions(game, 0, BloodfenRaptor(), RiverCrocolisk())

        self.make_all_active(game)
        game.play_single_turn()

        self.assert_minions(game.players[1])
        self.assert_minions(game.players[0], "Bloodfen Raptor",
                            "River Crocolisk")

        self.assertEqual(27, game.players[1].hero.health)
Exemplo n.º 14
0
    def test_dwarf(self):
        game = TestHelpers().make_game()

        self.set_hand(game, 0, DarkIronDwarf())
        self.set_board(game, 0, Wisp())
        self.set_board(game, 1, RiverCrocolisk())

        game.players[0].mana = 4
        game.players[0].max_mana = 4

        self.make_all_active(game)
        game.play_single_turn()

        self.assert_minions(game.players[0], "Dark Iron Dwarf")
        self.assert_minions(game.players[1])
Exemplo n.º 15
0
    def test_cleric_buff_to_keep_alive(self):
        # This test does not pass yet. Agent picks a random friendly minion
        return

        game = TestHelpers().make_game()

        self.set_hand(game, 0, ShatteredSunCleric())
        self.set_board(game, 0, MagmaRager(), Wisp())
        self.set_board(game, 1, ImpMaster())
        self.set_mana(game, 0, 3)

        self.make_all_active(game)
        game.play_single_turn()

        self.assert_minions(game.players[0], "Shattered Sun Cleric",
                            "Magma Rager", "Wisp")
        self.assert_minions(game.players[1])