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


C# Mobile.FixedEffect方法代码示例

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


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

示例1: OnMoveOver

        public override bool OnMoveOver( Mobile m )
        {
            if(m_refresh) {
                m.PlaySound( 0x214 );
                m.FixedEffect( 0x376A, 10, 16 );

                m.Resurrect();

                m.Hits = m.HitsMax;
                m.Stam = m.Dex;
                m.Mana = m.Int;
            } else {
                if ( !m.Alive && m.Map != null && m.Map.CanFit( m.Location, 16, false, false ) )
                {
                    m.PlaySound( 0x214 );
                    m.FixedEffect( 0x376A, 10, 16 );

                    m.CloseGump( typeof( ResurrectGump ) );
                    m.SendGump( new ResurrectGump( m ) );
                }
                else
                {
                    m.SendLocalizedMessage( 502391 ); // Thou can not be resurrected there!
                }
            }

            return false;
        }
开发者ID:guy489,项目名称:runuot2a,代码行数:28,代码来源:ResGate.cs

示例2: OnDoubleClick

		public override void OnDoubleClick( Mobile from )
		{
			if ( from.BeginAction( typeof( RejuvinationAddonComponent ) ) )
			{
				from.FixedEffect( 0x373A, 1, 16 );

				int random = Utility.Random( 1, 4 );

				if ( random == 1 || random == 4 )
				{
					from.Hits = from.HitsMax;
					SendLocalizedMessageTo( from, 500801 ); // A sense of warmth fills your body!
				}

				if ( random == 2 || random == 4 )
				{
					from.Mana = from.ManaMax;
					SendLocalizedMessageTo( from, 500802 ); // A feeling of power surges through your veins!
				}

				if ( random == 3 || random == 4 )
				{
					from.Stam = from.StamMax;
					SendLocalizedMessageTo( from, 500803 ); // You feel as though you've slept for days!
				}

				Timer.DelayCall( TimeSpan.FromHours( 2.0 ), new TimerStateCallback( ReleaseUseLock_Callback ), new object[]{ from, random } );
			}
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:29,代码来源:RejuvinationAnkhs.cs

示例3: Resurrect

		public static void Resurrect( Mobile m, Item item )
		{
            if ( m.InRange(item, 2) && m.InLOS(item))
            {
                if (!m.Alive)
                {
                    if (m.Map == null || !m.Map.CanFit(m.Location, 16, false, false))
                    {
                        m.SendLocalizedMessage(502391); // Thou can not be resurrected there!
                    }
                    else if (m.Region is HouseRegion)
                    {
                        m.SendAsciiMessage("You can't get resurrected in house regions.");
                    }
                    else
                    {
                        m.PlaySound(0x214);
                        m.FixedEffect(0x376A, 10, 16);

                        m.Resurrect();

                        //m.CloseGump(typeof(ResurrectGump));
                        //m.SendGump(new ResurrectGump(m, item, ResurrectMessage.VirtueShrine));
                    }
                }
            }
            else
            {
                m.LocalOverheadMessage(MessageType.Regular, 906, 1019045); // I can't reach that.
            }	
        }
开发者ID:FreeReign,项目名称:imaginenation,代码行数:31,代码来源:Ankhs.cs

示例4: CheckSpellEvasion

		public static bool CheckSpellEvasion( Mobile defender )
		{
			BaseWeapon weap = defender.FindItemOnLayer( Layer.OneHanded ) as BaseWeapon;

			if ( weap == null )
				weap = defender.FindItemOnLayer( Layer.TwoHanded ) as BaseWeapon;

			if ( Core.ML ) {
				if ( defender.Spell != null && defender.Spell.IsCasting ) {
					return false;
				}
				
				if ( weap != null ) {
					if ( defender.Skills[weap.Skill].Base < 50  ) {
						return false;
					}
				} else if ( !( defender.FindItemOnLayer( Layer.TwoHanded ) is BaseShield ) ) {
					return false;
				}
			}
			
			if ( IsEvading( defender ) && BaseWeapon.CheckParry( defender ) ) {
				defender.Emote( "*evades*" ); // Yes.  Eew.  Blame OSI.
				defender.FixedEffect( 0x37B9, 10, 16 );
				return true;
			}

			return false;
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:29,代码来源:Evasion.cs

示例5: Target

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

				SpellHelper.CheckReflect( (int)this.Circle, Caster, ref m );

                double duration;

                // Algorithm: ((20% of magery) + 7) seconds [- 50% if resisted]

                duration = 7.0 + (Caster.Skills[SkillName.Magery].Value * 0.2);

                if (CheckResisted(m))
                    duration *= 0.75;

				m.Paralyze( TimeSpan.FromSeconds( duration ) );

				m.PlaySound( 0x204 );
				m.FixedEffect( 0x376A, 6, 1 );

				HarmfulSpell( m );
			}

			FinishSequence();
		}
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:31,代码来源:Paralyze.cs

