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


C# Mobile.Heal方法代码示例

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


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

示例1: DoHeal

		public void DoHeal( Mobile from )
		{
			int min = Scale( from, MinHeal );
			int max = Scale( from, MaxHeal );

			from.Heal( Utility.RandomMinMax( min, max ) );
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:7,代码来源:BaseHealPotion.cs

示例2: DoBleed

        public static void DoBleed(Mobile m, Mobile from, int level, bool blooddrinker)
        {
            if (m.Alive)
            {
                int damage = Utility.RandomMinMax(level, level * 2);

                if (!m.Player)
                    damage *= 2;

                m.PlaySound(0x133);
                AOS.Damage(m, from, damage, false, 0, 0, 0, 0, 0, 0, 100, false, false, false);

                if (blooddrinker && from.Hits < from.HitsMax)
                {
                    from.SendLocalizedMessage(1113606); //The blood drinker effect heals you.
                    from.Heal(damage);
                }

                Blood blood = new Blood();

                blood.ItemID = Utility.Random(0x122A, 5);

                blood.MoveToWorld(m.Location, m.Map);
            }
            else
            {
                EndBleed(m, false);
            }
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:29,代码来源:BleedAttack.cs

示例3: OnDoubleClick

        public override void OnDoubleClick(Mobile from)
        {
            if (!from.InRange(this.GetWorldLocation(), 1))
            {
                from.SendLocalizedMessage(502138); // That is too far away for you to use
                return;
            }
            else if (from != this.m_Caster)
            {
                // from.SendLocalizedMessage( ); // 
                return;
            }

            BaseWeapon weapon = from.FindItemOnLayer(Layer.OneHanded) as BaseWeapon;

            if (weapon == null)
                weapon = from.FindItemOnLayer(Layer.TwoHanded) as BaseWeapon;

            if (weapon != null)
            {
                from.SendLocalizedMessage(1080116); // You must have a free hand to use a Healing Stone.
            }
            else if (from.BeginAction(typeof(BaseHealPotion)))
            {
                from.Heal(Utility.RandomMinMax(BasePotion.Scale(from, 13), BasePotion.Scale(from, 16)));
                this.Consume();
                Timer.DelayCall(TimeSpan.FromSeconds(8.0), new TimerStateCallback(ReleaseHealLock), from);
            }
            else
                from.SendLocalizedMessage(1095172); // You must wait a few seconds before using another Healing Stone.
        }
开发者ID:m309,项目名称:ForkUO,代码行数:31,代码来源:HealingStone.cs

示例4: DoHeal

		public void DoHeal( Mobile from )
		{
			int min = MinHeal;
			int max = MaxHeal;

			from.Heal( Utility.RandomMinMax( min, max ) );
		}
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:7,代码来源:BaseHealPotion.cs

示例5: Exited

        public void Exited(Mobile m)
        {
			if (m.Alive)
			{
				//m.Hits = MaxHits;
				m.Heal(100);
				m.FixedParticles(0x376A, 9, 32, 5005, EffectLayer.Waist);
				m.PlaySound(0x1F2);
            }
            //Al: Fix for getting out of the Arena flagged.
            PlayerMobile pm = m as PlayerMobile;
            if (pm != null) pm.ClearAggression();
			if (MyRegion != null && MyRegion.Players.Count == 0 && m_InUse)
            {
                Clean();
            }
        }
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:17,代码来源:ArenaControl.cs

示例6: 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( 0x202 );
                m.FixedParticles( 0x376A, 1, 62, 0x480, 3, 3, EffectLayer.Waist );
                m.FixedParticles( 0x3779, 1, 46, 0x481, 5, 3, EffectLayer.Waist );

                double toHeal = Caster.Skills[SkillName.SpiritSpeak].Value / 2.0 + Utility.Random( 5 );

                toHeal *= ClericDivineFocusSpell.GetScalar( Caster );

                m.Heal( (int)toHeal );
            }

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

示例7: Heal

 public static void Heal(int amount, Mobile target, Mobile from, bool message)
 {
     //TODO: All Healing *spells* go through ArcaneEmpowerment
     target.Heal(amount, from, message);
 }
开发者ID:jasegiffin,项目名称:JustUO,代码行数:5,代码来源:SpellHelper.cs

示例8: Heal

		public virtual void Heal( Mobile patient )
		{
			if ( !Alive || this.Map == Map.Internal || !CanBeBeneficial( patient, true, true ) || patient.Map != this.Map || !InRange( patient, HealEndRange ) )
			{
				StopHeal();
				return;
			}

			bool onSelf = ( patient == this );

			if ( !patient.Alive )
			{
			}
			else if ( patient.Poisoned )
			{
				int poisonLevel = patient.Poison.Level;

				double healing = Skills.Healing.Value;
				double anatomy = Skills.Anatomy.Value;
				double chance = ( healing - 30.0 ) / 50.0 - poisonLevel * 0.1;

				if ( ( healing >= 60.0 && anatomy >= 60.0 ) && chance > Utility.RandomDouble() )
				{
					if ( patient.CurePoison( this ) )
					{
						patient.SendLocalizedMessage( 1010059 ); // You have been cured of all poisons.

						CheckSkill( SkillName.Healing, 0.0, 60.0 + poisonLevel * 10.0 ); // TODO: Verify formula
						CheckSkill( SkillName.Anatomy, 0.0, 100.0 );
					}
				}
			}
			else if ( BleedAttack.IsBleeding( patient ) )
			{
				patient.SendLocalizedMessage( 1060167 ); // The bleeding wounds have healed, you are no longer bleeding!
				BleedAttack.EndBleed( patient, false );
			}
			else
			{
				double healing = Skills.Healing.Value;
				double anatomy = Skills.Anatomy.Value;
				double chance = ( healing + 10.0 ) / 100.0;

				if ( chance > Utility.RandomDouble() )
				{
					double min, max;

					min = ( anatomy / 10.0 ) + ( healing / 6.0 ) + 4.0;
					max = ( anatomy / 8.0 ) + ( healing / 3.0 ) + 4.0;

					if ( onSelf )
						max += 10;

					double toHeal = min + ( Utility.RandomDouble() * ( max - min ) );

					toHeal *= HealScalar;

					patient.Heal( (int)toHeal );

					CheckSkill( SkillName.Healing, 0.0, 90.0 );
					CheckSkill( SkillName.Anatomy, 0.0, 100.0 );
				}
			}

			HealEffect( patient );

			StopHeal();

			if ( ( onSelf && HealFully && Hits >= HealTrigger * HitsMax && Hits < HitsMax ) || ( !onSelf && HealOwnerFully && patient.Hits >= HealOwnerTrigger * patient.HitsMax && patient.Hits < patient.HitsMax ) )
				HealStart( patient );
		}
开发者ID:greeduomacro,项目名称:uotitan,代码行数:71,代码来源:BaseCreature.cs

示例9: Target

		public void Target( Mobile m )
		{
			if ( !Caster.CanSee( m ) )
			{
				Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
			}
			else if ( m is BaseCreature && ((BaseCreature)m).IsAnimatedDead )
			{
				Caster.SendLocalizedMessage( 1061654 ); // You cannot heal that which is not alive.
			}
			else if ( m is Golem )
			{
				Caster.LocalOverheadMessage( MessageType.Regular, 0x3B2, 500951 ); // You cannot heal that.
			}
			/*else if ( m.Poisoned || Server.Items.MortalStrike.IsWounded( m ) )
			{
				Caster.LocalOverheadMessage( MessageType.Regular, 0x22, (Caster == m) ? 1005000 : 1010398 );
			}*/
            else if (CheckBSequence(m))
            {
                int healamount = 0;
                if (m.Poisoned)
                {
                    healamount = 30;
                    Caster.LocalOverheadMessage(MessageType.Regular, 0x22, true, "The poison mitigates your healing!");
                }
                else
                    healamount = 38;

                if (Scroll != null)
                {
                    healamount -= 3;
                }

                m.Heal(healamount);

                m.FixedParticles(0x376A, 10, 15, 5030, EffectLayer.Waist);
                m.PlaySound(Sound);
            }	

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

示例10: Target

		public void Target( Mobile m )
		{
			if ( !Caster.CanSee( m ) )
			{
				Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
			}
			else if ( m is BaseCreature && ((BaseCreature)m).IsAnimatedDead )
			{
				Caster.SendLocalizedMessage( 1061654 ); // You cannot heal that which is not alive.
			}
			else if ( m is Golem )
			{
				Caster.LocalOverheadMessage( MessageType.Regular, 0x3B2, 500951 ); // You cannot heal that.
			}
			else if ( CheckBSequence( m ) )
			{

				int toHeal;

                CustomRegion cR = Caster.Region as CustomRegion;

				if ( Core.AOS )
				{
					// TODO: / 100 or / 120 ? 1, 3 or 1, 4 ?
					toHeal = Caster.Skills.Magery.Fixed / 100;
					toHeal += Utility.RandomMinMax( 1, 3 );
				}
                else //Loki edit: New PvP changes
                {
                    toHeal = 3 + (int)(Caster.Skills[SkillName.Magery].Value * 0.1);
                    if (m.Poisoned)
                    {
                        toHeal -= 3;
                        if (toHeal < 1)
                            toHeal = 1;
                        Caster.LocalOverheadMessage(MessageType.Regular, 0x22, true, "The poison mitigates your healing!");
                    }
                } 

                m.Heal(toHeal);

				m.FixedParticles( 0x376A, 5, 15, 5005, EffectLayer.Waist );
				m.PlaySound( Sound );
			}

			FinishSequence();
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:47,代码来源:Heal.cs

示例11: Target

        public void Target( Mobile m )
        {
            if ( Caster ==  m )
            {
                Caster.SendMessage( "You cannot heal yourself" ); // Cannot heal self.
            }
            if ( !Caster.CanSee( m ) )
            {
                Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
            }
            else if ( m is BaseCreature && ((BaseCreature)m).IsAnimatedDead )
            {
                Caster.SendLocalizedMessage( 1061654 ); // You cannot heal that which is not alive.
            }
            else if ( m is Golem )
            {
                Caster.LocalOverheadMessage( MessageType.Regular, 0x3B2, 500951 ); // You cannot heal that.
            }
            else if ( m.Poisoned || Server.Items.MortalStrike.IsWounded( m ) )
            {
                Caster.LocalOverheadMessage( MessageType.Regular, 0x22, (Caster == m) ? 1005000 : 1010398 );
            }
            else if ( CheckBSequence( m ) )
            {
                SpellHelper.Turn( Caster, m );

                int toHeal = (int)(Caster.Skills[SkillName.SpiritSpeak].Value * 0.4);
                toHeal += Utility.Random( 8, 15 );

                int toBleed = (int)(Caster.Skills[SkillName.SpiritSpeak].Value * 0.2);
                toBleed += Utility.Random( 5, 10 );

                m.Heal( toHeal );

                m.PlaySound( 0x133 );
                m.FixedParticles( 0x377A, 244, 25, 9950, 31, 0, EffectLayer.Waist );
                Caster.FixedParticles( 0x377A, 244, 25, 9950, 31, 0, EffectLayer.Waist );
                Caster.Damage( toBleed );
            }

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

示例12: OnDoubleClick

            public override void OnDoubleClick( Mobile from )
            {
                if ( !IsChildOf( from.Backpack ) )
                    return;

                if ( !from.Alive )
                    return;

                HealingStoneContext context = null;

                if ( m_MalusTable.ContainsKey( from ) )
                    context = m_MalusTable[from];

                if ( context != null && context.UnderCooldown )
                {
                    from.LocalOverheadMessage( MessageType.Regular, 0x22, 1095172 ); // You must wait a few seconds before using another Healing Stone.
                }
                else if ( from.Hits == from.HitsMax )
                {
                    from.SendLocalizedMessage( 1049547, "", 0x59 ); // You are already at full health.
                }
                else if ( !BasePotion.HasFreeHand( from ) && !BasePotion.HasBalancedWeapon( from ) )
                {
                    from.SendLocalizedMessage( 1080116 ); // You must have a free hand to use a Healing Stone.
                }
                else if ( MortalStrike.IsWounded( from ) )
                {
                    from.LocalOverheadMessage( MessageType.Regular, 0x22, 1005000 ); // You cannot heal yourself in your current state.
                }
                else if ( from.Poisoned )
                {
                    // TODO (SA): Healing Stone should now heal poison
                }
                else
                {
                    int amountToHeal = Utility.RandomMinMax( 1, 6 ) + (int) ( ( GetBaseSkill( from ) + GetBoostSkill( from ) ) / 8.0 );

                    if ( context != null )
                        amountToHeal = (int) ( amountToHeal * context.Scale );

                    amountToHeal = Math.Min( amountToHeal, HealingPoints );

                    // TODO (SA): Arcane Empowerment debe otorgar un bonus.

                    from.Heal( amountToHeal );
                    from.PlaySound( 0x202 );

                    HealingPoints -= amountToHeal;

                    if ( context != null )
                    {
                        context.Reset();
                    }
                    else
                    {
                        Timer t = Timer.DelayCall( TimeSpan.FromSeconds( Malus ), new TimerCallback(
                            delegate
                            {
                                m_MalusTable.Remove( from );
                            } ) );
                        m_MalusTable.Add( from, new HealingStoneContext( from, t ) );
                    }
                }
            }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:64,代码来源:HealingStoneSpell.cs

示例13: Heal

        public static void Heal( Mobile m )
        {
            Mobile caster = m_Table3[m] as Mobile;

            int toHeal = 8 + GetFocusLevel( caster );

            ArcaneEmpowermentSpell.ApplyHealBonus( caster, ref toHeal );

            m.Heal( toHeal, caster );
            m.FixedParticles( 0x376A, 9, 32, 5005, EffectLayer.Waist );
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:11,代码来源:GiftOfRenewal.cs


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