Ejemplo n.º 1
0
def test_impulsive_trickster(initialized_game):
    attacker_board = initialized_game.player_board[0]
    defender_board = initialized_game.player_board[1]

    imp2 = ImpulsiveTrickster(taunt=True)
    imp3 = ImpulsiveTrickster()
    attacker_board.set_minions([ImpulsiveTrickster(), imp2, imp3])
    defender_board.set_minions([PunchingBag(attack=20)])
    initialized_game.start_of_game()
    initialized_game.single_round()
    imp2_health = imp2.health
    imp3_health = imp3.health
    if imp2_health == 2:
        assert imp3_health == 4
    elif imp3_health == 2:
        assert imp2_health == 4
    initialized_game.single_round()
    assert imp3.health == imp3_health + imp2_health

    bag = PunchingBag()
    attacker_board.set_minions([ImpulsiveTrickster(taunt=True), bag])
    defender_board.set_minions([PunchingBag(attack=1)])
    initialized_game.start_of_game()
    initialized_game.single_round()
    initialized_game.single_round()
    assert bag.health == 102
Ejemplo n.º 2
0
def test_arm_of_the_empire(initialized_game):
    attacker_board = initialized_game.player_board[0]
    defender_board = initialized_game.player_board[1]

    # Taunted creature should get buff. Non taunted creature should not.
    attacker_board.set_minions([PunchingBag(attack=1)])
    defender_board.set_minions(
        [ArmoftheEmpire(),
         PunchingBag(taunt=True),
         PunchingBag()])
    initialized_game.start_of_game(0)
    initialized_game.single_round()
    assert defender_board.minions[1].attack == 2
    assert defender_board.minions[2].attack == 0

    # It should buff itself if it is taunted
    attacker_board.set_minions([PunchingBag(attack=1)])
    defender_board.set_minions([ArmoftheEmpire(taunt=True)])
    initialized_game.start_of_game(0)
    initialized_game.single_round()
    assert defender_board.minions[0].attack == 6
    assert defender_board.minions[0].health == 3

    # Multiple arms stack
    attacker_board.set_minions([PunchingBag(attack=1)])
    defender_board.set_minions([ArmoftheEmpire(taunt=True), ArmoftheEmpire()])
    initialized_game.start_of_game(0)
    initialized_game.single_round()
    assert defender_board.minions[0].attack == 8
    assert defender_board.minions[0].health == 3
Ejemplo n.º 3
0
def test_mechano_tank(initialized_game):
    attacker_board = initialized_game.player_board[0]
    defender_board = initialized_game.player_board[1]

    bag = PunchingBag(attack=99)
    attacker_board.set_minions(
        [Alleycat(), Alleycat(taunt=True),
         MechanoTank()])
    defender_board.set_minions([bag])
    initialized_game.start_of_game()
    initialized_game.single_round()
    initialized_game.single_round()
    assert bag.health == 92

    first_bag = PunchingBag(attack=99, taunt=True)
    second_bag = PunchingBag(attack=1)
    attacker_board.set_minions(
        [Alleycat(),
         Alleycat(taunt=True),
         MechanoTank(golden=True)])
    defender_board.set_minions([first_bag, second_bag])
    initialized_game.start_of_game()
    initialized_game.single_round()
    initialized_game.single_round()
    assert first_bag.health == 92
    assert second_bag.health == 94
