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


C# BaseCreature.SetHits方法代码示例

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


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

示例1: SetStats

        public static void SetStats( BaseCreature steed )
        {
            steed.SetStr( 201, 210 );
            steed.SetDex( 101, 110 );
            steed.SetInt( 101, 115 );

            steed.SetHits( 201, 220 );

            steed.SetDamage( 20, 24 );

            steed.SetDamageType( ResistanceType.Physical, 25 );
            steed.SetDamageType( ResistanceType.Fire, 75 );

            steed.SetResistance( ResistanceType.Physical, 60, 70 );
            steed.SetResistance( ResistanceType.Fire, 90 );
            steed.SetResistance( ResistanceType.Poison, 100 );

            steed.SetSkill( SkillName.MagicResist, 90.1, 110.0 );
            steed.SetSkill( SkillName.Tactics, 50.0 );
            steed.SetSkill( SkillName.Wrestling, 90.1, 110.0 );

            steed.Fame = 0;
            steed.Karma = 0;
        }
开发者ID:felladrin,项目名称:runuo-pt-br,代码行数:24,代码来源:HellSteed.cs

示例2: Summon

		public static bool Summon(
			BaseCreature creature, bool controlled, Mobile caster, Point3D p, int sound, TimeSpan duration)
		{
			if (caster.Followers + creature.ControlSlots > caster.FollowersMax)
			{
				caster.SendLocalizedMessage(1049645); // You have too many followers to summon that creature.
				creature.Delete();
				return false;
			}

			m_Summoning = true;

			if (controlled)
			{
				creature.SetControlMaster(caster);
			}

			creature.RangeHome = 10;
			creature.Summoned = true;

			creature.SummonMaster = caster;

			Container pack = creature.Backpack;

			if (pack != null)
			{
				for (int i = pack.Items.Count - 1; i >= 0; --i)
				{
					if (i >= pack.Items.Count)
					{
						continue;
					}

					pack.Items[i].Delete();
				}
			}

			creature.SetHits(
				(int)Math.Floor(creature.HitsMax * (1 + ArcaneEmpowermentSpell.GetSpellBonus(caster, false) / 100.0)));

			new UnsummonTimer(caster, creature, duration).Start();
			creature.m_SummonEnd = DateTime.UtcNow + duration;

			creature.MoveToWorld(p, caster.Map);

			Effects.PlaySound(p, creature.Map, sound);

			m_Summoning = false;

			return true;
		}
开发者ID:g4idrijs,项目名称:ServUO,代码行数:51,代码来源:BaseCreature.cs

示例3: Summon

        public static bool Summon( BaseCreature creature, bool controlled, Mobile caster, Point3D p, int sound, TimeSpan duration )
        {
            if ( caster.Followers + creature.ControlSlots > caster.FollowersMax )
            {
                caster.SendLocalizedMessage( 1049645 ); // You have too many followers to summon that creature.
                creature.Delete();
                return false;
            }

            m_Summoning = true;

            creature.RangeHome = 10;
            creature.Summoned = true;

            if ( controlled )
                creature.SetControlMaster( caster );

            creature.SummonMaster = caster;

            Container pack = creature.Backpack;

            if ( pack != null )
            {
                for ( int i = pack.Items.Count - 1; i >= 0; --i )
                {
                    if ( i >= pack.Items.Count )
                        continue;

                    ( (Item) pack.Items[i] ).Delete();
                }
            }

            double hitsScalar = 1.0 + ( ArcaneEmpowermentSpell.GetSummonHitsBonus( caster ) / 100 );

            if ( hitsScalar != 1.0 )
                creature.SetHits( (int) ( creature.HitsMax * hitsScalar ) );

            new UnsummonTimer( caster, creature, duration ).Start();
            creature.m_SummonEnd = DateTime.Now + duration;

            creature.MoveToWorld( p, caster.Map );

            Effects.PlaySound( p, creature.Map, sound );

            if ( creature is EnergyVortex || creature is BladeSpirits )
                SpellHelper.CheckSummonLimits( creature );

            m_Summoning = false;

            return true;
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:51,代码来源:BaseCreature.cs


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