Class: Parse::Phrase::Base
- Includes:
- FromHash
- Defined in:
- lib/ascension/parse.rb
Instance Attribute Summary collapse
-
#category ⇒ Object
Returns the value of attribute category.
-
#raw ⇒ Object
Returns the value of attribute raw.
Instance Method Summary collapse
- #ability ⇒ Object
- #add_honor(side) ⇒ Object
- #add_power(side) ⇒ Object
- #draw_cards(side) ⇒ Object
- #mod_card(card) ⇒ Object
- #trigger ⇒ Object
Instance Attribute Details
#category ⇒ Object
Returns the value of attribute category.
68 69 70 |
# File 'lib/ascension/parse.rb', line 68 def category @category end |
#raw ⇒ Object
Returns the value of attribute raw.
68 69 70 |
# File 'lib/ascension/parse.rb', line 68 def raw @raw end |
Instance Method Details
#ability ⇒ Object
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 |
#trigger ⇒ Object
80 |
# File 'lib/ascension/parse.rb', line 80 def trigger; nil; end |