Class: SlowLandCard

Inherits:
Card
  • Object
show all
Defined in:
lib/manasimu/card/slowland.rb

Instance Attribute Summary

Attributes inherited from Card

#card_type, #id, #side

Instance Method Summary collapse

Methods inherited from Card

#can_play?, #color_identity, #color_identity_size, #configure, #converted_mana_cost, #drawed, #edges, #first_produce_symbol=, #initialize, #is_land?, #mana_cost, #mana_produced?, #mana_source, #mana_source?, #mana_source_size, #max_flow, #playable?, #played, #played?, #price, #set_code, #step_in_hands, #to_s, #type, #types

Constructor Details

This class inherits a constructor from Card

Instance Method Details

#resetObject



28
29
30
31
# File 'lib/manasimu/card/slowland.rb', line 28

def reset
  super
  @tapped = false
end

#resolve(side, hands, plays, deck) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/manasimu/card/slowland.rb', line 3

def resolve(side, hands, plays, deck)
  super(side, hands, plays, deck)
  num = 0
  for card in plays do
    next if card == self
    num += 1 if card.is_land?
    break if num >= 2
  end

  if num == 2
    @tapped = false
  else
    @tapped = true
  end
end

#step_in_plays(turn) ⇒ Object



19
20
21
22
# File 'lib/manasimu/card/slowland.rb', line 19

def step_in_plays(turn)
  super(turn)
  @tapped = false
end

#tapped?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/manasimu/card/slowland.rb', line 24

def tapped?
  @tapped
end