示例6: OnGaveMeleeAttack

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

			if ( 0.1 > Utility.RandomDouble() && !IsStunned( defender ) )
			{
				/* Lightning Fist
				 * Cliloc: 1070839
				 * Effect: Type: "3" From: "0x57D4F5B" To: "0x0" ItemId: "0x37B9" ItemIdName: "glow" FromLocation: "(884 715, 10)" ToLocation: "(884 715, 10)" Speed: "10" Duration: "5" FixedDirection: "True" Explode: "False"
				 * Damage: 35-65, 100% energy, resistable
				 * Freezes for 4 seconds
				 * Effect cannot stack
				 */

				defender.FixedEffect( 0x37B9, 10, 5 );
				defender.SendLocalizedMessage( 1070839 ); // The creature attacks with stunning force!
 
				// This should be done in place of the normal attack damage.
				//AOS.Damage( defender, this, Utility.RandomMinMax( 35, 65 ), 0, 0, 0, 0, 100 );

				defender.Frozen = true; 

				ExpireTimer timer = new ExpireTimer( defender, TimeSpan.FromSeconds( 4.0 ) );
				timer.Start();
				m_Table[defender] = timer;
			}
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:27,代码来源:RaiJu.cs

示例7: 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

示例8: OnGaveMeleeAttack

		// TODO: Put this attack shared with Hiryu and Lesser Hiryu in one place
		public override void OnGaveMeleeAttack( Mobile defender )
		{
			base.OnGaveMeleeAttack( defender );

			if( 0.1 > Utility.RandomDouble() )
			{
				ExpireTimer timer = (ExpireTimer)m_Table[defender];

				if( timer != null )
				{
					timer.DoExpire();
					defender.SendLocalizedMessage( 1070837 ); // The creature lands another blow in your weakened state.
				}
				else
					defender.SendLocalizedMessage( 1070836 ); // The blow from the creature's claws has made you more susceptible to physical attacks.

				int effect = -(defender.PhysicalResistance * 15 / 100);

				ResistanceMod mod = new ResistanceMod( ResistanceType.Physical, effect );

				defender.FixedEffect( 0x37B9, 10, 5 );
				defender.AddResistanceMod( mod );

				timer = new ExpireTimer( defender, mod, TimeSpan.FromSeconds( 5.0 ) );
				timer.Start();
				m_Table[defender] = timer;
			}
		}
开发者ID:jackuoll,项目名称:Pre-AOS-RunUO,代码行数:29,代码来源:Swoop.cs

