Ejemplo n.º 1
0
        public void OnImpact(NWPlayer player, NWObject target, int level, int spellFeatID)
        {
            int   damage;
            float duration;

            switch (level)
            {
            case 1:
                damage   = RandomService.D4(1);
                duration = 6;
                break;

            case 2:
                damage   = RandomService.D8(1);
                duration = 6;
                break;

            case 3:
                damage   = RandomService.D8(2);
                duration = 6;
                break;

            case 4:
                damage   = RandomService.D8(2);
                duration = 12;
                break;

            case 5:
                damage   = RandomService.D8(3);
                duration = 12;
                break;

            case 6:
                damage   = RandomService.D8(4);
                duration = 12;
                break;

            case 7:
                damage   = RandomService.D8(5);
                duration = 12;
                break;

            case 8:
                damage   = RandomService.D8(5);
                duration = 18;
                break;

            case 9:
                damage   = RandomService.D8(6);
                duration = 24;
                break;

            default: return;
            }


            _.ApplyEffectToObject(DURATION_TYPE_INSTANT, _.EffectDamage(damage, DAMAGE_TYPE_PIERCING), target);
            _.ApplyEffectToObject(DURATION_TYPE_TEMPORARY, _.EffectCutsceneImmobilize(), target, duration);
            _.ApplyEffectToObject(DURATION_TYPE_TEMPORARY, _.EffectVisualEffect(VFX_IMP_ACID_L), target, duration);
        }
Ejemplo n.º 2
0
        public void OnImpact(NWCreature creature, NWObject target, int level, int spellTier)
        {
            int   damage;
            float duration;

            switch (level)
            {
            case 1:
                damage   = RandomService.D4(1);
                duration = 6;
                break;

            case 2:
                damage   = RandomService.D8(1);
                duration = 6;
                break;

            case 3:
                damage   = RandomService.D8(2);
                duration = 6;
                break;

            case 4:
                damage   = RandomService.D8(2);
                duration = 12;
                break;

            case 5:
                damage   = RandomService.D8(3);
                duration = 12;
                break;

            case 6:
                damage   = RandomService.D8(4);
                duration = 12;
                break;

            case 7:
                damage   = RandomService.D8(5);
                duration = 12;
                break;

            case 8:
                damage   = RandomService.D8(5);
                duration = 18;
                break;

            case 9:
                damage   = RandomService.D8(6);
                duration = 24;
                break;

            default: return;
            }


            _.ApplyEffectToObject(DurationType.Instant, _.EffectDamage(damage, DamageType.Piercing), target);
            _.ApplyEffectToObject(DurationType.Temporary, _.EffectCutsceneImmobilize(), target, duration);
            _.ApplyEffectToObject(DurationType.Temporary, _.EffectVisualEffect(VisualEffect.Vfx_Imp_Acid_L), target, duration);
        }
Ejemplo n.º 3
0
        private void DoDiceRoll(NWPlayer user, int sides, int number)
        {
            int value;

            if (number < 1)
            {
                number = 1;
            }
            else if (number > 10)
            {
                number = 10;
            }

            switch (sides)
            {
            case 2:
                value = RandomService.D2(number);
                break;

            case 4:
                value = RandomService.D4(number);
                break;

            case 6:
                value = RandomService.D6(number);
                break;

            case 8:
                value = RandomService.D8(number);
                break;

            case 10:
                value = RandomService.D10(number);
                break;

            case 20:
                value = RandomService.D20(number);
                break;

            case 100:
                value = RandomService.D100(number);
                break;

            default:
                value = 0;
                break;
            }

            string dieRoll = number + "d" + sides;
            string message = ColorTokenService.SkillCheck("Dice Roll: ") + dieRoll + ": " + value;

            user.SpeakString(message);
        }
Ejemplo n.º 4
0
        public void OnImpact(NWCreature creature, NWObject target, int perkLevel, int spellTier)
        {
            int   damage;
            float length;

            switch (perkLevel)
            {
            case 1:
                damage = RandomService.D4(1);
                length = 6.0f;
                break;

            case 2:
                damage = RandomService.D4(2);
                length = 6.0f;
                break;

            case 3:
                damage = RandomService.D6(2);
                length = 6.0f;
                break;

            case 4:
                damage = RandomService.D6(2);
                length = 9.0f;
                break;

            case 5:
                damage = RandomService.D6(3);
                length = 9.0f;
                break;

            case 6:
                damage = RandomService.D8(3);
                length = 9.0f;
                break;

            default: return;
            }

            _.ApplyEffectToObject(DurationType.Temporary, AbilityService.EffectKnockdown(target, length), target.Object, length);
            _.ApplyEffectToObject(DurationType.Instant, _.EffectDamage(damage, DamageType.Bludgeoning), target);
        }
