Exemple #1
0
        protected virtual AbilityEffectContext GetSharedOutput(float outputShare, AbilityEffectContext abilityEffectInput)
        {
            AbilityEffectContext modifiedOutput = new AbilityEffectContext();

            foreach (ResourceInputAmountNode resourceInputAmountNode in abilityEffectInput.resourceAmounts)
            {
                modifiedOutput.AddResourceAmount(resourceInputAmountNode.resourceName, (int)(resourceInputAmountNode.amount * outputShare));
            }

            modifiedOutput.groundTargetLocation = abilityEffectInput.groundTargetLocation;
            return(modifiedOutput);
        }
Exemple #2
0
        protected virtual AbilityEffectContext GetSharedOutput(float outputShare, AbilityEffectContext abilityEffectInput)
        {
            // modify the resource amounts by multiplying them by the output share
            AbilityEffectContext modifiedOutput = abilityEffectInput.GetCopy();

            modifiedOutput.resourceAmounts.Clear();
            foreach (ResourceInputAmountNode resourceInputAmountNode in abilityEffectInput.resourceAmounts)
            {
                modifiedOutput.AddResourceAmount(resourceInputAmountNode.resourceName, (int)(resourceInputAmountNode.amount * outputShare));
            }

            return(modifiedOutput);
        }