Skip to content

Commit 4435b5d

Browse files
behehjleclanche
authored andcommitted
Implement Spellbender and add test
1 parent 5539995 commit 4435b5d

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

fireplace/cards/classic/mage.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,13 @@ class EX1_279:
125125
##
126126
# Secrets
127127

128+
# Spellbender
129+
class tt_010:
130+
events = Play(OPPONENT, SPELL, MINION).on(
131+
Retarget(Play.Args.CARD, Summon(CONTROLLER, "tt_010a")), Reveal(SELF)
132+
)
133+
134+
128135
# Counterspell
129136
class EX1_287:
130137
events = Play(OPPONENT, SPELL).on(

tests/test_main.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -903,6 +903,30 @@ def test_southsea_deckhand():
903903
assert deckhand.charge
904904

905905

906+
def test_spellbender():
907+
game = prepare_game()
908+
spellbender = game.player1.give("tt_010")
909+
spellbender.play()
910+
goldshire = game.player1.give(GOLDSHIRE_FOOTMAN)
911+
goldshire.play()
912+
game.end_turn()
913+
914+
assert game.player1.hero.health == 30
915+
game.player2.give(MOONFIRE).play(target=game.player1.hero)
916+
assert game.player1.hero.health == 29
917+
assert spellbender in game.player1.secrets
918+
assert goldshire.health == 2
919+
assert len(game.player1.field) == 1
920+
game.player2.give(MOONFIRE).play(target=goldshire)
921+
assert spellbender not in game.player1.secrets
922+
assert goldshire.health == 2
923+
assert len(game.player1.field) == 2
924+
target = game.player1.field[1]
925+
assert target.id == "tt_010a"
926+
assert target.max_health == 3
927+
assert target.health == 2
928+
929+
906930
def test_spiteful_smith():
907931
game = prepare_game()
908932
assert not game.current_player.hero.atk

0 commit comments

Comments
 (0)