Opywang

Member
Hi there I notice some quest item has over 20-20 base damage, and whirl wind does not work. If anybody can help me figure out why, or make it work after 20-20 I would appreciate it.

Code:
using System;
using System.Collections;
using Server.Spells;

namespace Server.Items
{
    /// <summary>
    /// A godsend to a warrior surrounded, the Whirlwind Attack allows the fighter to strike at all nearby targets in one mighty spinning swing.
    /// </summary>
    public class WhirlwindAttack : WeaponAbility
    {
        public WhirlwindAttack()
        {
        }

        public override int BaseMana
        {
            get
            {
                return 30;
            }
        }
        public override void OnHit(Mobile attacker, Mobile defender, int damage)
        {
            if (!this.Validate(attacker))
                return;

            ClearCurrentAbility(attacker);

            Map map = attacker.Map;

            if (map == null)
                return;

            BaseWeapon weapon = attacker.Weapon as BaseWeapon;

            if (weapon == null)
                return;

            if (!this.CheckMana(attacker, true))
                return;

            attacker.FixedEffect(0x3728, 10, 15);
            attacker.PlaySound(0x2A1);

            ArrayList list = new ArrayList();

            foreach (Mobile m in defender.GetMobilesInRange(2))
                list.Add(m);

            ArrayList targets = new ArrayList();

            for (int i = 0; i < list.Count; ++i)
            {
                Mobile m = (Mobile)list[i];

                if (m != defender && m != attacker && SpellHelper.ValidIndirectTarget(attacker, m))
                {
                    if (m == null || m.Deleted || m.Map != attacker.Map || !m.Alive || !attacker.CanSee(m) || !attacker.CanBeHarmful(m))
                        continue;

                    if (!attacker.InRange(m, weapon.MaxRange))
                        continue;

                    if (attacker.InLOS(m))
                        targets.Add(m);
                }
            }

            if (targets.Count > 0)
            {
                double bushido = attacker.Skills.Bushido.Value;
                double damageBonus = 1.0 + Math.Pow((targets.Count * bushido) / 60, 2) / 100;

                if (damageBonus > 2.0)
                    damageBonus = 2.0;
                   
                attacker.RevealingAction();

                for (int i = 0; i < targets.Count; ++i)
                {
                    Mobile m = (Mobile)targets[i];

                    attacker.SendLocalizedMessage(1060161); // The whirling attack strikes a target!
                    m.SendLocalizedMessage(1060162); // You are struck by the whirling attack and take damage!

                    weapon.OnHit(attacker, m, damageBonus);
                }
            }
        }
    }
}
 
Some items from quest has base damage 20-40, but Whirlwind special weapon ability move does not work after 20-20 base damage.

I need to make it work above 20-20, or unlimited cap cause it is max out at 20-20 base damage.

When it go over 20-20 base damage it will not even whirlwind at all it will just attack a single monster, and it will not do any damage beside that one single monster.
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back