Example #1
0
        }// 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;
        }
Example #2
0
		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();
		}
Example #3
0
		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();
		}
Example #4
0
        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();
        }
Example #5
0
        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;
        }
Example #6
0
        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?
        }
Example #7
0
		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();
		}
Example #8
0
        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" );
        }
Example #9
0
        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;
        }
        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;
        }
        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;
            }
        }
Example #12
0
        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" );
        }
        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" );
        }
        public override void OnDoubleClick(Mobile from)
        {
            if (Parent != from)
            {
                if( this.ItemID == 7107 ) this.ItemID = 7108;
				else if( this.ItemID == 7108 ) this.ItemID = 7107;
            }
            else if (from.Title != "Gaurdian of the Ages")
            {
                if (ItemID == 7107)
                {
                    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;
            }
        }
Example #15
0
		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();
		}
Example #16
0
		public static void Debuff( Mobile mob )
		{
			mob.RemoveStatMod( "[Magic] Str Offset" );
			mob.RemoveStatMod( "[Magic] Dex Offset" );
			mob.RemoveStatMod( "[Magic] Int Offset" );
			mob.RemoveStatMod( "Concussion" );
			mob.RemoveStatMod( "blood-rose" );
			mob.RemoveStatMod( "clarity-potion" );

			OrangePetals.RemoveContext( mob );

			mob.Paralyzed = false;
			mob.Hidden = false;

			if ( !Core.AOS )
			{
				mob.MagicDamageAbsorb = 0;
				mob.MeleeDamageAbsorb = 0;
				Spells.Second.ProtectionSpell.Registry.Remove( mob );

				Spells.Fourth.ArchProtectionSpell.RemoveEntry( mob );

				mob.EndAction( typeof( DefensiveSpell ) );
			}

			TransformationSpellHelper.RemoveContext( mob, true );
			AnimalForm.RemoveContext( mob, true );

			if( DisguiseTimers.IsDisguised( mob ) )
				DisguiseTimers.StopTimer( mob );

			if( !mob.CanBeginAction( typeof( PolymorphSpell ) ) )
			{
				mob.BodyMod = 0;
				mob.HueMod = -1;
				mob.EndAction( typeof( PolymorphSpell ) );
			}

			BaseArmor.ValidateMobile( mob );
			BaseClothing.ValidateMobile( mob );

			mob.Hits = mob.HitsMax;
			mob.Stam = mob.StamMax;
			mob.Mana = mob.ManaMax;

			mob.Poison = null;
		}
		public static bool ClearSkillLoss(Mobile mob)
		{
			try
			{
				SkillLossContext context;

				if (m_SkillLoss.TryGetValue(mob, out context) && context != null)
				{
					m_SkillLoss.Remove(mob);

					List<SkillMod> mods = context.m_SkillMods;

					foreach (SkillMod t in mods)
					{
						mob.RemoveSkillMod(t);
					}

					context.m_Timer.Stop();

					mob.RemoveStatMod("Murder Penalty Str");
					mob.RemoveStatMod("Murder Penalty Dex");
					mob.RemoveStatMod("Murder Penalty Int");

					return true;
				}
			}
			catch
			{ }

			return false;
		}
Example #18
0
		private void FixMobile(Mobile m)
		{
			if (!m.Alive)
				m.Resurrect();

			HandleCorpse(m);

			m.Aggressed.Clear();
			m.Aggressors.Clear();
			m.Hits = m.HitsMax;
			m.Stam = m.StamMax;
			m.Mana = m.ManaMax;
			m.DamageEntries.Clear();
			m.Combatant = null;
			m.InvalidateProperties();

            m.Criminal = false;

			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(m);

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

			#region Buff Icons
			if (m is PlayerMobile)
			{
				PlayerMobile pm = (PlayerMobile)m;
				pm.RemoveBuff(BuffIcon.Clumsy);
				pm.RemoveBuff(BuffIcon.CorpseSkin);
				pm.RemoveBuff(BuffIcon.EvilOmen);
				pm.RemoveBuff(BuffIcon.Curse);
				pm.RemoveBuff(BuffIcon.FeebleMind);
				pm.RemoveBuff(BuffIcon.MassCurse);
				pm.RemoveBuff(BuffIcon.Paralyze);
				pm.RemoveBuff(BuffIcon.Poison);
				pm.RemoveBuff(BuffIcon.Strangle);
				pm.RemoveBuff(BuffIcon.Weaken);
			}
			#endregion

			m.SendMessage("The duel has ended.");
		}
Example #19
0
        public static void RemoveBonus( Mobile m )
        {
            BaseArmor armor;

            if ( ( armor = m.FindItemOnLayer( Layer.Gloves ) as BaseArmor ) is AssassinGloves )
                RemoveBonus( armor );
            if ( ( armor = m.FindItemOnLayer( Layer.Pants ) as BaseArmor ) is AssassinLeggings )
                RemoveBonus( armor );
            if ( ( armor = m.FindItemOnLayer( Layer.Arms ) as BaseArmor ) is AssassinSleeves )
                RemoveBonus( armor );
            if ( ( armor = m.FindItemOnLayer( Layer.InnerTorso ) as BaseArmor ) is AssassinTunic )
                RemoveBonus( armor );

            m.RemoveStatMod( "AssassinSetDex" );

            SkillMod skillmod = m_Table[m] as SkillMod;

            if ( skillmod != null )
            {
                m.RemoveSkillMod( skillmod );
                m_Table.Remove( m );
            }
        }
 public void RevertFormOn( Mobile from )
 {
     from.BodyValue = OriginalBody;
     from.Hue = OriginalHue;
     from.Emote( "*reverts to {0} original form*", from.Female == true ? "her" : "his" );
     OriginalHue = 0;
     OriginalBody = 0;
     from.RemoveStatMod( "Bracelet of the Serpent" );
     from.NameMod = null;
 }
