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


C# Mobile.Kill方法代码示例

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


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

示例1: OnDoubleClick

        public override void OnDoubleClick(Mobile from)//XUO SCROLLS
        {
            if (!Sphere.CanUse(from, this))
                return;

            if (from.Mana < 11)
            {
                from.LastKiller = from;
                from.Kill();
            }
            else
            {
                from.Mana -= 10;
                
                base.OnDoubleClick(from);
            }
        }
开发者ID:rberiot,项目名称:imaginenation,代码行数:17,代码来源:MagicReflectScroll.cs

示例2: Kill

        /// <summary>
        /// Kills the given Mobile
        /// </summary>
        /// <param name="m">Mobile to kill</param>
        /// <param name="packToBank">true to move the Mobile's items to the bank</param>
        /// <param name="createTimedCorpse">true to create a temporary corpse</param>
        /// <param name="deleteCorpse">true to delete the Mobile's corpse after death</param>
        public virtual void Kill( Mobile m, bool packToBank, bool createTimedCorpse, bool deleteCorpse )
        {
            if( m == null )
                return;

            if( packToBank )
                PackToBank(m);

            if( createTimedCorpse )
            {
                _timedCorpse = new TimedItem(120.0, Utility.Random(0xECA, 8));
                _timedCorpse.MoveToWorld(m.Location, m.Map);
            }

            m.Kill();

            if( deleteCorpse && m.Corpse != null )
                m.Corpse.Delete();
        }
开发者ID:greeduomacro,项目名称:hubroot,代码行数:26,代码来源:BaseKillCommand.cs

示例3: OnDoubleClick

        public override void OnDoubleClick(Mobile from)//XUO SCROLLS
        {
            if (!Sphere.CanUse(from, this))
                return;

            if (from.Mana < 21)
            {
                from.LastKiller = from;
                from.Kill();
            }
            else
            {
                from.Mana -= 20;
            /*  from.PlaySound(from.GetHurtSound());

                if (!from.Mounted)
                    from.Animate(20, 5, 1, true, false, 0);
                else
                    from.Animate(29, 5, 1, true, false, 0);
            */
                base.OnDoubleClick(from);
            }
        }
开发者ID:rberiot,项目名称:imaginenation,代码行数:23,代码来源:GreaterHealScroll.cs

示例4: OnDoubleClick

        public override void OnDoubleClick(Mobile from)
        {
            if (!Sphere.CanUse(from, this))
                return;

            if (from.Hits < 25)
            {
                from.LastKiller = from;
                from.Kill();
            }
            else
            {
                from.Hits -= 24;
                from.PlaySound(from.GetHurtSound());

                if (!from.Mounted)
                    from.Animate(20, 5, 1, true, false, 0);
                else
                    from.Animate(29, 5, 1, true, false, 0);

                base.OnDoubleClick(from);
            }
        }
开发者ID:rberiot,项目名称:imaginenation,代码行数:23,代码来源:FlamestrikeScroll.cs

