Class: PathwayCard
Instance Attribute Summary
Attributes inherited from Card
Instance Method Summary collapse
Methods inherited from Card
#can_play?, #color_identity, #color_identity_size, #configure, #converted_mana_cost, #drawed, #edges, #initialize, #is_land?, #mana_cost, #mana_produced?, #mana_source?, #mana_source_size, #max_flow, #playable?, #played, #played?, #price, #reset, #resolve, #set_code, #step_in_hands, #step_in_plays, #tapped?, #to_s, #type, #types
Constructor Details
This class inherits a constructor from Card
Instance Method Details
#first_produce_symbol=(symbol) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/manasimu/card/pathway.rb', line 3 def first_produce_symbol=(symbol) if symbol.to_i.to_s == symbol @side = 'a' @symbol = @card_type.color_identity[0] else @card_type.color_identity.each_with_index do |ci, i| if ci == symbol @side = @card_type.contents[i].side @symbol = ci break end end end end |
#mana_source ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/manasimu/card/pathway.rb', line 18 def mana_source if @side [@symbol] else @card_type.color_identity end end |