Skip to content

Instantly share code, notes, and snippets.

@beheh
Last active August 29, 2015 14:25
Show Gist options
  • Save beheh/d670f35084a714ecd5a7 to your computer and use it in GitHub Desktop.
Save beheh/d670f35084a714ecd5a7 to your computer and use it in GitHub Desktop.
def test_shaman():
game = prepare_game(SHAMAN, SHAMAN)
assert game.player1.hero.id is SHAMAN
assert len(game.player1.hero.power.data.entourage) == 4
# use hero power four times
for i in range(4):
assert len(game.player1.field) == i
assert game.player1.hero.power.is_usable()
game.player1.hero.power.use()
assert len(game.player1.field) == i + 1
assert game.player1.field[-1] in ("CS2_050", "CS2_051", "CS2_052", "NEW1_009")
game.end_turn(); game.end_turn()
# ensure hero power can only be used again after a totem was destroyed
assert not game.player1.hero.power.is_usable()
game.player1.field[0].destroy()
assert game.player1.hero.power.is_usable()
# ensure that hero power cannot be used on full board
for i in range(4):
game.player1.give(WISP).play()
assert len(game.player1.field) == 7
assert not game.player1.hero.power.is_usable()
def test_paladin():
game = prepare_game(PALADIN, PALADIN)
assert game.current_player.hero.id is PALADIN
game.current_player.hero.power.use()
assert len(game.board) == 1
assert len(game.current_player.field) == 1
assert game.current_player.field[0].id == "CS2_101t"
# ensure that hero power cannot be used on full board
game.end_turn(); game.end_turn()
assert game.player1.hero.power.is_usable()
for i in range(6):
game.player1.give(WISP).play()
assert len(game.player1.field) == 7
assert not game.player1.hero.power.is_usable()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment