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() }); }
public virtual void Compute(MagicCoreAttributes Attributes, MagicUserContext GlobalContext) { Attributes.TotalManaCost += ManaCost; foreach (MagicElement ActiveListMagicElement in ListLinkedMagicElement) { ActiveListMagicElement.Compute(Attributes, GlobalContext); } }
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); }
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; }
public override void Compute(MagicCoreAttributes Attributes, MagicUserContext GlobalContext) { Attributes.CurrentSkill.CurrentSkillLevel.ListActivation[1].ListRequirement.Add(new TimeEllapsedRequirement(MagicParams, SecondsToWait)); }