Class: Ability::BanishHandDiscard

Inherits:
Banish show all
Defined in:
lib/ascension/ability.rb

Instance Attribute Summary

Attributes inherited from Base

#parent_card

Instance Method Summary collapse

Methods inherited from BaseChoice

#call, #card_choice, #side_for_card_choice

Methods inherited from Base

#call_until_nil, #choice_instance

Instance Method Details

#action(card, side) ⇒ Object



108
109
110
111
112
113
114
# File 'lib/ascension/ability.rb', line 108

def action(card,side)
  if side.hand.include?(card)
    side.hand.banish(card)
  else
    side.discard.banish(card)
  end
end

#choosable_cards(side) ⇒ Object



115
116
117
# File 'lib/ascension/ability.rb', line 115

def choosable_cards(side)
  side.hand.cards + side.discard.cards
end