Inheritance: Server.Items.BaseWearable, IDyable, IScissorable, IFactionItem, ICraftable, IWearableDurability
        public override void AlterFrom( BaseClothing orig )
        {
            base.AlterFrom( orig );

            if ( orig is IFactionArtifact )
                m_Owner = ( (IFactionArtifact) orig ).Owner;
        }
Exemplo n.º 2
0
 public static void ApplyBonusSingle( BaseClothing bc )
 {
     //bc.Resistances.Physical -= 20;
     //bc.Resistances.Fire -= 20;
     //bc.Resistances.Cold -= 20;
     //bc.Resistances.Poison -= 20;
     //bc.Resistances.Energy -= 20;
 }
Exemplo n.º 3
0
        public static void ApplyBonus( BaseClothing bc )
        {
            bc.Hue = 0;

            bc.Resistances.Physical += 5;
            bc.Resistances.Fire += 5;
            bc.Resistances.Cold += 5;
            bc.Resistances.Poison += 5;
            bc.Resistances.Energy += 5;
        }
Exemplo n.º 4
0
        public virtual void AlterFrom( BaseClothing orig )
        {
            m_Altered = true;

            m_MagicalAttributes = orig.Attributes;
            m_ClothingAttributes = orig.ClothingAttributes;
            m_SkillBonuses = orig.SkillBonuses;
            m_Resistances = orig.Resistances;
            m_AbsorptionAttributes = orig.AbsorptionAttributes;

            Crafter = orig.Crafter;
            Exceptional = orig.Exceptional;

            MaxHitPoints = orig.MaxHitPoints;
            HitPoints = orig.HitPoints;
        }
Exemplo n.º 5
0
 /* MAGIC CLOTHING */
 public void ConsumeCharge(object parent, BaseClothing item)
 {
     item.Charges--;
 }
Exemplo n.º 6
0
        public static void RemoveBonus( BaseClothing bc )
        {
            bc.Hue = 550;

            bc.Resistances.Physical = 0;
            bc.Resistances.Fire = 0;
            bc.Resistances.Cold = 0;
            bc.Resistances.Poison = 0;
            bc.Resistances.Energy = 0;
        }
Exemplo n.º 7
0
			private bool IsSpecialClothing( BaseClothing clothing )
			{
				// Armor repairable but not craftable

				if( m_CraftSystem is DefTailoring )
				{
					return (clothing is BearMask)
						|| (clothing is DeerMask);
				}

				return false;
			}
Exemplo n.º 8
0
        public static void ApplyAttributesTo(BaseClothing cloth, bool isRunicTool, int luckChance, int attributeCount, int min, int max)
        {
            m_IsRunicTool = isRunicTool;
            m_LuckChance = luckChance;

            AosAttributes primary = cloth.Attributes;
            AosArmorAttributes secondary = cloth.ClothingAttributes;
            AosElementAttributes resists = cloth.Resistances;

            m_Props.SetAll(false);

            for (int i = 0; i < attributeCount; ++i)
            {
                int random = GetUniqueRandom(19);

                if (random == -1)
                    break;

                switch (random)
                {
                    //case 0: ApplyAttribute( primary, min, max, AosAttribute.ReflectPhysical, 1, 15 ); break;
                    case 1: ApplyAttribute(primary, min, max, AosAttribute.BonusHits, 3, 8); break;
                    case 2: ApplyAttribute(primary, min, max, AosAttribute.BonusStam, 3, 8); break;
                    case 3: ApplyAttribute(primary, min, max, AosAttribute.BonusMana, 3, 8); break;
                    //case 4: ApplyAttribute( primary, min, max, AosAttribute.NightSight, 1, 1 ); break;
                    case 5: ApplyAttribute(primary, min, max, AosAttribute.BonusHits, 3, 8); break;
                    case 6: ApplyAttribute(primary, min, max, AosAttribute.BonusStam, 3, 8); break;
                    case 7: ApplyAttribute(primary, min, max, AosAttribute.BonusMana, 3, 8); break;
                    case 8: ApplyAttribute(primary, min, max, AosAttribute.LowerManaCost, 3, 8); break;
                    //case 9: ApplyAttribute( primary, min, max, AosAttribute.LowerRegCost, 1, 20 ); break;
                    //case 10: ApplyAttribute( primary,	min, max, AosAttribute.Luck, 1, 100 ); break;
                    //case 11: //ApplyAttribute( secondary,	min, max, AosArmorAttribute.LowerStatReq,		10, 100, 10 ); break;
                    //case 12: //ApplyAttribute( secondary,	min, max, AosArmorAttribute.SelfRepair,			1, 5 ); break;
                    //case 13: ApplyAttribute( secondary, min, max, AosArmorAttribute.DurabilityBonus, 10, 100, 10 ); break;
                    case 14: ApplyAttribute(resists, min, max, AosElementAttribute.Physical, 3, 15); break;
                    case 15: ApplyAttribute(resists, min, max, AosElementAttribute.Fire, 3, 15); break;
                    case 16: ApplyAttribute(resists, min, max, AosElementAttribute.Cold, 3, 15); break;
                    case 17: ApplyAttribute(resists, min, max, AosElementAttribute.Poison, 3, 15); break;
                    case 18: ApplyAttribute(resists, min, max, AosElementAttribute.Energy, 3, 15); break;
                }
            }
        }
