Example #1
0
    public override void Apply(CardVisual target)
    {
        //Debug.Log(targetLocation.ToString());
        bool hasVFX = String.IsNullOrEmpty(parentAbility.abilityVFX);


        switch (targetLocation)
        {
        case DeckType.SoulCrypt:

            if (target is CreatureCardVisual || target is SupportCardVisual)
            {
                target.RPCCheckDeath(PhotonTargets.All, source, true, !hasVFX);
            }
            else
            {
                target.RPCCheckDeath(PhotonTargets.All, source, true, !hasVFX);
                target.currentDeck.RPCTransferCard(PhotonTargets.All, target, GetDeckFromType(targetLocation, target));
            }

            break;

        case DeckType.Void:
            target.currentDeck.RPCTransferCard(PhotonTargets.All, target, GetDeckFromType(targetLocation, target));
            target.StartCoroutine(target.RemoveCardVisualFromField(target));

            break;

        default:
            target.currentDeck.RPCTransferCard(PhotonTargets.All, target, GetDeckFromType(targetLocation, target));
            break;
        }
    }