private void DefineMods()
		{
			m_SkillMod0 = new DefaultSkillMod( SkillName.Magery, true, 20 ); 
			m_SkillMod1 = new DefaultSkillMod( SkillName.EvalInt, true, 20 ); 
			m_SkillMod2 = new DefaultSkillMod( SkillName.Meditation, true, 20 ); 
			m_StatMod0 = new StatMod( StatType.Int, "MagiCloak", 20, TimeSpan.Zero ); 
		}
Exemplo n.º 2
0
		private void DefineMods()
		{
			m_SkillMod0 = new DefaultSkillMod( SkillName.Hiding, true, 10 ); 
			m_SkillMod1 = new DefaultSkillMod( SkillName.Stealth, true, 10 ); 
			m_SkillMod2 = new DefaultSkillMod( SkillName.Healing, true, -10 ); 
			m_StatMod0 = new StatMod( StatType.Dex, "ElvenCloak", 5, TimeSpan.Zero ); 
		}
Exemplo n.º 3
0
		private void DefineMods()
		{
			m_SkillMod0 = new DefaultSkillMod( SkillName.Necromancy, true, 20 ); 
			m_SkillMod1 = new DefaultSkillMod( SkillName.SpiritSpeak, true, 20 ); 
			m_SkillMod2 = new DefaultSkillMod( SkillName.MagicResist, true, 20 ); 
			m_StatMod0 = new StatMod( StatType.Dex, "DruidCloak", 15, TimeSpan.Zero ); 
		}
		private void DefineMods()
		{
			m_SkillMod0 = new DefaultSkillMod( SkillName.SpiritSpeak, true, 5 );
			m_SkillMod1 = new DefaultSkillMod( SkillName.EvalInt, true, 5 );
			m_SkillMod2 = new DefaultSkillMod( SkillName.Necromancy, true, 5 );
			m_StatMod0 = new StatMod( StatType.Int, "MagiCloak", 5, TimeSpan.Zero );
		}
Exemplo n.º 5
0
		private void DefineMods()
		{
			m_SkillMod0 = new DefaultSkillMod( SkillName.AnimalLore, true, 15 ); 
			m_SkillMod1 = new DefaultSkillMod( SkillName.Herding, true, 15 ); 
			m_SkillMod2 = new DefaultSkillMod( SkillName.Tracking, true, 15 ); 
			m_StatMod0 = new StatMod( StatType.Int, "Arch Druid Cloak", 15, TimeSpan.Zero ); 
		}
Exemplo n.º 6
0
		private void DefineMods()
		{
			m_SkillMod0 = new DefaultSkillMod( SkillName.Peacemaking, true, 15 ); 
			m_SkillMod1 = new DefaultSkillMod( SkillName.Swords, true, 15 ); 
			m_SkillMod2 = new DefaultSkillMod( SkillName.Healing, true, 15 ); 
			m_StatMod0 = new StatMod( StatType.Str, "CloakofSirKen", 15, TimeSpan.Zero ); 
		}
Exemplo n.º 7
0
		public override void OnAdded( object parent )
		{
			base.OnAdded( parent );

			if ( parent is Mobile )
			{
				Mobile from = parent as Mobile;
				if ( m_SkillMod1 != null )
					m_SkillMod1.Remove();
				if (m_SkillMod2 != null )
					m_SkillMod2.Remove();
				int amount = 25;
				if (from.SkillsCap < from.SkillsTotal + (amount * 10))
					amount = (from.SkillsCap - from.SkillsTotal) / 10;
				m_SkillMod1 = new DefaultSkillMod( m_Skill1, true, amount );
				m_SkillMod1.ObeyCap = true;
				from.AddSkillMod( m_SkillMod1 );
				amount = 25;
				if (from.SkillsCap < from.SkillsTotal + (amount * 10))
					amount = (from.SkillsCap - from.SkillsTotal) / 10;
				m_SkillMod2 = new DefaultSkillMod( m_Skill2, true, amount );
				m_SkillMod2.ObeyCap = true;
				from.AddSkillMod( m_SkillMod2 );
			}
		}
Exemplo n.º 8
0
		private void DefineMods()
		{
			m_SkillMod0 = new DefaultSkillMod( SkillName.AnimalLore, true, 10 ); 
			m_SkillMod1 = new DefaultSkillMod( SkillName.AnimalTaming, true, 10 ); 
			m_SkillMod2 = new DefaultSkillMod( SkillName.Peacemaking, true, 10 ); 
			m_StatMod0 = new StatMod( StatType.Dex, "DruidCloak", 15, TimeSpan.Zero ); 
		}
Exemplo n.º 9
0
		private void DefineMods()
		{
			m_SkillMod0 = new DefaultSkillMod( SkillName.Swords, true, 20 ); 
			m_SkillMod1 = new DefaultSkillMod( SkillName.Parry, true, 20 ); 
			m_SkillMod2 = new DefaultSkillMod( SkillName.MagicResist, true, 20 ); 
			m_StatMod0 = new StatMod( StatType.Dex, "DruidCloak", 15, TimeSpan.Zero ); 
		}
Exemplo n.º 10
0
		private void DefineMods()
		{
			m_SkillMod0 = new DefaultSkillMod( SkillName.Swords, true, 5 );
			m_SkillMod1 = new DefaultSkillMod( SkillName.Tactics, true, 5 );
			m_SkillMod2 = new DefaultSkillMod( SkillName.Anatomy, true, 5 ); 
			//m_StatMod0 = new StatMod( StatType.Int, "MagiCloak", 5, TimeSpan.Zero ); 
		}
Exemplo n.º 11
0
		private void DefineMods()
		{
			m_SkillMod0 = new DefaultSkillMod( SkillName.Stealth, true, 20 ); 
			m_SkillMod1 = new DefaultSkillMod( SkillName.Hiding, true, 20 ); 
			m_SkillMod2 = new DefaultSkillMod( SkillName.Stealing, true, 20 );
                        m_SkillMod3 = new DefaultSkillMod( SkillName.Fencing, true, 20 );  
			m_StatMod0 = new StatMod( StatType.Dex, "RogueCloak", 15, TimeSpan.Zero ); 
		}
Exemplo n.º 12
0
		public void RemoveSkillMod()
		{
			m_SkillMod.Owner.SendLocalizedMessage( 1075541 ); //The scent of herbs gradually fades away...

			m_SkillMod.Remove();
			m_SkillMod = null;
			m_Active = false;
		}