示例9: Target

        public void Target( Mobile m )
        {
            BaseCreature bc = m as BaseCreature;

            if ( !Caster.CanSee( m ) )
            {
                Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
            }
            else if ( bc == null || !bc.IsDispellable )
            {
                Caster.SendLocalizedMessage( 1005049 ); // That cannot be dispelled.
            }
            else if ( CheckHSequence( m ) )
            {
                SpellHelper.Turn( Caster, m );

                double dispelChance = ( 50.0 + ( ( 100 * ( Caster.Skills.Magery.Value - bc.DispelDifficulty ) ) / ( bc.DispelFocus * 2 ) ) ) / 100;

                if ( dispelChance > Utility.RandomDouble() )
                {
                    Effects.SendLocationParticles( EffectItem.Create( m.Location, m.Map, EffectItem.DefaultDuration ), 0x3728, 8, 20, 5042 );
                    Effects.PlaySound( m, m.Map, 0x201 );

                    m.Delete();
                }
                else
                {
                    m.FixedEffect( 0x3779, 10, 20 );
                    Caster.SendLocalizedMessage( 1010084 ); // The creature resisted the attempt to dispel it!
                }
            }

            FinishSequence();
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:34,代码来源:Dispel.cs

示例10: Target

		public void Target( Mobile m )
		{
			Type t = m.GetType();
			bool dispellable = false;

			if ( m is BaseCreature )
				dispellable = ((BaseCreature)m).Summoned;

			if ( !Caster.CanSee( m ) )
			{
				Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
			}
			else if ( !dispellable )
			{
				Caster.SendLocalizedMessage( 1005049 ); // That cannot be dispelled.
			}
			else if ( CheckHSequence( m ) )
			{
				SpellHelper.Turn( Caster, m );

				if ( CheckResisted( m ) )
				{
					m.FixedEffect( 0x3779, 10, 20 );
				}
				else
				{
					Effects.SendLocationParticles( EffectItem.Create( m.Location, m.Map, EffectItem.DefaultDuration ), 0x3728, 8, 20, 5042 );
					Effects.PlaySound( m, m.Map, 0x201 );

					m.Delete();
				}
			}

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

示例11: OnHit

		public override void OnHit(Mobile attacker, Mobile defender, int damage)
		{
			ClearCurrentAbility(attacker);

			attacker.SendLocalizedMessage(1060084); // You attack with lightning speed!
			defender.SendLocalizedMessage(1060085); // Your attacker strikes with lightning speed!

			defender.PlaySound(0x3BB);
			defender.FixedEffect(0x37B9, 244, 25);

			// Swing again:

			// If no combatant, wrong map, one of us is a ghost, or cannot see, or deleted, then stop combat
			if (defender == null || defender.Deleted || attacker.Deleted || defender.Map != attacker.Map || !defender.Alive || !attacker.Alive || !attacker.CanSee(defender))
			{
				attacker.Combatant = null;
				return;
			}

			IWeapon weapon = attacker.Weapon;

			if (weapon == null)
				return;

			if (!attacker.InRange(defender, weapon.MaxRange))
				return;

			if (attacker.InLOS(defender))
			{
				BaseWeapon.InDoubleStrike = true;
				attacker.RevealingAction();
				attacker.NextCombatTime = DateTime.Now + weapon.OnSwing(attacker, defender);
				BaseWeapon.InDoubleStrike = false;
			}
		}
开发者ID:ITLongwell,项目名称:aedilis2server,代码行数:35,代码来源:DoubleStrike.cs

示例12: AbsorbDamage

		public override int AbsorbDamage( Mobile attacker, Mobile defender, int damage )
		{
			damage = base.AbsorbDamage( attacker, defender, damage );

			int absorb = defender.MeleeDamageAbsorb;

			if ( absorb > 0 )
			{
				if ( absorb > damage )
				{
					int react = damage / 5;

					if ( react <= 0 )
						react = 1;

					defender.MeleeDamageAbsorb -= damage;
					damage = 0;

                    defender.Damage( react, attacker );

					attacker.PlaySound( 0x1F1 );
					attacker.FixedEffect( 0x374A, 10, 16 );
				}
				else
				{
					defender.MeleeDamageAbsorb = 0;
					defender.SendLocalizedMessage( 1005556 ); // Your reactive armor spell has been nullified.
					DefensiveSpell.Nullify( defender );
				}
			}

			return damage;
		}
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:33,代码来源:BaseMeleeWeapon.cs

示例13: OnHit

		public override void OnHit( Mobile attacker, Mobile defender, int damage )
		{
			if( !Validate( attacker ) || !CheckMana( attacker, true ) )
				return;

			ClearCurrentAbility( attacker );

			if( IsImmune( defender ) )	//Intentionally going after Mana consumption
			{
				attacker.SendLocalizedMessage( 1070804 ); // Your target resists paralysis.
				defender.SendLocalizedMessage( 1070813 ); // You resist paralysis.
				return;
			}

			defender.FixedEffect( 0x376A, 9, 32 );
			defender.PlaySound( 0x204 );

			attacker.SendLocalizedMessage( 1060163 ); // You deliver a paralyzing blow!
			defender.SendLocalizedMessage( 1060164 ); // The attack has temporarily paralyzed you!

			TimeSpan duration = defender.Player ? PlayerFreezeDuration : NPCFreezeDuration;

			// Treat it as paralyze not as freeze, effect must be removed when damaged.
			defender.Paralyze( duration );

			BeginImmunity( defender, duration + FreezeDelayDuration );
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:27,代码来源:ParalyzingBlow.cs

示例14: Target

        public void Target(Mobile m)
        {
            if (!Caster.CanSee(m))
            {
                Caster.SendAsciiMessage("Target can not be seen."); // Target can not be seen.
            }
            else if (Core.AOS && (m.Frozen || m.Paralyzed || (m.Spell != null && m.Spell.IsCasting)))
            {
                Caster.SendAsciiMessage("The target is already frozen."); // The target is already frozen.
            }
            else if (CheckHSequence(m))
            {
                SpellHelper.Turn(Caster, m);

                SpellHelper.CheckReflect((int)this.Circle, Caster, ref m);

                double duration;
                duration = (((Caster.Skills[SkillName.Magery].Value / 10) + 1) * 2) + 5;

                if (CheckResisted(m, 5))
                    duration /= 2;

                m.Paralyze(TimeSpan.FromSeconds(duration));

                if (m.Spell != null && m.Spell is Spell)
                    ((Spell)m.Spell).Disturb(DisturbType.Hurt);

                m.PlaySound(0x204);
                m.FixedEffect(0x376A, 6, 1);
            }

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

示例15: Target

        public void Target( Mobile m )
        {
            if ( !Caster.CanSee( m ) )
            {
                Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
            }
            else if ( m.Frozen || m.Paralyzed )
            {
                Caster.SendLocalizedMessage( 1061923 ); // The target is already frozen.
            }
            else if ( CheckHSequence( m ) )
            {
                SpellHelper.Turn( Caster, m );

                SpellHelper.CheckReflect( (int) this.Circle, Caster, ref m );

                int secs = (int) ( ( GetDamageSkill( Caster ) / 10 ) - ( GetResistSkill( m ) / 10 ) );

                if ( !m.IsPlayer )
                    secs *= 3;

                if ( secs < 0 )
                    secs = 0;

                double duration = secs;

                m.Paralyze( TimeSpan.FromSeconds( duration ) );

                m.PlaySound( 0x204 );
                m.FixedEffect( 0x376A, 6, 1 );
            }

            FinishSequence();
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:34,代码来源:Paralyze.cs


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