Ejemplo n.º 5
0
        public void OnImpact(NWPlayer player, NWObject target, int perkLevel, int spellFeatID)
        {
            int   damage;
            float length;

            switch (perkLevel)
            {
            case 1:
                damage = RandomService.D4(1);
                length = 6.0f;
                break;

            case 2:
                damage = RandomService.D4(2);
                length = 6.0f;
                break;

            case 3:
                damage = RandomService.D6(2);
                length = 6.0f;
                break;

            case 4:
                damage = RandomService.D6(2);
                length = 9.0f;
                break;

            case 5:
                damage = RandomService.D6(3);
                length = 9.0f;
                break;

            case 6:
                damage = RandomService.D8(3);
                length = 9.0f;
                break;

            default: return;
            }

            _.ApplyEffectToObject(DURATION_TYPE_TEMPORARY, _.EffectKnockdown(), target.Object, length);
            _.ApplyEffectToObject(DURATION_TYPE_INSTANT, _.EffectDamage(damage, DAMAGE_TYPE_BLUDGEONING), target);
        }
Ejemplo n.º 6
0
        private void HealTarget(NWCreature member, int level, int luck)
        {
            int amount;

            switch (level)
            {
            case 1:
                amount = RandomService.D12(1);
                break;

            case 2:
                amount = RandomService.D8(2);
                break;

            case 3:
                amount = RandomService.D8(3);
                break;

            case 4:
                amount = RandomService.D8(4);
                break;

            case 5:
                amount = RandomService.D8(5);
                break;

            case 6:
                amount = RandomService.D8(6);
                break;

            default: return;
            }

            if (RandomService.D100(1) <= luck)
            {
                amount *= 2;
            }

            _.ApplyEffectToObject(DURATION_TYPE_INSTANT, _.EffectHeal(amount), member);
            _.ApplyEffectToObject(DURATION_TYPE_INSTANT, _.EffectVisualEffect(VFX_IMP_HEALING_S), member);
        }
Ejemplo n.º 7
0
        private void HealTarget(NWCreature member, int level, int luck)
        {
            int amount;

            switch (level)
            {
            case 1:
                amount = RandomService.D12(1);
                break;

            case 2:
                amount = RandomService.D8(2);
                break;

            case 3:
                amount = RandomService.D8(3);
                break;

            case 4:
                amount = RandomService.D8(4);
                break;

            case 5:
                amount = RandomService.D8(5);
                break;

            case 6:
                amount = RandomService.D8(6);
                break;

            default: return;
            }

            if (RandomService.D100(1) <= luck)
            {
                amount *= 2;
            }

            _.ApplyEffectToObject(DurationType.Instant, _.EffectHeal(amount), member);
            _.ApplyEffectToObject(DurationType.Instant, _.EffectVisualEffect(VisualEffect.Vfx_Imp_Healing_S), member);
        }
Ejemplo n.º 8
0
        public void OnImpact(NWPlayer player, NWObject target, int level, int spellFeatID)
        {
            int damage;
            int seconds;
            int dotDamage;

            switch (level)
            {
            case 1:
                damage    = RandomService.D4(1);
                seconds   = 6;
                dotDamage = 1;
                break;

            case 2:
                damage    = RandomService.D8(1);
                seconds   = 6;
                dotDamage = 1;
                break;

            case 3:
                damage    = RandomService.D8(2);
                seconds   = 6;
                dotDamage = 1;
                break;

            case 4:
                damage    = RandomService.D8(2);
                seconds   = 12;
                dotDamage = 2;
                break;

            case 5:
                damage    = RandomService.D8(3);
                seconds   = 12;
                dotDamage = 2;
                break;

            case 6:
                damage    = RandomService.D8(4);
                seconds   = 12;
                dotDamage = 2;
                break;

            case 7:
                damage    = RandomService.D8(5);
                seconds   = 12;
                dotDamage = 3;
                break;

            case 8:
                damage    = RandomService.D8(5);
                seconds   = 18;
                dotDamage = 3;
                break;

            case 9:
                damage    = RandomService.D8(6);
                seconds   = 24;
                dotDamage = 3;
                break;

            default: return;
            }

            _.ApplyEffectToObject(DURATION_TYPE_INSTANT, _.EffectDamage(damage, DAMAGE_TYPE_PIERCING), target);
            CustomEffectService.ApplyCustomEffect(player, target.Object, CustomEffectType.Bleeding, seconds, level, Convert.ToString(dotDamage));
        }
