from card import Castable, CardType


@CardType('planeswalker')
class Planeswalker(Castable):

    def __init__(self, card_dict):
        super(Planeswalker, self).__init__(card_dict)
        self.abilities = card_dict.get('planeswalkerAbilities', [])
        self.loyalty = card_dict.get('loyalty', 0)

    @property
    def abilities(self):
        return self._abilities

    @abilities.setter
    def abilities(self, value):
        self._abilities = []
        for ability in value:
            rules = ability.get('rules')
            cost = ability.get('cost')
            self._abilities.append({'rules': rules, 'cost': cost})

    def to_dict(self):
        card_dict = super(Planeswalker, self).to_dict()
        card_dict.update({'abilities': self.abilities, 'loyalty': self.loyalty}
            )
        return card_dict

fa74fae85edce7f09f1aa131cbe023709f590d8b
<mask token>


@CardType('planeswalker')
class Planeswalker(Castable):

    def __init__(self, card_dict):
        super(Planeswalker, self).__init__(card_dict)
        self.abilities = card_dict.get('planeswalkerAbilities', [])
        self.loyalty = card_dict.get('loyalty', 0)
    <mask token>
    <mask token>
    <mask token>

<mask token>


@CardType('planeswalker')
class Planeswalker(Castable):

    def __init__(self, card_dict):
        super(Planeswalker, self).__init__(card_dict)
        self.abilities = card_dict.get('planeswalkerAbilities', [])
        self.loyalty = card_dict.get('loyalty', 0)

    @property
    def abilities(self):
        return self._abilities
    <mask token>
    <mask token>

<mask token>


@CardType('planeswalker')
class Planeswalker(Castable):

    def __init__(self, card_dict):
        super(Planeswalker, self).__init__(card_dict)
        self.abilities = card_dict.get('planeswalkerAbilities', [])
        self.loyalty = card_dict.get('loyalty', 0)

    @property
    def abilities(self):
        return self._abilities

    @abilities.setter
    def abilities(self, value):
        self._abilities = []
        for ability in value:
            rules = ability.get('rules')
            cost = ability.get('cost')
            self._abilities.append({'rules': rules, 'cost': cost})

    def to_dict(self):
        card_dict = super(Planeswalker, self).to_dict()
        card_dict.update({'abilities': self.abilities, 'loyalty': self.loyalty}
            )
        return card_dict

from card import Castable, CardType


@CardType('planeswalker')
class Planeswalker(Castable):

    def __init__(self, card_dict):
        super(Planeswalker, self).__init__(card_dict)
        self.abilities = card_dict.get('planeswalkerAbilities', [])
        self.loyalty = card_dict.get('loyalty', 0)

    @property
    def abilities(self):
        return self._abilities

    @abilities.setter
    def abilities(self, value):
        self._abilities = []
        for ability in value:
            rules = ability.get('rules')
            cost = ability.get('cost')
            self._abilities.append({'rules': rules, 'cost': cost})

    def to_dict(self):
        card_dict = super(Planeswalker, self).to_dict()
        card_dict.update({'abilities': self.abilities, 'loyalty': self.loyalty}
            )
        return card_dict
