Пример #1
0
            public WholenessOfBodyTimer(Mobile from) : base(TimeSpan.FromMilliseconds(200), TimeSpan.FromMilliseconds(200))
            {
                m_From    = from;
                m_OldMana = from.Mana;
                m_Count   = 5;

                MonkFists mf = from.FindItemOnLayer(Layer.Gloves) as MonkFists;

                if (mf != null)
                {
                    m_Count = mf.Teir * 5;
                }

                from.Mana       = 0;
                from.Meditating = true;
                from.BeginAction(typeof(WholenessOfBodyTimer));
            }
Пример #2
0
        // Healing Ki
        // Activate to heal all nearby allies for 1d4 (1 to 4), plus an additional
        // 1d4 (1 to 4) for every two monk levels. (Does not harm undead)
        public static void LightCombo(Mobile from)
        {
            from.SendMessage(2075, "You execute the maneuver: Healing Ki");

            List <Mobile> mobiles = new List <Mobile>();

            foreach (Mobile m in from.GetMobilesInRange(4))
            {
                if (m != null)
                {
                    if (NotorietyHandlers.Mobile_AllowBeneficial(from, m))
                    {
                        mobiles.Add(m);
                    }
                }
            }

            MonkFists mf     = from.FindItemOnLayer(Layer.Gloves) as MonkFists;
            int       amount = 0;

            if (mf != null)
            {
                amount = Utility.Dice(mf.Teir, 3, (3 * mf.Teir));
            }
            else
            {
                amount = Utility.Dice(2, 6, 0);
            }

            for (int i = 0; i < mobiles.Count; i++)
            {
                mobiles[i].FixedParticles(0x3967, 10, 30, 5013, 36, 4, EffectLayer.CenterFeet, 0);
                mobiles[i].Heal(amount, from);
            }

            if (from.Female)
            {
                from.PlaySound(0x339);
            }
            else
            {
                from.PlaySound(0x44B);
            }
        }
Пример #3
0
        // Breath of the Fire Dragon: A cone of searing flame shoots forth,
        // damaging the targets in the area of the flames for 1d6 (1 to 6) damage
        // each monk level. A successful Reflex save reduces the damage by half.
        public static void FireCombo(Mobile from)
        {
            from.SendMessage(2075, "You execute the maneuver: Breath Of The Fire Dragon");

            int            x = from.X, y = from.Y, xoffset = 0, yoffset = 0;
            List <Mobile>  mobiles = new List <Mobile>();
            List <Point3D> points  = new List <Point3D>();

            foreach (Mobile m in from.GetMobilesInRange(4))
            {
                if (m != null)
                {
                    if (SpellHelper.ValidIndirectTarget(from, m))
                    {
                        mobiles.Add(m);
                    }
                }
            }

            switch (from.Direction)
            {
            case (Direction)0x0:
            case (Direction)0x80: yoffset--; break;                                          //North

            case (Direction)0x1:
            case (Direction)0x81: { xoffset++; yoffset--; break; }                                          //Right

            case (Direction)0x2:
            case (Direction)0x82: xoffset++; break;                                          //East

            case (Direction)0x3:
            case (Direction)0x83: { xoffset++; yoffset++; break; }                                          //Down

            case (Direction)0x4:
            case (Direction)0x84: yoffset++; break;                                          //South

            case (Direction)0x5:
            case (Direction)0x85: { xoffset--; yoffset++; break; }                                          //Left

            case (Direction)0x6:
            case (Direction)0x86: xoffset--; break;                                          //West

            case (Direction)0x7:
            case (Direction)0x87: { xoffset--; yoffset--; break; }                                          //Up

            default: { break; }
            }

            for (int i = 0; i < 4; i++)               // goes to the sides
            {
                for (int j = i + 1; j <= 4; j++)      // j goes forward
                {
                    if (j >= i + 1)
                    {
                        Point3D point = new Point3D(0, 0, 0);
                        point.X = (x + j * xoffset - i * yoffset);
                        point.Y = (y + j * yoffset + i * xoffset);
                        point.Z = from.Map.GetAverageZ(point.X, point.Y);
                        points.Add(point);

                        if (i > 0)
                        {
                            point.X = (x + j * xoffset + i * yoffset);
                            point.Y = (y + j * yoffset - i * xoffset);
                            point.Z = from.Map.GetAverageZ(point.X, point.Y);
                            points.Add(point);
                        }
                    }
                }
            }

            MonkFists mf     = from.FindItemOnLayer(Layer.Gloves) as MonkFists;
            int       amount = 0;

            if (mf != null)
            {
                amount = Utility.Dice(mf.Teir, 3, (3 * mf.Teir));
            }
            else
            {
                amount = Utility.Dice(2, 6, 0);
            }

            if (from.FindItemOnLayer(Layer.Waist) is MonksBelt)
            {
                amount *= 2;
            }

            from.Freeze(TimeSpan.FromSeconds(1));
            from.Animate(17, 7, 1, true, false, 0);
            from.PlaySound(0x228);

            for (int i = 0; i < points.Count; i++)
            {
                if (mobiles.Count > 0)
                {
                    for (int j = mobiles.Count - 1; j > -1; j--)
                    {
                        if (mobiles[j].X == points[i].X && mobiles[j].Y == points[i].Y)
                        {
                            AOS.Damage(mobiles[j], from, amount, 0, 100, 0, 0, 0);

                            if (mobiles[j] != null)
                            {
                                mobiles.Remove(mobiles[j]);
                            }
                        }
                    }
                }

                Effects.SendLocationParticles(EffectItem.Create(points[i], from.Map, EffectItem.DefaultDuration), 0x36BD, 1, 20, 0 /*Hue*/, 4, 0, 0);
            }

            mobiles.Clear();
            points.Clear();

            MonkSystem.AddHit(from, MonkElement.FireCombo);

            if (from.HasGump(typeof(MonkStrikeGump)))
            {
                from.CloseGump(typeof(MonkStrikeGump));
            }

            from.SendGump(new MonkStrikeGump(from));
        }