Ejemplo n.º 9
0
        public void OnImpact(NWPlayer player, NWObject target, int level, int spellFeatID)
        {
            float length;
            int   damage;

            switch (level)
            {
            case 1:
                damage = RandomService.D4(1);
                length = 3;
                break;

            case 2:
                damage = RandomService.D4(1);
                length = 6;
                break;

            case 3:
                damage = RandomService.D6(1);
                length = 6;
                break;

            case 4:
                damage = RandomService.D8(1);
                length = 6;
                break;

            case 5:
                damage = RandomService.D8(1);
                length = 9;
                break;

            default: return;
            }
            SkillService.RegisterPCToNPCForSkill(player, target, SkillType.ForceCombat);

            // Resistance affects length for this perk.
            ForceResistanceResult resistance = CombatService.CalculateResistanceRating(player, target.Object, ForceAbilityType.Mind);

            length = length * resistance.Amount;

            if (length <= 0.0f || resistance.Type != ResistanceType.Zero)
            {
                player.SendMessage("Your Force Push effect was resisted.");
                return;
            }

            var effectiveStats = PlayerStatService.GetPlayerItemEffectiveStats(player);
            int luck           = PerkService.GetPCPerkLevel(player, PerkType.Lucky) + effectiveStats.Luck;

            if (RandomService.Random(100) + 1 <= luck)
            {
                length = length * 2;
                player.SendMessage("Lucky force push!");
            }

            _.PlaySound("v_imp_frcpush");
            _.ApplyEffectToObject(DURATION_TYPE_INSTANT, _.EffectDamage(damage, DAMAGE_TYPE_POSITIVE), target);
            _.ApplyEffectToObject(DURATION_TYPE_TEMPORARY, _.EffectKnockdown(), target, length);
            CombatService.AddTemporaryForceDefense(target.Object, ForceAbilityType.Light);
        }
Ejemplo n.º 10
0
        public void OnImpact(NWPlayer player, NWObject target, int perkLevel, int spellFeatID)
        {
            int   damage   = 0;
            float duration = 0.0f;

            switch (perkLevel)
            {
            case 1:
                damage   = RandomService.D4(1);
                duration = 6;
                break;

            case 2:
                damage   = RandomService.D4(2);
                duration = 6;
                break;

            case 3:
                damage   = RandomService.D4(2);
                duration = 9;
                break;

            case 4:
                damage   = RandomService.D8(2);
                duration = 9;
                break;

            case 5:
                damage   = RandomService.D8(2);
                duration = 12;
                break;

            case 6:
                damage   = RandomService.D6(3);
                duration = 15;
                break;

            case 7:
                damage   = RandomService.D8(3);
                duration = 15;
                break;

            case 8:
                damage   = RandomService.D8(3);
                duration = 18;
                break;

            case 9:
                damage   = RandomService.D8(4);
                duration = 18;
                break;

            case 10:
                damage   = RandomService.D8(4);
                duration = 21;
                break;
            }

            _.ApplyEffectToObject(DURATION_TYPE_INSTANT, _.EffectDamage(damage, DAMAGE_TYPE_SLASHING), target);
            _.ApplyEffectToObject(DURATION_TYPE_TEMPORARY, _.EffectACDecrease(3), target, duration);
            _.ApplyEffectToObject(DURATION_TYPE_INSTANT, _.EffectVisualEffect(VFX_IMP_HEAD_EVIL), target);

            player.SendMessage("Your target's armor has been breached.");
        }
Ejemplo n.º 11
0
        public void OnImpact(NWCreature creature, NWObject target, int perkLevel, int spellTier)
        {
            int   damage   = 0;
            float duration = 0.0f;

            switch (perkLevel)
            {
            case 1:
                damage   = RandomService.D4(1);
                duration = 6;
                break;

            case 2:
                damage   = RandomService.D4(2);
                duration = 6;
                break;

            case 3:
                damage   = RandomService.D4(2);
                duration = 9;
                break;

            case 4:
                damage   = RandomService.D8(2);
                duration = 9;
                break;

            case 5:
                damage   = RandomService.D8(2);
                duration = 12;
                break;

            case 6:
                damage   = RandomService.D6(3);
                duration = 15;
                break;

            case 7:
                damage   = RandomService.D8(3);
                duration = 15;
                break;

            case 8:
                damage   = RandomService.D8(3);
                duration = 18;
                break;

            case 9:
                damage   = RandomService.D8(4);
                duration = 18;
                break;

            case 10:
                damage   = RandomService.D8(4);
                duration = 21;
                break;
            }

            _.ApplyEffectToObject(DurationType.Instant, _.EffectDamage(damage, DamageType.Slashing), target);
            _.ApplyEffectToObject(DurationType.Temporary, _.EffectACDecrease(3), target, duration);
            _.ApplyEffectToObject(DurationType.Instant, _.EffectVisualEffect(VisualEffect.Vfx_Imp_Head_Evil), target);

            creature.SendMessage("Your target's armor has been breached.");
        }