Ejemplo n.º 4
0
def test_sisefin(initialized_game):
    attacker_board = initialized_game.player_board[0]
    defender_board = initialized_game.player_board[1]

    surviving_murloc = MurlocTidehunter()
    seifein = SISefin()
    defender_board.set_minions([
        MurlocTidehunter(),
        MurlocTidehunter(taunt=True),
        MurlocTidehunter(taunt=True), surviving_murloc, seifein
    ])
    attacker_board.set_minions([PunchingBag(attack=10)])
    initialized_game.start_of_game()
    initialized_game.single_round()
    initialized_game.single_round()
    initialized_game.single_round()
    if surviving_murloc.poisonous:
        assert not seifein.poisonous
    elif seifein.poisonous:
        assert not surviving_murloc.poisonous

    surviving_murloc = MurlocTidehunter()
    seifein = SISefin(golden=True)
    defender_board.set_minions([
        MurlocTidehunter(),
        MurlocTidehunter(taunt=True),
        MurlocTidehunter(taunt=True), surviving_murloc, seifein
    ])
    attacker_board.set_minions([PunchingBag(attack=10)])
    initialized_game.start_of_game()
    initialized_game.single_round()
    initialized_game.single_round()
    initialized_game.single_round()
    assert surviving_murloc.poisonous
    assert seifein.poisonous
Ejemplo n.º 5
0
def test_gemsplitter(initialized_game):
    attacker_board = initialized_game.player_board[0]
    defender_board = initialized_game.player_board[1]

    pirate = SaltyLooter()
    attacker_board.set_minions(
        [DeflectoBot(), pirate,
         Gemsplitter(),
         PeggyBrittlebone()])
    defender_board.set_minions([PunchingBag(attack=1)])
    initialized_game.start_of_game(0)
    initialized_game.single_round()
    assert pirate.attack == 5
    assert pirate.health == 6

    pirate = SaltyLooter()
    attacker_board.set_minions(
        [DeflectoBot(), pirate,
         Gemsplitter(golden=True),
         PeggyBrittlebone()])
    defender_board.set_minions([PunchingBag(attack=1)])
    initialized_game.start_of_game(0)
    initialized_game.single_round()
    assert pirate.attack == 6
    assert pirate.health == 7
Ejemplo n.º 6
0
def test_bird_buddy(initialized_game):
    attacker_board = initialized_game.player_board[0]
    defender_board = initialized_game.player_board[1]

    bird_buddy = BirdBuddy()
    cat = Alleycat()
    attacker_board.set_minions(
        [Alleycat(), Alleycat(taunt=True), cat, bird_buddy])
    defender_board.set_minions([PunchingBag(attack=99)])
    initialized_game.start_of_game()
    initialized_game.single_round()
    assert cat.health == 2
    assert bird_buddy.health == 4

    initialized_game.single_round()
    assert cat.health == 3
    assert bird_buddy.health == 4

    bird_buddy = BirdBuddy(golden=True)
    cat = Alleycat()
    attacker_board.set_minions(
        [Alleycat(), Alleycat(taunt=True), cat, bird_buddy])
    defender_board.set_minions([PunchingBag(attack=99)])
    initialized_game.start_of_game()
    initialized_game.single_round()
    assert cat.health == 3
    assert bird_buddy.health == 8

    initialized_game.single_round()
    assert cat.health == 5
    assert bird_buddy.health == 8
Ejemplo n.º 7
0
def test_minion_insertion_multiple(initialized_game):
    # Test that a minion inserted before the attack order doesnt disrupt attack order
    attacker_board = initialized_game.player_board[0]
    defender_board = initialized_game.player_board[1]

    defender_bag = PunchingBag()
    attacker_board.set_minions(
        [RatPack(taunt=True),
         Sellemental(), WrathWeaver()])
    defender_board.set_minions([defender_bag])

    initialized_game.start_of_game()

    # Attack with Rat
    initialized_game.single_round()
    # Skip bag attack
    initialized_game.single_round()
    # Attack with sellemental
    initialized_game.single_round()
    defender_bag.attack = 99
    # Bag attacks and kills rat
    initialized_game.single_round()

    assert (len(attacker_board.minions) == 4)
    assert (attacker_board.minions[0].name
            and attacker_board.minions[1].name == "Rat")

    # Next minion to attack should be the wrath weaver (rats are inserted before it)
    minion = attacker_board.select_attacking_minion()
    assert (minion.name == "Wrath Weaver")