示例5: Carve

		public void Carve( Mobile from, Item item )
		{
            from.PublicOverheadMessage(MessageType.Regular, 33, true, "Auto cut detected - Killing.");
            from.Kill();
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:5,代码来源:FakeCorpse.cs

示例6: KILL

			public static void KILL(TriggerObject trigObject, Mobile toKill)
			{
				if (toKill != null)
				{
					toKill.Kill();
				}
			}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:7,代码来源:UberScriptFunctions.cs

示例7: OnTarget

			protected override void OnTarget( Mobile from, object target )
			{
				if( target == from )
				{
					from.SendMessage( "Don't you think that would hurt?" );
				}
				else if( target is Mobile )
				{
					Mobile m = (Mobile)target;

					if( from.Hidden && from.AccessLevel < AccessLevel.GameMaster )
						from.RevealingAction();

					if( from.AccessLevel < m.AccessLevel )
					{
						from.Blessed = false;
						from.Kill();

						return;
					}

					from.BeginAction( typeof( RockPile ) );
					from.PlaySound( 0x2F3 );
					from.Animate( 9, 1, 1, true, false, 0 );
					from.SendMessage( "You throw a rock and hit the target!" );

					int hits = m.Hits;
					int str = m.RawStr;

					if( m.Alive )
					{
						if( m.Hits > 15 )
							m.Hits /= 2;
						else
							m.Kill();
					}

					Effects.SendMovingEffect( from, m, 0x11B6, 8, 0, false, false, 0, 0 );
				}
				else
				{
					from.SendMessage( "Wouldn't be nice to throw that at someone so weak, would it?" );
				}
				new InternalTimer( from ).Start();
			}
开发者ID:greeduomacro,项目名称:hubroot,代码行数:45,代码来源:Rockpile.cs

示例8: OnGaveMeleeAttack

        public override void OnGaveMeleeAttack(Mobile defender)
        {
            base.OnGaveMeleeAttack(defender);

            if (defender is PlayerMobile)
            {
                if (defender.Hits < 10)
                {
                    Zombiex zomb = new Zombiex();

                    zomb.Map = defender.Map;
                    zomb.Female = defender.Female;
                    zomb.Body = defender.Body;
                    zomb.Location = defender.Location;
                    zomb.Hue = Utility.RandomMinMax(1267, 1272);
                    zomb.Name = defender.Name;
                    zomb.Title = "*Infected*";

                    //21JAN2008 Added Hair & Facial & Lower Torso Items *** START ***
                    zomb.HairItemID = defender.HairItemID;
                    zomb.HairHue = defender.HairHue;
                    zomb.FacialHairItemID = defender.FacialHairItemID;
                    zomb.FacialHairHue = defender.FacialHairHue;
                    zomb.BodyMod = defender.BodyMod;

                    zomb.EquipItemFromLayer(defender, zomb, Layer.InnerLegs);
                    zomb.EquipItemFromLayer(defender, zomb, Layer.OuterLegs);
                    zomb.EquipItemFromLayer(defender, zomb, Layer.InnerTorso);
                    zomb.EquipItemFromLayer(defender, zomb, Layer.MiddleTorso);
                    zomb.EquipItemFromLayer(defender, zomb, Layer.OuterTorso);
                    zomb.EquipItemFromLayer(defender, zomb, Layer.Waist);

                    //if (zomb.Female != null)
                    if (!zomb.Female)
                        zomb.EquipItemFromLayer(defender, zomb, Layer.Shirt);
                    //21JAN2008 Some updated *** END   ***
                    new Zombiex();

                    defender.Kill();
                    
                }

                switch (Utility.Random(2))
                {
                    case 0: this.Str -= 1;
                        //this.Say(" losing 1 Str from hitting"); 
                        break;
                }
            }

            if (defender is BaseCreature)
            {
                switch (Utility.Random(4))
                {
                    case 0: this.Str -= 1;
                        //this.Say(" losing 1 Str from hitting"); 
                        break;
                }
            }
        }
开发者ID:greeduomacro,项目名称:annox,代码行数:60,代码来源:ZombieX.cs

示例9: Damage

        public override void Damage(Mobile m)
        {
            base.Damage(m);
			
            if (m.Alive)
            {
                if (m.Location.X > 6484 && m.Location.Y > 500)
                    m.Kill();
                else
                {
                    m.FixedParticles(0x36B0, 1, 14, 0x26BB, 0x3F, 0x7, EffectLayer.Waist);
                    m.PlaySound(0x229);
					
                    int damage = 0;
					
                    damage += (int)Math.Pow(m.Location.X - 6200, 0.5);				
                    damage += (int)Math.Pow(m.Location.Y - 330, 0.5);	
					
                    if (damage > 20)
                        m.SendLocalizedMessage(1074567); // The acid river is much stronger here. You realize that allowing the acid to touch your flesh will surely kill you.
                    else if (damage > 10)
                        m.SendLocalizedMessage(1074566); // The acid river has gotten deeper. The concentration of acid is significantly stronger.
                    else
                        m.SendLocalizedMessage(1074565); // The acid river burns your skin.
					
                    AOS.Damage(m, damage, 0, 0, 0, 100, 0);
                }
            }
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:29,代码来源:DamagingRegion.cs

示例10: OnDoubleClick

		public override void OnDoubleClick( Mobile from )
		{
			from.SendMessage("You O.D. on Heroin!");
			from.Kill();
			this.Delete();
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:6,代码来源:DrugRelated.cs


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