Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Implement Spellbender and add test
  • Loading branch information
beheh authored and jleclanche committed Sep 6, 2015
1 parent 5539995 commit 4435b5d
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fireplace/cards/classic/mage.py
Expand Up @@ -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(
Expand Down
24 changes: 24 additions & 0 deletions tests/test_main.py
Expand Up @@ -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
Expand Down

0 comments on commit 4435b5d

Please sign in to comment.