# Path: MTG/cardtype.py
# class SuperType(Enum):
# class CardType(Enum):
# class LandType(Enum):
#     BASIC = 0
#     LEGENDARY = 1
#     SNOW = 2
#     WORLD = 3
#     ARTIFACT = 0
#     CREATURE = 1
#     ENCHANTMENT = 2
#     INSTANT = 3
#     LAND = 4
#     PLANESWALKER = 5
#     SORCERY = 6
#     TRIBAL = 7
#     PLAINS = 0
#     ISLAND = 1
#     SWAMP = 2
#     MOUNTAIN = 3
#     FOREST = 4
# 
# Path: MTG/static_abilities.py
# class StaticAbilities(Enum):
# 
# Path: MTG/utils.py
# def get_card_from_user_input(player, string):
# def choose_targets(source):
# def parse_targets(criterias):
# def parse_ability_costs(cost):


import pdb
import time
import math
from collections import defaultdict, namedtuple
from sortedcontainers import SortedListWithKey
from MTG import cardtype
from MTG import static_abilities
from MTG import utils
    def is_artifact(self):
        return cardtype.CardType.ARTIFACT in self.characteristics.types

    @property
    def is_enchantment(self):
        return cardtype.CardType.ENCHANTMENT in self.characteristics.types

    @property
    def is_aura(self):
        return self.is_enchantment and 'Aura' in self.characteristics.subtype

    @property
    def is_equipment(self):
        return self.is_artifact and 'Equipment' in self.characteristics.subtype


    @property
    def power(self):
        return self.characteristics.power if self.is_creature else None

    @property
    def toughness(self):
        return self.characteristics.toughness if self.is_creature else None

    def has_ability(self, ability):
        for effect in self.effects['gainAbility']:
            if ability in effect.value:
                return True

        ability = ability.replace(' ', '_')

# Path: MTG/cardtype.py
# class SuperType(Enum):
# class CardType(Enum):
# class LandType(Enum):
#     BASIC = 0
#     LEGENDARY = 1
#     SNOW = 2
#     WORLD = 3
#     ARTIFACT = 0
#     CREATURE = 1
#     ENCHANTMENT = 2
#     INSTANT = 3
#     LAND = 4
#     PLANESWALKER = 5
#     SORCERY = 6
#     TRIBAL = 7
#     PLAINS = 0
#     ISLAND = 1
#     SWAMP = 2
#     MOUNTAIN = 3
#     FOREST = 4
# 
# Path: MTG/static_abilities.py
# class StaticAbilities(Enum):
# 
# Path: MTG/utils.py
# def get_card_from_user_input(player, string):
# def choose_targets(source):
# def parse_targets(criterias):
# def parse_ability_costs(cost):


# Path: MTG/gameobject.py
import pdb
import time
import math
from collections import defaultdict, namedtuple
from sortedcontainers import SortedListWithKey
from MTG import cardtype
from MTG import static_abilities
from MTG import utils

    def is_artifact(self):
        return cardtype.CardType.ARTIFACT in self.characteristics.types

    @property
    def is_enchantment(self):
        return cardtype.CardType.ENCHANTMENT in self.characteristics.types

    @property
    def is_aura(self):
        return self.is_enchantment and 'Aura' in self.characteristics.subtype

    @property
    def is_equipment(self):
        return self.is_artifact and 'Equipment' in self.characteristics.subtype


    @property
    def power(self):
        return self.characteristics.power if self.is_creature else None

    @property
    def toughness(self):
        return self.characteristics.toughness if self.is_creature else None

    def has_ability(self, ability):
        for effect in self.effects['gainAbility']:
            if ability in effect.value:
                return True

        ability = ability.replace(' ', '_')

        return static_abilities.StaticAbilities[ability] in self.characteristics.abilities