Пример #4
0
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            if (info.ButtonID == 0)
            {
                return;
            }

            MonkFists mf = sender.Mobile.FindItemOnLayer(Layer.Gloves) as MonkFists;

            if (mf == null)
            {
                sender.Mobile.SendMessage("Only monks can use this strike.");
                return;
            }

            if (info.ButtonID == 999)
            {
                new MonkCombos.WholenessOfBodyTimer(sender.Mobile).Start();

                if (sender.Mobile.HasGump(typeof(MonkStrikeGump)))
                {
                    sender.Mobile.CloseGump(typeof(MonkStrikeGump));
                }

                sender.Mobile.SendGump(new MonkStrikeGump(sender.Mobile));

                return;
            }

            switch ((MonkElement)info.ButtonID)
            {
            case MonkElement.None:
            {
                sender.Mobile.Freeze(TimeSpan.FromSeconds(1));
                sender.Mobile.Animate(17, 7, 1, true, false, 0);

                MonkSystem.AddHit(sender.Mobile, (MonkElement)info.ButtonID);

                if (sender.Mobile.HasGump(typeof(MonkStrikeGump)))
                {
                    sender.Mobile.CloseGump(typeof(MonkStrikeGump));
                }

                sender.Mobile.SendGump(new MonkStrikeGump(sender.Mobile));
                break;
            }

            case MonkElement.FireCombo:
            {
                MonkCombos.FireCombo(sender.Mobile);
                break;
            }

            case MonkElement.LightCombo:
            {
                MonkCombos.LightCombo(sender.Mobile);
                goto case MonkElement.None;
            }

            case MonkElement.LightAirCombo:
            {
                MonkCombos.LightAirCombo(sender.Mobile);
                goto case MonkElement.None;
            }

            case MonkElement.LightEarthCombo:
            {
                MonkCombos.LightEarthCombo(sender.Mobile);
                goto case MonkElement.None;
            }

            case MonkElement.LightFireCombo:
            {
                MonkCombos.LightFireCombo(sender.Mobile);
                goto case MonkElement.None;
            }

            case MonkElement.LightWaterCombo:
            {
                MonkCombos.LightWaterCombo(sender.Mobile);
                goto case MonkElement.None;
            }

            case MonkElement.LightVoidCombo:
            {
                // Moment of Clarity: Activate this to grant your allies a +5 Insight bonus to hit and to skill checks for a very short period of time.
                goto case MonkElement.None;
            }

            case MonkElement.LightSpecialOne:
            {
                mf.LightEnergy = mf.DarkEnergy = 0;
                break;
            }

            case MonkElement.LightSpecialTwo:
            {
                mf.LightEnergy = mf.DarkEnergy = 0;
                break;
            }

            case MonkElement.DarkSpecialOne:
            {
                mf.LightEnergy = mf.DarkEnergy = 0;
                break;
            }

            case MonkElement.DarkSpecialTwo:
            {
                mf.LightEnergy = mf.DarkEnergy = 0;
                break;
            }

            default:
            {
                if (Enum.IsDefined(typeof(MonkElement), info.ButtonID))
                {
                    SpecialMove.SetCurrentMove(sender.Mobile, new MonkStrike((MonkElement)info.ButtonID));
                }
                break;
            }
            }
        }
