Ejemplo n.º 1
0
    public override bool IsTargettable()
    {
        if (controller)
        {
            if (controller.CanPlayCards() && controller.isLocalPlayer && context != null)
            {
                if (cardData != null && cardData.GetManaCost() <= owner.currMana)
                {
                    switch (cardData.GetCardType())
                    {
                    case CardType.SPELL:
                        return(HasValidTargets(cardData.GetSelectableTargets(TriggerCondition.NONE)));

                    case CardType.CREATURE:
                        return(true);

                    case CardType.TRAP:
                        return(controller.arena.HasSpaceTrap());
                    }
                    return(true);
                }
            }
        }
        else if (owner)
        {
            if (owner.isLocalPlayer && selectorOption)
            {
                return(true);
            }
        }
        return(false);
    }