Exemplo n.º 9
0
 public UnBlessEntry(Mobile from, BaseClothing item)
     : base(6208, -1)
 {
     m_From = from;
     m_Item = item; // BaseArmor, BaseWeapon or BaseClothing
 }
Exemplo n.º 10
0
 private static void CopyProperties(BaseClothing toCopy, BaseClothing newItem)
 {
     //AoSAttributes
     newItem.Crafter = toCopy.Crafter;
     newItem.MaxHitPoints = toCopy.MaxHitPoints;
     newItem.HitPoints = toCopy.HitPoints;
     newItem.IsRenamed = toCopy.IsRenamed;
     newItem.PlayerConstructed = toCopy.PlayerConstructed;
     newItem.Quality = toCopy.Quality;
     //Resistances
     newItem.Resource = toCopy.Resource;
     newItem.Hue = toCopy.Hue;
     //Stat requirements
 }
Exemplo n.º 11
0
		public static ItemValue CheckClothing( BaseClothing item )
		{
			int value = 0;

			foreach( int i in Enum.GetValues(typeof( AosAttribute ) ) )
			{
				if ( item != null && item.Attributes[ (AosAttribute)i ] > 0 )
					value += 2;
			}

			//Start skill bonus

			if ( item.SkillBonuses.Skill_1_Value > 0 )
			{
				value += (int)item.SkillBonuses.Skill_1_Value * 4;
				value += 2;
			}

			if ( item.SkillBonuses.Skill_2_Value > 0 )
			{
				value += (int)item.SkillBonuses.Skill_2_Value * 4;
				value += 2;
			}

			if ( item.SkillBonuses.Skill_3_Value > 0 )
			{
				value += (int)item.SkillBonuses.Skill_3_Value * 4;
				value += 2;
			}

			if ( item.SkillBonuses.Skill_4_Value > 0 )
			{
				value += (int)item.SkillBonuses.Skill_4_Value * 4;
				value += 2;
			}

			if ( item.SkillBonuses.Skill_5_Value > 0 )
			{
				value += (int)item.SkillBonuses.Skill_5_Value * 4;
				value += 2;
			}

			//Start standard attributes

			if ( item.Attributes.AttackChance > 0 )
				value += item.Attributes.AttackChance * 2;

			if ( item.Attributes.BonusDex > 0 )
				value += item.Attributes.BonusDex * 4;

			if ( item.Attributes.BonusHits > 0 )
				value += item.Attributes.BonusHits * 2;

			if ( item.Attributes.BonusInt > 0 )
				value += item.Attributes.BonusInt * 4;

			if ( item.Attributes.BonusMana > 0 )
				value += item.Attributes.BonusMana * 2;

			if ( item.Attributes.BonusStam > 0 )
				value += item.Attributes.BonusStam * 2;

			if ( item.Attributes.BonusStr > 0 )
				value += item.Attributes.BonusStr * 4;

			if ( item.Attributes.CastRecovery > 0 )
				value += item.Attributes.CastRecovery * 10;

			if ( item.Attributes.CastSpeed > 0 )
				value += item.Attributes.CastSpeed * 10;

			if ( item.Attributes.DefendChance > 0 )
				value += item.Attributes.DefendChance * 2;

			if ( item.Attributes.EnhancePotions > 0 )
				value += item.Attributes.EnhancePotions;

			if ( item.Attributes.LowerManaCost > 0 )
				value += item.Attributes.LowerManaCost * 2;

			if ( item.Attributes.LowerRegCost > 0 )
				value += item.Attributes.LowerRegCost;

			if ( item.Attributes.Luck > 0 )
				value += item.Attributes.Luck / 2;

			if ( item.Attributes.NightSight > 0 )
				value += 10;

			if ( item.Attributes.ReflectPhysical > 0 )
				value += item.Attributes.ReflectPhysical * 2;

			if ( item.Attributes.RegenHits > 0 )
				value += item.Attributes.RegenHits * 10;

			if ( item.Attributes.RegenMana > 0 )
				value += item.Attributes.RegenMana * 10;

			if ( item.Attributes.RegenStam > 0 )
				value += item.Attributes.RegenStam * 10;

			if ( item.Attributes.SpellChanneling > 0 )
				value += 10;

			if ( item.Attributes.SpellDamage > 0 )
				value += item.Attributes.SpellDamage * 2;

			if ( item.Attributes.WeaponDamage > 0 )
				value += item.Attributes.WeaponDamage * 2;

			if ( item.Attributes.WeaponSpeed > 0 )
				value += item.Attributes.WeaponSpeed * 2;

			//Start Element Resist

			if ( item.Resistances.Chaos > 0 )
				value += item.Resistances.Chaos;

			if ( item.Resistances.Cold > 0 )
				value += item.Resistances.Cold;

			if ( item.Resistances.Direct > 0 )
				value += item.Resistances.Direct;

			if ( item.Resistances.Energy > 0 )
				value += item.Resistances.Energy;

			if ( item.Resistances.Fire > 0 )
				value += item.Resistances.Fire;

			if ( item.Resistances.Physical > 0 )
				value += item.Resistances.Physical;

			if ( item.Resistances.Poison > 0 )
				value += item.Resistances.Poison;

			//Start Calculate

			if ( value <= 50 )
				return ItemValue.Common;

			if ( value <= 100 )
				return ItemValue.Uncommon;

			if ( value <= 200 )
				return ItemValue.Rare;

			if ( value <= 300 )
				return ItemValue.Epic;

			return ItemValue.Legendary;
		}