Exemplo n.º 13
0
		private void DefineMods()
		{
			m_SkillMod0 = new DefaultSkillMod( SkillName.Healing, true, 20 ); 
			m_SkillMod1 = new DefaultSkillMod( SkillName.Swords, true, 20 ); 
			m_SkillMod2 = new DefaultSkillMod( SkillName.Chivalry, true, 20 ); 
                        m_SkillMod3 = new DefaultSkillMod( SkillName.Macing, true, 20 );
			m_StatMod0 = new StatMod( StatType.Str, "FighterCloak", 15, TimeSpan.Zero ); 
		}
Exemplo n.º 14
0
		public override void OnRemoved( object parent )
		{
			if( UseSkillMod && m_BSMod != null )
			{
				m_BSMod.Remove();
				m_BSMod = null;
			}
		}
Exemplo n.º 15
0
		public override void OnRemoved( object parent )
		{
			base.OnRemoved( parent );

			if ( m_SkillMod != null )
				m_SkillMod.Remove();

			m_SkillMod = null;
		}
Exemplo n.º 16
0
		public void AddSkillModTo( Mobile to )
		{
			m_SkillMod = new DefaultSkillMod( SkillName.Cooking, true, m_Bonus );
			m_SkillMod.ObeyCap = true;
			to.AddSkillMod( m_SkillMod );
			m_Active = true;

			to.SendLocalizedMessage( 1075540 ); //The scent of fresh herbs begins to fill your home...
		}
Exemplo n.º 17
0
		public override bool OnEquip( Mobile from )
		{
			if( UseSkillMod )
			{
                if (m_BSMod != null)
                    m_BSMod.Remove();

			    m_BSMod = new DefaultSkillMod( SkillName.Blacksmith, true, 20 );
                    from.AddSkillMod( m_BSMod );
			}
			return base.OnEquip( from );
		}
Exemplo n.º 18
0
        }// ancient smithy hammer
        public override void OnAdded(object parent)
        {
            base.OnAdded(parent);

            if (this.m_Bonus != 0 && parent is Mobile)
            {
                if (this.m_SkillMod != null)
                    this.m_SkillMod.Remove();

                this.m_SkillMod = new DefaultSkillMod(SkillName.Blacksmith, true, this.m_Bonus);
                ((Mobile)parent).AddSkillMod(this.m_SkillMod);
            }
        }
		public override void OnAdded( object parent )
		{
			base.OnAdded( parent );

			if ( i_SkillBonus != 0 && parent is Mobile )
			{
				if ( sm_SkillMod != null )
					sm_SkillMod.Remove();

				sm_SkillMod = new DefaultSkillMod( sn_SkillName, true, i_SkillBonus );
				((Mobile)parent).AddSkillMod( sm_SkillMod );
			}
		}
Exemplo n.º 20
0
		public override void OnAdded(IEntity parent)
		{
			base.OnAdded( parent );

			if ( m_Bonus != 0 && parent is Mobile )
			{
				if ( m_SkillMod != null )
					m_SkillMod.Remove();

				m_SkillMod = new DefaultSkillMod( SkillName.Blacksmith, true, m_Bonus );
				((Mobile)parent).AddSkillMod( m_SkillMod );
			}
		}
Exemplo n.º 21
0
 public override bool OnEquip(Mobile from)
 {
     if (UseSkillMod)
     {
         if (from.FindItemOnLayer(Layer.TwoHanded) != this && m_ARCHERYMod == null && m_TACTICSMod == null)
         {
             m_TACTICSMod = new DefaultSkillMod(SkillName.Tactics, true, 15);
             from.AddSkillMod(m_TACTICSMod);
             m_ARCHERYMod = new DefaultSkillMod(SkillName.Archery, true, 10);
             from.AddSkillMod(m_ARCHERYMod);
         }
     }
     return base.OnEquip(from);
 }
Exemplo n.º 22
0
        public override void OnItemUsed(Mobile from, Item item)
        {
            if (Charges < 1)
            {
                if (m_SkillMod != null)
                {
                    m_SkillMod.Remove();
                    m_SkillMod = null;
                }
                from.SendAsciiMessage("The fish have chewed off all your bait!");
            }


            base.OnItemUsed(from, item);
        }
Exemplo n.º 23
0
        public override void OnDoubleClick(Mobile from)
        {
            Fishing.System.BeginHarvesting(from, this);

            if (Charges >= 1 && m_SkillMod == null && from.FindItemOnLayer(Layer.OneHanded) is DeepSeaFishingPole)
            {
                m_SkillMod = new DefaultSkillMod(SkillName.Fishing, true, 1);
                from.AddSkillMod(m_SkillMod);
            }

            if (!Sphere.EquipOnDouble(from, this))
                return;


            base.OnDoubleClick(from);
        }
Exemplo n.º 24
0
 public override void OnRemoved(object parent)
 {
     Mobile pl = null;
     if (parent is Mobile)
         pl = (Mobile)parent;
     if (UseSkillMod && m_ARCHERYMod != null && m_TACTICSMod != null && pl != null)
     {
         if (pl.FindItemOnLayer(Layer.TwoHanded) != this)
         {
             m_ARCHERYMod.Remove();
             m_ARCHERYMod = null;
             m_TACTICSMod.Remove();
             m_TACTICSMod = null;
         }
     }
 }
Exemplo n.º 25
0
		public override void OnAdded( object parent )
		{
			base.OnAdded( parent );

			if ( parent is Mobile )
			{
				Mobile from = parent as Mobile;
				if ( m_SkillMod != null )
					m_SkillMod.Remove();
				int amount = 50;
				if (from.SkillsCap < from.SkillsTotal + (amount * 10))
					amount = (from.SkillsCap - from.SkillsTotal) / 10;
				m_SkillMod = new DefaultSkillMod( ((SkillName)((int)m_Skill)), true, amount );
				m_SkillMod.ObeyCap = true;
				from.AddSkillMod( m_SkillMod );
			}
		}
