Class: Ability::Base

Inherits:
Object show all
Includes:
FromHash
Defined in:
lib/ascension/ability.rb

Direct Known Subclasses

BaseChoice, Draw, EarnHonor

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#parent_cardObject

Returns the value of attribute parent_card.



46
47
48
# File 'lib/ascension/ability.rb', line 46

def parent_card
  @parent_card
end

Instance Method Details

#call_until_nil(side) ⇒ Object



48
49
50
51
52
53
54
# File 'lib/ascension/ability.rb', line 48

def call_until_nil(side)
  loop do
    choice = call(side)
    yield if block_given?
    return unless choice.choice.chosen_option && choosable_cards(side).size > 0
  end
end

#choice_instance(side) ⇒ Object



55
56
57
# File 'lib/ascension/ability.rb', line 55

def choice_instance(side)
  ChoiceInstance.new(:choice => self, :side => side)
end