Пример #5
0
        public MonkStrikeGump(Mobile from) : base(150, 600)
        {
            Closable   = true;
            Disposable = true;
            Dragable   = true;
            Resizable  = false;

            AddPage(0);

            AddBackground(0, 0, 325, 110, 9250);

            #region Current
            AddLabel(15, 20, 0, "Monk Combo:");

            if (MonkSystem.ComboChain.ContainsKey(from))
            {
                if (MonkSystem.ComboChain[from].First != MonkElement.None)
                {
                    AddImage(105, 15, 30055, Hues[(int)MonkSystem.ComboChain[from].First]);
                }

                if (MonkSystem.ComboChain[from].Second != MonkElement.None)
                {
                    AddImage(140, 15, 30055, Hues[(int)MonkSystem.ComboChain[from].Second]);
                }

                if (MonkSystem.ComboChain[from].Third != MonkElement.None)
                {
                    AddImage(175, 15, 30055, Hues[(int)MonkSystem.ComboChain[from].Third]);
                }
            }
            #endregion

            #region Moves
            MonkElement litup = MonkElement.None;
            MonkStrike  ms    = SpecialMove.GetCurrentMove(from) as MonkStrike;

            if (ms != null)
            {
                litup = ms.m_Element;
            }

            if (litup == MonkElement.Air)
            {
                AddImage(15, 50, 2269, 33);
            }
            else
            {
                AddButton(15, 50, 2269, 2269, (int)MonkElement.Air, GumpButtonType.Reply, 0);
            }

            if (litup == MonkElement.Earth)
            {
                AddImage(65, 50, 2296, 33);
            }
            else
            {
                AddButton(65, 50, 2296, 2296, (int)MonkElement.Earth, GumpButtonType.Reply, 0);
            }

            if (litup == MonkElement.Fire)
            {
                AddImage(115, 50, 2282, 33);
            }
            else
            {
                AddButton(115, 50, 2282, 2282, (int)MonkElement.Fire, GumpButtonType.Reply, 0);
            }

            if (litup == MonkElement.Water)
            {
                AddImage(165, 50, 2291, 33);
            }
            else
            {
                AddButton(165, 50, 2291, 2291, (int)MonkElement.Water, GumpButtonType.Reply, 0);
            }

            if (litup == MonkElement.Light)
            {
                AddImage(215, 50, 2298, 33);
            }
            else
            {
                AddButton(215, 50, 2298, 2298, (int)MonkElement.Light, GumpButtonType.Reply, 0);
            }

            if (litup == MonkElement.Dark)
            {
                AddImage(265, 50, 2283, 33);
            }
            else
            {
                AddButton(265, 50, 2283, 2283, (int)MonkElement.Dark, GumpButtonType.Reply, 0);
            }

            #endregion

            #region Finisher
            MonkElement finisher = MonkSystem.GetCombo(from);

            if ((int)finisher > 7)
            {
                AddBackground(325, 45, 65, 65, 9250);
                int itemid = 0;

                switch (finisher)
                {
                case MonkElement.AirCombo: itemid = 2289; break;

                case MonkElement.EarthCombo: itemid = 2273; break;

                case MonkElement.FireCombo: itemid = 2267; break;

                case MonkElement.WaterCombo: itemid = 2286; break;

                case MonkElement.LightCombo: itemid = 23012; break;

                case MonkElement.DarkCombo: itemid = 23013; break;

                case MonkElement.LightAirCombo: itemid = 20494; break;

                case MonkElement.LightEarthCombo: itemid = 21008; break;

                case MonkElement.LightFireCombo: itemid = 20736; break;

                case MonkElement.LightWaterCombo: itemid = 21280; break;

                case MonkElement.DarkAirCombo: itemid = 23004; break;

                case MonkElement.DarkFireCombo: itemid = 24011; break;

                case MonkElement.DarkEarthCombo: itemid = 23009; break;

                case MonkElement.DarkWaterCombo: itemid = 24015; break;
                }

                if ((int)litup > 7)
                {
                    AddImage(335, 55, itemid, 33);
                }
                else
                {
                    AddButton(335, 55, itemid, itemid, (int)finisher, GumpButtonType.Reply, 0);
                }
            }
            #endregion

            MonkFists mf = from.FindItemOnLayer(Layer.Gloves) as MonkFists;

            #region Wholeness
            if (mf != null && mf.Teir > 1)
            {
                AddBackground(325, 0, 65, 45, 9250);

                if (from.CanBeginAction(typeof(MonkCombos.WholenessOfBodyTimer)))
                {
                    AddButton(344, 8, 30035, 30035, 999, GumpButtonType.Reply, 0);
                }
                else
                {
                    AddImage(344, 8, 30035, 1000);
                }
            }
            #endregion

            #region Dark/Light Special
            if (mf != null && mf.Teir > 2)
            {
                if (mf.LightEnergy > 95)
                {
                    AddButton(284, 12, 30115, 30102, (int)MonkElement.LightSpecialOne, GumpButtonType.Reply, 0);
                    AddButton(245, 12, 30105, 30105, (int)MonkElement.LightSpecialTwo, GumpButtonType.Reply, 0);
                }
                else if (mf.DarkEnergy > 95)
                {
                    AddButton(284, 12, 30115, 30102, (int)MonkElement.DarkSpecialOne, GumpButtonType.Reply, 0);
                    AddButton(245, 12, 30105, 30105, (int)MonkElement.DarkSpecialTwo, GumpButtonType.Reply, 0);
                }
                else
                {
                    AddImage(215, 15, 9750);
                    AddImage(215, 35, 9750);

                    AddImageTiled(215, 15, (mf.LightEnergy), 7, 9753);
                    AddImageTiled(215, 35, (mf.DarkEnergy), 7, 9751);
                }
            }
            #endregion

            #region Void
            if (mf != null && mf.Teir > 3)
            {
            }
            #endregion
        }
