Exemplo n.º 1
0
    //Remove all my adjustments from a target
    private void RemoveStatAdjustments(CardVisual card)
    {
        //bool hasVFX = String.IsNullOrEmpty(parentAbility.abilityVFX);

        List <StatAdjustment> targetAdjustments = new List <StatAdjustment>();

        for (int i = 0; i < card.statAdjustments.Count; i++)
        {
            for (int j = 0; j < adjustments.Count; j++)
            {
                if (card.statAdjustments[i].uniqueID == adjustments[j].uniqueID)
                {
                    //Debug.Log("Match Found");
                    targetAdjustments.Add(card.statAdjustments[i]);
                }
                //else {
                //    Debug.Log(card.statAdjustments[i].uniqueID + " is the id I'm looking at and " + adjustments[j].uniqueID + " is my id");
                //}
            }
        }

        for (int i = 0; i < targetAdjustments.Count; i++)
        {
            card.RPCRemoveSpecialAbilityStatAdjustment(PhotonTargets.All, targetAdjustments[i].uniqueID, source, false, setStatToValue);
        }
    }