Skip to content

Commit 18f0784

Browse files
committed
Make Mind Spike and Mind Shatter refresh SHADOWFORM on the controller
1 parent 015dda0 commit 18f0784

File tree

4 files changed

+29
-19
lines changed

4 files changed

+29
-19
lines changed

fireplace/cards/classic/priest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,12 @@ def play(self):
174174
# Mind Spike
175175
class EX1_625t:
176176
activate = Hit(TARGET, 2)
177+
update = Refresh(CONTROLLER, {GameTag.SHADOWFORM: True})
177178

178179
# Mind Shatter
179180
class EX1_625t2:
180181
activate = Hit(TARGET, 3)
182+
update = Refresh(CONTROLLER, {GameTag.SHADOWFORM: True})
181183

182184

183185
# Mass Dispel

fireplace/managers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ class PlayerManager(Manager):
165165
GameTag.RECALL: "overload",
166166
GameTag.RECEIVES_DOUBLE_SPELLDAMAGE_BONUS: "receives_double_spelldamage_bonus",
167167
GameTag.SECRET: "secret",
168+
GameTag.SHADOWFORM: "shadowform",
168169
GameTag.SHOULDEXITCOMBAT: "should_exit_combat",
169170
GameTag.SILENCED: "silenced",
170171
GameTag.SPELLPOWER: "spellpower",

fireplace/player.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class Player(Entity, TargetableByAuras):
1717
healing_double = slot_property("healing_double", sum)
1818
hero_power_double = slot_property("hero_power_double", sum)
1919
outgoing_healing_adjustment = slot_property("outgoing_healing_adjustment")
20+
shadowform = slot_property("shadowform")
2021
spellpower_double = slot_property("spellpower_double", sum)
2122
type = CardType.PLAYER
2223

tests/test_main.py

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4777,32 +4777,38 @@ def test_shadow_word_pain_questing_adventurer():
47774777
def test_shadowform():
47784778
game = prepare_game(PRIEST, PRIEST)
47794779
# Hero Power should reset
4780-
shadowform1 = game.current_player.give("EX1_625")
4781-
assert game.current_player.hero.power.id == "CS1h_001"
4782-
assert game.current_player.hero.power.is_usable()
4783-
game.current_player.hero.power.use(target=game.current_player.hero)
4784-
assert not game.current_player.hero.power.is_usable()
4780+
shadowform1 = game.player1.give("EX1_625")
4781+
assert game.player1.hero.power.id == "CS1h_001"
4782+
assert game.player1.hero.power.is_usable()
4783+
game.player1.hero.power.use(target=game.player1.hero)
4784+
assert not game.player1.hero.power.is_usable()
4785+
assert not game.player1.shadowform
47854786
assert shadowform1.is_playable()
4787+
print(game.player1.slots)
47864788
shadowform1.play()
4787-
assert game.current_player.hero.power.id == "EX1_625t"
4788-
assert game.current_player.hero.power.is_usable()
4789-
game.current_player.hero.power.use(target=game.current_player.opponent.hero)
4790-
assert not game.current_player.hero.power.is_usable()
4791-
assert game.current_player.opponent.hero.health == 28
4789+
print(game.player1.slots)
4790+
assert game.player1.shadowform
4791+
assert game.player1.hero.power.id == "EX1_625t"
4792+
assert game.player1.hero.power.is_usable()
4793+
game.player1.hero.power.use(target=game.player2.hero)
4794+
assert not game.player1.hero.power.is_usable()
4795+
assert game.player2.hero.health == 28
47924796
game.end_turn(); game.end_turn()
47934797

4794-
shadowform2 = game.current_player.give("EX1_625")
4798+
shadowform2 = game.player1.give("EX1_625")
47954799
shadowform2.play()
4796-
assert game.current_player.hero.power.id == "EX1_625t2"
4797-
assert game.current_player.hero.power.is_usable()
4798-
game.current_player.hero.power.use(target=game.current_player.opponent.hero)
4799-
assert not game.current_player.hero.power.is_usable()
4800-
assert game.current_player.opponent.hero.health == 25
4800+
assert game.player1.shadowform
4801+
assert game.player1.hero.power.id == "EX1_625t2"
4802+
assert game.player1.hero.power.is_usable()
4803+
game.player1.hero.power.use(target=game.player2.hero)
4804+
assert not game.player1.hero.power.is_usable()
4805+
assert game.player2.hero.health == 25
48014806

4802-
shadowform3 = game.current_player.give("EX1_625")
4807+
shadowform3 = game.player1.give("EX1_625")
48034808
shadowform3.play()
4804-
assert game.current_player.hero.power.id == "EX1_625t2"
4805-
assert not game.current_player.hero.power.is_usable()
4809+
assert game.player1.shadowform
4810+
assert game.player1.hero.power.id == "EX1_625t2"
4811+
assert not game.player1.hero.power.is_usable()
48064812

48074813

48084814
def test_shadowstep():

0 commit comments

Comments
 (0)