Exemplo n.º 1
0
 public void Activate(string SkillName)
 {
     for (int E = 0; E < ListEffect.Count; E++)
     {
         foreach (AutomaticSkillTargetType ActiveActivation in ListEffectTargetReal[E])
         {
             if (ActiveActivation.CanExecuteEffectOnTarget(ListEffect[E]))
             {
                 ActiveActivation.ExecuteAndAddEffectToTarget(ListEffect[E], SkillName);
             }
         }
     }
 }
Exemplo n.º 2
0
        public bool Activate(string SkillRequirementToActivate, string SkillName)
        {
            bool CanActivate = true;

            //Check if you can attack with ActivationPercentage.
            if (!RandomHelper.RandomActivationCheck(ActivationPercentage))
            {
                return(false);
            }

            for (int R = 0; R < ListRequirement.Count && CanActivate; R++)
            {
                bool IsManuallyActivated   = ListRequirement[R].CanActicateManually(SkillRequirementToActivate);
                bool CanPassiveRequirement = ListRequirement[R].CanActivatePassive();

                if (!CanPassiveRequirement && !IsManuallyActivated)
                {
                    CanActivate = false;
                }
            }

            if (CanActivate)
            {
                for (int E = 0; E < ListEffect.Count; E++)
                {
                    foreach (AutomaticSkillTargetType ActiveActivation in ListEffectTargetReal[E])
                    {
                        if (ActiveActivation.CanExecuteEffectOnTarget(ListEffect[E]))
                        {
                            ActiveActivation.ExecuteAndAddEffectToTarget(ListEffect[E], SkillName);
                        }
                    }
                }
            }

            return(CanActivate);
        }