Ejemplo n.º 8
0
def test_roadboar(initialized_game):
    attacker_board = initialized_game.player_board[0]
    defender_board = initialized_game.player_board[1]

    boar = Roadboar()
    pirate = FreedealingGambler()
    attacker_board.set_minions([boar, PeggyBrittlebone(), pirate])
    defender_board.set_minions([PunchingBag(attack=1)])
    initialized_game.start_of_game()
    initialized_game.single_round()
    assert boar.frenzy_triggered
    assert pirate.health == 4

    boar = Roadboar(golden=True)
    pirate = FreedealingGambler()
    attacker_board.set_minions([boar, PeggyBrittlebone(), pirate])
    defender_board.set_minions([PunchingBag(attack=1)])
    initialized_game.start_of_game()
    initialized_game.single_round()
    assert boar.frenzy_triggered
    assert pirate.health == 5

    boar = Roadboar(golden=True)
    pirate = FreedealingGambler()
    attacker_board.set_minions([boar, PeggyBrittlebone(), pirate])
    defender_board.set_minions([PunchingBag(attack=99)])
    initialized_game.start_of_game()
    initialized_game.single_round()
    assert not boar.frenzy_triggered
    assert pirate.health == 3
Ejemplo n.º 9
0
def test_deathwing(initialized_game):
    initialized_game.player_board[0] = PlayerBoard(0, HeroType.DEATHWING, 1, 1,
                                                   [HarvestGolem()])
    initialized_game.player_board[1] = PlayerBoard(0,
                                                   None,
                                                   1,
                                                   1, [PunchingBag(attack=10)],
                                                   enemy_is_deathwing=True)

    initialized_game.start_of_game()
    initialized_game.single_round()
    assert initialized_game.player_board[0].minions[0].attack == 4

    initialized_game.player_board[0] = PlayerBoard(0,
                                                   HeroType.DEATHWING,
                                                   1,
                                                   1, [HarvestGolem()],
                                                   enemy_is_deathwing=True)
    initialized_game.player_board[1] = PlayerBoard(0,
                                                   HeroType.DEATHWING,
                                                   1,
                                                   1, [PunchingBag(attack=10)],
                                                   enemy_is_deathwing=True)
    initialized_game.start_of_game()
    initialized_game.single_round()
    assert initialized_game.player_board[0].minions[0].attack == 6
Ejemplo n.º 10
0
def test_champion_of_yshaarj(initialized_game):
    attacker_board = initialized_game.player_board[0]
    defender_board = initialized_game.player_board[1]

    champion = ChampionofYShaarj()

    attacker_board.set_minions([PunchingBag(attack=1)])
    defender_board.set_minions([PunchingBag(taunt=True), champion])
    initialized_game.start_of_game(0)
    initialized_game.single_round()
    assert champion.attack == 5
    assert champion.health == 5

    champion = ChampionofYShaarj(taunt=True)
    defender_board.set_minions([champion])
    initialized_game.start_of_game(0)
    initialized_game.single_round()
    assert champion.attack == 5
    assert champion.health == 4

    champion = ChampionofYShaarj(taunt=True, golden=True)
    defender_board.set_minions([champion])
    initialized_game.start_of_game(0)
    initialized_game.single_round()
    assert champion.attack == 10
    assert champion.health == 9
Ejemplo n.º 11
0
def test_draw(initialized_game):
    # Make sure draws are detected. Base case is empty boards
    assert (initialized_game.finished())
    assert (initialized_game.calculate_score_player_0() == 0)

    # Test boards with only 0 power minions
    initialized_game.player_board[0].add_minion(PunchingBag())
    initialized_game.player_board[1].add_minion(PunchingBag())
    assert (initialized_game.finished())
    assert (initialized_game.calculate_score_player_0() == 0)
