Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outcast, prepared to demon hunter #521

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions fireplace/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,15 +487,8 @@ def do(self, source, card, target, index, choose):
else:
trigger_battlecry = True

if card is card.controller.hand[0] or card is card.controller.hand[-1]:
trigger_outcast = True
else:
trigger_outcast = False

if card is card.controller.hand[-1]:
card.play_right_most = True
else:
card.play_right_most = False
card.play_left_most = card is card.controller.hand[0]
card.play_right_most = card is card.controller.hand[-1]

card.zone = Zone.PLAY

Expand Down Expand Up @@ -525,7 +518,7 @@ def do(self, source, card, target, index, choose):

# "Can't Play" (aka Counter) means triggers don't happen either
if not card.cant_play:
if trigger_outcast and card.get_actions("outcast"):
if card.trigger_outcast and card.get_actions("outcast"):
source.game.trigger(card, card.get_actions("outcast"), event_args=None)
elif trigger_battlecry:
source.game.queue_actions(
Expand Down
5 changes: 5 additions & 0 deletions fireplace/card.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ def __init__(self, data):
self.turn_drawn = -1
self.turn_played = -1
self.cast_on_friendly_minions = False
self.play_left_most = False
self.play_right_most = False
self.custom_card = False
super().__init__(data)
Expand Down Expand Up @@ -380,6 +381,10 @@ def drawn_this_turn(self):
def played_this_turn(self):
return self.turn_played == self.game.turn

@property
def trigger_outcast(self):
return self.play_left_most or self.play_right_most

@property
def zone_position(self):
"""
Expand Down
Loading