Пример #1
0
        public void DoInjury(Injury inj)
        {
            if (m_Player == null || m_Player.Deleted)
            {
                Delete();
                return;
            }

            if (m_Player is PlayerMobile && (m_Player as PlayerMobile).RessSick)
                return;

            bool hasInjury = false;
            foreach (InjuryTimer iT in CurrentInjuries)
            {
                if (iT.Injury == inj)
                {
                    hasInjury = true;
                    continue;
                }
            }
            if (!hasInjury)
                return;

            switch (inj)
            {
                case Injury.Bloodied:
                    {
                        int dmg = Utility.RandomMinMax(1, 5);
                        if (m_Player.Hits - dmg < 1)
                            dmg = m_Player.Hits - (m_Player.Hits - 1);
                        m_Player.Damage(dmg);
                        Blood newBlood = new Blood();
                        newBlood.MoveToWorld(m_Player.Location, m_Player.Map);
                        m_Player.SendMessage(37, "You're bleeding.");
                        break;
                    }
                case Injury.BrokenBack:
                    {
                        int pMin = 120 - m_Player.StamMax - m_Player.ManaMax;
                        if (pMin < 15)
                            pMin = 15;
                        XmlParalyze newParalysis = new XmlParalyze(pMin);
                        newParalysis.Name = "Injury Paralysis";
                        XmlAttach.AttachTo(m_Player, newParalysis);
                        m_Player.SendMessage(37, "You are wracked with paralytic back spasms and cannot move!");
                        m_Player.Emote("*spasms!*");
                        break;
                    }
                case Injury.BrokenJaw:
                    {
                        ArrayList muteAtt = XmlAttach.FindAttachments(m_Player, typeof(XmlBackground));
                        bool attached = false;
                        foreach (XmlBackground att in muteAtt)
                        {
                            if (att.Background == BackgroundList.Mute)
                                attached = true;
                        }
                        if (!attached)
                        {
                            int muteTime = 180 - m_Player.StamMax - m_Player.ManaMax;
                            if (muteTime < 20)
                                muteTime = 20;
                            XmlBackground newMute = new XmlBackground(BackgroundList.Mute, 1, muteTime);
                            newMute.Name = "Injury Mute";
                            XmlAttach.AttachTo(m_Player, newMute);
                            m_Player.SendMessage(37, "Your jaw is broken, causing you great pain and rendering you unable to speak.");
                        }
                        break;
                    }
                case Injury.BrokenLeftArm:
                    {
                        Item LeftArmItem = m_Player.FindItemOnLayer(Layer.TwoHanded);
                        if (LeftArmItem != null && !LeftArmItem.Deleted && m_Player.Alive)
                        {
                            LeftArmItem.MoveToWorld(m_Player.Location, m_Player.Map);
                            m_Player.PlaySound(LeftArmItem.GetDropSound());
                            if (LeftArmItem.Name != null && LeftArmItem.Name != "")
                                m_Player.Emote("*drops " + LeftArmItem.Name + " due to " + (m_Player.Female ? "her" : "his") + " wounds*");
                        }
                        //Remainder is handled in PlayerMobile.cs
                        break;
                    }
                case Injury.BrokenLeftLeg:
                    {
                        ArrayList lameAtts = XmlAttach.FindAttachments(m_Player, typeof(XmlBackground));
                        bool attached = false;
                        foreach (XmlBackground att in lameAtts)
                        {
                            if (att.Background == BackgroundList.Lame)
                                attached = true;
                        }
                        if (!attached)
                        {
                            int lameTime = 100 - m_Player.StamMax - m_Player.ManaMax;
                            if (lameTime < 5)
                                lameTime = 5;
                            XmlBackground lameAtt = new XmlBackground(BackgroundList.Lame, 1, lameTime);
                            lameAtt.Name = "Injury Left Lame";
                            XmlAttach.AttachTo(m_Player, lameAtt);
                            m_Player.SendMessage(37, "Your left leg is broken, hindering your movement.");
                        }
                        break;
                    }
                case Injury.BrokenNeck:
                    {
                        if (Utility.RandomMinMax(1, 100) > Utility.RandomMinMax(1 + (m_Player.ManaMax / 2), 100 + m_Player.ManaMax))
                        {
                            int pMin = 120 - m_Player.StamMax - m_Player.ManaMax;
                            if (pMin < 15)
                                pMin = 15;
                            XmlParalyze parAtt = new XmlParalyze(pMin);
                            parAtt.Name = "Injury Paralysis Neck";
                            XmlAttach.AttachTo(m_Player, parAtt);
                            m_Player.SendMessage(37, "Your neck is broken, and your body is paralyzed with pain!");
                            m_Player.Emote("*spasms!*");
                        }
                        break;
                    }
                case Injury.BrokenRightArm:
                    {
                        Item RightArmItem = m_Player.FindItemOnLayer(Layer.OneHanded);
                        if (RightArmItem == null || RightArmItem.Deleted)
                            RightArmItem = m_Player.FindItemOnLayer(Layer.FirstValid);
                        if ((RightArmItem == null || RightArmItem.Deleted) && m_Player.FindItemOnLayer(Layer.TwoHanded) is BaseWeapon)
                            RightArmItem = m_Player.FindItemOnLayer(Layer.TwoHanded);

                        if (RightArmItem != null && !RightArmItem.Deleted && m_Player.Alive)
                        {
                            RightArmItem.MoveToWorld(m_Player.Location, m_Player.Map);
                            m_Player.PlaySound(RightArmItem.GetDropSound());
                            if (RightArmItem.Name != null && RightArmItem.Name != "")
                                m_Player.Emote("*drops " + RightArmItem.Name + " due to " + (m_Player.Female ? "her" : "his") + " wounds*");
                        }
                        //Remainder is handled in PlayerMobile.cs
                        break;
                    }
                case Injury.BrokenRightLeg:
                    {
                        ArrayList lameAtts = XmlAttach.FindAttachments(m_Player, typeof(XmlBackground));
                        bool attached = false;
                        foreach (XmlBackground att in lameAtts)
                        {
                            if (att.Background == BackgroundList.Lame)
                                attached = true;
                        }
                        if (!attached)
                        {
                            int lameTime = 100 - m_Player.StamMax - m_Player.ManaMax;
                            if (lameTime < 5)
                                lameTime = 5;
                            XmlBackground lameAtt = new XmlBackground(BackgroundList.Lame, 1, lameTime);
                            lameAtt.Name = "Injury Right Lame";
                            XmlAttach.AttachTo(m_Player, lameAtt);
                            m_Player.SendMessage(37, "Your right leg is broken, hindering your movement.");
                        }
                        break;
                    }
                case Injury.Bruised:
                    {
                        bool alreadyBruised = false;
                        foreach (StatMod mod in m_Player.StatMods)
                        {
                            if (mod.Name.ToLower().Contains("bruise"))
                            {
                                alreadyBruised = true;
                                continue;
                            }
                        }
                        if (!alreadyBruised)
                        {
                            int bruiseTime = 180 - m_Player.StamMax - m_Player.ManaMax;
                            if (bruiseTime < 20)
                                bruiseTime = 20;
                            XmlHits bruising = new XmlHits(Utility.RandomMinMax(1, 10) * -1, bruiseTime);
                            bruising.Name = "Bruise";
                            XmlAttach.AttachTo(m_Player, bruising);
                            m_Player.SendMessage("You are badly bruised.");
                        }
                        break;
                    }
                case Injury.DeepCut:
                    {
                        int HPLoss = m_Player.HitsMax / Utility.RandomMinMax(10, 20);

                        if (m_Player.Hits - HPLoss <= 0)
                            break;
                        else if ( m_Player.Hits - HPLoss > 0 )
                        {
                            m_Player.Damage(HPLoss);
                            m_Player.SendMessage(37, "You have been cut deeply, and continue to bleed.");
                            Blood newBlood = new Blood();
                            newBlood.MoveToWorld(m_Player.Location, m_Player.Map);
                            m_Player.PlaySound(0x050);
                        }
                        break;
                    }
                case Injury.Exhausted:
                    {
                        int StamLoss = 0;
                        if (m_Player is PlayerMobile)
                        {
                            double numerator = m_Player.StamMax;
                            StamLoss = (int)(numerator / (m_Player as PlayerMobile).Level);
                        }
                        else
                            StamLoss = Utility.Random(1, 10);
                        if (m_Player.StamMax - StamLoss < 1)
                            StamLoss = m_Player.Stam - 1;
                        m_Player.Stam -= StamLoss;
                        if(Utility.RandomMinMax(1,100) > 90)
                            m_Player.SendMessage(37, "You are exhausted, drained of " + StamLoss.ToString() + " stamina.");
                        break;
                    }
                case Injury.FracturedLeftArm:
                    {
                        //Handled in BaseWeapon and BaseShield.cs
                        break;
                    }
                case Injury.FracturedLeftLeg:
                    {
                        if (Utility.RandomBool() && m_Player.Stam - 1 > 0)
                            m_Player.Stam--;

                        //Handled in PlayerMobile.cs
                        break;
                    }
                case Injury.FracturedRibs:
                    {
                        int damage = Utility.RandomMinMax(1, 10);
                        if (m_Player.Hits - damage > 0)
                        {
                            m_Player.Damage(damage);
                            if(Utility.RandomMinMax(1,100) < 25)
                                m_Player.SendMessage(37, "Your ribs are fractured, making movement painful and even debilitating!");
                        }
                        break;
                    }
                case Injury.FracturedRightArm:
                    {
                        //Handled in BaseWeapon.cs
                        break;
                    }
                case Injury.FracturedRightLeg:
                    {
                        if (Utility.RandomBool() && m_Player.Stam - 1 > 0)
                            m_Player.Stam--;

                        //Handled in PlayerMobile.cs
                        break;
                    }
                case Injury.FracturedSkull:
                    {
                        m_Player.Mana = 0;
                        int intLoss = (-1 * (m_Player.RawInt - m_Player.ManaMax)) / 10;
                        if(intLoss > 0)
                            intLoss = 0;
                        XmlAttach.AttachTo(m_Player, new XmlInt(intLoss, InjuryLevel * 100));
                        m_Player.SendMessage(37, "Your skull is fractured, causing you to feel dizzy and confused!");
                        break;
                    }
                case Injury.InternalBleeding:
                    {
                        int HPLoss = m_Player.HitsMax / Utility.RandomMinMax(10, 20);
                        if (m_Player.Hits - HPLoss > 0)
                        {
                            m_Player.Damage(HPLoss);
                        }
                        m_Player.SendMessage(37, "You are bleeding internally!");

                        m_Player.PlaySound(m_Player.Female ? 813 : 1087);
                        m_Player.Say("*pukes*");
                        if (!m_Player.Mounted)
                            m_Player.Animate(32, 5, 1, true, false, 0);
                        Point3D p = new Point3D(m_Player.Location);
                        switch (m_Player.Direction)
                        {
                            case Direction.North:
                                p.Y--; break;
                            case Direction.South:
                                p.Y++; break;
                            case Direction.East:
                                p.X++; break;
                            case Direction.West:
                                p.X--; break;
                            case Direction.Right:
                                p.X++; p.Y--; break;
                            case Direction.Down:
                                p.X++; p.Y++; break;
                            case Direction.Left:
                                p.X--; p.Y++; break;
                            case Direction.Up:
                                p.X--; p.Y--; break;
                            default:
                                break;
                        }
                        p.Z = m_Player.Map.GetAverageZ(p.X, p.Y);

                        bool canFit = Server.Spells.SpellHelper.AdjustField(ref p, m_Player.Map, 12, false);

                        if (canFit)
                        {
                            Puke puke = new Puke();
                            puke.Name = "blood";
                            puke.Hue = Utility.RandomList(1157, 1609, 2206, 2778, 2795);
                            puke.Map = m_Player.Map;
                            puke.Location = p;
                        }

                        if (CombatSystemAttachment.GetCSA(m_Player).CruiseControl)
                        {
                            CombatSystemAttachment.GetCSA(m_Player).DisableAutoCombat();
                            m_Player.SendMessage("It is difficult for you focus on combat right now.");
                        }

                        break;
                    }
                case Injury.LaceratedTorso:
                    {
                        int HPLoss = m_Player.HitsMax / Utility.RandomMinMax(10, 20);
                        if (m_Player.Hits - HPLoss > 0)
                        {
                            m_Player.Damage(HPLoss);
                            m_Player.SendMessage(37, "You are severely injured!");
                        }
                        break;
                    }
                case Injury.MajorConcussion:
                    {
                        m_Player.Mana = 0;
                        if (m_Player.Warmode)
                            m_Player.Warmode = false;

                        if (m_Player.Mount != null && !(m_Player.Mount as BaseCreature).Deleted && Utility.RandomMinMax(1, 100) > ( 50 - ( m_Player.HitsMax - m_Player.Hits)))
                        {
                            IMount mount = m_Player.Mount;
                            mount.Rider = null;

                            if (m_Player is PlayerMobile)
                            {
                                PlayerMobile pm = m_Player as PlayerMobile;

                                if (pm.DismountedTimer != null)
                                    pm.DismountedTimer.Stop();

                                pm.DismountedTimer = new Misc.Dismount.DismountTimer(pm, 1);
                                pm.DismountedTimer.Start();

                                Spells.SpellHelper.Damage(TimeSpan.FromTicks(1), pm, pm, Utility.RandomMinMax(1, 6));
                                pm.Emote("*falls from {0} mount*", pm.Female == true ? "her" : "his");
                            }
                            else
                            {
                                m_Player.Emote("*falls off " + (m_Player.Female == true ? "her" : "his") + " mount!*");
                                if (m_Player is Soldier)
                                    (mount as BaseCreature).Kill();
                            }
                        }

                        if (Utility.RandomMinMax(1, 100) > 95)
                        {
                            CombatSystemAttachment csa = CombatSystemAttachment.GetCSA(m_Player);
                            csa.DoTrip(1);
                        }

                        if (Utility.RandomMinMax(1, 100) > 25)
                            XmlAttach.AttachTo(m_Player, new XmlBackground(BackgroundList.Deaf, 1, 5));

                        if(Utility.RandomMinMax(1,100) > 95)
                            m_Player.SendMessage(37, "You are severely concussed!");

                        break;
                    }
                case Injury.MassiveBleeding:
                    {
                        foreach (Item item in m_Player.Items)
                        {
                            if (Utility.RandomMinMax(1, 100) > 75)
                            {
                                XmlAttach.AttachTo(item, new XmlHue(1157, 30));
                                continue;
                            }
                        }

                        XmlAttach.AttachTo(m_Player, new XmlHue(2419, 30));

                        XmlAttach.AttachTo(m_Player, new XmlHits(-1 * Utility.RandomMinMax(1, InjuryLevel), InjuryLevel * 100));
                        Blood newBlood = new Blood();
                        newBlood.MoveToWorld(m_Player.Location, m_Player.Map);

                        m_Player.Mana = 0;

                        break;
                    }
                case Injury.MinorConcussion:
                    {
                        m_Player.Mana = 0;
                        switch(Utility.RandomMinMax(1,3))
                        {
                            case 1:
                                if (m_Player.Warmode)
                                {
                                    m_Player.Warmode = false;
                                    if(Utility.RandomMinMax(1,100) > 90)
                                        m_Player.SendMessage(37, "You are concussed!");
                                }
                                break;
                            case 2:
                                {
                                    if (m_Player.Mount != null && !(m_Player.Mount as BaseCreature).Deleted && Utility.RandomMinMax(1, 100) > ( 50 - ( m_Player.HitsMax - m_Player.Hits)))
                                    {
                                        IMount mount = m_Player.Mount;
                                        mount.Rider = null;

                                        if (m_Player is PlayerMobile)
                                        {
                                            PlayerMobile pm = m_Player as PlayerMobile;

                                            if (pm.DismountedTimer != null)
                                                pm.DismountedTimer.Stop();

                                            pm.DismountedTimer = new Misc.Dismount.DismountTimer(pm, 1);
                                            pm.DismountedTimer.Start();

                                            Spells.SpellHelper.Damage(TimeSpan.FromTicks(1), pm, pm, Utility.RandomMinMax(1, 6));
                                            pm.Emote("*falls from {0} mount*", pm.Female == true ? "her" : "his");
                                        }
                                        else
                                        {
                                            m_Player.Emote("*falls off " + (m_Player.Female == true ? "her" : "his") + " mount!*");
                                            if (m_Player is Soldier)
                                                (mount as BaseCreature).Kill();
                                        }
                                    }

                                    break;
                                }
                            case 3:
                                {
                                    if (Utility.RandomMinMax(1, 100) > 95)
                                    {
                                        CombatSystemAttachment csa = CombatSystemAttachment.GetCSA(m_Player);
                                        csa.DoTrip(1);
                                        m_Player.SendMessage(37, "You are concussed!");
                                    }
                                    break;
                                }
                        }
                        break;
                    }
                case Injury.MinorCut:
                    {
                        int dmg = Utility.RandomMinMax(1, 3);
                        if (m_Player.Hits - dmg > 0)
                        {
                            m_Player.Damage(dmg);
                            m_Player.SendMessage(37, "You have been cut, and are still bleeding.");
                        }

                        break;
                    }
                case Injury.BrokenSkull:
                    {
                        m_Player.Mana = 0;
                        int intLoss = (-1 * (m_Player.RawInt - m_Player.ManaMax)) / 10;
                        if (intLoss > 0)
                            intLoss = 0;
                        XmlAttach.AttachTo(m_Player, new XmlInt(intLoss, InjuryLevel * 100));

                        new EyeRaking.EyeRakingTimer(m_Player, 10);
                        m_Player.SendMessage("You have been blinded!");

                        m_Player.SendMessage(37, "Your skull is broken, causing your perception to fade in and out!");

                        break;
                    }
                case Injury.Winded:
                    {
                        m_Player.Mana -= Utility.RandomMinMax(1, 10);

                        int stamDmg = Utility.RandomMinMax(1, 5);
                        if (m_Player.Stam - stamDmg > 0)
                            m_Player.Stam -= stamDmg;
                        else
                            m_Player.Stam = 1;

                        m_Player.SendMessage(37, "You're winded.");
                        break;
                    }
                default: break;
            }
        }