Ejemplo n.º 12
0
def test_unstable_ghoul(initialized_game):
    attacker_board = initialized_game.player_board[0]
    defender_board = initialized_game.player_board[1]

    attacker_board.set_minions([UnstableGhoul(), PunchingBag()])
    defender_board.set_minions([PunchingBag(attack=6)])
    initialized_game.start_of_game()
    initialized_game.single_round()
    assert defender_board.minions[0].health == 98
    assert attacker_board.minions[0].health == 99
Ejemplo n.º 13
0
def test_minion_deathrattle_return_attack(initialized_game):
    # if a minion with deathrattle (or reborn) attacks and survives and on the next opposing attack
    # it is attacked and killed, its left most deathrattle minion (or its reborn self) should be next in the attack order
    attacker_board = initialized_game.player_board[0]
    defender_board = initialized_game.player_board[1]

    # TEST DEATHRATTLE
    attacker_board.set_minions([HarvestGolem(taunt=True), Imp()])
    defender_board.set_minions([Sellemental(), Sellemental(), Sellemental()])

    initialized_game.start_of_game(0)
    # Golem Attacks
    initialized_game.single_round()
    # Golem is attacked and killed
    initialized_game.single_round()
    attacker = attacker_board.select_attacking_minion()
    assert (attacker.name == "Damaged Golem")

    # TEST REBORN
    attacker_board.set_minions([BronzeWarden(taunt=True), HarvestGolem()])
    defender_board.set_minions([Sellemental(), Sellemental(), Sellemental()])

    initialized_game.start_of_game(0)
    # Dragon Attacks
    initialized_game.single_round()
    # Dragon is attacked and killed
    initialized_game.single_round()
    # Reborn dragon should still be the next attacker
    attacker = attacker_board.select_attacking_minion()
    assert (attacker.reborn_triggered)
    assert (attacker.name == "Bronze Warden")

    # TEST DEATHRATTLE AND REBORN
    punching_bag = PunchingBag()
    attacker_board.set_minions([
        MicroMummy(taunt=True, deathrattles=[ReplicatingMenaceDeathrattle()]),
        HarvestGolem()
    ])
    defender_board.set_minions([punching_bag])
    initialized_game.start_of_game(0)

    # Mummy Attacks
    initialized_game.single_round()
    # Punching bag kills mummy
    punching_bag.attack = 99
    initialized_game.single_round()
    # Mummy dies, microbots spawn first, then mummy is reborn, bots should attack first
    attacker = attacker_board.select_attacking_minion()

    assert (attacker.name == "Microbot")
    assert (attacker_board.minions[3].name == "Micro Mummy")
    assert (attacker_board.minions[3].reborn_triggered)
Ejemplo n.º 14
0
def test_king_bagurgle(initialized_game):
    attacker_board = initialized_game.player_board[0]
    defender_board = initialized_game.player_board[1]
    defender_board.set_minions([PunchingBag(attack=10)])

    murloc = KingBagurgle()
    non_murloc = PunchingBag()
    attacker_board.set_minions([KingBagurgle(), murloc, non_murloc])

    initialized_game.start_of_game(0)
    initialized_game.single_round()
    assert murloc.attack == 8
    assert murloc.health == 5
    assert non_murloc.attack == 0
    assert non_murloc.health == 100
Ejemplo n.º 15
0
def test_glyph_guardian(initialized_game):
    attacker_board = initialized_game.player_board[0]
    defender_board = initialized_game.player_board[1]

    attacker_board.set_minions([GlyphGuardian()])
    defender_board.set_minions([PunchingBag()])
    initialized_game.start_of_game(0)
    initialized_game.single_round()
    assert attacker_board.minions[0].attack == 4

    attacker_board.set_minions([GlyphGuardian(golden=True)])
    defender_board.set_minions([PunchingBag()])
    initialized_game.start_of_game(0)
    initialized_game.single_round()
    assert attacker_board.minions[0].attack == 12
