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


C# Mobile.RemoveStatMod方法代码示例

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


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

示例1: Eat

        }// A tasty bite of the enchanted apple lifts all curses from your soul.
        public override bool Eat(Mobile from)
        {
            if (base.Eat(from))
            {
                from.PlaySound(0xF6);
                from.PlaySound(0x1F7);
                from.FixedParticles(0x3709, 1, 30, 9963, 13, 3, EffectLayer.Head);

                IEntity mfrom = new Entity(Serial.Zero, new Point3D(from.X, from.Y, from.Z - 10), from.Map);
                IEntity mto = new Entity(Serial.Zero, new Point3D(from.X, from.Y, from.Z + 50), from.Map);
                Effects.SendMovingParticles(mfrom, mto, 0x2255, 1, 0, false, false, 13, 3, 9501, 1, 0, EffectLayer.Head, 0x100);

                from.RemoveStatMod("[Magic] Str Curse");
				from.RemoveStatMod("[Magic] Dex Curse");
				from.RemoveStatMod("[Magic] Int Curse");

                from.Paralyzed = false;
                from.Asleep = false;

                EvilOmenSpell.TryEndEffect(from);
                StrangleSpell.RemoveCurse(from);
                CorpseSkinSpell.RemoveCurse(from);
                CurseSpell.RemoveEffect(from);

                BuffInfo.RemoveBuff(from, BuffIcon.Clumsy);
                BuffInfo.RemoveBuff(from, BuffIcon.FeebleMind);
                BuffInfo.RemoveBuff(from, BuffIcon.Weaken);
                BuffInfo.RemoveBuff(from, BuffIcon.MassCurse);	
				
                return true;
            }
			
            return false;
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:35,代码来源:EnchantedApple.cs

示例2: Target

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

                if (m.Spell != null)
                    m.Spell.OnCasterHurt();

                if (BlessSpell.UnderEffect(m))
                {
                    if (m.Str > m.RawStr)
                        m.RemoveStatMod(String.Format("[Magic] {0} Offset", StatType.Str));
                    else
                        m.SendAsciiMessage("You are under the effect of a bless spell and cannot get any stat penalties");
                }
                else
                    SpellHelper.AddStatCurse(Caster, m, StatType.Str);

                m.FixedParticles( 0x374A, 10, 15, 5009, EffectLayer.Waist );
				m.PlaySound( Sound );

                HarmfulSpell(m);
			}

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

示例3: Target

		public void Target( Mobile m )
		{
			if ( !Caster.CanSee( m ) )
			{
				Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
			}
			else if ( CheckBSequence( m ) )
			{
                if ((m.Player && m.Dex <= 120) || (!m.Player))
                {
                    if (CurseSpell.UnderEffect(m))
                    {
                        if (m.Dex < m.RawDex)
                            m.RemoveStatMod(String.Format("[Magic] {0} Offset", StatType.Dex));
                        else
                            m.SendAsciiMessage("You are under the effect of a curse spell and cannot get any stat bonuses");
                    }
                    else
                        SpellHelper.AddStatBonus(Caster, m, StatType.Dex);
                }
                else
                {
                    m.SendAsciiMessage(33, "You are too fast to benefit from that!");
                    return;
                }

				m.FixedParticles( 0x373A, 10, 15, 5010, EffectLayer.Waist );
				m.PlaySound( Sound );
			}

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

示例4: 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( 0xF6 );
                m.PlaySound( 0x1F7 );
                m.FixedParticles( 0x3709, 1, 30, 9963, 13, 3, EffectLayer.Head );

                IEntity from = new Entity( Serial.Zero, new Point3D( m.X, m.Y, m.Z - 10 ), Caster.Map );
                IEntity to = new Entity( Serial.Zero, new Point3D( m.X, m.Y, m.Z + 50 ), Caster.Map );
                Effects.SendMovingParticles( from, to, 0x2255, 1, 0, false, false, 13, 3, 9501, 1, 0, EffectLayer.Head, 0x100 );

                StatMod mod;

                mod = m.GetStatMod( "[Magic] Str Offset" );
                if ( mod != null && mod.Offset < 0 )
                    m.RemoveStatMod( "[Magic] Str Offset" );

                mod = m.GetStatMod( "[Magic] Dex Offset" );
                if ( mod != null && mod.Offset < 0 )
                    m.RemoveStatMod( "[Magic] Dex Offset" );

                mod = m.GetStatMod( "[Magic] Int Offset" );
                if ( mod != null && mod.Offset < 0 )
                    m.RemoveStatMod( "[Magic] Int Offset" );

                m.Paralyzed = false;
                m.CurePoison( Caster );

                EvilOmenSpell.CheckEffect( m );
                StrangleSpell.RemoveCurse( m );
                CorpseSkinSpell.RemoveCurse( m );
            }

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

