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


C# BaseCreature.Say方法代码示例

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


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

示例1: DoAntiEscape

		//END ANTI ARCHERY

		//BEGIN ANTI ESCAPE

		public static void DoAntiEscape(BaseCreature mobile, Mobile player)
		{
			if ( mobile.Combatant != null )
				if ( !player.InRange( mobile, 5 ) )
				{                 
					Point3D from = mobile.Location;
					Point3D to = player.Location;

					if ( mobile.Mana >= 10 )
					{
						mobile.Location = to;
						
						mobile.Mana -= 10;

						mobile.Say( "Grrrr" );

						Effects.SendLocationParticles( EffectItem.Create( from, mobile.Map, EffectItem.DefaultDuration ), 0x3728, 10, 10, 2023 );
						Effects.SendLocationParticles( EffectItem.Create(   to, mobile.Map, EffectItem.DefaultDuration ), 0x3728, 10, 10, 5023 );

						mobile.PlaySound( 0x1FE );
					}
					else if ( !player.InRange( mobile, 20 ) )
						return;
				}
		}
开发者ID:Tukaramdas,项目名称:ServUO-EC-Test-Fork,代码行数:29,代码来源:MobileFeatures.cs

示例2: RoarAttack

        public static void RoarAttack(BaseCreature from, Mobile target)
        {
            if (from.RoarAttack < 10 || from == null || target == null)
                return;

            int power = from.RoarAttack / 10;
            int mindam = from.RoarAttack / 3;
            int maxdam = from.RoarAttack / 2;
            from.Say("*Roars*");

            ArrayList targets = new ArrayList();

            foreach (Mobile m in from.GetMobilesInRange(power))
            {
                if (m != from && from.CanBeHarmful(m))
                    targets.Add(m);
            }

            for (int i = 0; i < targets.Count; ++i)
            {
                Mobile m = (Mobile)targets[i];

                if (m is BaseCreature)
                {
                    BaseCreature bc = (BaseCreature)m;

                   // if (bc.Controlled == true && bc.ControlMaster != null)
                       // return;//////////////////////////////////////////////////////////////////////////////
                    
                  //  else
                    
                    bc.BeginFlee(TimeSpan.FromSeconds(10.0));
                    AOS.Damage(target, from, Utility.RandomMinMax(mindam, maxdam), 100, 0, 0, 0, 0);
                }
            }
        }
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:36,代码来源:PetMoves.cs

示例3: GetSpeech

        public static void GetSpeech(BaseCreature m_Mobile, SpeechEventArgs e)
        {
            string response = null;
            Region reg = Region.Find(m_Mobile.Location, m_Mobile.Map);

            //Check Job
            //TODO

            //Check Region
            if (reg.Name == "Britain")
            {
                if (m_Mobile.Sophistication == SophisticationLevel.High)
                    response = BritainHigh(m_Mobile, e);
                else if (m_Mobile.Sophistication == SophisticationLevel.Medium)
                    response = BritainMedium(m_Mobile, e);
                else if (m_Mobile.Sophistication == SophisticationLevel.Low)
                    response = BritainLow(m_Mobile, e);
            }

            //Check World
            if (response == null)
            {
                if (m_Mobile.Sophistication == SophisticationLevel.High)
                    response = BritanniaHigh(m_Mobile, e);
                else if (m_Mobile.Sophistication == SophisticationLevel.Medium)
                    response = BritanniaMedium(m_Mobile, e);
                else if (m_Mobile.Sophistication == SophisticationLevel.Low)
                    response = BritanniaLow(m_Mobile, e);
            }

            //No answer found
            if (response == null)
            {
                if (m_Mobile.Sophistication == SophisticationLevel.High)
                    response = DefaultHigh(m_Mobile, e.Mobile);
                else if (m_Mobile.Sophistication == SophisticationLevel.Medium)
                    response = DefaultMedium(m_Mobile, e.Mobile);
                else if (m_Mobile.Sophistication == SophisticationLevel.Low)
                    response = DefaultLow(m_Mobile, e.Mobile);
            }

            m_Mobile.Say(true, response);
        }