Exemplo n.º 26
0
        public static MorphResult Morph(Mobile m, int entryID)
        {
            if (entryID < 0 || entryID >= m_Entries.Length)
            {
                return(MorphResult.Fail);
            }

            AnimalFormEntry entry = m_Entries[entryID];

            m_LastAnimalForms[m] = entryID;             // On OSI, it's the last /attempted/ one not the last succeeded one

            if (m.Skills.Ninjitsu.Value < entry.ReqSkill)
            {
                string args = String.Format("{0}\t{1}\t ", entry.ReqSkill.ToString("F1"), SkillName.Ninjitsu);
                m.SendLocalizedMessage(1063013, args);                   // You need at least ~1_SKILL_REQUIREMENT~ ~2_SKILL_NAME~ skill to use that ability.
                return(MorphResult.NoSkill);
            }

            double minSkill = entry.ReqSkill - 12.5;
            double maxSkill = entry.ReqSkill + 37.5;

            if (!m.CheckSkill(SkillName.Ninjitsu, minSkill, maxSkill))
            {
                return(MorphResult.Fail);
            }

            BaseMount.Dismount(m);

            m.BodyMod = entry.BodyMod;

            if (entry.HueMod >= 0)
            {
                m.HueMod = entry.HueMod;
            }

            if (entry.SpeedBoost)
            {
                m.ForcedRun = true;
            }

            SkillMod mod = null;

            if (entry.StealthBonus)
            {
                mod         = new DefaultSkillMod(SkillName.Stealth, true, 20.0);
                mod.ObeyCap = true;
                m.AddSkillMod(mod);
            }

            #region Heritage Items

            /*
             * else if ( entry.StealingBonus )
             * {
             *      mod = new DefaultSkillMod( SkillName.Stealing, true, 10.0 );
             *      mod.ObeyCap = true;
             *      m.AddSkillMod( mod );
             * }
             */
            #endregion

            Timer timer = new AnimalFormTimer(m, entry.BodyMod, m.HueMod);
            timer.Start();

            AddContext(m, new AnimalFormContext(timer, mod, entry.SpeedBoost, entry.Type));

            Effects.SendLocationParticles(EffectItem.Create(m.Location, m.Map, EffectItem.DefaultDuration), 0x3728, 1, 13, 0x7F3);

            BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.AnimalForm, 1075822, 1075823, String.Format("{0}\t{1}", entry.ArticleCliloc, entry.FormCliloc)));

            m.Target = null;

            return(MorphResult.Success);
        }
Exemplo n.º 27
0
 private void DefineMods()
 {
     m_SkillMod0 = new DefaultSkillMod(SkillName.Cooking, true, 5);
 }
Exemplo n.º 28
0
 //Skillmod
 private void DefineMods()
 {
     m_SkillMod0 = new DefaultSkillMod(SkillName.Swords, true, 20);
 }
Exemplo n.º 29
0
 private void DefineMods()
 {
     m_SkillMod0 = new DefaultSkillMod(SkillName.AnimalTaming, true, 10);
     m_SkillMod1 = new DefaultSkillMod(SkillName.AnimalLore, true, 10);
 }
Exemplo n.º 30
0
 private void DefineMods()
 {
     m_SkillMod6 = new DefaultSkillMod(SkillName.Tailoring, true, 20);
 }
