Esempio n. 1
0
        public override SkillEffect[] CreateAdditionalSkillEffects(Skill sk, SkillEffect[] effects)
        {
            ActiveSkill aa = Owner.MeleeSkill;

            if (aa != null && sk.GetSkillId() == aa.GetSkillId())
            {
                if (sk.Owner.HasEffectOfSkill(SkillId.Haste))
                {
                    SkillEffect[] ef = new SkillEffect[1];
                    ef[0] = new EffectPushaway(30);
                    return(ef);
                }
            }

            return(null);
        }
Esempio n. 2
0
        public override void OnGiveDamage(Character target, int damage, SkillId skillId)
        {
            ActiveSkill aa = Owner.MeleeSkill;

            if (target != null && aa != null && skillId == aa.GetSkillId() && damage > 0)
            {
                if (Owner.HasEffectOfSkill(SkillId.Haste))
                {
                    int drainAmmount = (int)(damage * POWER / 100f);

                    if (drainAmmount > 0)
                    {
                        Owner.ReceiveHeal(target, drainAmmount, skillId);
                    }
                }
            }
        }