Exemplo n.º 12
0
		public static string ComputeName( BaseClothing bc )
		{
			if( bc.IsRenamed && !string.IsNullOrEmpty( bc.Name ) )
				return bc.Name;

			string name;

			if( bc.Name == null )
				name = CliLoc.LocToString( bc.LabelNumber );
			else
				name = bc.Name;

            if (bc.Amount > 1)
                name = name + "s";

			var resource = string.Empty;

			if( bc.Resource != CraftResource.None && bc.Resource != CraftResource.Iron )
				resource = CraftResources.GetName( bc.Resource );

			if( bc.Crafter != null )
				if( bc.Quality == ClothingQuality.Exceptional )
					if( bc.Resource != CraftResource.None )
						name = string.Format( "{0} {1} {2} crafted by {3}", "Exceptional", resource.ToLower(), name.ToLower(), bc.Crafter.Name );
					else
						name = string.Format( "{0} {1} crafted by {2}", "Exceptional", name.ToLower(), bc.Crafter.Name );
				else if( bc.Resource != CraftResource.None )
                    if (!string.IsNullOrEmpty(resource))
					    name = string.Format( "{0} {1} crafted by {2}", resource, name.ToLower(), bc.Crafter.Name );
                    else
                        name = string.Format("{0} crafted by {1}", name, bc.Crafter.Name);
				else
					name = string.Format( "{0} crafted by {1}", name.ToLower(), bc.Crafter.Name );
			else if( bc.Resource != CraftResource.None )
                if (bc.Quality == ClothingQuality.Exceptional)
                    if (!string.IsNullOrEmpty(resource))
			            name = string.Format( "{0} {1} {2}", "Exceptional", resource.ToLower(), name.ToLower() );
                    else
                        name = string.Format(" {0} {1}", "Exceptional", name.ToLower());
                else
                    if (!string.IsNullOrEmpty(resource))
                        name = string.Format("{0} {1}", resource, name.ToLower());
                    else
                        name = string.Format(name);
            else if (bc.Resource == CraftResource.None)
                if (bc.Quality == ClothingQuality.Exceptional)
                    name = string.Format("{0} {1}", "Exceptional", name.ToLower());

            if (bc.Amount > 1)
                name = bc.Amount + " " + name;

			return name;
		}
Exemplo n.º 13
0
		public override void AlterFrom( BaseClothing orig )
		{
			base.AlterFrom( orig );

			m_CanFortity = orig.CanFortify;
		}
Exemplo n.º 14
0
			public MagicEffectTimer(PlayerMobile Wearer, BaseClothing Clothing, TimeSpan Duration) : base (Duration)
			{
				m_Wearer = Wearer;
				m_Clothing = Clothing;
			}
Exemplo n.º 15
0
			public RenamePrompt(Mobile from, BaseClothing clothing, Embroidery embroidery)
			{
				m_from   = from;
				m_clothing = clothing;
				m_embroidery = embroidery;
			}
