Class: Ability::KillMonster

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

Instance Attribute Summary collapse

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 Attribute Details

#max_powerObject

Returns the value of attribute max_power.



157
158
159
# File 'lib/ascension/ability.rb', line 157

def max_power
  @max_power
end

Instance Method Details

#action(card, side) ⇒ Object



161
162
163
# File 'lib/ascension/ability.rb', line 161

def action(card,side)
  side.defeat(card)
end

#choosable_cards(side) ⇒ Object



158
159
160
# File 'lib/ascension/ability.rb', line 158

def choosable_cards(side)
  side.game.center_wc.select { |x| x.monster? && x.power_cost <= (max_power||99) }
end