Exemplo n.º 31
0
        private void DefineMods()
        {
            int value = Utility.RandomMinMax(1, 10);

            switch (Utility.Random(58))
            {
            case 0:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.ArmsLore, true, value);
                SkillBonus  = String.Format("Increases Arms Lore by {0}%", value);
                break;
            }

            case 1:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Begging, true, value);
                SkillBonus  = String.Format("Increases Begging by {0}%", value);
                break;
            }

            case 2:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Camping, true, value);
                SkillBonus  = String.Format("Increases Camping by {0}%", value);
                break;
            }

            case 3:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Cartography, true, value);
                SkillBonus  = String.Format("Increases Cartography by {0}%", value);
                break;
            }

            case 4:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Forensics, true, value);
                SkillBonus  = String.Format("Increases Forensics by {0}%", value);
                break;
            }

            case 5:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.ItemID, true, value);
                SkillBonus  = String.Format("Increases Item ID by {0}%", value);
                break;
            }

            case 6:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.TasteID, true, value);
                SkillBonus  = String.Format("Increases Taste ID by {0}%", value);
                break;
            }

            case 7:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Anatomy, true, value);
                SkillBonus  = String.Format("Increases Anatomy by {0}%", value);
                break;
            }

            case 8:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Archery, true, value);
                SkillBonus  = String.Format("Increases Archery by {0}%", value);
                break;
            }

            case 9:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Fencing, true, value);
                SkillBonus  = String.Format("Increases Fencing by {0}%", value);
                break;
            }

            case 10:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Focus, true, value);
                SkillBonus  = String.Format("Increases Focus by {0}%", value);
                break;
            }

            case 11:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Healing, true, value);
                SkillBonus  = String.Format("Increases Healing by {0}%", value);
                break;
            }

            case 12:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Macing, true, value);
                SkillBonus  = String.Format("Increases Mace Fighting by {0}%", value);
                break;
            }

            case 13:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Parry, true, value);
                SkillBonus  = String.Format("Increases Parry by {0}%", value);
                break;
            }

            case 14:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Swords, true, value);
                SkillBonus  = String.Format("Increases Swordsmanship by {0}%", value);
                break;
            }

            case 15:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Tactics, true, value);
                SkillBonus  = String.Format("Increases Tactics by {0}%", value);
                break;
            }

            case 16:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Throwing, true, value);
                SkillBonus  = String.Format("Increases Throwing by {0}%", value);
                break;
            }

            case 17:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Wrestling, true, value);
                SkillBonus  = String.Format("Increases Wrestling by {0}%", value);
                break;
            }

            case 18:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Alchemy, true, value);
                SkillBonus  = String.Format("Increases Alchemy by {0}%", value);
                break;
            }

            case 19:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Blacksmith, true, value);
                SkillBonus  = String.Format("Increases Blacksmithy by {0}%", value);
                break;
            }

            case 20:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Fletching, true, value);
                SkillBonus  = String.Format("Increases Bowcraft/Fletching by {0}%", value);
                break;
            }

            case 21:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Carpentry, true, value);
                SkillBonus  = String.Format("Increases Carpentry by {0}%", value);
                break;
            }

            case 22:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Cooking, true, value);
                SkillBonus  = String.Format("Increases Cooking by {0}%", value);
                break;
            }

            case 23:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Inscribe, true, value);
                SkillBonus  = String.Format("Increases Inscription by {0}%", value);
                break;
            }

            case 24:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Lumberjacking, true, value);
                SkillBonus  = String.Format("Increases Lumberjacking by {0}%", value);
                break;
            }

            case 25:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Mining, true, value);
                SkillBonus  = String.Format("Increases Mining by {0}%", value);
                break;
            }

            case 26:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Tailoring, true, value);
                SkillBonus  = String.Format("Increases Tailoring by {0}%", value);
                break;
            }

            case 27:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Tinkering, true, value);
                SkillBonus  = String.Format("Increases Tinkering by {0}%", value);
                break;
            }

            case 28:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Bushido, true, value);
                SkillBonus  = String.Format("Increases Bushido by {0}%", value);
                break;
            }

            case 29:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Chivalry, true, value);
                SkillBonus  = String.Format("Increases Chivalry by {0}%", value);
                break;
            }

            case 30:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.EvalInt, true, value);
                SkillBonus  = String.Format("Increases Evaluating Intelligence by {0}%", value);
                break;
            }

            case 31:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Imbuing, true, value);
                SkillBonus  = String.Format("Increases Imbuing by {0}%", value);
                break;
            }

            case 32:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Magery, true, value);
                SkillBonus  = String.Format("Increases Magery by {0}%", value);
                break;
            }

            case 33:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Meditation, true, value);
                SkillBonus  = String.Format("Increases Meditation by {0}%", value);
                break;
            }

            case 34:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Mysticism, true, value);
                SkillBonus  = String.Format("Increases Mysticism by {0}%", value);
                break;
            }

            case 35:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Necromancy, true, value);
                SkillBonus  = String.Format("Increases Necromancy by {0}%", value);
                break;
            }

            case 36:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Ninjitsu, true, value);
                SkillBonus  = String.Format("Increases Ninjitsu by {0}%", value);
                break;
            }

            case 37:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.MagicResist, true, value);
                SkillBonus  = String.Format("Increases Resisting Spells by {0}%", value);
                break;
            }

            case 38:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Spellweaving, true, value);
                SkillBonus  = String.Format("Increases Spellweaving by {0}%", value);
                break;
            }

            case 39:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.SpiritSpeak, true, value);
                SkillBonus  = String.Format("Increases Spirit Speak by {0}%", value);
                break;
            }

            case 40:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.AnimalLore, true, value);
                SkillBonus  = String.Format("Increases Animal Lore by {0}%", value);
                break;
            }

            case 41:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.AnimalTaming, true, value);
                SkillBonus  = String.Format("Increases Animal Taming by {0}%", value);
                break;
            }

            case 42:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Fishing, true, value);
                SkillBonus  = String.Format("Increases Fishing by {0}%", value);
                break;
            }

            case 43:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Herding, true, value);
                SkillBonus  = String.Format("Increases Herding by {0}%", value);
                break;
            }

            case 44:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Tracking, true, value);
                SkillBonus  = String.Format("Increases Tracking by {0}%", value);
                break;
            }

            case 45:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Veterinary, true, value);
                SkillBonus  = String.Format("Increases Veterinary by {0}%", value);
                break;
            }

            case 46:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.DetectHidden, true, value);
                SkillBonus  = String.Format("Increases Detecting Hidden by {0}%", value);
                break;
            }

            case 47:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Hiding, true, value);
                SkillBonus  = String.Format("Increases Hiding by {0}%", value);
                break;
            }

            case 48:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Lockpicking, true, value);
                SkillBonus  = String.Format("Increases Lockpicking by {0}%", value);
                break;
            }

            case 49:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Poisoning, true, value);
                SkillBonus  = String.Format("Increases Poisoning by {0}%", value);
                break;
            }

            case 50:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.RemoveTrap, true, value);
                SkillBonus  = String.Format("Increases Remove Trap by {0}%", value);
                break;
            }

            case 51:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Snooping, true, value);
                SkillBonus  = String.Format("Increases Snooping by {0}%", value);
                break;
            }

            case 52:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Stealing, true, value);
                SkillBonus  = String.Format("Increases Stealing by {0}%", value);
                break;
            }

            case 53:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Stealth, true, value);
                SkillBonus  = String.Format("Increases Stealth by {0}%", value);
                break;
            }

            case 54:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Discordance, true, value);
                SkillBonus  = String.Format("Increases Discordance by {0}%", value);
                break;
            }

            case 55:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Musicianship, true, value);
                SkillBonus  = String.Format("Increases Musicianship by {0}%", value);
                break;
            }

            case 56:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Peacemaking, true, value);
                SkillBonus  = String.Format("Increases Peacemaking by {0}%", value);
                break;
            }

            case 57:
            {
                m_SkillMod0 = new DefaultSkillMod(SkillName.Provocation, true, value);
                SkillBonus  = String.Format("Increases Provocation by {0}%", value);
                break;
            }
            }
        }
 private void DefineMods()
 {
     m_SkillMod0 = new DefaultSkillMod(SkillName.Tinkering, true, 10);
 }
Exemplo n.º 33
0
		public override bool OnEquip(Mobile from)
		{
			int strBonus = m_AosAttributes.BonusStr;
			int dexBonus = m_AosAttributes.BonusDex;
			int intBonus = m_AosAttributes.BonusInt;

			if ((strBonus != 0 || dexBonus != 0 || intBonus != 0))
			{
				Mobile m = from;

				string modName = Serial.ToString();

				if (strBonus != 0)
				{
					m.AddStatMod(new StatMod(StatType.Str, modName + "Str", strBonus, TimeSpan.Zero));
				}

				if (dexBonus != 0)
				{
					m.AddStatMod(new StatMod(StatType.Dex, modName + "Dex", dexBonus, TimeSpan.Zero));
				}

				if (intBonus != 0)
				{
					m.AddStatMod(new StatMod(StatType.Int, modName + "Int", intBonus, TimeSpan.Zero));
				}
			}

			from.NextCombatTime = Core.TickCount + (int)GetDelay(from).TotalMilliseconds;

			if (UseSkillMod && m_AccuracyLevel != WeaponAccuracyLevel.Regular)
			{
				if (m_SkillMod != null)
				{
					m_SkillMod.Remove();
				}

				m_SkillMod = new DefaultSkillMod(AccuracySkill, true, (int)m_AccuracyLevel * 5);
				from.AddSkillMod(m_SkillMod);
			}

			if (Core.AOS && m_AosWeaponAttributes.MageWeapon != 0 && m_AosWeaponAttributes.MageWeapon != 30)
			{
				if (m_MageMod != null)
				{
					m_MageMod.Remove();
				}

				m_MageMod = new DefaultSkillMod(SkillName.Magery, true, -30 + m_AosWeaponAttributes.MageWeapon);
				from.AddSkillMod(m_MageMod);
			}

			XmlAttach.CheckOnEquip(this, from);

			return true;
		}