Exemplo n.º 16
0
        public static void SupplyCloths(Mobile m, BaseClothing[] clothList, int hue, string teamName, bool newbie)
        {
            MakeEventItems(clothList, hue, teamName, true, true, false);

            for (int i = 0; i < clothList.Length; ++i)
            {
                Item item = clothList[i];

                if (newbie)
                    item.LootType = LootType.Newbied;

                EquipItem(m, item);
                item.Movable = false;
            }
        }
Exemplo n.º 17
0
		public int ClothingValue(BaseClothing c)
		{
			int value = 100;

			if (c.LootType == LootType.Blessed)
			{
				value += 65000;
			}

			return value;
		}
Exemplo n.º 18
0
 public UnBlessEntry(Mobile from, Item item)
     : base(6208, -1)
 {
     if (item.RootParent == from)
     {
         m_From = (Mobile)from;
         m_Item = (BaseClothing)item;
     }
 }
Exemplo n.º 19
0
 private static bool ValidateClothing(BaseClothing toStack, BaseClothing item)
 {
     return !( !ValidateItem(toStack, item) || (toStack is IArcaneEquip) != (item is IArcaneEquip) || toStack.Quality != item.Quality );
 }
Exemplo n.º 20
0
 public static void ApplyAttributesTo(BaseClothing cloth, int attributeCount, int min, int max)
 {
     ApplyAttributesTo(cloth, false, 0, attributeCount, min, max);
 }
Exemplo n.º 21
0
        private static void StackWith(BaseClothing toStack, List<BaseClothing> itemList, int startIndex)
        {
            if (toStack == null || toStack.Deleted)
                return;

            for (int i = startIndex; i < itemList.Count; i++)
            {
                BaseClothing item = itemList[i];
                if (ValidateClothing(toStack, item))
                {
                    item.Amount += toStack.Amount;
                    toStack.Delete();
                    return;
                }
            }
        }
Exemplo n.º 22
0
            private bool IsSpecialClothing(BaseClothing clothing)
            {
                // Clothing repairable but not craftable
                if (this.m_CraftSystem is DefTailoring)
                {
                    return (clothing is BearMask) ||
                           (clothing is DeerMask) ||
                           (clothing is TheMostKnowledgePerson) ||
                           (clothing is TheRobeOfBritanniaAri) ||
                           (clothing is EmbroideredOakLeafCloak);
                }

                return false;
            }
Exemplo n.º 23
0
 public EffectTimer(Mobile m, BaseClothing item)
     : base(TimeSpan.FromSeconds(60))
 {
     parent = m;
     m_Item = item;
     Priority = TimerPriority.OneMinute;
 }
Exemplo n.º 24
0
            public CheckTimer( BaseClothing item )
                : base(TimeSpan.FromSeconds( Utility.RandomMinMax( 15, 45 ) ), TimeSpan.FromSeconds( 15.0 ))
            {
                m_Item = item;

                Priority = TimerPriority.OneSecond;
            }