Ejemplo n.º 16
0
def test_prized_promo_drake(initialized_game):
    attacker_board = initialized_game.player_board[0]
    defender_board = initialized_game.player_board[1]

    left_minion = PunchingBag()
    right_minion = PunchingBag()
    attacker_board.set_minions(
        [left_minion,
         PrizedPromoDrake(), right_minion,
         BronzeWarden()])
    defender_board.set_minions([PunchingBag()])

    initialized_game.start_of_game()
    assert left_minion.attack == 2
    assert right_minion.health == 102
Ejemplo n.º 17
0
def test_minion_insertion(initialized_game):
    # Test that a newly inserted minion attacks in order correctly
    attacker_board = initialized_game.player_board[0]
    defender_board = initialized_game.player_board[1]

    attacker_board.set_minions(
        [HarvestGolem(), PunchingBag(attack=1),
         WrathWeaver()])
    defender_board.set_minions([PunchingBag(attack=99)])

    initialized_game.start_of_game()
    initialized_game.single_round()

    # If a minion attacks, dies, and creates one or more minions, they should be next in the attack order
    minion = attacker_board.search_for_valid_attacker()
    assert (minion.name == "Damaged Golem")
Ejemplo n.º 18
0
def test_palescale_crocolisk(initialized_game):
    attacker_board = initialized_game.player_board[0]
    defender_board = initialized_game.player_board[1]

    cat = Alleycat()
    surviving_cat = Alleycat(health=99)
    crocolisk = PalescaleCrocolisk()
    attacker_board.set_minions(
        [Alleycat(),
         Alleycat(taunt=True), cat, crocolisk, surviving_cat])
    defender_board.set_minions([PunchingBag(attack=20)])
    initialized_game.start_of_game()
    initialized_game.single_round()
    initialized_game.single_round()

    last_cat_health = surviving_cat.health
    if cat.health == 7:
        assert surviving_cat.health == 99
    elif cat.health == 1:
        assert surviving_cat.health == 105

    initialized_game.single_round()
    crocolisk.taunt = True
    initialized_game.single_round()
    assert surviving_cat.health == last_cat_health + 6
Ejemplo n.º 19
0
def test_old_murk_eye(initialized_game):
    attacker_board = initialized_game.player_board[0]
    defender_board = initialized_game.player_board[1]

    attacker_murkeye = OldMurkEye()
    punching_bag = PunchingBag()

    attacker_board.set_minions([attacker_murkeye, MurlocTidehunter()])
    defender_board.add_minion(punching_bag)

    # Friendly board murlocs should buff
    initialized_game.attack(attacker_murkeye, punching_bag, attacker_board, defender_board)
    assert attacker_murkeye.attack == 3

    # Enemy board murlocs should buff
    defender_board.add_minion(MurlocTidehunter())
    initialized_game.attack(attacker_murkeye, punching_bag, attacker_board, defender_board)
    assert attacker_murkeye.attack == 4

    # Removal of enemy board murlocs should lower attack
    defender_board.minions[1].dead = True
    initialized_game.check_deaths(attacker_board, defender_board)
    initialized_game.attack(attacker_murkeye, punching_bag, attacker_board, defender_board)
    assert attacker_murkeye.attack == 3

    # Removal of friendly board murlocs should lower attack (note: murlock is the one attacked, to test on_attacked)
    attacker_board.minions[1].dead = True
    initialized_game.check_deaths(attacker_board, defender_board)
    initialized_game.attack(punching_bag, attacker_murkeye, defender_board, attacker_board)
    assert attacker_murkeye.attack == 2
Ejemplo n.º 20
0
def test_cave_hydra(initialized_game):
    attacker_board = initialized_game.player_board[0]
    defender_board = initialized_game.player_board[1]

    # Test simultaneous deaths. Wolf token should not be buffed since pack leader died with the grandmother
    # TODO: Update for patch

    # Death rattle order on cleave. Rats should fill board and not leave room for wolf token
    attacker_board.set_minions(
        [CaveHydra(attack=10),
         PunchingBag(),
         PunchingBag(),
         PunchingBag()])
    defender_board.set_minions([RatPack(attack=7), ReplicatingMenace()])
    initialized_game.start_of_game()
    initialized_game.single_round()
    assert defender_board.minions[6].name == "Rat"