Пример #2
0
        protected override void OnTick()
        {
            if (m_Addict == null || m_Addict.Deleted)
            {
                Stop();
                return;
            }

            if (!m_Addict.Alive)
                return;

            if (m_Addict.Map == Map.Internal)
                return;

            if (m_Addict is PlayerMobile && (m_Addict as PlayerMobile).Reforging)
                return;

            if (m_RecoveryCount >= HungerMax)
            {
                m_Addict.SendMessage(2006, "You have successfully recovered from your addiction to " + m_Crave.ToLower() + ".");

                XmlAddiction addAtt = XmlAttach.FindAttachment(m_Addict, typeof(XmlAddiction)) as XmlAddiction;
                if (addAtt != null)
                {
                    if (addAtt.Addictions.Contains(this))
                        addAtt.Addictions.Remove(this);
                }

                Stop();
                return;
            }

            if (Hunger < HungerMax / 2)
            {
                int statLoss = HungerMax - m_Addict.ManaMax - m_Addict.StamMax;
                if (statLoss < 5)
                    statLoss = 5;

                if (Hunger <= 0)
                {
                    XmlHits withdrawal1 = new XmlHits(0 - statLoss, HungerMax * 10); withdrawal1.Name = "Severe Withdrawal";
                    XmlAttach.AttachTo(m_Addict, withdrawal1);
                    XmlHue withdrawal2 = new XmlHue(2419, HungerMax * 10); withdrawal2.Name = "Severe Withdrawal";
                    XmlAttach.AttachTo(m_Addict, withdrawal2);

                    m_Addict.SendMessage(37, "You grow weak and pale with your desire for " + m_Crave.ToLower() + ".");
                    m_RecoveryCount++;
                }

                if (m_Crave == "Tobacco")
                {
                    XmlDex withdrawal = new XmlDex(0 - statLoss, HungerMax * 1); withdrawal.Name = "Tobacco Withdrawal";
                    XmlAttach.AttachTo(m_Addict, withdrawal);

                    m_Addict.SendMessage(37, "You've developed the shakes!");
                }
                else if (m_Crave == "Swampweed")
                {
                    XmlInt withdrawal = new XmlInt(0 - statLoss, HungerMax * 10); withdrawal.Name = "Swampweed Withdrawal";
                    XmlAttach.AttachTo(m_Addict, withdrawal);

                    m_Addict.SendMessage(37, "You have a splitting migraine!");
                }
                else if (m_Crave == "Qat")
                {
                    XmlStam withdrawal = new XmlStam(0 - statLoss, HungerMax * 10); withdrawal.Name = "Qat Withdrawal";
                    XmlAttach.AttachTo(m_Addict, withdrawal);

                    m_Addict.SendMessage(37, "You feel lethargic.");
                }
                else if (m_Crave == "Banestone")
                {
                    XmlMana withdrawal1 = new XmlMana(0 - statLoss, HungerMax * 10); withdrawal1.Name = "Banestone Withdrawal";
                    XmlAttach.AttachTo(m_Addict, withdrawal1);
                    XmlInt withdrawal2 = new XmlInt(0 - statLoss, HungerMax * 10); withdrawal2.Name = "Banestone Withdrawal";
                    XmlAttach.AttachTo(m_Addict, withdrawal2);

                    if (Utility.RandomBool())
                    {
                        new TripFoe.TripFoeTimer(m_Addict, 3);
                        m_Addict.Emote("*collapses, thrashing violently!*");
                    }
                    else
                    {
                        int damage = (HungerMax - Hunger);
                        if(damage < 1)
                            damage = 1;
                        if(m_Addict.HitsMax / 10 < 1)
                            damage = 1;
                        else
                            damage = damage / (m_Addict.HitsMax / 10);

                        m_Addict.PlaySound(0x133);
                        m_Addict.Damage(damage, m_Addict);
                        Blood blood = new Blood();
                        blood.ItemID = Utility.Random(0x122A, 5);
                        blood.MoveToWorld(m_Addict.Location, m_Addict.Map);
                        m_Addict.Emote("*blood flows from " + (m_Addict.Female ? "her" : "his") + " nose as " + (m_Addict.Female ? "her" : "his") +
                            " eyes roll to the back of " + (m_Addict.Female ? "her" : "his") + " head!*");
                    }

                    m_Addict.SendMessage(1609, "You are wracked with seizures!");
                }
                else if (m_Crave == "Opium")
                {
                    XmlDex withdrawal = new XmlDex(0 - statLoss, HungerMax * 10); withdrawal.Name = "Opium Withdrawal";
                    XmlAttach.AttachTo(m_Addict, withdrawal);
                    m_Addict.Hunger--;

                    m_Addict.SendMessage(37, "You feel a gnawing hunger.");
                }
            }

            Hunger--;
            if (Hunger < 0)
                Hunger = 0;

            base.OnTick();
        }
