Example #1
0
        public void ShenStrike(Mobile attacker, Mobile defender, BaseWeapon weapon)
        {
            if (Level >= PerkLevel.Fifth)
            {
                if (weapon is Fists && Utility.RandomDouble() <= 0.10)
                {
                    int element = Utility.RandomMinMax(2, 4);

                    switch (element)
                    {
                        case 1:
                            {
                                weapon.DoLightning(attacker, defender);
                                break;
                            }
                        case 2:
                            {
                                weapon.DoMagicArrow(attacker, defender);
                                break;
                            }
                        case 3:
                            {
                                weapon.DoHarm(attacker, defender);
                                break;
                            }
                        case 4:
                            {
                                weapon.DoFireball(attacker, defender);
                                break;
                            }

                    }
                }
            }
        }
Example #2
0
        public void Capacitor(Mobile attacker, Mobile defender, BaseWeapon weapon)
        {
            if (Level >= PerkLevel.Fourth)
            {
                if (!(weapon is Fists) && !(weapon is BaseRanged) && weapon is BaseWeapon && Utility.RandomDouble() <= 0.10)
                {
                    int element = Utility.RandomMinMax(1, 4);

                    switch (element)
                    {
                        case 1:
                            {
                                weapon.DoLightning(attacker, defender);
                                break;
                            }
                        case 2:
                            {
                                weapon.DoMagicArrow(attacker, defender);
                                break;
                            }
                        case 3:
                            {
                                weapon.DoHarm(attacker, defender);
                                break;
                            }
                        case 4:
                            {
                                weapon.DoFireball(attacker, defender);
                                break;
                            }

                    }
                }
            }
        }