当前位置: 首页>>代码示例>>C#>>正文


C# Mobile.CurePoison方法代码示例

本文整理汇总了C#中Mobile.CurePoison方法的典型用法代码示例。如果您正苦于以下问题:C# Mobile.CurePoison方法的具体用法?C# Mobile.CurePoison怎么用?C# Mobile.CurePoison使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mobile的用法示例。


在下文中一共展示了Mobile.CurePoison方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Target

		public void Target( Mobile m )
		{
			if( !Caster.CanSee( m ) )
			{
				Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
			}
			if( m_Table.ContainsKey( m ) )
			{
				Caster.SendLocalizedMessage( 501775 ); // This spell is already in effect.
			}
			else if( !Caster.CanBeginAction( typeof( GiftOfRenewalSpell ) ) )
			{
				Caster.SendLocalizedMessage( 501789 ); // You must wait before trying again.
			}
			else if( CheckBSequence( m ) )
			{
				SpellHelper.Turn( Caster, m );

				Caster.FixedEffect( 0x374A, 10, 20 );
				Caster.PlaySound( 0x5C9 );

				if( m.Poisoned )
				{
					m.CurePoison( m );
				}
				else
				{
					double skill = Caster.Skills[SkillName.Spellweaving].Value;

					int hitsPerRound = 5 + (int)(skill / 24) + FocusLevel;
					TimeSpan duration = TimeSpan.FromSeconds( 30 + (FocusLevel * 10) );
					
					#region Mondain's Legacy
					ArcaneEmpowermentSpell.AddHealBonus( Caster, ref hitsPerRound );
					#endregion

					GiftOfRenewalInfo info = new GiftOfRenewalInfo( Caster, m, hitsPerRound );

					Timer.DelayCall( duration,
						delegate
						{
							if( StopEffect( m ) )
							{
								m.PlaySound( 0x455 );
								m.SendLocalizedMessage( 1075071 ); // The Gift of Renewal has faded.
							}
						} );



					m_Table[m] = info;

					Caster.BeginAction( typeof( GiftOfRenewalSpell ) );

					BuffInfo.AddBuff( m, new BuffInfo( BuffIcon.GiftOfRenewal, 1031602, 1075797, duration, m, hitsPerRound.ToString() ) );
				}
			}

			FinishSequence();
		}
开发者ID:ITLongwell,项目名称:mondains-legacy,代码行数:60,代码来源:GiftOfRenewal.cs

示例2: Target

        public void Target( Mobile m )
        {
            if ( !Caster.CanSee( m ) )
            {
                Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
            }
            else if ( CheckBSequence( m ) )
            {
                SpellHelper.Turn( Caster, m );

                if ( m.Poison != null )
                {
                    int chanceToCure = (int)( 10000 + ( Caster.Skills[SkillName.Magery].Value*75 - (m.Poison.Level + 1)*1750 ) ) / 100;
                    if ( chanceToCure > Utility.Random( 100 ) && m.CurePoison( Caster ) )
                    {
                        if ( Caster != m )
                            Caster.SendLocalizedMessage( 1010058 ); // You have cured the target of all poisons!

                        m.SendLocalizedMessage( 1010059 ); // You have been cured of all poisons.
                    }
                    else
                    {
                        Caster.SendAsciiMessage( "You failed to cure {0}!", m.Name );
                    }
                }

                m.FixedParticles( 0x373A, 10, 15, 5012, EffectLayer.Waist );
                m.PlaySound( 0x1E0 );
            }

            FinishSequence();
        }
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:32,代码来源:Cure.cs