Exemplo n.º 25
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                int    scalar;
                double mageSkill = from.Skills[SkillName.Inscribe].Value;

                if (mageSkill >= 100.0)
                {
                    scalar = 3;
                }
                else if (mageSkill >= 90.0)
                {
                    scalar = 2;
                }
                else
                {
                    scalar = 1;
                }

                if (targeted is BaseWeapon)
                {
                    BaseWeapon Weapon = targeted as BaseWeapon;

                    if (!from.InRange(((Item)targeted).GetWorldLocation(), 1))
                    {
                        from.SendLocalizedMessage(500446);                           // That is too far away.
                    }

                    else if ((((Item)targeted).Parent != null) && (((Item)targeted).Parent is Mobile))
                    {
                        from.SendMessage("You cannot enhance that in it's current location.");
                    }

                    else
                    {
                        int DestroyChance = Utility.Random(5);

                        if (DestroyChance > 0)                           // Success
                        {
                            int augment = ((Utility.Random(3)) * scalar) + 1;

                            Weapon.Attributes.BonusStam += augment; from.SendMessage("The Ex Rune enhances your weapon.");

                            from.PlaySound(0x1F5);
                            m_ExRune.Delete();
                        }

                        else                         // Fail
                        {
                            from.SendMessage("You have failed to enhance the weapon!");
                            from.SendMessage("The weapon is damaged beyond repair!");
                            from.PlaySound(42);
                            Weapon.Delete();
                            m_ExRune.Delete();
                        }
                    }
                }

                else if (targeted is BaseArmor)
                {
                    BaseArmor Armor = targeted as BaseArmor;

                    if (!from.InRange(((Item)targeted).GetWorldLocation(), 1))
                    {
                        from.SendLocalizedMessage(500446);                           // That is too far away.
                    }

                    else if ((((Item)targeted).Parent != null) && (((Item)targeted).Parent is Mobile))
                    {
                        from.SendMessage("You cannot enhance that in it's current location.");
                    }

                    else
                    {
                        int DestroyChance = Utility.Random(5);

                        if (DestroyChance > 0)                           // Success
                        {
                            int augment    = ((Utility.Random(3)) * scalar) + 1;
                            int augmentper = ((Utility.Random(5)) * scalar) + 5;

                            Armor.Attributes.BonusStam += augment; from.SendMessage("The Ex Rune enhances your armor.");

                            from.PlaySound(0x1F5);
                            m_ExRune.Delete();
                        }

                        else                         // Fail
                        {
                            from.SendMessage("You have failed to enhance the armor!");
                            from.SendMessage("The armor is damaged beyond repair!");
                            from.PlaySound(42);
                            Armor.Delete();
                            m_ExRune.Delete();
                        }
                    }
                }

                else if (targeted is BaseShield)
                {
                    BaseShield Shield = targeted as BaseShield;

                    if (!from.InRange(((Item)targeted).GetWorldLocation(), 1))
                    {
                        from.SendLocalizedMessage(500446);                           // That is too far away.
                    }

                    else if ((((Item)targeted).Parent != null) && (((Item)targeted).Parent is Mobile))
                    {
                        from.SendMessage("You cannot enhance that in it's current location.");
                    }

                    else
                    {
                        int DestroyChance = Utility.Random(5);

                        if (DestroyChance > 0)                           // Success
                        {
                            int augment    = ((Utility.Random(3)) * scalar) + 1;
                            int augmentper = ((Utility.Random(5)) * scalar) + 5;

                            Shield.Attributes.BonusStam += augment; from.SendMessage("The Ex Rune enhances your sheild.");

                            from.PlaySound(0x1F5);
                            m_ExRune.Delete();
                        }

                        else                         // Fail
                        {
                            from.SendMessage("You have failed to enhance the shield!");
                            from.SendMessage("The shield is damaged beyond repair!");
                            from.PlaySound(42);
                            Shield.Delete();
                            m_ExRune.Delete();
                        }
                    }
                }

                else if (targeted is BaseClothing)
                {
                    BaseClothing Clothing = targeted as BaseClothing;

                    if (!from.InRange(((Item)targeted).GetWorldLocation(), 1))
                    {
                        from.SendLocalizedMessage(500446);                           // That is too far away.
                    }

                    else if ((((Item)targeted).Parent != null) && (((Item)targeted).Parent is Mobile))
                    {
                        from.SendMessage("You cannot enhance that in it's current location.");
                    }

                    else
                    {
                        int DestroyChance = Utility.Random(5);

                        if (DestroyChance > 0)                           // Success
                        {
                            int augment = ((Utility.Random(3)) * scalar) + 1;

                            Clothing.Attributes.BonusStam += augment; from.SendMessage("The Ex Rune enhances your clothing");

                            from.PlaySound(0x1F5);
                            m_ExRune.Delete();
                        }

                        else                         // Fail
                        {
                            from.SendMessage("You have failed to enhance the clothing!");
                            from.SendMessage("The clothing is damaged beyond repair!");
                            from.PlaySound(88);
                            Clothing.Delete();
                            m_ExRune.Delete();
                        }
                    }
                }

                else if (targeted is BaseJewel)
                {
                    BaseJewel Jewel = targeted as BaseJewel;

                    if (!from.InRange(((Item)targeted).GetWorldLocation(), 1))
                    {
                        from.SendLocalizedMessage(500446);                           // That is too far away.
                    }

                    else if ((((Item)targeted).Parent != null) && (((Item)targeted).Parent is Mobile))
                    {
                        from.SendMessage("You cannot enhance that in it's current location.");
                    }

                    else
                    {
                        int DestroyChance = Utility.Random(5);

                        if (DestroyChance > 0)                           // Success
                        {
                            int augment = ((Utility.Random(3)) * scalar) + 1;
                            Jewel.Attributes.BonusStam += augment; from.SendMessage("The Ex Rune ennhances your jewelry..");

                            from.PlaySound(0x1F5);
                            m_ExRune.Delete();
                        }

                        else                         // Fail
                        {
                            from.SendMessage("You have failed to enhance the jewelery!");
                            from.SendMessage("The jewelery is damaged beyond repair!");
                            from.PlaySound(62);
                            Jewel.Delete();
                            m_ExRune.Delete();
                        }
                    }
                }

                else
                {
                    from.SendMessage("You cannot enhance that.");
                }
            }