Example #21
0
        public void RemoveStatMods( Mobile m )
        {
            if ( m == null )
                return;

            string modName = this.Serial.ToString();

            m.RemoveStatMod( String.Format( "[Magic Hat] -Str {0}", modName ) );
            m.RemoveStatMod( String.Format( "[Magic Hat] -Dex {0}", modName ) );
            m.RemoveStatMod( String.Format( "[Magic Hat] +Int {0}", modName ) );
        }
Example #22
0
        public static void RemoveBonus( Mobile m )
        {
            BaseArmor armor;

            if ( ( armor = m.FindItemOnLayer( Layer.Gloves ) as BaseArmor ) is LeafweaveGloves )
                RemoveBonus( armor );
            if ( ( armor = m.FindItemOnLayer( Layer.Pants ) as BaseArmor ) is LeafweaveLeggings )
                RemoveBonus( armor );
            if ( ( armor = m.FindItemOnLayer( Layer.Arms ) as BaseArmor ) is LeafweaveSleeves )
                RemoveBonus( armor );
            if ( ( armor = m.FindItemOnLayer( Layer.InnerTorso ) as BaseArmor ) is LeafweaveTunic )
                RemoveBonus( armor );

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

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

            m.RemoveStatMod( "LeafweaveSetInt" );
        }
Example #23
0
        private static void RemoveMorphEffect(Mobile m)
        {
            m.BodyMod = 0;

            string modName = m.Serial + "Polymorph";
            m.RemoveStatMod(modName + "Str");
            m.RemoveStatMod(modName + "Dex");
            m.RemoveStatMod(modName + "Int");

            m.VirtualArmorMod = 0;
            
            if (m is PlayerMobile)
            {
                PlayerMobile pm = ((PlayerMobile) m);
                pm.MinDamage = 0;
                pm.MaxDamage = 0;
                pm.SwingSpeed = 0;
            }

            m.EndAction(typeof(PolymorphSpell));

            BaseArmor.ValidateMobile(m);

            if (m.NameMod != null) //Player has incognito, need to update name
                m.NameMod = IncognitoSpell.GetNameMod(m.BodyValue);
        }
Example #24
0
        public static void RemoveBonus( Mobile m )
        {
            BaseArmor armor;
            BaseWeapon weapon;

            if ( ( armor = m.FindItemOnLayer( Layer.TwoHanded ) as BaseArmor ) is MalekisHonor )
                RemoveBonus( armor );
            if ( ( weapon = m.FindItemOnLayer( Layer.OneHanded ) as BaseWeapon ) is Evocaricus )
                RemoveBonus( weapon );

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

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

            m.RemoveStatMod( "JuggernautSetStr" );
        }
Example #25
0
		public void Target( Mobile m )
		{
			if ( CheckBSequence( m ) )
			{
				SpellHelper.Turn( Caster, m );

				/* Attempts to remove all Curse effects from Target.
				 * Curses include Mage spells such as Clumsy, Weaken, Feeblemind and Paralyze
				 * as well as all Necromancer curses.
				 * Chance of removing curse is affected by Caster's Karma.
				 */

				int chance = 0;

				if ( Caster.Karma < -5000 )
					chance = 0;
				else if ( Caster.Karma < 0 )
					chance = (int) Math.Sqrt( 20000 + Caster.Karma ) - 122;
				else if ( Caster.Karma < 5625 )
					chance = (int) Math.Sqrt( Caster.Karma ) + 25;
				else
					chance = 100;

				if ( chance > Utility.Random( 100 ) )
				{
					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;

					EvilOmenSpell.TryEndEffect( m );
					StrangleSpell.RemoveCurse( m );
					CorpseSkinSpell.RemoveCurse( m );
					CurseSpell.RemoveEffect( m );
					MortalStrike.EndWound( m );
					if (Core.ML) { BloodOathSpell.RemoveCurse ( m ); }
					MindRotSpell.ClearMindRotScalar ( m );

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

					// TODO: Should this remove blood oath? Pain spike?
				}
				else
				{
					m.PlaySound( 0x1DF );
				}
			}

			FinishSequence();
		}
Example #26
0
        public static void RemoveBonus( Mobile m )
        {
            if ( m_Bonus.ContainsKey( m ) )
            {
                List<object> mods = m_Bonus[m];

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

            Item item;

            if ( ( item = m.FindItemOnLayer( Layer.InnerTorso ) ) != null )
                item.InvalidateProperties();
            if ( ( item = m.FindItemOnLayer( Layer.Pants ) ) != null )
                item.InvalidateProperties();
            if ( ( item = m.FindItemOnLayer( Layer.Arms ) ) != null )
                item.InvalidateProperties();
            if ( ( item = m.FindItemOnLayer( Layer.Gloves ) ) != null )
                item.InvalidateProperties();
            if ( ( item = m.FindItemOnLayer( Layer.Helm ) ) != null )
                item.InvalidateProperties();
            if ( ( item = m.FindItemOnLayer( Layer.Neck ) ) != null )
                item.InvalidateProperties();

            m.RemoveStatMod( "SorcerersSetInt" );
        }