Skip to content

Commit

Permalink
Fix issue #523
Browse files Browse the repository at this point in the history
  • Loading branch information
shinoi2 committed May 27, 2024
1 parent 39c9721 commit 85b273e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fireplace/dsl/selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,10 @@ def __init__(self, direction: Direction, child: SelectorLike):
def eval(self, entities, source):
result = []
for e in self.child.eval(entities, source):
if getattr(e, "zone", None) == Zone.PLAY:
if (
getattr(e, "zone", None) == Zone.PLAY
and getattr(e, "type", None) == CardType.MINION
):
if self.direction == self.Direction.LEFT:
result += e.left_minion
else:
Expand Down
17 changes: 17 additions & 0 deletions tests/test_dalaran.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,3 +290,20 @@ def test_duel():
game3.player2.summon(WISP)
duel = game3.player1.give("DAL_731")
assert not duel.is_playable()


def test_sweeping_strikes():
game = prepare_game()
wisp = game.player1.give(WISP).play()
sweeping_strikes = game.player1.give("DAL_062")
sweeping_strikes.play(target=wisp)
game.skip_turn()
wisp.attack(game.player2.hero)
assert game.player2.hero.health == 29

game.end_turn()
dummies = [game.player2.give(TARGET_DUMMY).play() for _ in range(3)]
game.end_turn()
wisp.attack(dummies[1])
for i in range(3):
assert dummies[i].health == 1

0 comments on commit 85b273e

Please sign in to comment.