Ejemplo n.º 12
0
        public void OnImpact(NWCreature creature, NWObject target, int perkLevel, int spellTier)
        {
            int   damage;
            float duration;

            switch (perkLevel)
            {
            case 1:
                damage   = RandomService.D8(1);
                duration = 3;
                break;

            case 2:
                damage   = RandomService.D8(2);
                duration = 3;
                break;

            case 3:
                damage   = RandomService.D8(3);
                duration = 3;
                break;

            case 4:
                damage   = RandomService.D8(3);
                duration = 6;
                break;

            case 5:
                damage   = RandomService.D8(4);
                duration = 6;
                break;

            case 6:
                damage   = RandomService.D8(5);
                duration = 6;
                break;

            case 7:
                damage   = RandomService.D8(6);
                duration = 6;
                break;

            case 8:
                damage   = RandomService.D8(7);
                duration = 6;
                break;

            case 9:
                damage   = RandomService.D8(7);
                duration = 9;
                break;

            case 10:
                damage   = RandomService.D8(8);
                duration = 9;
                break;

            default: return;
            }

            _.ApplyEffectToObject(DURATION_TYPE_TEMPORARY, _.EffectStunned(), target, duration);
            _.ApplyEffectToObject(DURATION_TYPE_INSTANT, _.EffectDamage(damage, DAMAGE_TYPE_ELECTRICAL), target);
            _.ApplyEffectToObject(DURATION_TYPE_INSTANT, _.EffectVisualEffect(VFX_IMP_SUNSTRIKE), target);
        }
Ejemplo n.º 13
0
        public void OnImpact(NWCreature creature, NWObject target, int level, int spellTier)
        {
            int damage;
            int seconds;
            int dotDamage;

            switch (level)
            {
            case 1:
                damage    = RandomService.D4(1);
                seconds   = 6;
                dotDamage = 1 + (creature.RightHand.DamageBonus / 5);
                break;

            case 2:
                damage    = RandomService.D8(1);
                seconds   = 6;
                dotDamage = 1 + (creature.RightHand.DamageBonus / 5);
                break;

            case 3:
                damage    = RandomService.D8(2);
                seconds   = 6;
                dotDamage = 1 + (creature.RightHand.DamageBonus / 5);
                break;

            case 4:
                damage    = RandomService.D8(2);
                seconds   = 12;
                dotDamage = 2 + (creature.RightHand.DamageBonus / 4);
                break;

            case 5:
                damage    = RandomService.D8(3);
                seconds   = 12;
                dotDamage = 2 + (creature.RightHand.DamageBonus / 4);
                break;

            case 6:
                damage    = RandomService.D8(4);
                seconds   = 12;
                dotDamage = 2 + (creature.RightHand.DamageBonus / 4);
                break;

            case 7:
                damage    = RandomService.D8(5);
                seconds   = 12;
                dotDamage = 3 + (creature.RightHand.DamageBonus / 3);
                break;

            case 8:
                damage    = RandomService.D8(5);
                seconds   = 18;
                dotDamage = 3 + (creature.RightHand.DamageBonus / 3);
                break;

            case 9:
                damage    = RandomService.D8(6);
                seconds   = 24;
                dotDamage = 3 + (creature.RightHand.DamageBonus / 3);
                break;

            default: return;
            }

            _.ApplyEffectToObject(DurationType.Instant, _.EffectDamage(damage, DamageType.Piercing), target);
            CustomEffectService.ApplyCustomEffect(creature, target.Object, CustomEffectType.Bleeding, seconds, level, Convert.ToString(dotDamage));
        }
Ejemplo n.º 14
0
        public void OnImpact(NWCreature creature, NWObject target, int perkLevel, int spellTier)
        {
            int   damage;
            float duration;

            switch (perkLevel)
            {
            case 1:
                damage   = RandomService.D8(1);
                duration = 3;
                break;

            case 2:
                damage   = RandomService.D8(2);
                duration = 3;
                break;

            case 3:
                damage   = RandomService.D8(3);
                duration = 3;
                break;

            case 4:
                damage   = RandomService.D8(3);
                duration = 6;
                break;

            case 5:
                damage   = RandomService.D8(4);
                duration = 6;
                break;

            case 6:
                damage   = RandomService.D8(5);
                duration = 6;
                break;

            case 7:
                damage   = RandomService.D8(6);
                duration = 6;
                break;

            case 8:
                damage   = RandomService.D8(7);
                duration = 6;
                break;

            case 9:
                damage   = RandomService.D8(7);
                duration = 9;
                break;

            case 10:
                damage   = RandomService.D8(8);
                duration = 9;
                break;

            default: return;
            }

            _.ApplyEffectToObject(DurationType.Temporary, _.EffectStunned(), target, duration);
            _.ApplyEffectToObject(DurationType.Instant, _.EffectDamage(damage, DamageType.Electrical), target);
            _.ApplyEffectToObject(DurationType.Instant, _.EffectVisualEffect(VisualEffect.Vfx_Imp_Sunstrike), target);
        }