Class: Ability::AcquireHero

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_rune_costObject

Returns the value of attribute max_rune_cost.



167
168
169
# File 'lib/ascension/ability.rb', line 167

def max_rune_cost
  @max_rune_cost
end

Instance Method Details

#action(card, side) ⇒ Object



172
173
174
# File 'lib/ascension/ability.rb', line 172

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

#choosable_cards(side) ⇒ Object



168
169
170
171
# File 'lib/ascension/ability.rb', line 168

def choosable_cards(side)
  #side.game.center_wc.select { |x| x.hero? }.each { |x| puts [x.name,x.rune_cost].inspect }
  side.game.center_wc.select { |x| x.hero? && x.rune_cost <= (max_rune_cost||99) }
end