Пример #3
0
        public bool DoDisease(Disease dis)
        {
            if (m_Player == null || m_Player.Deleted || !m_Player.Alive || (m_Player is PlayerMobile && (m_Player as PlayerMobile).RessSick))
                return false;

            if (m_Player.Map == Map.Internal)
                return false;

            if (!HasDisease(dis))
                return false;

            switch (dis)
            {
                case Disease.Influenza:
                    {
                        List<StatMod> removeMod = new List<StatMod>();
                        foreach (StatMod mod in m_Player.StatMods)
                        {
                            if (mod.Name.Contains("[Influenza]"))
                                removeMod.Add(mod);

                        }

                        for (int i = 0; i < removeMod.Count; i++)
                            if(m_Player.StatMods.Contains(removeMod[i]))
                                m_Player.StatMods.Remove(removeMod[i]);

                        int amount = (m_Player.StamMax / 2) * -1;
                        m_Player.Emote("*sweats profusely*");
                        XmlStam influenza = new XmlStam(amount, 300);
                        influenza.Name = " [Disease] [Influenza] ";
                        XmlAttach.AttachTo(m_Player, influenza);
                        DiseaseMessage(dis);
                        return true;
                    }
                case Disease.HundredDaysCough:
                    {
                        List<StatMod> removeMod = new List<StatMod>();
                        foreach (StatMod mod in m_Player.StatMods)
                        {
                            if (mod.Name.Contains("[HundredDaysCough]"))
                                removeMod.Add(mod);

                        }

                        for (int i = 0; i < removeMod.Count; i++)
                            if(m_Player.StatMods.Contains(removeMod[i]))
                                m_Player.StatMods.Remove(removeMod[i]);

                        m_Player.Emote("*cough cough cough!*");
                        if (m_Player.Female)
                        {
                            if (Utility.RandomBool())
                                m_Player.PlaySound(0x311);
                            else
                                m_Player.PlaySound(0x312);
                        }
                        else
                        {
                            if (Utility.RandomBool())
                                m_Player.PlaySound(0x420);
                            else
                                m_Player.PlaySound(0x421);
                        }
                        XmlStam cough = new XmlStam(-5, 60);
                        XmlHits ache = new XmlHits(-5, 300);
                        cough.Name = " [Disease] [HundredDaysCough] [1] ";
                        ache.Name = " [Disease] [HundredDaysCough] [2] ";
                        XmlAttach.AttachTo(m_Player, cough);
                        XmlAttach.AttachTo(m_Player, ache);
                        DiseaseMessage(dis);
                        return true;
                    }
                case Disease.Diptheria:
                    {
                         List<StatMod> removeMod = new List<StatMod>();
                        foreach (StatMod mod in m_Player.StatMods)
                        {
                            if (mod.Name.Contains("[Diptheria]"))
                                removeMod.Add(mod);

                        }

                        for (int i = 0; i < removeMod.Count; i++)
                            if(m_Player.StatMods.Contains(removeMod[i]))
                                m_Player.StatMods.Remove(removeMod[i]);

                        int amount = (m_Player.Dex / 3) * -1;
                        m_Player.Emote("*drools over " + (m_Player.Female ? "her" : "his") + " swollen neck*");
                        XmlDex diptheria = new XmlDex(amount, 600);
                        diptheria.Name = " [Disease] [Diptheria] ";
                        XmlAttach.AttachTo(m_Player, diptheria);
                        DiseaseMessage(dis);
                        return true;
                    }
                case Disease.Dysentery:
                    {
                         List<StatMod> removeMod = new List<StatMod>();
                        foreach (StatMod mod in m_Player.StatMods)
                        {
                            if (mod.Name.Contains("[Dysentery]"))
                                removeMod.Add(mod);

                        }

                        for (int i = 0; i < removeMod.Count; i++)
                            if(m_Player.StatMods.Contains(removeMod[i]))
                                m_Player.StatMods.Remove(removeMod[i]);

                        m_Player.Emote("*doubles over in pain!*");
                        m_Player.Hunger -= 10;
                        if (m_Player.Hunger < 0)
                            m_Player.Hunger = 0;
                        m_Player.Thirst -= 10;
                        if (m_Player.Thirst < 0)
                            m_Player.Thirst = 0;
                        XmlHits dysentery = new XmlHits(-10, 3600);
                        dysentery.Name = " [Disease] [Dysentery] ";
                        XmlAttach.AttachTo(m_Player, dysentery);
                        DiseaseMessage(dis);
                        return true;
                    }
                case Disease.Consumption:
                    {
                         List<StatMod> removeMod = new List<StatMod>();
                        foreach (StatMod mod in m_Player.StatMods)
                        {
                            if (mod.Name.Contains("[Consumption]"))
                                removeMod.Add(mod);

                        }

                        for (int i = 0; i < removeMod.Count; i++)
                            if(m_Player.StatMods.Contains(removeMod[i]))
                                m_Player.StatMods.Remove(removeMod[i]);

                        m_Player.Emote("*cough cough cough!*");
                        if (m_Player.Female)
                        {
                            if(Utility.RandomBool())
                                m_Player.PlaySound(0x311);
                            else
                                m_Player.PlaySound(0x312);
                        }
                        else
                        {
                            if (Utility.RandomBool())
                                m_Player.PlaySound(0x420);
                            else
                                m_Player.PlaySound(0x421);
                        }

                        int hitsamount = (m_Player.HitsMax / 4) * -1;
                        int stamamount = (m_Player.StamMax / 4) * -1;

                        XmlHits consumption1 = new XmlHits(hitsamount, 1200);
                        XmlStam consumption2 = new XmlStam(stamamount, 1200);
                        consumption1.Name = " [Disease] [Consumption] [1] ";
                        consumption2.Name = " [Disease] [Consumption] [2] ";
                        XmlAttach.AttachTo(m_Player, consumption1);
                        XmlAttach.AttachTo(m_Player, consumption2);

                        if (!m_Player.Mounted)
                            m_Player.Animate(32, 5, 1, true, false, 0);
                        Point3D p = new Point3D(m_Player.Location);
                        switch (m_Player.Direction)
                        {
                            case Direction.North:
                                p.Y--; break;
                            case Direction.South:
                                p.Y++; break;
                            case Direction.East:
                                p.X++; break;
                            case Direction.West:
                                p.X--; break;
                            case Direction.Right:
                                p.X++; p.Y--; break;
                            case Direction.Down:
                                p.X++; p.Y++; break;
                            case Direction.Left:
                                p.X--; p.Y++; break;
                            case Direction.Up:
                                p.X--; p.Y--; break;
                            default:
                                break;
                        }
                        p.Z = m_Player.Map.GetAverageZ(p.X, p.Y);

                        bool canFit = Server.Spells.SpellHelper.AdjustField(ref p, m_Player.Map, 12, false);

                        if (canFit)
                        {
                            Puke puke = new Puke();
                            puke.Name = "blood";
                            puke.Hue = Utility.RandomList(1157, 1609, 2206, 2778, 2795);
                            puke.Map = m_Player.Map;
                            puke.Location = p;
                        }
                        DiseaseMessage(dis);
                        return true;
                    }
                case Disease.AzhuranFever:
                    {
                        List<StatMod> removeMod = new List<StatMod>();
                        foreach (StatMod mod in m_Player.StatMods)
                        {
                            if (mod.Name.Contains("[AzhuranFever]"))
                                removeMod.Add(mod);
                        }

                        for (int i = 0; i < removeMod.Count; i++)
                            if (m_Player.StatMods.Contains(removeMod[i]))
                                m_Player.StatMods.Remove(removeMod[i]);

                        m_Player.Emote("*sweats profusely!*");
                        if(m_Player is PlayerMobile)
                            HallucinationEffect.BeginHallucinating(m_Player as PlayerMobile, 120);
                        XmlHue yellowFever = new XmlHue(1052, 120);

                        int stamamount =(m_Player.StamMax / 3) * -1;
                        int stramount = (m_Player.Str / 4) * -1;
                        XmlStam azhuranStam = new XmlStam(stamamount, 60);
                        XmlStr azhuranStr = new XmlStr(stramount, 60);

                        yellowFever.Name = " [Disease] [AzhuranFever] [1] ";
                        azhuranStam.Name = " [Disease] [AzhuranFever] [2] ";
                        azhuranStr.Name = " [Disease] [AzhuranFever] [3] ";

                        XmlAttach.AttachTo(m_Player, yellowFever);
                        XmlAttach.AttachTo(m_Player, azhuranStam);
                        XmlAttach.AttachTo(m_Player, azhuranStr);
                        DiseaseMessage(dis);
                        return true;
                    }
                case Disease.Bile:
                    {
                        List<StatMod> removeMod = new List<StatMod>();
                        foreach (StatMod mod in m_Player.StatMods)
                        {
                            if (mod.Name.Contains("[Bile]"))
                                removeMod.Add(mod);
                        }

                        for (int i = 0; i < removeMod.Count; i++)
                            if (m_Player.StatMods.Contains(removeMod[i]))
                                m_Player.StatMods.Remove(removeMod[i]);

                        m_Player.Emote("*doubles over in pain, losing control of " + (m_Player.Female ? "her" : "his") + " bodily functions*");
                        m_Player.Hunger -= 20;
                        if (m_Player.Hunger < 0)
                            m_Player.Hunger = 0;
                        m_Player.Thirst -= 20;
                        if (m_Player.Thirst < 0)
                            m_Player.Thirst = 0;
                        XmlHits dysentery = new XmlHits(-20, 3600);
                        dysentery.Name = " [Disease] [Bile] ";
                        XmlAttach.AttachTo(m_Player, dysentery);

                        if (!m_Player.Mounted)
                            m_Player.Animate(32, 5, 1, true, false, 0);
                        Point3D p = new Point3D(m_Player.Location);
                        switch (m_Player.Direction)
                        {
                            case Direction.North:
                                p.Y--; break;
                            case Direction.South:
                                p.Y++; break;
                            case Direction.East:
                                p.X++; break;
                            case Direction.West:
                                p.X--; break;
                            case Direction.Right:
                                p.X++; p.Y--; break;
                            case Direction.Down:
                                p.X++; p.Y++; break;
                            case Direction.Left:
                                p.X--; p.Y++; break;
                            case Direction.Up:
                                p.X--; p.Y--; break;
                            default:
                                break;
                        }
                        p.Z = m_Player.Map.GetAverageZ(p.X, p.Y);

                        bool canFit = Server.Spells.SpellHelper.AdjustField(ref p, m_Player.Map, 12, false);

                        if (canFit)
                        {
                            Puke puke = new Puke();
                            puke.Name = "vomit";
                            puke.Hue = 2964;
                            puke.Map = m_Player.Map;
                            puke.Location = p;

                            if (m_Player.Female)
                                m_Player.PlaySound(0x32D);
                            else
                                m_Player.PlaySound(0x43F);
                        }
                        if (m_Player.Female)
                            m_Player.PlaySound(0x318);
                        else
                            m_Player.PlaySound(0x428);
                        DiseaseMessage(dis);
                        return true;
                    }
                case Disease.Leprosy:
                    {
                        XmlAosAttribute leprosy = new XmlAosAttribute(AosAttribute.RegenHits, -25, 15);
                        leprosy.Name = " [Disease] [Leprosy] ";
                        XmlAttach.AttachTo(m_Player, leprosy);
                        Disfigurement++;
                        DiseaseMessage(dis);
                        return true;
                    }
                case Disease.TyreanDisease:
                    {
                        List<StatMod> removeMod = new List<StatMod>();
                        foreach (StatMod mod in m_Player.StatMods)
                        {
                            if (mod.Name.Contains("[TyreanDisease]"))
                                removeMod.Add(mod);
                        }

                        for (int i = 0; i < removeMod.Count; i++)
                            if (m_Player.StatMods.Contains(removeMod[i]))
                                m_Player.StatMods.Remove(removeMod[i]);

                        XmlAosAttribute tyrean = new XmlAosAttribute(AosAttribute.RegenHits, -50, 15);
                        tyrean.Name = " [Disease] [TyreanDisease] ";
                        XmlAttach.AttachTo(m_Player, tyrean);

                        int amount = (m_Player.Int / 2) * -1;
                        XmlInt madness = new XmlInt(amount, 600);
                        madness.Name = " [Disease] [TyreanDisease] ";
                        XmlAttach.AttachTo(m_Player, madness);

                        Disfigurement++;
                        DiseaseMessage(dis);
                        return true;
                    }
            }

            return false;
        }