Exemplo n.º 34
0
 public AnimalFormContext(Timer timer, SkillMod mod, bool speedBoost, Type type, SkillMod stealingMod)
 {
     m_Timer       = timer;
     m_Mod         = mod;
     m_SpeedBoost  = speedBoost;
     m_Type        = type;
     m_StealingMod = stealingMod;
 }
Exemplo n.º 35
0
 public BonusContext(Timer timer, SkillMod mod)
 {
     m_Timer = timer;
     m_Mod   = mod;
 }
Exemplo n.º 36
0
        public static MorphResult Morph(Mobile m, int entryID)
        {
            if (entryID < 0 || entryID >= m_Entries.Length)
            {
                return(MorphResult.Fail);
            }

            AnimalFormEntry entry = m_Entries[entryID];

            m_LastAnimalForms[m] = entryID;             //On OSI, it's the last /attempted/ one not the last succeeded one

            if (m.Skills.Ninjitsu.Value < entry.ReqSkill)
            {
                string args = String.Format("{0}\t{1}\t ", entry.ReqSkill.ToString("F1"), SkillName.Ninjitsu);
                m.SendLocalizedMessage(1063013, args);
                // You need at least ~1_SKILL_REQUIREMENT~ ~2_SKILL_NAME~ skill to use that ability.
                return(MorphResult.NoSkill);
            }

            /*
             * if( !m.CheckSkill( SkillName.Ninjitsu, entry.ReqSkill, entry.ReqSkill + 37.5 ) )
             * return MorphResult.Fail;
             *
             * On OSI,it seems you can only gain starting at '0' using Animal form.
             */

            double ninjitsu = m.Skills.Ninjitsu.Value;

            if (ninjitsu < entry.ReqSkill + 37.5)
            {
                double chance = (ninjitsu - entry.ReqSkill) / 37.5;

                if (chance < Utility.RandomDouble())
                {
                    return(MorphResult.Fail);
                }
            }

            m.CheckSkill(SkillName.Ninjitsu, 0.0, 37.5);

            if (!BaseFormTalisman.EntryEnabled(m, entry.Type))
            {
                return(MorphResult.Success);                // Still consumes mana, just no effect
            }

            BaseMount.Dismount(m);

            int bodyMod = entry.BodyMod;
            int hueMod  = entry.HueMod;

            m.BodyMod = bodyMod;
            m.HueMod  = hueMod;

            if (entry.SpeedBoost)
            {
                m.Send(SpeedControl.MountSpeed);
            }

            SkillMod mod = null;

            if (entry.StealthBonus)
            {
                mod         = new DefaultSkillMod(SkillName.Stealth, true, 20.0);
                mod.ObeyCap = true;
                m.AddSkillMod(mod);
            }

            SkillMod stealingMod = null;

            if (entry.StealingBonus)
            {
                stealingMod         = new DefaultSkillMod(SkillName.Stealing, true, 10.0);
                stealingMod.ObeyCap = true;
                m.AddSkillMod(stealingMod);
            }

            Timer timer = new AnimalFormTimer(m, bodyMod, hueMod);

            timer.Start();

            AddContext(m, new AnimalFormContext(timer, mod, entry.SpeedBoost, entry.Type, stealingMod));
            m.CheckStatTimers();
            return(MorphResult.Success);
        }
Exemplo n.º 37
0
        public static MorphResult Morph(Mobile m, int entryID)
        {
            if (entryID < 0 || entryID >= m_Entries.Length)
            {
                return(MorphResult.Fail);
            }

            AnimalFormEntry entry = m_Entries[entryID];

            m_LastAnimalForms[m] = entryID;             //On OSI, it's the last /attempted/ one not the last succeeded one

            if (m.Skills.Ninjitsu.Value < entry.ReqSkill)
            {
                string args = String.Format("{0}\t{1}\t ", entry.ReqSkill.ToString("F1"), SkillName.Ninjitsu);
                m.SendLocalizedMessage(1063013, args);                   // You need at least ~1_SKILL_REQUIREMENT~ ~2_SKILL_NAME~ skill to use that ability.
                return(MorphResult.NoSkill);
            }

            double ninjitsu = m.Skills.Ninjitsu.Value;

            if (ninjitsu < entry.ReqSkill + 37.5)
            {
                double chance = (ninjitsu - entry.ReqSkill) / 37.5;

                if (chance < Utility.RandomDouble())
                {
                    return(MorphResult.Fail);
                }
            }

            m.CheckSkill(SkillName.Ninjitsu, 0.0, 37.5);

            BaseMount.Dismount(m);

            m.BodyMod = entry.BodyMod;

            if (entry.HueMod > 0)
            {
                m.HueMod = entry.HueMod;
            }

            if (entry.SpeedBoost)
            {
                m.Send(SpeedBoost.Instantiate(true));
            }

            SkillMod mod = null;

            if (entry.StealthBonus)
            {
                mod         = new DefaultSkillMod(SkillName.Stealth, true, 20.0);
                mod.ObeyCap = true;
                m.AddSkillMod(mod);
            }

            Timer timer = new AnimalFormTimer(m, entry.BodyMod, entry.HueMod);

            timer.Start();

            AddContext(m, new AnimalFormContext(timer, mod, entry.SpeedBoost, entry.Type));
            return(MorphResult.Success);
        }
