Class: Parse::Phrase::Base

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

Direct Known Subclasses

Basic, For, If, On

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#categoryObject

Returns the value of attribute category.



68
69
70
# File 'lib/ascension/parse.rb', line 68

def category
  @category
end

#rawObject

Returns the value of attribute raw.



68
69
70
# File 'lib/ascension/parse.rb', line 68

def raw
  @raw
end

Instance Method Details

#abilityObject



81
# File 'lib/ascension/parse.rb', line 81

def ability; nil; end

#add_honor(side) ⇒ Object



87
88
89
# File 'lib/ascension/parse.rb', line 87

def add_honor(side)
  side.honor += before_clause.to_i
end

#add_power(side) ⇒ Object



90
91
92
# File 'lib/ascension/parse.rb', line 90

def add_power(side)
  side.pool.power += before_clause.to_i
end

#draw_cards(side) ⇒ Object



93
94
95
96
97
# File 'lib/ascension/parse.rb', line 93

def draw_cards(side)
  before_clause.to_i.times do
    side.draw_one!
  end
end

#mod_card(card) ⇒ Object



82
83
84
85
# File 'lib/ascension/parse.rb', line 82

def mod_card(card)
  card.triggers << trigger.tap { |x| x.optional = optional if x.respond_to?('optional=') } if trigger
  card.abilities << ability.tap { |x| x.optional = optional if x.respond_to?('optional=') } if ability
end

#triggerObject



80
# File 'lib/ascension/parse.rb', line 80

def trigger; nil; end