Пример #1
0
        public void OnImpact(NWPlayer oPC, NWObject oTarget)
        {
            int   level = _perk.GetPCPerkLevel(oPC, PerkType.GraspingIce);
            int   damage;
            float slowLength = 0.0f;

            switch (level)
            {
            case 1:
                damage = _random.Random(6) + 1;
                break;

            case 2:
                damage     = _random.Random(6) + 1;
                slowLength = 3.0f;
                break;

            case 3:
                damage     = _random.Random(6) + 1;
                damage    += _random.Random(6) + 1;
                slowLength = 3.0f;
                break;

            case 4:
                damage     = _random.Random(4) + 1;
                damage    += _random.Random(4) + 1;
                damage    += _random.Random(4) + 1;
                damage    += _random.Random(4) + 1;
                slowLength = 3.0f;
                break;

            case 5:
                damage     = _random.Random(8) + 1;
                damage    += _random.Random(8) + 1;
                damage    += _random.Random(8) + 1;
                slowLength = 3.0f;
                break;

            default:
                return;
            }

            int wisdom       = oPC.WisdomModifier;
            int intelligence = oPC.IntelligenceModifier;

            float damageMultiplier = 1.0f + (intelligence * 0.2f) + (wisdom * 0.1f);

            damage = (int)(damage * damageMultiplier);

            _.ApplyEffectToObject(DURATION_TYPE_INSTANT, _.EffectVisualEffect(VFX_FNF_HOWL_MIND), oTarget.Object);

            if (slowLength > 0.0f)
            {
                _.ApplyEffectToObject(DURATION_TYPE_TEMPORARY, _.EffectSlow(), oTarget.Object, slowLength + 0.1f);
            }

            _skill.RegisterPCToNPCForSkill(oPC, (NWCreature)oTarget, SkillType.EvocationMagic);
            _.ApplyEffectToObject(DURATION_TYPE_INSTANT, _.EffectDamage(damage), oTarget.Object);
        }