Module: Selectable
- Included in:
- CenterWithConstants
- Defined in:
- lib/ascension/cards.rb
Instance Method Summary collapse
Instance Method Details
#can?(card, side) ⇒ Boolean
131 132 133 134 135 136 137 138 |
# File 'lib/ascension/cards.rb', line 131 def can?(card,side) if card.monster? raise card.name unless card.power_cost side.played.pool.power >= card.power_cost else side.played.pool.can_purchase?(card) end end |
#engageable_cards(side) ⇒ Object
128 129 130 |
# File 'lib/ascension/cards.rb', line 128 def engageable_cards(side) select { |x| can?(x,side) } end |