Beispiel #1
0
        /// <summary>
        /// Application de l'effet, deux sorte : buff, direct
        /// </summary>
        /// <param name="CastInfos"></param>
        /// <returns></returns>
        public override int ApplyEffect(EffectCast CastInfos)
        {
            // Si > 0 alors c'est un buff
            if (CastInfos.Duration > 0)
            {
                // L'effet est un poison
                CastInfos.IsPoison = true;

                // Ajout du buff
                foreach (var Target in CastInfos.Targets)
                {
                    Target.Buffs.AddBuff(new BuffHeal(CastInfos, Target));
                }
            }
            else // Heal direct
            {
                foreach (var Target in CastInfos.Targets)
                {
                    if (EffectHeal.ApplyHeal(CastInfos, Target, CastInfos.GenerateJet(Target)) == -3)
                    {
                        return(-3);
                    }
                }
            }

            return(-1);
        }
Beispiel #2
0
        public override int ApplyEffect(ref int DamageValue, EffectCast DamageInfos = null)
        {
            var CoefDamages = this.CastInfos.Value1;
            var CoefHeal    = this.CastInfos.Value2;
            var Chance      = this.CastInfos.Value3;
            var Jet         = BuffChanceEcaflip.Random.Next(0, 99);

            // Soin ?
            if (Jet < Chance)
            {
                var HealValue = DamageValue * CoefHeal;

                if (EffectHeal.ApplyHeal(this.CastInfos, this.Target, HealValue) == -3)
                {
                    return(-3);
                }

                DamageValue = 0;
            }
            else // Multiplication des dommages
            {
                DamageValue *= CoefDamages;
            }

            return(base.ApplyEffect(ref DamageValue, DamageInfos));
        }
Beispiel #3
0
        public override int ApplyEffect(ref int DamageValue, EffectCast DamageInfos = null)
        {
            if (EffectHeal.ApplyHeal(CastInfos, Target, CastInfos.GenerateJet(Target)) == -3)
            {
                return(-3);
            }
            return(-1);
            //var Damage = this.CastInfos.RandomJet;

            //return EffectDamage.ApplyDamages(this.CastInfos, this.Target, ref Damage);
        }
        public override int ApplyEffect(EffectCast CastInfos)
        {
            // Si > 0 alors c'est un buff
            if (CastInfos.Duration > 0)
            {
                // L'effet est un poison
                CastInfos.IsPoison = true;

                // Ajout du buff
                foreach (var Target in CastInfos.Targets)
                {
                    Target.Buffs.AddBuff(new BuffDamageDropLife(CastInfos, Target));
                }
            }
            else // Dommage direct
            {
                int effectBase  = CastInfos.GenerateJet(CastInfos.Caster);
                var DamageValue = (CastInfos.Caster.CurrentLife / 100) * effectBase;
                if (EffectDamage.ApplyDamages(CastInfos, CastInfos.Caster, ref DamageValue) == -3)
                {
                    foreach (var Target in CastInfos.Targets)
                    {
                        if (EffectHeal.ApplyHeal(CastInfos, Target, DamageValue) == -3)
                        {
                            return(-3);
                        }
                    }
                    return(-3);
                }
                else
                {
                    foreach (var Target in CastInfos.Targets)
                    {
                        if (EffectHeal.ApplyHeal(CastInfos, Target, DamageValue) == -3)
                        {
                            return(-3);
                        }
                    }
                }
                //DamageValue = (-DamageValue);
            }

            return(-1);
        }
Beispiel #5
0
        public override int ApplyEffect(EffectCast CastInfos)
        {
            foreach (var Target in CastInfos.Targets)
            {
                var DamageJet = CastInfos.GenerateJet(Target);

                if (EffectDamage.ApplyDamages(CastInfos, Target, ref DamageJet) == -3)
                {
                    return(-3);
                }

                var HealJet = DamageJet / 2;

                if (EffectHeal.ApplyHeal(CastInfos, CastInfos.Caster, HealJet) == -3)
                {
                    return(-3);
                }
            }

            return(-1);
        }
        public override int ApplyEffect(ref int DamageJet, EffectCast DamageInfos = null)
        {
            //var Damage = this.CastInfos.RandomJet;

            // return EffectDamage.ApplyDamages(this.CastInfos, this.Target, ref Damage);


            int effectBase   = DamageJet;
            var DamageValuea = (Target.CurrentLife / 100) * effectBase;
            var DamageValue  = (CastInfos.Caster.CurrentLife / 100) * effectBase;

            if (EffectDamage.ApplyDamages(CastInfos, CastInfos.Caster, ref DamageValue) == -3)
            {
                EffectHeal.ApplyHeal(CastInfos, Target, DamageValue);
                return(-3);
            }
            else
            {
                return(EffectHeal.ApplyHeal(CastInfos, Target, DamageValue));
            }

            //DamageValuea = (-DamageValuea);
        }