// EXECUTABLE: ----------------------------------------------------------------------------

        public override bool InstantExecute(GameObject target, IAction[] actions, int index)
        {
            if (this.stat != null)
            {
                Stats componentTarget = this.target.GetGameObject(target).GetComponentInChildren <Stats>();
                if (componentTarget == null)
                {
                    return(true);
                }

                string id = this.stat.stat.uniqueName;

                float value = 0.0f;
                switch (this.valueType)
                {
                case ValueType.Value:
                    value = this.amount.GetValue(target);
                    break;

                case ValueType.Formula:
                    Stats componentOther = this.opponent.GetGameObject(target).GetComponentInChildren <Stats>();
                    value = this.formula.formula.Calculate(0.0f, componentTarget, componentOther);
                    break;
                }

                switch (this.operation)
                {
                case Operation.Set: componentTarget.SetStatBase(id, value); break;

                case Operation.Add: componentTarget.AddStatBase(id, value); break;

                case Operation.Subtract: componentTarget.AddStatBase(id, -value); break;

                case Operation.Multiply: componentTarget.MultiplyStatBase(id, value); break;

                case Operation.Divide: componentTarget.MultiplyStatBase(id, (1f / value)); break;
                }
            }

            return(true);
        }