Beispiel #1
0
        public static void ApplyBuffChatiment(EffectCast cast, EffectCast actualCast)
        {
            int        statsValue = actualCast.Jet / 2;
            EffectEnum statsType  = (EffectEnum)cast.Value1 == EffectEnum.Heal ? EffectEnum.AddVitalite : (EffectEnum)cast.Value1;
            int        maxValue   = cast.Value2;
            int        duration   = cast.Value3;

            if (statsValue > maxValue)
            {
                statsValue = maxValue;
            }

            EffectProcessor.ApplyEffect(new EffectCast(statsType, cast.SpellID, 0, statsValue, -1, -1, 0, duration, false, cast.Caster, null, cast.Target));
        }
Beispiel #2
0
        public static void ApplyBuffChanceEcaflip(EffectCast cast, EffectCast actualCast)
        {
            int coefDamages = cast.Value1;
            int coefHeal    = cast.Value2;
            int chance      = cast.Value3;

            if (Utilities.Basic.Rand(0, 99) < chance)
            {
                EffectProcessor.ApplyEffect(new EffectCast(EffectEnum.Heal, cast.SpellID, actualCast.Jet * coefHeal, -1, -1, 0, 0, 0, false, cast.Caster, null, cast.Target));

                actualCast.Jet = 0;
            }
            else
            {
                actualCast.Jet *= coefDamages;
            }
        }
Beispiel #3
0
        public static void ApplyBuffMissBack(EffectCast cast, EffectCast actualCast)
        {
            if (!actualCast.AtCac)
            {
                return;
            }

            int chance = cast.Value1;
            int push   = cast.Value2;

            if (Utilities.Basic.Rand(0, 99) < chance)
            {
                EffectProcessor.ApplyEffect(new EffectCast(EffectEnum.PushBack, cast.SpellID, actualCast.CellID, push, -1, -1, 0, 0, false, actualCast.Caster, null, cast.Target));

                actualCast.Jet = 0;
            }
        }
Beispiel #4
0
        public static void ApplyBuffSacrifice(EffectCast cast, EffectCast actualCast)
        {
            EffectProcessor.ApplyEffect(new EffectCast(EffectEnum.Transpose, cast.SpellID, -1, -1, -1, 0, 0, 0, false, cast.Caster, null, cast.Target));

            actualCast.Target = cast.Caster;
        }
Beispiel #5
0
 public static void ApplyBuffDamage(EffectCast cast, EffectCast actualCast)
 {
     EffectProcessor.ApplyEffect(cast);
 }