Exemplo n.º 38
0
		public override void OnRemoved(object parent)
		{
			if (parent is Mobile)
			{
				Mobile m = (Mobile)parent;
				BaseWeapon weapon = m.Weapon as BaseWeapon;

				string modName = Serial.ToString();

				m.RemoveStatMod(modName + "Str");
				m.RemoveStatMod(modName + "Dex");
				m.RemoveStatMod(modName + "Int");

				if (weapon != null)
				{
					m.NextCombatTime = Core.TickCount + (int)weapon.GetDelay(m).TotalMilliseconds;
				}

				if (UseSkillMod && m_SkillMod != null)
				{
					m_SkillMod.Remove();
					m_SkillMod = null;
				}

				if (m_MageMod != null)
				{
					m_MageMod.Remove();
					m_MageMod = null;
				}

				if (Core.AOS)
				{
					m_AosSkillBonuses.Remove();
				}

				ImmolatingWeaponSpell.StopImmolating(this);
                Spells.Mystic.EnchantSpell.OnWeaponRemoved(this, m);

				m.CheckStatTimers();

				m.Delta(MobileDelta.WeaponDamage);

				XmlAttach.CheckOnRemoved(this, parent);

                if (FocusWeilder != null)
                    FocusWeilder = null;

				#region Mondain's Legacy Sets
				if (IsSetItem && m_SetEquipped)
				{
					SetHelper.RemoveSetBonus(m, SetID, this);
				}
				#endregion
			}
		}
Exemplo n.º 39
0
 private void DefineMods()
 {
     m_SkillMod0 = new DefaultSkillMod(SkillName.Blacksmith, true, 15);
     m_SkillMod2 = new DefaultSkillMod(SkillName.Mining, true, 15);
 }
Exemplo n.º 40
0
 public virtual bool Equals(SkillMod mod)
 {
     return(!ReferenceEquals(mod, null) && Value == mod.Value && Relative == mod.Relative && Skill == mod.Skill);
 }
Exemplo n.º 41
0
 private void DefineMods()
 {
     m_SkillMod0 = new DefaultSkillMod(SkillName.Archery, true, 15);
     m_SkillMod1 = new DefaultSkillMod(SkillName.Hiding, true, 5);
 }
Exemplo n.º 42
0
 private void DefineMods()
 {
     m_SkillMod0 = new DefaultSkillMod(SkillName.ArmsLore, true, 5);
     m_SkillMod1 = new DefaultSkillMod(SkillName.Anatomy, true, 5);
 }
Exemplo n.º 43
0
        public override void OnRemoved( object parent )
        {
            if( parent is Mobile )
            {
                Mobile m = (Mobile)parent;
                BaseWeapon weapon = m.Weapon as BaseWeapon;

                string modName = this.Serial.ToString();

                m.RemoveStatMod(modName + "Str");
                m.RemoveStatMod(modName + "Dex");
                m.RemoveStatMod(modName + "Int");

                if( weapon != null )
                    m.NextCombatTime = DateTime.Now + weapon.GetDelay(m);

                if( UseSkillMod && m_SkillMod != null )
                {
                    m_SkillMod.Remove();
                    m_SkillMod = null;
                }

                if( m_MageMod != null )
                {
                    m_MageMod.Remove();
                    m_MageMod = null;
                }

                if( Core.AOS )
                    m_AosSkillBonuses.Remove();

                m.CheckStatTimers();

                m.Delta(MobileDelta.WeaponDamage);
            }
        }
Exemplo n.º 44
0
 private void DefineMods()
 {
     this.m_SkillMod0 = new DefaultSkillMod(SkillName.Stealth, true, 20);
 }
