Permalink
Browse files

Make Mind Spike and Mind Shatter refresh SHADOWFORM on the controller

  • Loading branch information...
jleclanche committed Oct 4, 2015
1 parent 015dda0 commit 18f0784b333797449c3f2d257764cbc3fef300ba
Showing with 29 additions and 19 deletions.
  1. +2 −0 fireplace/cards/classic/priest.py
  2. +1 −0 fireplace/managers.py
  3. +1 −0 fireplace/player.py
  4. +25 −19 tests/test_main.py
@@ -174,10 +174,12 @@ def play(self):
# Mind Spike
class EX1_625t:
activate = Hit(TARGET, 2)
update = Refresh(CONTROLLER, {GameTag.SHADOWFORM: True})

# Mind Shatter
class EX1_625t2:
activate = Hit(TARGET, 3)
update = Refresh(CONTROLLER, {GameTag.SHADOWFORM: True})


# Mass Dispel
@@ -165,6 +165,7 @@ class PlayerManager(Manager):
GameTag.RECALL: "overload",
GameTag.RECEIVES_DOUBLE_SPELLDAMAGE_BONUS: "receives_double_spelldamage_bonus",
GameTag.SECRET: "secret",
GameTag.SHADOWFORM: "shadowform",
GameTag.SHOULDEXITCOMBAT: "should_exit_combat",
GameTag.SILENCED: "silenced",
GameTag.SPELLPOWER: "spellpower",
@@ -17,6 +17,7 @@ class Player(Entity, TargetableByAuras):
healing_double = slot_property("healing_double", sum)
hero_power_double = slot_property("hero_power_double", sum)
outgoing_healing_adjustment = slot_property("outgoing_healing_adjustment")
shadowform = slot_property("shadowform")
spellpower_double = slot_property("spellpower_double", sum)
type = CardType.PLAYER

@@ -4777,32 +4777,38 @@ def test_shadow_word_pain_questing_adventurer():
def test_shadowform():
game = prepare_game(PRIEST, PRIEST)
# Hero Power should reset
shadowform1 = game.current_player.give("EX1_625")
assert game.current_player.hero.power.id == "CS1h_001"
assert game.current_player.hero.power.is_usable()
game.current_player.hero.power.use(target=game.current_player.hero)
assert not game.current_player.hero.power.is_usable()
shadowform1 = game.player1.give("EX1_625")
assert game.player1.hero.power.id == "CS1h_001"
assert game.player1.hero.power.is_usable()
game.player1.hero.power.use(target=game.player1.hero)
assert not game.player1.hero.power.is_usable()
assert not game.player1.shadowform
assert shadowform1.is_playable()
print(game.player1.slots)
shadowform1.play()
assert game.current_player.hero.power.id == "EX1_625t"
assert game.current_player.hero.power.is_usable()
game.current_player.hero.power.use(target=game.current_player.opponent.hero)
assert not game.current_player.hero.power.is_usable()
assert game.current_player.opponent.hero.health == 28
print(game.player1.slots)
assert game.player1.shadowform
assert game.player1.hero.power.id == "EX1_625t"
assert game.player1.hero.power.is_usable()
game.player1.hero.power.use(target=game.player2.hero)
assert not game.player1.hero.power.is_usable()
assert game.player2.hero.health == 28
game.end_turn(); game.end_turn()

shadowform2 = game.current_player.give("EX1_625")
shadowform2 = game.player1.give("EX1_625")
shadowform2.play()
assert game.current_player.hero.power.id == "EX1_625t2"
assert game.current_player.hero.power.is_usable()
game.current_player.hero.power.use(target=game.current_player.opponent.hero)
assert not game.current_player.hero.power.is_usable()
assert game.current_player.opponent.hero.health == 25
assert game.player1.shadowform
assert game.player1.hero.power.id == "EX1_625t2"
assert game.player1.hero.power.is_usable()
game.player1.hero.power.use(target=game.player2.hero)
assert not game.player1.hero.power.is_usable()
assert game.player2.hero.health == 25

shadowform3 = game.current_player.give("EX1_625")
shadowform3 = game.player1.give("EX1_625")
shadowform3.play()
assert game.current_player.hero.power.id == "EX1_625t2"
assert not game.current_player.hero.power.is_usable()
assert game.player1.shadowform
assert game.player1.hero.power.id == "EX1_625t2"
assert not game.player1.hero.power.is_usable()


def test_shadowstep():

0 comments on commit 18f0784

Please sign in to comment.