Permalink
Browse files

Implement Spellbender and add test

  • Loading branch information...
beheh authored and jleclanche committed Aug 14, 2015
1 parent 5539995 commit 4435b5df45179f938296cbfe499c9a6b3deb0262
Showing with 31 additions and 0 deletions.
  1. +7 −0 fireplace/cards/classic/mage.py
  2. +24 −0 tests/test_main.py
@@ -125,6 +125,13 @@ class EX1_279:
##
# Secrets

# Spellbender
class tt_010:
events = Play(OPPONENT, SPELL, MINION).on(
Retarget(Play.Args.CARD, Summon(CONTROLLER, "tt_010a")), Reveal(SELF)
)


# Counterspell
class EX1_287:
events = Play(OPPONENT, SPELL).on(
@@ -903,6 +903,30 @@ def test_southsea_deckhand():
assert deckhand.charge


def test_spellbender():
game = prepare_game()
spellbender = game.player1.give("tt_010")
spellbender.play()
goldshire = game.player1.give(GOLDSHIRE_FOOTMAN)
goldshire.play()
game.end_turn()

assert game.player1.hero.health == 30
game.player2.give(MOONFIRE).play(target=game.player1.hero)
assert game.player1.hero.health == 29
assert spellbender in game.player1.secrets
assert goldshire.health == 2
assert len(game.player1.field) == 1
game.player2.give(MOONFIRE).play(target=goldshire)
assert spellbender not in game.player1.secrets
assert goldshire.health == 2
assert len(game.player1.field) == 2
target = game.player1.field[1]
assert target.id == "tt_010a"
assert target.max_health == 3
assert target.health == 2


def test_spiteful_smith():
game = prepare_game()
assert not game.current_player.hero.atk

0 comments on commit 4435b5d

Please sign in to comment.