开发者ID:Godkong,项目名称:RunUO,代码行数:43,代码来源:BaseSpeech.cs

示例4: FireBreathAttack

        public static void FireBreathAttack(BaseCreature from, Mobile target)
        {
            if (from.FireBreathAttack < 10 || from == null || target == null)
                return;

            // Scale FireBreath Attack, IE 100 points = 100% of the standard 25% breath scaler, then drop to 75% since it later reburns them.
            // Confused yet? 100 points is equal to 75% of the damage of every other fire breathing monster.
            int damage = (int)((from.Hits * (0.01 * ((28 * from.FireBreathAttack) / 100))) * 0.75);

            from.MovingParticles(target, 0x36D4, 7, 0, false, true, 9502, 4019, 0x160);
            from.PlaySound(Core.AOS ? 0x15E : 0x44B);
            from.Say("Fire Breath");
            target.FixedParticles(0x3709, 10, 30, 5052, EffectLayer.LeftFoot);
            target.PlaySound(0x208);

            AOS.Damage(target, from, damage, 0, 0, 0, 0, 100);

            new FireBreathDOT(target, from, from.FireBreathAttack).Start();
        }
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:19,代码来源:PetMoves.cs

示例5: PetPoisonAttack

        public static void PetPoisonAttack(BaseCreature from, Mobile target)
        {
            if (from.PetPoisonAttack < 10 || from == null || target == null)
                return;

            Effects.SendLocationParticles(EffectItem.Create(target.Location, target.Map, EffectItem.DefaultDuration), 0x36B0, 1, 14, 63, 7, 9915, 0);
            Effects.PlaySound(target.Location, target.Map, 0x229);

            int mindam = from.PetPoisonAttack / 3;
            int maxdam = from.PetPoisonAttack / 2;

            int level = from.PetPoisonAttack / 20;

            if (level > 3)
                level = 3; // 3 is Deadly

            from.Say("Poison Attack");
            target.ApplyPoison(from.ControlMaster, Poison.GetPoison(level));
            AOS.Damage(target, from, Utility.RandomMinMax(mindam, maxdam), 0, 0, 0, 0, 100);
        }
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:20,代码来源:PetMoves.cs

示例6: ShockAttack

        public static void ShockAttack(BaseCreature from, Mobile target)
        {
            if (from.ShockAttack < 10 || from == null || target == null)
                return;

            int mindam = from.ShockAttack / 2;
            int maxdam = from.ShockAttack;

            from.Say("Shock Attack");
            target.SendMessage("Your body is paralyzed from the electrical current!");
            target.Freeze(TimeSpan.FromSeconds(3));
            AOS.Damage(target, from, Utility.RandomMinMax(mindam, maxdam), 0, 0, 0, 0, 100);
        }
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:13,代码来源:PetMoves.cs

示例7: IcyWindAttack

        public static void IcyWindAttack(BaseCreature from, Mobile target)
        {
            if (from.IcyWindAttack < 10 || from == null || target == null)
                return;

            Effects.SendLocationParticles(EffectItem.Create(target.Location, target.Map, EffectItem.DefaultDuration), 0x37CC, 1, 40, 97, 3, 9917, 0);
            int mindam = from.IcyWindAttack / 3;
            int maxdam = from.IcyWindAttack / 2;

            ArrayList targets = new ArrayList();

            foreach (Mobile m in from.GetMobilesInRange(from.IcyWindAttack / 10))
            {
                if (m != from && from.CanBeHarmful(m))
                    targets.Add(m);
            }

            for (int i = 0; i < targets.Count; ++i)
            {
                Mobile m = (Mobile)targets[i];
                from.Say("Icy Wind Attack");
                AOS.Damage(target, from, Utility.RandomMinMax(mindam, maxdam), 0, 0, 100, 0, 0);
                Slow.SlowWalk(m, 10);
            }
        }
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:25,代码来源:PetMoves.cs


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