示例5: RemoveEffect

        public static void RemoveEffect( Mobile m )
        {
            object[] mods = (object[])m_Table[m];

            if ( mods != null )
            {
                m.RemoveStatMod( ((StatMod)mods[0]).Name );
                m.RemoveStatMod( ((StatMod)mods[1]).Name );
                m.RemoveStatMod( ((StatMod)mods[2]).Name );
                m.RemoveSkillMod( (SkillMod)mods[3] );
                m.RemoveSkillMod( (SkillMod)mods[4] );
                m.RemoveSkillMod( (SkillMod)mods[5] );
            }

            m_Table.Remove( m );

            m.EndAction( typeof( ClericAngelicFaithSpell ) );

            m.BodyMod = 0;
        }
开发者ID:evildude807,项目名称:kaltar,代码行数:20,代码来源:AngelicFaithSpell.cs

示例6: DoRemoveCurses

        public static void DoRemoveCurses( Mobile m )
        {
            StatMod mod;

            mod = m.GetStatMod( "[Magic] Str Malus" );
            if ( mod != null && mod.Offset < 0 )
                m.RemoveStatMod( "[Magic] Str Malus" );

            mod = m.GetStatMod( "[Magic] Dex Malus" );
            if ( mod != null && mod.Offset < 0 )
                m.RemoveStatMod( "[Magic] Dex Malus" );

            mod = m.GetStatMod( "[Magic] Int Malus" );
            if ( mod != null && mod.Offset < 0 )
                m.RemoveStatMod( "[Magic] Int Malus" );

            m.Paralyzed = false;

            EvilOmenSpell.CheckEffect( m );
            StrangleSpell.RemoveCurse( m );
            CorpseSkinSpell.RemoveCurse( m );
            CurseSpell.RemoveEffect( m );
            MortalStrike.EndWound( m );
            BloodOathSpell.EndEffect( m );
            SpellPlagueSpell.RemoveEffect( m );

            BuffInfo.RemoveBuff( m, BuffIcon.Clumsy );
            BuffInfo.RemoveBuff( m, BuffIcon.FeebleMind );
            BuffInfo.RemoveBuff( m, BuffIcon.Weaken );
            BuffInfo.RemoveBuff( m, BuffIcon.MassCurse );
            BuffInfo.RemoveBuff( m, BuffIcon.Curse );
            BuffInfo.RemoveBuff( m, BuffIcon.EvilOmen );
            BuffInfo.RemoveBuff( m, BuffIcon.MortalStrike );

            // TODO: Should this remove blood oath? Pain spike?
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:36,代码来源:RemoveCurse.cs

示例7: Target

		public void Target( Mobile m )
		{
			if ( !Caster.CanSee( m ) )
			{
                Caster.SendAsciiMessage("Target is not in line of sight."); DoFizzle();//One line so i could use VS Replace, feel free to change/remove comment:p
			}
            else if (SphereSpellTarget is BaseWand)
            {
                BaseWand bw = SphereSpellTarget as BaseWand;
                bw.RechargeWand(Caster, this);
            }
			else if ( CheckBSequence( m ) )
			{
                if ((m.Player && m.Int <= 120 && m.Str <= 120 && m.Dex <= 120 && m.RawStatTotal <= 300) || (!m.Player))
                {
                    if (CurseSpell.UnderEffect(m))
                    {
                        bool message = true;

                        if (m.Str < m.RawStr)
                        {
                            m.RemoveStatMod(String.Format("[Magic] {0} Offset", StatType.Str));
                            message = false;
                        }
                        if (m.Dex < m.RawDex)
                        {
                            m.RemoveStatMod(String.Format("[Magic] {0} Offset", StatType.Dex));
                            message = false;
                        }
                        if (m.Int < m.RawInt)
                        {
                            m.RemoveStatMod(String.Format("[Magic] {0} Offset", StatType.Int));
                            message = false;
                        }

                        if (message)
                            m.SendAsciiMessage("You are under the effect of a curse spell and cannot get any stat bonuses");
                    }
                    else
                    {
                        SpellHelper.AddStatBonus(Caster, m, StatType.Str);
                        SpellHelper.DisableSkillCheck = true;
                        SpellHelper.AddStatBonus(Caster, m, StatType.Dex);
                        SpellHelper.AddStatBonus(Caster, m, StatType.Int);
                        SpellHelper.DisableSkillCheck = false;
                    }
                }

				m.FixedParticles( 0x373A, 10, 15, 5018, EffectLayer.Waist );
				m.PlaySound( Sound );

                int percentage = (int)(SpellHelper.GetOffsetScalar(Caster, m, false) * 100);
                TimeSpan length = SpellHelper.GetDuration(Caster, m);

                m_UnderEffect[m] = Timer.DelayCall(length, new TimerStateCallback(RemoveEffect), m);

                string args = String.Format("{0}\t{1}\t{2}", percentage, percentage, percentage);

			    BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.Bless, 1075847, 1075848, length, m, args));
			}

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

