Skip to content

Commit

Permalink
Outcast, prepared to demon hunter
Browse files Browse the repository at this point in the history
  • Loading branch information
shinoi2 committed Apr 12, 2024
1 parent 257047e commit a246b86
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
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

0 comments on commit a246b86

Please sign in to comment.