コード例 #1
0
ファイル: BasePiege.cs プロジェクト: bsenyuva/terranubia3
 private bool checkReflexe(Mobile m)
 {
     if (m is NubiaMobile)
     {
         NubiaMobile mob  = m as NubiaMobile;
         int         roll = DndHelper.rollDe(De.vingt);
         roll += mob.getBonusReflexe(SortEnergie.Piege);
         if (m is NubiaPlayer)
         {
             if (((NubiaPlayer)mob).hasDon(DonEnum.SensPieges))
             {
                 roll += ((NubiaPlayer)mob).getDonNiveau(DonEnum.SensPieges);
             }
         }
         if (roll >= mDD)
         {
             m.Emote("*Evite le piège*");
             return(true);
         }
         else
         {
             return(false);
         }
     }
     else
     {
         return(false);
     }
 }
コード例 #2
0
ファイル: GumpBlessure.cs プロジェクト: bsenyuva/terranubia3
            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));
                        }
                    }
                }
            }
コード例 #3
0
ファイル: BasePiege.cs プロジェクト: bsenyuva/terranubia3
        protected virtual void OnDeclenchement(NubiaMobile m)
        {
            int degats = DndHelper.rollDe(mDegat, mNbrLancer);

            foreach (NubiaMobile mob in this.GetMobilesInRange(mRange))
            {
                if (DndHelper.rollDe(De.vingt) + m.getBonusReflexe(SortEnergie.Piege) < mDD)
                {
                    mob.ActionRevelation();
                    mob.FixedParticles(mEffectID, 7, 5, 0, EffectLayer.Head);
                    mob.Damage(degats);
                    if (mPoisonning && DndHelper.rollDe(De.vingt) + m.getBonusVigueur(SortEnergie.Piege) < mDD)
                    {
                        mob.Poison = mPoison;
                    }
                }
                else
                {
                    mob.Emote("*évite le piège*");
                }
            }
        }
コード例 #4
0
        public int intRoll(bool silent)
        {
            if (mOwner.NextSkillTime > DateTime.Now)
            {
                if (!silent)
                {
                    mOwner.SendMessage("vous devez attendre pour utiliser une compétence");
                }
                return(1);
            }
            int roll = DndHelper.rollDe(De.vingt);

            //Bonus Malus
            roll += mOwner.getBonusRoll();
            //Maitrise de la comp
            roll += (int)getMaitrise();

            if (mOwner is NubiaPlayer)
            {
                ((NubiaPlayer)mOwner).GiveXP(roll);
            }

            return(roll);
        }