示例8: RemoveBonus

        public static void RemoveBonus( Mobile m )
        {
            Feathernock f;
            Swiftflight s;

            if ( ( f = m.FindItemOnLayer( Layer.Cloak ) as Feathernock ) != null )
                RemoveBonus( f );
            if ( ( s = m.FindItemOnLayer( Layer.TwoHanded ) as Swiftflight ) != null )
                RemoveBonus( s );

            if ( m_Bonus.ContainsKey( m ) )
            {
                List<AttributeMod> mods = m_Bonus[m];

                RemoveMods( m, mods );
                m_Bonus.Remove( m );
            }

            m.RemoveStatMod( "MarksmanSetStr" );
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:20,代码来源:MarksmanSet.cs

示例9: AddStatBonus

        public static bool AddStatBonus( Mobile caster, Mobile target, StatType type, int bonus, TimeSpan duration )
        {
            int offset = bonus;
            string name = String.Format( "[Magic] {0} Offset", type );

            StatMod mod = target.GetStatMod( name );

            //one is negative and the other is positive, so adding up
            if( mod != null && ((mod.Offset <= 0 && offset > 0) || (offset < 0 && mod.Offset >= 0)) )
            {
                target.RemoveStatMod( name );
                target.AddStatMod( new StatMod( type, name, mod.Offset + offset, duration ) );
                return true;
            }
            //nothing to replace, just adding
            else if( mod == null )
            {
                target.AddStatMod( new StatMod( type, name, offset, duration ) );
                return true;
            }
            //replacing the current mod with a larger one
            else if( mod != null && ((mod.Offset <= 0 && offset < mod.Offset) || (mod.Offset >= 0 && mod.Offset < offset)) )
            {
                target.RemoveStatMod( name );
                target.AddStatMod( new StatMod( type, name, offset, duration ) );
                return true;
            }

            return false;
        }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:30,代码来源:SpellHelper.cs

示例10: OnMoveOver

        public override bool OnMoveOver( Mobile m )
        {
            if( !Visible )
                return true;

            if( m == null || !m.Player )
                return true;

            if(!PvpCore.IsInDeathmatch( m ) )
                return true;

            Visible = false;

            StatMod mod = m.GetStatMod( String.Format( "[DM] {0}", m_PowerUp ) );

            if( mod != null )
                m.RemoveStatMod( String.Format( "[DM] {0}", m_PowerUp ) );

            switch( m_PowerUp )
            {
                case PowerUpType.Dex:
                {
                    m.FixedParticles( 0x3779, 10, 15, 5009, EffectLayer.Waist );
                    m.PlaySound( 0x1E6 );
                    m.AddStatMod( new StatMod( StatType.Dex, String.Format("[DM] {0}", m_PowerUp ), 5, TimeSpan.FromMinutes( 1.0 ) ) );
                    break;
                }
                case PowerUpType.Fury:
                {
                    m.FixedParticles( 0x3779, 10, 15, 5009, EffectLayer.Waist );
                    m.PlaySound( 0x1E6 );
                    m.AddStatMod( new StatMod( StatType.All, String.Format( "[DM] {0}", m_PowerUp ), 5, TimeSpan.FromMinutes( 1.0 ) ) );
                    break;
                }
                case PowerUpType.Int:
                {
                    m.FixedParticles( 0x3779, 10, 15, 5009, EffectLayer.Waist );
                    m.PlaySound( 0x1E6 );
                    m.AddStatMod( new StatMod( StatType.Int, String.Format( "[DM] {0}", m_PowerUp ), 5, TimeSpan.FromMinutes( 1.0 ) ) );
                    break;
                }
                case PowerUpType.Rage:
                {
                    m.FixedParticles( 0x3779, 10, 15, 5009, EffectLayer.Waist );
                    m.PlaySound( 0x1E6 );
                    m.AddStatMod( new StatMod( StatType.All, String.Format( "[DM] {0}", m_PowerUp ), 10, TimeSpan.FromMinutes( 1.0 ) ) );
                    break;
                }
                case PowerUpType.Spirit:
                {
                    m.FixedParticles( 0x3779, 10, 15, 5009, EffectLayer.Waist );
                    m.PlaySound( 0x1E6 );
                    m.AddStatMod( new StatMod( StatType.Int, String.Format( "[DM] {0}", m_PowerUp ), 15, TimeSpan.FromMinutes( 1.0 ) ) );
                    break;
                }
                case PowerUpType.Str:
                {
                    m.FixedParticles( 0x3779, 10, 15, 5009, EffectLayer.Waist );
                    m.PlaySound( 0x1E6 );
                    m.AddStatMod( new StatMod( StatType.Str, String.Format( "[DM] {0}", m_PowerUp ), 5, TimeSpan.FromMinutes( 1.0 ) ) );
                    break;
                }
                case PowerUpType.Supremacy:
                {
                    m.FixedParticles( 0x3779, 10, 15, 5009, EffectLayer.Waist );
                    m.PlaySound( 0x1E6 );
                    m.AddStatMod( new StatMod( StatType.All, String.Format( "[DM] {0}", m_PowerUp ), 20, TimeSpan.FromSeconds( 20.0 ) ) );
                    break;
                }
            }

            new RespawnTimer( this ).Start();
            return true;
        }
开发者ID:FreeReign,项目名称:imaginenation,代码行数:74,代码来源:DMPowerUpSpawner.cs

示例11: OnDoubleClick

        public override void OnDoubleClick(Mobile from)
        {

            if (Parent != from)
            {
                from.SendMessage("The Sword must be eqquiped to use.");
            }
            else if (from.Title != "Merlin's Apprentance")
            {
                from.Title = "Merlin's Apprentance";

                from.BoltEffect(0);
                from.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);

                m_StatMod0 = new StatMod(StatType.Str, "MOD0", 10, TimeSpan.Zero);
                m_StatMod1 = new StatMod(StatType.Int, "MOD1", 10, TimeSpan.Zero);

                from.AddStatMod(m_StatMod0);
                from.AddStatMod(m_StatMod1);

                this.WeaponAttributes.HitLeechHits = 65;
                this.WeaponAttributes.HitLeechMana = 45;
                this.Attributes.WeaponSpeed = 30;
            }
            else
            {
                from.BoltEffect(0);
                from.FixedParticles(0x36BD, 20, 10, 5044, EffectLayer.Head);

                from.Title = null;

                from.RemoveStatMod("MOD0");
                from.RemoveStatMod("MOD1");

                this.WeaponAttributes.HitLeechHits = 25;
                this.WeaponAttributes.HitLeechMana = 25;
                this.Attributes.WeaponSpeed = 15;
            }
        }