Пример #6
0
        public override void OnHit(Mobile attacker, Mobile defender, int damage)
        {
            if (!MonkSystem.IsMonk(attacker))
            {
                attacker.SendMessage("Only monks can use this strike.");
                return;
            }

            MonkFists mf     = attacker.FindItemOnLayer(Layer.Gloves) as MonkFists;
            int       amount = 0;

            if (mf != null)
            {
                amount = Utility.Dice(mf.Teir, 3, (3 * mf.Teir));
            }
            else
            {
                amount = Utility.Dice(2, 6, 0);
            }

            switch (m_Element)
            {
            case MonkElement.Air:
            {
                defender.FixedParticles(0x374A, 10, 20, 5013, 1176, 0, EffectLayer.Waist);
                AOS.Damage(defender, attacker, amount, 0, 0, 0, 0, 100);
                PlayPunchSound(attacker);
                break;
            }

            case MonkElement.Earth:
            {
                defender.FixedParticles(0x374A, 10, 20, 5013, 1191, 0, EffectLayer.Waist);
                AOS.Damage(defender, attacker, amount, 100, 0, 0, 0, 0);
                PlayPunchSound(attacker);
                break;
            }

            case MonkElement.Fire:
            {
                defender.FixedParticles(0x374A, 10, 20, 5013, 1160, 0, EffectLayer.Waist);
                AOS.Damage(defender, attacker, amount, 0, 100, 0, 0, 0);
                PlayPunchSound(attacker);
                break;
            }

            case MonkElement.Water:
            {
                defender.FixedParticles(0x374A, 10, 20, 5013, 1364, 0, EffectLayer.Waist);
                AOS.Damage(defender, attacker, amount, 0, 0, 0, 100, 0);
                PlayPunchSound(attacker);
                break;
            }

            case MonkElement.Light:
            {
                defender.FixedParticles(0x374A, 10, 20, 5013, 1149, 0, EffectLayer.Waist);
                AOS.Damage(defender, attacker, amount / 2, false, 0, 0, 0, 0, 0, 0, 100 /*direct*/, false, false, false);
                PlayPunchSound(attacker);
                mf.LightEnergy += 5;
                break;
            }

            case MonkElement.Dark:
            {
                defender.FixedParticles(0x374A, 10, 20, 5013, 1108, 0, EffectLayer.Waist);
                AOS.Damage(defender, attacker, amount, false, 0, 0, 0, 0, 0, 100 /*chaos*/, 0, false, false, false);
                PlayPunchSound(attacker);
                mf.DarkEnergy += 5;
                break;
            }

            case MonkElement.AirCombo: { MonkCombos.AirCombo(attacker, defender); break; }

            case MonkElement.EarthCombo: { MonkCombos.EarthCombo(attacker, defender); break; }

            case MonkElement.FireCombo:
            {
                // Handled in MonkStrikeGump
                break;
            }

            case MonkElement.WaterCombo: { MonkCombos.WaterCombo(attacker, defender); break; }

            case MonkElement.DarkCombo: { MonkCombos.DarkCombo(attacker, defender); break; }

            case MonkElement.DarkAirCombo: { MonkCombos.DarkAirCombo(attacker, defender); break; }

            case MonkElement.DarkEarthCombo: { MonkCombos.DarkEarthCombo(attacker, defender); break; }

            case MonkElement.DarkFireCombo:
            {
                MonkCombos.DarkFireCombo(attacker, defender, ref damage);
                break;
            }

            case MonkElement.DarkWaterCombo: { MonkCombos.DarkWaterCombo(attacker, defender); break; }
            }

            if ((int)m_Element < 11)
            {
                attacker.SendMessage("You hit your opponent with an elemental attack.");
            }

            ClearCurrentMove(attacker);

            MonkSystem.AddHit(attacker, m_Element);

            if (attacker.HasGump(typeof(MonkStrikeGump)))
            {
                attacker.CloseGump(typeof(MonkStrikeGump));
            }

            attacker.SendGump(new MonkStrikeGump(attacker));
        }