Esempio n. 1
0
            protected override void OnTick()
            {
                if (mOwner != null && mViewer != null && mBlessure != null)
                {
                    if (mViewer.Competences[CompType.Chirurgie].roll(mBlessure.DD + malus))
                    {
                        int val = DndHelper.rollDe(De.vingt) + (int)DndHelper.GetCaracMod(mViewer, DndStat.Sagesse)
                                  + (int)(DndHelper.GetCaracMod(mViewer, DndStat.Intelligence) / 2)
                                  + (int)(DndHelper.GetCaracMod(mViewer, DndStat.Dexterite) / 2);
                        mBlessure.SoinStatut += val;
                        mViewer.SendMessage("Vous soignez {0} avez succès", mOwner.Name);
                        if (mOwner != mViewer)
                        {
                            mViewer.SendMessage("{0} vous soigne avez succès", mOwner.Name);
                        }

                        mViewer.GiveXP(50);
                    }
                    else
                    {
                        if (Utility.Random(20) + (int)DndHelper.GetCaracMod(mOwner, DndStat.Constitution) < mBlessure.DD)
                        {
                            int degat = DndHelper.rollDe(De.quatre) + (int)mBlessure.BGravite;
                            if (mBlessure.SoinStatut > 5)
                            {
                                mBlessure.SoinStatut -= 5;
                            }
                            mOwner.SendMessage("Les soins vous font affreusement souffrir!");

                            mOwner.Damage(degat, mViewer);

                            if (mViewer.Backpack != null && Utility.Random(50) == 1)
                            {
                                MedecineKit kit = (MedecineKit)mViewer.Backpack.FindItemByType(typeof(MedecineKit));
                                if (kit != null)
                                {
                                    mViewer.SendMessage("Vous cassez vous outils");
                                    kit.Delete();
                                }
                            }
                        }
                        else
                        {
                            mOwner.SendMessage("Les soins sont raté, mais vous encaissez la douleur");
                        }

                        if (mOwner != mViewer)
                        {
                            mViewer.SendMessage("Vous ratez vos soins");
                        }
                        mViewer.GiveXP(25);

                        if (mOwner.BlessureList.Count > 0)
                        {
                            mViewer.SendGump(new GumpBlessure(mOwner, mViewer));
                        }
                    }
                }
            }
Esempio n. 2
0
        public static void acrobatie_OnCommand(CommandEventArgs e)
        {
            NubiaPlayer p = e.Mobile as NubiaPlayer;

            if (p.Competences.mustWait())
            {
                return;
            }

            if (p.InCombat)
            {
                p.SendMessage("Vous ne pouvez pas faire d'acrobatie pour l'instant");
                return;
            }

            bool can = p.Competences[CompType.Acrobaties].roll(15);

            if (can)
            {
                p.Emote("*execute une acrobatie*");
                foreach (Mobile m in p.GetMobilesInRange(8))
                {
                    if (m is NubiaPlayer)
                    {
                        NubiaPlayer player = m as NubiaPlayer;
                        if (player.CanSee(p))
                        {
                            player.changeMoral(Utility.Random(1, 8));
                        }
                    }
                }
            }
            else
            {
                p.Emote("*rate son acrobatie*");
                p.Damage(Utility.Random(1, 4));
            }
        }
Esempio n. 3
0
            protected override void OnTarget(Mobile f, object o)
            {
                if (o is Item)
                {
                    m_Owner.SendMessage("Visez le sol");
                    return;
                }
                if (!(o is IPoint3D))
                {
                    return;
                }

                IPoint3D p = o as IPoint3D;



                if (p != null)
                {
                    SpellHelper.GetSurfaceTop(ref p);


                    if (!m_Owner.CanSee(p))
                    {
                        m_Owner.SendMessage("Vous ne voyez pas votre point de chute");
                        return;
                    }
                    if (Factions.Sigil.ExistsOn(m_Owner))
                    {
                        m_Owner.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil.
                    }
                    else if (Server.Misc.WeightOverloading.IsOverloaded(m_Owner))
                    {
                        m_Owner.SendLocalizedMessage(502359, "", 0x22); // Thou art too encumbered to move.
                    }
                    else if (!SpellHelper.CheckTravel(m_Owner, TravelCheckType.TeleportFrom))
                    {
                    }
                    else if (!SpellHelper.CheckTravel(m_Owner, m_Owner.Map, new Point3D(p), TravelCheckType.TeleportTo))
                    {
                    }
                    else if (m_Owner.Map == null || !m_Owner.Map.CanSpawnMobile(p.X, p.Y, p.Z))
                    {
                        m_Owner.SendLocalizedMessage(501942); // That location is blocked.
                    }
                    else if (SpellHelper.CheckMulti(new Point3D(p), m_Owner.Map))
                    {
                        m_Owner.SendLocalizedMessage(501942); // That location is blocked.
                    }

                    int hauteur = p.Z - m_Owner.Z;
                    if (hauteur < 0)
                    {
                        hauteur = 0;
                    }
                    hauteur /= 5;
                    int distance = (int)m_Owner.GetDistanceToSqrt(p);
                    int diff     = (10 + distance) + (hauteur);
                    if (m_Owner.Stam < diff)
                    {
                        m_Owner.SendMessage("Trop loin, trop dur");
                        return;
                    }

                    Point3D from = m_Owner.Location;
                    Point3D to   = new Point3D(p);
                    m_Owner.Stam -= diff;

                    if (m_Owner.Competences[CompType.Saut].roll(diff))
                    {
                        m_Owner.Emote("*Saute*");

                        m_Owner.Stam    += diff / 2;
                        m_Owner.Location = to;
                        //m_Owner.ProcessDelta();
                    }
                    else
                    {
                        m_Owner.Emote("*Essaie de sauter*");
                        m_Owner.Damage(6, null);
                        m_Owner.SendMessage("Vous n'y arrivez pas");
                    }

                    /* if (m_Owner.Player && m_Owner.Hidden == false)
                     * {
                     *   Effects.SendLocationParticles(EffectItem.Create(from, m_Owner.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 2023);
                     *   Effects.SendLocationParticles(EffectItem.Create(to, m_Owner.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 5023);
                     * }
                     * else
                     * {
                     *   m_Owner.FixedParticles( 0x376A, 9, 32, 0x13AF, EffectLayer.Waist );
                     * }*/
                }
            }