Ejemplo n.º 21
0
def test_baronrivendar(initialized_game):
    attacker_board = initialized_game.player_board[0]
    defender_board = initialized_game.player_board[1]

    # Basic test
    attacker_board.set_minions([Voidlord(), Voidlord(), BaronRivendare()])
    defender_board.set_minions([PunchingBag(attack=10)])
    initialized_game.start_of_game()
    initialized_game.single_round()
    for i in range(5):
        assert attacker_board.minions[i].name == "Voidwalker"

    # Golden baron
    baron = BaronRivendare(golden=True)
    attacker_board.set_minions([SpawnofNZoth(), baron])
    defender_board.set_minions([PunchingBag(attack=10)])
    initialized_game.start_of_game()
    initialized_game.single_round()
    assert baron.attack == 5

    # Test adding and removing baron(s)
    attacker_board.set_minions([])
    assert attacker_board.deathrattle_multiplier == 1

    regular_baron = BaronRivendare()
    attacker_board.add_minion(regular_baron)
    assert attacker_board.deathrattle_multiplier == 2

    golden_baron = BaronRivendare(golden=True)
    attacker_board.add_minion(golden_baron)
    assert attacker_board.deathrattle_multiplier == 3

    attacker_board.remove_minion(regular_baron, defender_board)
    assert attacker_board.deathrattle_multiplier == 3

    attacker_board.remove_minion(golden_baron, defender_board)
    assert attacker_board.deathrattle_multiplier == 1

    attacker_board.add_minion(BaronRivendare())
    attacker_board.add_minion(BaronRivendare())
    assert attacker_board.deathrattle_multiplier == 2

    attacker_board.add_minion(BaronRivendare(golden=True))
    attacker_board.add_minion(BaronRivendare(golden=True))
    assert attacker_board.deathrattle_multiplier == 3
Ejemplo n.º 22
0
def test_fish_of_nzoth(initialized_game):
    attacker_board = initialized_game.player_board[0]
    defender_board = initialized_game.player_board[1]

    fish = FishofNZoth()
    attacker_bag = PunchingBag()

    attacker_board.set_minions(
        [Scallywag(), Scallywag(taunt=True), fish, attacker_bag])
    defender_board.set_minions([PunchingBag(attack=10)])

    initialized_game.start_of_game()
    initialized_game.single_round()
    attacker_bag_attack = attacker_bag.attack
    fish_attack = fish.attack

    initialized_game.single_round()
    assert len(fish.deathrattles) == 2
Ejemplo n.º 23
0
def test_crackling_cyclone(initialized_game):
    attacker_board = initialized_game.player_board[0]
    defender_board = initialized_game.player_board[1]

    # Mega wind fury should attack 4 times
    attacker_board.set_minions([CracklingCyclone(golden=True, health=4)])
    defender_board.set_minions([PunchingBag(attack=1)])
    initialized_game.start_of_game(0)
    initialized_game.single_round()
    assert not attacker_board.minions[0].divine_shield
    assert attacker_board.minions[0].health == 1

    # Wind fury should attack 2 times
    attacker_board.set_minions([CracklingCyclone()])
    defender_board.set_minions([PunchingBag(health=1), PunchingBag(health=1)])
    initialized_game.start_of_game(0)
    initialized_game.single_round()
    assert len(defender_board.minions) == 0
