Exemplo n.º 1
0
        public override void Compute(MagicCoreAttributes Attributes, MagicUserContext GlobalContext)
        {
            base.Compute(Attributes, GlobalContext);

            Attributes.CurrentSkill.CurrentSkillLevel.ListActivation[0].ListEffect.Add(new ChannelInternalManaEffect(MagicParams));
            Attributes.CurrentSkill.CurrentSkillLevel.ListActivation[0].ListEffectTargetReal.Add(new List<AutomaticSkillTargetType>() { new EffectActivationExecuteOnly() });
        }
Exemplo n.º 2
0
        public virtual void Compute(MagicCoreAttributes Attributes, MagicUserContext GlobalContext)
        {
            Attributes.TotalManaCost += ManaCost;

            foreach (MagicElement ActiveListMagicElement in ListLinkedMagicElement)
            {
                ActiveListMagicElement.Compute(Attributes, GlobalContext);
            }
        }
Exemplo n.º 3
0
        public List <BaseAutomaticSkill> ComputeSpell()
        {
            ListMagicSpell.Clear();
            MagicCoreAttributes ActiveCoreAttributes = new MagicCoreAttributes();

            foreach (MagicCore ActiveMagicCore in ListMagicCore)
            {
                ActiveMagicCore.Compute(ActiveCoreAttributes, GlobalContext);

                ListMagicSpell.Add(ActiveCoreAttributes.CurrentSkill);
            }

            return(ListMagicSpell);
        }
Exemplo n.º 4
0
        public override void Compute(MagicCoreAttributes Attributes, MagicUserContext GlobalContext)
        {
            IMagicUser OriginalUser   = GlobalContext.ActiveUser;
            IMagicUser OriginalTarget = GlobalContext.ActiveTarget;

            Attributes.TotalManaCost += RequiredMana;
            MagicEffect        SpellEffect = GetSpellEffect();
            BaseAutomaticSkill BaseSkill   = CreateSpell(SpellEffect, GlobalContext);

            GlobalContext.ActiveTarget = SpellEffect;

            //Linked magic cores are considered as following skills
            if (Attributes.CurrentSpell != null)
            {
                GlobalContext.ActiveUser = OriginalTarget;
                Attributes.CurrentSpell.ListFollowingSkill.Add(BaseSkill);
                BaseSkill.CurrentSkillLevel.ListActivation[1].ListRequirement.Add(new ManaChanneledRequirement(Attributes.TotalManaCost, MagicParams));
            }
            else
            {
                BaseSkill.CurrentSkillLevel.ListActivation[1].ListRequirement.Add(new ManaChanneledRequirement(Attributes.TotalManaCost, MagicParams));
                //Add a final effect that will empty the channeled mana on its own after every other effects are executed.
                BaseSkill.CurrentSkillLevel.ListActivation[1].ListEffect.Add(new EmptyChanneledManaEffect(MagicParams));
            }

            Attributes.CurrentSkill = BaseSkill;
            Attributes.CurrentSpell = SpellEffect;

            foreach (MagicElement ActiveListMagicElement in ListLinkedMagicElement)
            {
                ActiveListMagicElement.Compute(Attributes, GlobalContext);

                Attributes.CurrentSkill = BaseSkill;
                Attributes.CurrentSpell = SpellEffect;
            }

            BaseSkill.CurrentSkillLevel.ListActivation[1].ListEffectTargetReal.Add(new List <AutomaticSkillTargetType>()
            {
                new EffectActivationExecuteOnly()
            });

            GlobalContext.ActiveUser   = OriginalUser;
            GlobalContext.ActiveTarget = OriginalTarget;
        }
Exemplo n.º 5
0
 public override void Compute(MagicCoreAttributes Attributes, MagicUserContext GlobalContext)
 {
     Attributes.CurrentSkill.CurrentSkillLevel.ListActivation[1].ListRequirement.Add(new TimeEllapsedRequirement(MagicParams, SecondsToWait));
 }