示例3: DoCure

		public void DoCure( Mobile from )
		{
			bool cure = false;

			CureLevelInfo[] info = LevelInfo;

			for ( int i = 0; i < info.Length; ++i )
			{
				CureLevelInfo li = info[i];

				if ( li.Poison == from.Poison && Scale( from, li.Chance ) > Utility.RandomDouble() )
				{
					cure = true;
					break;
				}
			}

			if ( cure && from.CurePoison( from ) )
			{
				from.SendLocalizedMessage( 500231 ); // You feel cured of poison!

				from.FixedEffect( 0x373A, 10, 15 );
				from.PlaySound( 0x1E0 );
			}
			else if ( !cure )
			{
				from.SendLocalizedMessage( 500232 ); // That potion was not strong enough to cure your ailment!
			}
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:29,代码来源:BaseCurePotion.cs

示例4: DoCure

		public void DoCure( Mobile from )
		{
			bool cure = false;

			CureLevelInfo[] info = LevelInfo;

			for ( int i = 0; i < info.Length; ++i )
			{
				CureLevelInfo li = info[i];

				if ( li.Poison == from.Poison && Scale( from, li.Chance ) > Utility.RandomDouble() )
				{
					cure = true;
					break;
				}
			}

			if ( cure && from.CurePoison( from ) )
			{
				from.SendLocalizedMessage( 500231 ); // You feel cured of poison!

                from.FixedParticles(0x373A, 10, 15, 5012, EffectLayer.Waist);
				from.PlaySound( 0x1E0 );
			}
			else if ( !cure && from.Poisoned ) //Loki edit: It shouldn't say this if you're not actually poisoned (added second condition)
			{
				from.SendLocalizedMessage( 500232 ); // That potion was not strong enough to cure your ailment!
			}
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:29,代码来源:BaseCurePotion.cs

示例5: Target

		public void Target(Mobile m)
		{
			if (!Caster.CanSee(m))
			{
				Caster.SendLocalizedMessage(500237); // Target can not be seen.
			}
			else if (CheckBSequence(m))
			{
				SpellHelper.Turn(Caster, m);

				Poison p = m.Poison;

				if (p != null)
				{
					int chanceToCure = 10000 + (int)(Caster.Skills[SkillName.Magery].Value * 75) -
									   ((p.Level + 1) * (Caster.EraAOS ? (p.Level < 4 ? 3300 : 3100) : 1750));
					chanceToCure /= 100;
					/*if( p.Level == 3 ) //DP tweak
					{
						chanceToCure -= 40; //@GM Magery, chance will be 65%
					}
					if( p.Level > 3 ) //lethal poison further penalty
					{
						chanceToCure -= 50; //@GM Magery, chance will be 55%
					}

					if( Caster.AccessLevel > AccessLevel.Player )
					{
						Caster.SendMessage("Chance to cure is " + chanceToCure + "%");
					}*/

					if (chanceToCure > Utility.Random(100))
					{
						if (m.CurePoison(Caster))
						{
							if (Caster != m)
							{
								Caster.SendLocalizedMessage(1010058); // You have cured the target of all poisons!
							}

							m.SendLocalizedMessage(1010059); // You have been cured of all poisons.
						}
					}
					else
					{
						m.SendLocalizedMessage(1010060); // You have failed to cure your target!
					}
				}

				m.FixedParticles(0x373A, 10, 15, 5012, EffectLayer.Waist);
				m.PlaySound(0x1E0);
			}

			FinishSequence();
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:55,代码来源:Cure.cs

示例6: Target

        public void Target( Mobile m )
        {
            if ( !m.Poisoned )
            {
            }
            else if ( CheckBSequence( m ) )
            {
                SpellHelper.Turn( Caster, m );

                /* Cures the target of poisons, but causes the caster to be burned by fire damage for 13-55 hit points.
                 * The amount of fire damage is lessened if the caster has high Karma.
                 */

                Poison p = m.Poison;

                if ( p != null )
                {
                    // Cleanse by fire is now difficulty based
                    int chanceToCure = 10000 + (int)(Caster.Skills[SkillName.Chivalry].Value * 75) - ((p.Level + 1) * 2000);
                    chanceToCure /= 100;

                    if ( chanceToCure > Utility.Random( 100 ) )
                    {
                        if ( m.CurePoison( Caster ) )
                        {
                        }
                    }
                    else
                    {
                    }
                }

                m.PlaySound( 0x1E0 );
                m.FixedParticles( 0x373A, 1, 15, 5012, 3, 2, EffectLayer.Waist );

                IEntity from = new Entity( Serial.Zero, new Point3D( m.X, m.Y, m.Z - 5 ), m.Map );
                IEntity to = new Entity( Serial.Zero, new Point3D( m.X, m.Y, m.Z + 45 ), m.Map );
                Effects.SendMovingParticles( from, to, 0x374B, 1, 0, false, false, 63, 2, 9501, 1, 0, EffectLayer.Head, 0x100 );

                Caster.PlaySound( 0x208 );
                Caster.FixedParticles( 0x3709, 1, 30, 9934, 0, 7, EffectLayer.Waist );

                int damage = 50 - ComputePowerValue( 4 );

                // TODO: Should caps be applied?
                if ( damage < 13 )
                    damage = 13;
                else if ( damage > 55 )
                    damage = 55;

                AOS.Damage( Caster, Caster, damage, 0, 100, 0, 0, 0, true );
            }

            FinishSequence();
        }
开发者ID:cynricthehun,项目名称:UOLegends,代码行数:55,代码来源:CleanseByFire.cs

示例7: Target

		public void Target( Mobile m )
		{
			if ( !m.Poisoned )
			{
				Caster.SendLocalizedMessage( 1060176 ); // That creature is not poisoned!
			}
			else if ( CheckBSequence( m ) )
			{
				SpellHelper.Turn( Caster, m );

				/* Cures the target of poisons, but causes the caster to be burned by fire damage for 13-55 hit points.
				 * The amount of fire damage is lessened if the caster has high Karma.
				 */

				if ( m.CurePoison( Caster ) )
				{
					if ( Caster != m )
						Caster.SendLocalizedMessage( 1010058 ); // You have cured the target of all poisons!

					m.SendLocalizedMessage( 1010059 ); // You have been cured of all poisons.
				}

				m.PlaySound( 0x1E0 );
				m.FixedParticles( 0x373A, 1, 15, 5012, 3, 2, EffectLayer.Waist );

				IEntity from = new Entity( Serial.Zero, new Point3D( m.X, m.Y, m.Z - 5 ), m.Map );
				IEntity to = new Entity( Serial.Zero, new Point3D( m.X, m.Y, m.Z + 45 ), m.Map );
				Effects.SendMovingParticles( from, to, 0x374B, 1, 0, false, false, 63, 2, 9501, 1, 0, EffectLayer.Head, 0x100 );

				Caster.PlaySound( 0x208 );
				Caster.FixedParticles( 0x3709, 1, 30, 9934, 0, 7, EffectLayer.Waist );

				int damage = 50 - ComputePowerValue( 4 );

				// TODO: Should caps be applied?
				if ( damage < 13 )
					damage = 13;
				else if ( damage > 55 )
					damage = 55;

				AOS.Damage( Caster, Caster, damage, 0, 100, 0, 0, 0, true );
			}

			FinishSequence();
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:45,代码来源:CleanseByFire.cs

示例8: Target

		public void Target( Mobile m )
		{
			if ( !Caster.CanSee( m ) )
			{
				Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
			}
			else if ( CheckBSequence( m ) )
			{
				SpellHelper.Turn( Caster, m );

				Poison p = m.Poison;

				if ( p != null )
				{
					#region Mondain's Legacy mod
					int chanceToCure = 10000 + (int)(Caster.Skills[SkillName.Magery].Value * 75) - ((p.RealLevel + 1) * (Core.AOS ? (p.RealLevel < 4 ? 3300 : 3100) : 1750));
					#endregion

					chanceToCure /= 100;

					if ( chanceToCure > Utility.Random( 100 ) )
					{
						if ( m.CurePoison( Caster ) )
						{
							if ( Caster != m )
								Caster.SendLocalizedMessage( 1010058 ); // You have cured the target of all poisons!

							m.SendLocalizedMessage( 1010059 ); // You have been cured of all poisons.
						}
					}
					else
					{
						m.SendLocalizedMessage( 1010060 ); // You have failed to cure your target!
					}
				}

				m.FixedParticles( 0x373A, 10, 15, 5012, EffectLayer.Waist );
				m.PlaySound( 0x1E0 );
			}

			FinishSequence();
		}
开发者ID:ITLongwell,项目名称:mondains-legacy,代码行数:42,代码来源:Cure.cs

示例9: Target

        public void Target( Mobile m )
        {
            if ( !Caster.CanSee( m ) )
            {
                Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
            }
            else if ( CheckBSequence( m ) )
            {
                SpellHelper.Turn( Caster, m );

                Poison p = m.Poison;

                if ( p != null )
                {

                    // Original UODemo formula: int chanceToCure = (int)( 10000 + ( Caster.Skills[SkillName.Magery].Value*75 - (m.Poison.Level + 1)*1750 ) ) / 100;

                    //Modified to be tougher:
                    int chanceToCure = (int)( 10000 + ( Caster.Skills[CastSkill].Value*75 - (m.Poison.Level + 1)*2500 ) ) / 100;

                    if ( chanceToCure > Utility.Random( 100 ) )
                    {
                        if ( m.CurePoison( Caster ) )
                        {
                            if ( Caster != m )
                                Caster.SendLocalizedMessage( 1010058 ); // You have cured the target of all poisons!

                            m.SendLocalizedMessage( 1010059 ); // You have been cured of all poisons.
                        }
                    }
                    else
                    {
                        m.SendLocalizedMessage( 1010060 ); // You have failed to cure your target!
                    }
                }

                m.FixedParticles( 0x373A, 10, 15, 5012, EffectLayer.Waist );
                m.PlaySound( 0x1E0 );
            }

            FinishSequence();
        }
开发者ID:greeduomacro,项目名称:divinity,代码行数:42,代码来源:Cure.cs

示例10: OnDoubleClickDead

        public override void OnDoubleClickDead(Mobile from)
        {
            if (!from.Alive && from is PlayerMobile)
            {
                ((PlayerMobile)from).ForceResurrect();
                CommandLogging.WriteLine(from, "Refreshing and resurrecting " + from.Name);
            }
            else if (!from.Alive)
            {
                from.Resurrect();
                CommandLogging.WriteLine(from, "Refreshing and resurrecting " + from.Name);
            }

            CommandLogging.WriteLine(from, "Refreshing but not resurrecting " + from.Name);

            from.PublicOverheadMessage(MessageType.Regular, from.SpeechHue, true, "I've been refreshed.");

            from.Hits = from.HitsMax;
            from.Stam = from.StamMax;
            from.Mana = from.ManaMax;
            from.CurePoison(from);
        }
开发者ID:rberiot,项目名称:imaginenation,代码行数:22,代码来源:RefreshStone.cs

示例11: Target

        public void Target( Mobile m )
        {
            if ( !Caster.CanSee( m ) )
            {
                Caster.SendAsciiMessage( "Target can not be seen." ); // Target can not be seen.
            }
            else if ( CheckBSequence( m ) )
            {
                SpellHelper.Turn( Caster, m );

                Poison p = m.Poison;

                if ( p != null )
                {
                    int chanceToCure = 10000 + (int)(Caster.Skills[SkillName.Magery].Value * 75) - ((p.Level + 1) * (Core.AOS ? (p.Level < 4 ? 3300 : 3100) : 1750));
                    chanceToCure /= 100;

                    if (((10000 + ((Caster.Skills[SkillName.Magery].Value * 75) - (p.Level+1 * 1750))) / 100) > Utility.Random(1, 100)) //if ( chanceToCure > Utility.Random( 100 ) )
                    {
                        if ( m.CurePoison( Caster ) )
                        {
                            if ( Caster != m )
                                Caster.SendAsciiMessage( String.Format("You have cured {0} of all poisons!", m.Name) ); // You have cured the target of all poisons!

                            m.SendAsciiMessage(String.Format("{0} has cured you of all poisons!",Caster.Name)); // You have been cured of all poisons.
                        }
                    }
                    else
                    {
                        m.SendAsciiMessage( String.Format("You have failed to cure {0}!",m.Name )); // You have failed to cure your target!
                    }
                }

                m.FixedParticles( 0x373A, 10, 15, 5012, EffectLayer.Waist );
                m.PlaySound( 0x1E0 );
            }

            FinishSequence();
        }
开发者ID:Godkong,项目名称:Origins,代码行数:39,代码来源:Cure.cs

示例12: Target

		public void Target( Mobile m )
		{
			if ( !Caster.CanSee( m ) )
			{
				Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
			}
			else if ( CheckBSequence( m ) )
			{
				SpellHelper.Turn( Caster, m );

				if ( CanCureTinkerTrapPoison(m) && m.CurePoison( Caster ))
				{
					if ( Caster != m )
						Caster.SendLocalizedMessage( 1010058 ); // You have cured the target of all poisons!

					m.SendLocalizedMessage( 1010059 ); // You have been cured of all poisons.
				}

				m.FixedParticles( 0x373A, 10, 15, 5012, EffectLayer.Waist );
				m.PlaySound( 0x1E0 );
			}

			FinishSequence();
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:24,代码来源:Cure.cs

示例13: Target

        public void Target( Mobile m )
        {
            if ( !Caster.CanSee( m ) )
            {
                Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
            }
            else if ( CheckBSequence( m, false ) )
            {
                SpellHelper.Turn( Caster, m );

                m.PlaySound( 0xF6 );
                m.PlaySound( 0x1F7 );
                m.FixedParticles( 0x3709, 1, 30, 9963, 13, 3, EffectLayer.Head );

                IEntity from = new Entity( Serial.Zero, new Point3D( m.X, m.Y, m.Z - 10 ), Caster.Map );
                IEntity to = new Entity( Serial.Zero, new Point3D( m.X, m.Y, m.Z + 50 ), Caster.Map );
                Effects.SendMovingParticles( from, to, 0x2255, 1, 0, false, false, 13, 3, 9501, 1, 0, EffectLayer.Head, 0x100 );

                StatMod mod;

                mod = m.GetStatMod( "[Magic] Str Offset" );
                if ( mod != null && mod.Offset < 0 )
                    m.RemoveStatMod( "[Magic] Str Offset" );

                mod = m.GetStatMod( "[Magic] Dex Offset" );
                if ( mod != null && mod.Offset < 0 )
                    m.RemoveStatMod( "[Magic] Dex Offset" );

                mod = m.GetStatMod( "[Magic] Int Offset" );
                if ( mod != null && mod.Offset < 0 )
                    m.RemoveStatMod( "[Magic] Int Offset" );

                m.Paralyzed = false;
                m.CurePoison( Caster );

                EvilOmenSpell.CheckEffect( m );
                StrangleSpell.RemoveCurse( m );
                CorpseSkinSpell.RemoveCurse( m );
            }

            FinishSequence();
        }
开发者ID:evildude807,项目名称:kaltar,代码行数:42,代码来源:PurgeSpell.cs

示例14: FixMobile

		private void FixMobile(Mobile m)
		{
			if (!m.Alive)
				m.Resurrect();

			HandleCorpse(m);

			m.Aggressed.Clear();
			m.Aggressors.Clear();
			m.Hits = m.HitsMax;
			m.Stam = m.StamMax;
			m.Mana = m.ManaMax;
			m.DamageEntries.Clear();
			m.Combatant = null;
			m.InvalidateProperties();

            m.Criminal = false;

			StatMod mod;

			mod = m.GetStatMod("[Magic] Str Offset");
			if (mod != null && mod.Offset < 0)
				m.RemoveStatMod("[Magic] Str Offset");

			mod = m.GetStatMod("[Magic] Dex Offset");
			if (mod != null && mod.Offset < 0)
				m.RemoveStatMod("[Magic] Dex Offset");

			mod = m.GetStatMod("[Magic] Int Offset");
			if (mod != null && mod.Offset < 0)
				m.RemoveStatMod("[Magic] Int Offset");

			m.Paralyzed = false;
			m.CurePoison(m);

			// EvilOmenSpell.CheckEffect(m);
			StrangleSpell.RemoveCurse(m);
			CorpseSkinSpell.RemoveCurse(m);

			#region Buff Icons
			if (m is PlayerMobile)
			{
				PlayerMobile pm = (PlayerMobile)m;
				pm.RemoveBuff(BuffIcon.Clumsy);
				pm.RemoveBuff(BuffIcon.CorpseSkin);
				pm.RemoveBuff(BuffIcon.EvilOmen);
				pm.RemoveBuff(BuffIcon.Curse);
				pm.RemoveBuff(BuffIcon.FeebleMind);
				pm.RemoveBuff(BuffIcon.MassCurse);
				pm.RemoveBuff(BuffIcon.Paralyze);
				pm.RemoveBuff(BuffIcon.Poison);
				pm.RemoveBuff(BuffIcon.Strangle);
				pm.RemoveBuff(BuffIcon.Weaken);
			}
			#endregion

			m.SendMessage("The duel has ended.");
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:58,代码来源:Duel.cs

示例15: TryCure

        public static void TryCure( Mobile m )
        {
            Poison p = m.Poison;

            Mobile caster = m_Table3[m] as Mobile;

            if ( p != null && caster != null )
            {
                int chanceToCure = 10000 + (int) ( caster.Skills[SkillName.Spellweaving].Value * 75 ) - ( ( p.Level + 1 ) * 3000 );

                chanceToCure += GetFocusLevel( caster ) * 1000;

                if ( chanceToCure > 10000 )
                    chanceToCure = 10000;

                chanceToCure /= 100;

                if ( chanceToCure > Utility.Random( 100 ) )
                {
                    if ( m.CurePoison( caster ) )
                        m.SendLocalizedMessage( 1010059 ); // You have been cured of all poisons.
                }
            }

            m.FixedParticles( 0x373A, 10, 15, 5012, EffectLayer.Waist );
            m.PlaySound( 0x1E0 );

            GiftOfRenewalTimer.ToDelete.Add( m );
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:29,代码来源:GiftOfRenewal.cs


注:本文中的Mobile.CurePoison方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。