Ejemplo n.º 24
0
def test_zapp_slywick(initialized_game):
    attacker_board = initialized_game.player_board[0]
    defender_board = initialized_game.player_board[1]

    # Zap should ignore taunts and attack lowest attack
    attacker_board.set_minions([ZappSlywick()])

    target = PunchingBag(attack=1)
    defender_board.set_minions([target, PunchingBag(attack=2, taunt=True)])
    initialized_game.start_of_game(0)
    initialized_game.single_round()
    assert target.health == 86

    target = PunchingBag(attack=0)
    defender_board.set_minions([target, PunchingBag(attack=1, taunt=True)])
    initialized_game.start_of_game(0)
    initialized_game.single_round()
    assert target.health == 86
Ejemplo n.º 25
0
def test_yo_ho_ogre(initialized_game):
    attacker_board = initialized_game.player_board[0]
    defender_board = initialized_game.player_board[1]

    # Ogre should attack twice in a single round
    attacker_board.set_minions([PunchingBag(attack=1), PunchingBag(taunt=True), PunchingBag()])
    defender_board.set_minions([YoHoOgre(), PunchingBag()])
    initialized_game.start_of_game()
    initialized_game.single_round()
    assert attacker_board.minions[0].health == 98
    assert attacker_board.minions[1].health == 98

    # Two pirates, they should kill each other in repeated attacks in one round
    attacker_board.set_minions([YoHoOgre()])
    defender_board.set_minions([YoHoOgre()])
    initialized_game.start_of_game()
    initialized_game.single_round()
    assert len(attacker_board.minions) == 0 and len(defender_board.minions) == 0
Ejemplo n.º 26
0
def test_tarecgosa(initialized_game):
    attacker_board = initialized_game.player_board[0]
    defender_board = initialized_game.player_board[1]

    tarecgosa = Tarecgosa(golden=True)
    attacker_board.set_minions([SpawnofNZoth(), tarecgosa])
    defender_board.set_minions([PunchingBag(attack=99)])
    initialized_game.start_of_game()
    initialized_game.single_round()
    assert tarecgosa.health == 10
Ejemplo n.º 27
0
def test_scallywag(initialized_game):
    attacker_board = initialized_game.player_board[0]
    defender_board = initialized_game.player_board[1]

    # Test 'attacks immediately' mechanic
    defender = PunchingBag(attack=1)
    attacker_board.add_minion(Scallywag())
    defender_board.add_minion(defender)
    initialized_game.start_of_game(0)
    initialized_game.single_round()
    assert defender.health == 97

    # Test golden tokens
    defender = PunchingBag(attack=10)
    attacker_board.set_minions([Scallywag(golden=True)])
    defender_board.set_minions([defender])
    initialized_game.start_of_game(0)
    initialized_game.single_round()
    assert defender.health == 94
Ejemplo n.º 28
0
def test_holy_mecherel(initialized_game):
    attacker_board = initialized_game.player_board[0]
    defender_board = initialized_game.player_board[1]

    mecherel = HolyMecherel()
    attacker_board.set_minions([Pupbot(), mecherel])
    defender_board.set_minions([PunchingBag(attack=1)])
    initialized_game.start_of_game()
    initialized_game.single_round()
    assert mecherel.divine_shield
Ejemplo n.º 29
0
def test_rat_pack(initialized_game):
    attacker_board = initialized_game.player_board[0]
    defender_board = initialized_game.player_board[1]
    rat = RatPack(reborn=True, attack=4)

    attacker_board.set_minions([rat])
    defender_board.set_minions([PunchingBag(attack=10)])
    initialized_game.start_of_game()
    initialized_game.single_round()
    assert len(attacker_board.minions) == 5
    assert attacker_board.minions[0].name == "Rat"
Ejemplo n.º 30
0
def test_mama_bear(initialized_game):
    attacker_board = initialized_game.player_board[0]
    defender_board = initialized_game.player_board[1]
    defender_board.set_minions([PunchingBag(attack=10)])

    attacker_board.set_minions([RatPack(), MamaBear()])
    initialized_game.start_of_game()
    initialized_game.single_round()

    assert attacker_board.minions[0].attack == 6
    assert attacker_board.minions[0].health == 6