コード例 #1
0
    //Apply All Adjustmetns to a target
    private void ApplyStatAdjustment(CardVisual target)
    {
        bool hasVFX = String.IsNullOrEmpty(parentAbility.abilityVFX);

        for (int i = 0; i < adjustments.Count; i++)
        {
            //source.RPCCheckAdjID(PhotonTargets.All, adjustments[i].uniqueID, parentAbility.abilityName);

            if (adjustments[i].spellDamage)
            {
                int spellDamage = Finder.FindTotalSpellDamage(Constants.OwnerConstraints.Mine);

                //Debug.Log(spellDamage + " is the amount of spelldamage reported");

                adjustments[i].value = baseAdjValues[i] - spellDamage;

                source.RPCUpdateSpecialAbilityStatAdjustment(PhotonTargets.Others, adjustments[i], source, adjustments[i].value);
            }

            //Debug.Log("[EffectStatAdjustment] " + source.gameObject.name + " is applying a stat adjstment");
            target.RPCApplySpecialAbilityStatAdjustment(PhotonTargets.All, adjustments[i], source, !hasVFX, setStatToValue);
        }
    }