Exemplo n.º 45
0
		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize(reader);

			int version = reader.ReadInt();

			switch (version)
			{
                case 12:
                    {
                        #region Runic Reforging
                        m_ReforgedPrefix = (ReforgedPrefix)reader.ReadInt();
                        m_ReforgedSuffix = (ReforgedSuffix)reader.ReadInt();
                        m_ItemPower = (ItemPower)reader.ReadInt();
                        m_BlockRepair = reader.ReadBool();
                        #endregion

                        #region Stygian Abyss
                        m_DImodded = reader.ReadBool();
                        m_SearingWeapon = reader.ReadBool();
                        goto case 11;
                    }
				case 11:
					{
						m_TimesImbued = reader.ReadInt();
                        #endregion

                        goto case 10;
					}
				case 10:
					{
						m_BlessedBy = reader.ReadMobile();
						m_EngravedText = reader.ReadString();
						m_Slayer3 = (TalismanSlayerName)reader.ReadInt();

						SetFlag flags = (SetFlag)reader.ReadEncodedInt();

						if (GetSaveFlag(flags, SetFlag.Attributes))
						{
							m_SetAttributes = new AosAttributes(this, reader);
						}
						else
						{
							m_SetAttributes = new AosAttributes(this);
						}

						if (GetSaveFlag(flags, SetFlag.WeaponAttributes))
						{
							m_SetSelfRepair = (new AosWeaponAttributes(this, reader)).SelfRepair;
						}

						if (GetSaveFlag(flags, SetFlag.SkillBonuses))
						{
							m_SetSkillBonuses = new AosSkillBonuses(this, reader);
						}
						else
						{
							m_SetSkillBonuses = new AosSkillBonuses(this);
						}

						if (GetSaveFlag(flags, SetFlag.Hue))
						{
							m_SetHue = reader.ReadInt();
						}

						if (GetSaveFlag(flags, SetFlag.LastEquipped))
						{
							m_LastEquipped = reader.ReadBool();
						}

						if (GetSaveFlag(flags, SetFlag.SetEquipped))
						{
							m_SetEquipped = reader.ReadBool();
						}

						if (GetSaveFlag(flags, SetFlag.SetSelfRepair))
						{
							m_SetSelfRepair = reader.ReadEncodedInt();
						}

						goto case 5;
					}
				case 9:
				case 8:
				case 7:
				case 6:
				case 5:
					{
						SaveFlag flags = (SaveFlag)reader.ReadInt();

						if (GetSaveFlag(flags, SaveFlag.DamageLevel))
						{
							m_DamageLevel = (WeaponDamageLevel)reader.ReadInt();

							if (m_DamageLevel > WeaponDamageLevel.Vanq)
							{
								m_DamageLevel = WeaponDamageLevel.Ruin;
							}
						}

						if (GetSaveFlag(flags, SaveFlag.AccuracyLevel))
						{
							m_AccuracyLevel = (WeaponAccuracyLevel)reader.ReadInt();

							if (m_AccuracyLevel > WeaponAccuracyLevel.Supremely)
							{
								m_AccuracyLevel = WeaponAccuracyLevel.Accurate;
							}
						}

						if (GetSaveFlag(flags, SaveFlag.DurabilityLevel))
						{
							m_DurabilityLevel = (WeaponDurabilityLevel)reader.ReadInt();

							if (m_DurabilityLevel > WeaponDurabilityLevel.Indestructible)
							{
								m_DurabilityLevel = WeaponDurabilityLevel.Durable;
							}
						}

						if (GetSaveFlag(flags, SaveFlag.Quality))
						{
							m_Quality = (WeaponQuality)reader.ReadInt();
						}
						else
						{
							m_Quality = WeaponQuality.Regular;
						}

						if (GetSaveFlag(flags, SaveFlag.Hits))
						{
							m_Hits = reader.ReadInt();
						}

						if (GetSaveFlag(flags, SaveFlag.MaxHits))
						{
							m_MaxHits = reader.ReadInt();
						}

						if (GetSaveFlag(flags, SaveFlag.Slayer))
						{
							m_Slayer = (SlayerName)reader.ReadInt();
						}

						if (GetSaveFlag(flags, SaveFlag.Poison))
						{
							m_Poison = Poison.Deserialize(reader);
						}

						if (GetSaveFlag(flags, SaveFlag.PoisonCharges))
						{
							m_PoisonCharges = reader.ReadInt();
						}

						if (GetSaveFlag(flags, SaveFlag.Crafter))
						{
							m_Crafter = reader.ReadMobile();
						}

						if (GetSaveFlag(flags, SaveFlag.Identified))
						{
							m_Identified = (version >= 6 || reader.ReadBool());
						}

						if (GetSaveFlag(flags, SaveFlag.StrReq))
						{
							m_StrReq = reader.ReadInt();
						}
						else
						{
							m_StrReq = -1;
						}

						if (GetSaveFlag(flags, SaveFlag.DexReq))
						{
							m_DexReq = reader.ReadInt();
						}
						else
						{
							m_DexReq = -1;
						}

						if (GetSaveFlag(flags, SaveFlag.IntReq))
						{
							m_IntReq = reader.ReadInt();
						}
						else
						{
							m_IntReq = -1;
						}

						if (GetSaveFlag(flags, SaveFlag.MinDamage))
						{
							m_MinDamage = reader.ReadInt();
						}
						else
						{
							m_MinDamage = -1;
						}

						if (GetSaveFlag(flags, SaveFlag.MaxDamage))
						{
							m_MaxDamage = reader.ReadInt();
						}
						else
						{
							m_MaxDamage = -1;
						}

						if (GetSaveFlag(flags, SaveFlag.HitSound))
						{
							m_HitSound = reader.ReadInt();
						}
						else
						{
							m_HitSound = -1;
						}

						if (GetSaveFlag(flags, SaveFlag.MissSound))
						{
							m_MissSound = reader.ReadInt();
						}
						else
						{
							m_MissSound = -1;
						}

						if (GetSaveFlag(flags, SaveFlag.Speed))
						{
							if (version < 9)
							{
								m_Speed = reader.ReadInt();
							}
							else
							{
								m_Speed = reader.ReadFloat();
							}
						}
						else
						{
							m_Speed = -1;
						}

						if (GetSaveFlag(flags, SaveFlag.MaxRange))
						{
							m_MaxRange = reader.ReadInt();
						}
						else
						{
							m_MaxRange = -1;
						}

						if (GetSaveFlag(flags, SaveFlag.Skill))
						{
							m_Skill = (SkillName)reader.ReadInt();
						}
						else
						{
							m_Skill = (SkillName)(-1);
						}

						if (GetSaveFlag(flags, SaveFlag.Type))
						{
							m_Type = (WeaponType)reader.ReadInt();
						}
						else
						{
							m_Type = (WeaponType)(-1);
						}

						if (GetSaveFlag(flags, SaveFlag.Animation))
						{
							m_Animation = (WeaponAnimation)reader.ReadInt();
						}
						else
						{
							m_Animation = (WeaponAnimation)(-1);
						}

						if (GetSaveFlag(flags, SaveFlag.Resource))
						{
							m_Resource = (CraftResource)reader.ReadInt();
						}
						else
						{
							m_Resource = CraftResource.Iron;
						}

						if (GetSaveFlag(flags, SaveFlag.xAttributes))
						{
							m_AosAttributes = new AosAttributes(this, reader);
						}
						else
						{
							m_AosAttributes = new AosAttributes(this);
						}

						if (GetSaveFlag(flags, SaveFlag.xWeaponAttributes))
						{
							m_AosWeaponAttributes = new AosWeaponAttributes(this, reader);
						}
						else
						{
							m_AosWeaponAttributes = new AosWeaponAttributes(this);
						}

						if (UseSkillMod && m_AccuracyLevel != WeaponAccuracyLevel.Regular && Parent is Mobile)
						{
							m_SkillMod = new DefaultSkillMod(AccuracySkill, true, (int)m_AccuracyLevel * 5);
							((Mobile)Parent).AddSkillMod(m_SkillMod);
						}

						if (version < 7 && m_AosWeaponAttributes.MageWeapon != 0)
						{
							m_AosWeaponAttributes.MageWeapon = 30 - m_AosWeaponAttributes.MageWeapon;
						}

						if (Core.AOS && m_AosWeaponAttributes.MageWeapon != 0 && m_AosWeaponAttributes.MageWeapon != 30 &&
							Parent is Mobile)
						{
							m_MageMod = new DefaultSkillMod(SkillName.Magery, true, -30 + m_AosWeaponAttributes.MageWeapon);
							((Mobile)Parent).AddSkillMod(m_MageMod);
						}

						if (GetSaveFlag(flags, SaveFlag.PlayerConstructed))
						{
							m_PlayerConstructed = true;
						}

						if (GetSaveFlag(flags, SaveFlag.SkillBonuses))
						{
							m_AosSkillBonuses = new AosSkillBonuses(this, reader);
						}
						else
						{
							m_AosSkillBonuses = new AosSkillBonuses(this);
						}

						if (GetSaveFlag(flags, SaveFlag.Slayer2))
						{
							m_Slayer2 = (SlayerName)reader.ReadInt();
						}

						if (GetSaveFlag(flags, SaveFlag.ElementalDamages))
						{
							m_AosElementDamages = new AosElementAttributes(this, reader);
						}
						else
						{
							m_AosElementDamages = new AosElementAttributes(this);
						}

						if (GetSaveFlag(flags, SaveFlag.EngravedText))
						{
							m_EngravedText = reader.ReadString();
						}

						#region Stygian Abyss
						if (version > 9 && GetSaveFlag(flags, SaveFlag.xAbsorptionAttributes))
						{
							m_SAAbsorptionAttributes = new SAAbsorptionAttributes(this, reader);
						}
						else
						{
							m_SAAbsorptionAttributes = new SAAbsorptionAttributes(this);
						}
						#endregion

						break;
					}
				case 4:
					{
						m_Slayer = (SlayerName)reader.ReadInt();

						goto case 3;
					}
				case 3:
					{
						m_StrReq = reader.ReadInt();
						m_DexReq = reader.ReadInt();
						m_IntReq = reader.ReadInt();

						goto case 2;
					}
				case 2:
					{
						m_Identified = reader.ReadBool();

						goto case 1;
					}
				case 1:
					{
						m_MaxRange = reader.ReadInt();

						goto case 0;
					}
				case 0:
					{
						if (version == 0)
						{
							m_MaxRange = 1; // default
						}

						if (version < 5)
						{
							m_Resource = CraftResource.Iron;
							m_AosAttributes = new AosAttributes(this);
							m_AosWeaponAttributes = new AosWeaponAttributes(this);
							m_AosElementDamages = new AosElementAttributes(this);
							m_AosSkillBonuses = new AosSkillBonuses(this);
						}

						m_MinDamage = reader.ReadInt();
						m_MaxDamage = reader.ReadInt();

						m_Speed = reader.ReadInt();

						m_HitSound = reader.ReadInt();
						m_MissSound = reader.ReadInt();

						m_Skill = (SkillName)reader.ReadInt();
						m_Type = (WeaponType)reader.ReadInt();
						m_Animation = (WeaponAnimation)reader.ReadInt();
						m_DamageLevel = (WeaponDamageLevel)reader.ReadInt();
						m_AccuracyLevel = (WeaponAccuracyLevel)reader.ReadInt();
						m_DurabilityLevel = (WeaponDurabilityLevel)reader.ReadInt();
						m_Quality = (WeaponQuality)reader.ReadInt();

						m_Crafter = reader.ReadMobile();

						m_Poison = Poison.Deserialize(reader);
						m_PoisonCharges = reader.ReadInt();

						if (m_StrReq == OldStrengthReq)
						{
							m_StrReq = -1;
						}

						if (m_DexReq == OldDexterityReq)
						{
							m_DexReq = -1;
						}

						if (m_IntReq == OldIntelligenceReq)
						{
							m_IntReq = -1;
						}

						if (m_MinDamage == OldMinDamage)
						{
							m_MinDamage = -1;
						}

						if (m_MaxDamage == OldMaxDamage)
						{
							m_MaxDamage = -1;
						}

						if (m_HitSound == OldHitSound)
						{
							m_HitSound = -1;
						}

						if (m_MissSound == OldMissSound)
						{
							m_MissSound = -1;
						}

						if (m_Speed == OldSpeed)
						{
							m_Speed = -1;
						}

						if (m_MaxRange == OldMaxRange)
						{
							m_MaxRange = -1;
						}

						if (m_Skill == OldSkill)
						{
							m_Skill = (SkillName)(-1);
						}

						if (m_Type == OldType)
						{
							m_Type = (WeaponType)(-1);
						}

						if (m_Animation == OldAnimation)
						{
							m_Animation = (WeaponAnimation)(-1);
						}

						if (UseSkillMod && m_AccuracyLevel != WeaponAccuracyLevel.Regular && Parent is Mobile)
						{
							m_SkillMod = new DefaultSkillMod(AccuracySkill, true, (int)m_AccuracyLevel * 5);
							((Mobile)Parent).AddSkillMod(m_SkillMod);
						}

						break;
					}
			}

			#region Mondain's Legacy Sets
			if (m_SetAttributes == null)
			{
				m_SetAttributes = new AosAttributes(this);
			}

			if (m_SetSkillBonuses == null)
			{
				m_SetSkillBonuses = new AosSkillBonuses(this);
			}
			#endregion

			if (Core.AOS && Parent is Mobile)
			{
				m_AosSkillBonuses.AddTo((Mobile)Parent);
			}

			int strBonus = m_AosAttributes.BonusStr;
			int dexBonus = m_AosAttributes.BonusDex;
			int intBonus = m_AosAttributes.BonusInt;

			if (Parent is Mobile && (strBonus != 0 || dexBonus != 0 || intBonus != 0))
			{
				Mobile m = (Mobile)Parent;

				string modName = Serial.ToString();

				if (strBonus != 0)
				{
					m.AddStatMod(new StatMod(StatType.Str, modName + "Str", strBonus, TimeSpan.Zero));
				}

				if (dexBonus != 0)
				{
					m.AddStatMod(new StatMod(StatType.Dex, modName + "Dex", dexBonus, TimeSpan.Zero));
				}

				if (intBonus != 0)
				{
					m.AddStatMod(new StatMod(StatType.Int, modName + "Int", intBonus, TimeSpan.Zero));
				}
			}

			if (Parent is Mobile)
			{
				((Mobile)Parent).CheckStatTimers();
			}

			if (m_Hits <= 0 && m_MaxHits <= 0)
			{
				m_Hits = m_MaxHits = Utility.RandomMinMax(InitMinHits, InitMaxHits);
			}

			if (version < 6)
			{
				m_PlayerConstructed = true; // we don't know, so, assume it's crafted
			}
		}
 private void DefineMods()
 {
     m_SkillMod0 = new DefaultSkillMod(SkillName.Blacksmith, true, 10);
 }
Exemplo n.º 47
0
		public AnimalFormContext(Timer timer, SkillMod mod, bool speedBoost, Type type, SkillMod stealingMod)
		{
			m_Timer = timer;
			m_Mod = mod;
			m_SpeedBoost = speedBoost;
			m_Type = type;
			m_StealingMod = stealingMod;
		}
Exemplo n.º 48
0
 public void DefineMods()
 {
     m_SkillMod0 = new DefaultSkillMod(SkillName.AnimalTaming, true, 10);
 }