开发者ID:greeduomacro,项目名称:unknown-shard-1,代码行数:39,代码来源:BladeofTorment.cs

示例12: RemoveBonus

        public static void RemoveBonus( Mobile m )
        {
            BaseArmor armor;

            if ( ( armor = m.FindItemOnLayer( Layer.Neck ) as BaseArmor ) is DarkwoodGorget )
                RemoveBonus( armor );
            if ( ( armor = m.FindItemOnLayer( Layer.Helm ) as BaseArmor ) is DarkwoodCrown )
                RemoveBonus( armor );
            if ( ( armor = m.FindItemOnLayer( Layer.Pants ) as BaseArmor ) is DarkwoodLeggings )
                RemoveBonus( armor );
            if ( ( armor = m.FindItemOnLayer( Layer.Arms ) as BaseArmor ) is DarkwoodPauldrons )
                RemoveBonus( armor );
            if ( ( armor = m.FindItemOnLayer( Layer.Gloves ) as BaseArmor ) is DarkwoodGauntlets )
                RemoveBonus( armor );
            if ( ( armor = m.FindItemOnLayer( Layer.InnerTorso ) as BaseArmor ) is DarkwoodChest )
                RemoveBonus( armor );

            if ( m_Bonus.ContainsKey( m ) )
            {
                List<AttributeMod> mods = m_Bonus[m];

                RemoveMods( m, mods );
                m_Bonus.Remove( m );
            }

            m.RemoveStatMod( "DarkwoodSetStr" );
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:27,代码来源:DarkwoodSet.cs

示例13: RemoveBonus

        public static void RemoveBonus( Mobile m )
        {
            BaseArmor armor;

            if ( ( armor = m.FindItemOnLayer( Layer.Gloves ) as BaseArmor ) is GauntletsOfTheGrizzle )
                RemoveBonus( armor );
            if ( ( armor = m.FindItemOnLayer( Layer.Pants ) as BaseArmor ) is GreavesOfTheGrizzle )
                RemoveBonus( armor );
            if ( ( armor = m.FindItemOnLayer( Layer.Arms ) as BaseArmor ) is VambracesOfTheGrizzle )
                RemoveBonus( armor );
            if ( ( armor = m.FindItemOnLayer( Layer.Helm ) as BaseArmor ) is SkullHelmOfTheGrizzle )
                RemoveBonus( armor );
            if ( ( armor = m.FindItemOnLayer( Layer.InnerTorso ) as BaseArmor ) is TunicOfTheGrizzle )
                RemoveBonus( armor );

            if ( m_Bonus.ContainsKey( m ) )
            {
                List<AttributeMod> mods = m_Bonus[m];

                RemoveMods( m, mods );
                m_Bonus.Remove( m );
            }

            m.RemoveStatMod( "GrizzleSetStr" );
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:25,代码来源:MonstrousInterredGrizzleSet.cs

示例14: OnDoubleClick


//.........这里部分代码省略.........
                    if (from.Karma <= 0)
                    {
                        from.Title = "Gaurdian of the Ages";
                        from.BodyMod = 753;
                        from.HueMod = 1109;

                        from.FixedParticles(0x373A, 10, 15, 5018, EffectLayer.Waist);

                        m_StatMod5 = new StatMod(StatType.Str, "MOD5", 10, TimeSpan.Zero);

                        from.AddStatMod(m_StatMod5);

                        this.Attributes.WeaponDamage = 15;
                        this.Attributes.ReflectPhysical = 15;
                        this.Attributes.DefendChance = 25;
                        this.Attributes.WeaponSpeed = 5;
                        this.Attributes.SpellChanneling = 1;
                        this.Attributes.SpellDamage = 10;
                        this.Attributes.NightSight = 1;
                    }
                    else
                    {

                        from.FixedParticles(0x373A, 10, 15, 5018, EffectLayer.Waist);

                        m_StatMod5 = new StatMod(StatType.Str, "MOD5", 10, TimeSpan.Zero);

                        from.AddStatMod(m_StatMod5);

                        this.Attributes.WeaponDamage = 15;
                        this.Attributes.ReflectPhysical = 15;
                        this.Attributes.DefendChance = 25;
                        this.Attributes.WeaponSpeed = 5;
                        this.Attributes.SpellChanneling = 1;
                        this.Attributes.SpellDamage = 10;
                        this.Attributes.NightSight = 1;
                    }
                }
                else if (ItemID == 7108)
                {
                    if (from.Karma >= 0)
                    {

                        from.Title = "Gaurdian of the Ages";
                        from.BodyMod = 752;
                        from.HueMod = 1157;

                        from.FixedParticles(0x373A, 1, 17, 1108, 7, 9914, 0);
                        from.FixedParticles(0x376A, 1, 22, 67, 7, 9502, 0);

                        m_StatMod5 = new StatMod(StatType.Str, "MOD5", 10, TimeSpan.Zero);

                        from.AddStatMod(m_StatMod5);

                        this.Attributes.WeaponDamage = 15;
                        this.Attributes.ReflectPhysical = 15;
                        this.Attributes.DefendChance = 25;
                        this.Attributes.WeaponSpeed = 5;
                        this.Attributes.SpellChanneling = 1;
                        this.Attributes.SpellDamage = 10;
                        this.Attributes.NightSight = 1;
                    }
                    else
                    {
                        from.FixedParticles(0x373A, 10, 15, 5018, EffectLayer.Waist);

                        m_StatMod5 = new StatMod(StatType.Str, "MOD5", 10, TimeSpan.Zero);

                        from.AddStatMod(m_StatMod5);

                        this.Attributes.WeaponDamage = 15;
                        this.Attributes.ReflectPhysical = 15;
                        this.Attributes.DefendChance = 25;
                        this.Attributes.WeaponSpeed = 5;
                        this.Attributes.SpellChanneling = 1;
                        this.Attributes.SpellDamage = 10;
                        this.Attributes.NightSight = 1;
                    }
                }
            }
            else
            {
                from.BoltEffect(0);
                from.FixedParticles(0x376A, 1, 29, 0x47D, 2, 9962, 0);

                from.HueMod = -1;
                from.Title = null;
                from.BodyMod = 0x0;

                from.RemoveStatMod("MOD5");

                this.Attributes.WeaponDamage = 5;
                this.Attributes.ReflectPhysical = 5;
                this.Attributes.DefendChance = 15;
                this.Attributes.WeaponSpeed = 0;
                this.Attributes.SpellChanneling = 1;
                this.Attributes.SpellDamage = 5;
                this.Attributes.NightSight = 1;
            }
        }
开发者ID:greeduomacro,项目名称:unknown-shard-1,代码行数:101,代码来源:GuardiansCrest.cs

示例15: Target

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

                if (m.Spell != null)
                    m.Spell.OnCasterHurt();

                if (BlessSpell.UnderEffect(m))
                {
                    bool message = true;

                    if (m.Str > m.RawStr)
                    {
                        m.RemoveStatMod(String.Format("[Magic] {0} Offset", StatType.Str));
                        message = false;
                    }
                    if (m.Dex > m.RawDex)
                    {
                        m.RemoveStatMod(String.Format("[Magic] {0} Offset", StatType.Dex));
                        message = false;
                    }
                    if (m.Int > m.RawInt)
                    {
                        m.RemoveStatMod(String.Format("[Magic] {0} Offset", StatType.Int));
                        message = false;
                    }

                    if (message)
                        m.SendAsciiMessage("You are under the effect of a bless spell and cannot get any stat penalties");
                }
                else
                {
                    SpellHelper.AddStatCurse(Caster, m, StatType.Str);
                    SpellHelper.DisableSkillCheck = true;
                    SpellHelper.AddStatCurse(Caster, m, StatType.Dex);
                    SpellHelper.AddStatCurse(Caster, m, StatType.Int);
                    SpellHelper.DisableSkillCheck = false;
                }

			    TimeSpan duration = SpellHelper.GetDuration(Caster, m);
                m_UnderEffect[m] = Timer.DelayCall(duration, new TimerStateCallback(RemoveEffect), m);
                m.UpdateResistances();

				//m.Paralyzed = false;
                m.FixedParticles(0x374A, 10, 15, 5028, EffectLayer.Waist);
				m.PlaySound( Sound );

                int percentage = (int)(SpellHelper.GetOffsetScalar(Caster, m, true) * 100);
                TimeSpan length = SpellHelper.GetDuration(Caster, m);

                string args = String.Format("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}", percentage, percentage, percentage, 10, 10, 10, 10);

                BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.Curse, 1075835, 1075836, length, m, args));

                HarmfulSpell(m);
			}

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


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