Inheritance: BaseAttributes
Ejemplo n.º 1
0
 public EnhancementAttributes(string title)
 {
     this.Title = title;
     this.Attributes = new AosAttributes(null);
     this.WeaponAttributes = new AosWeaponAttributes(null);
     this.ArmorAttributes = new AosArmorAttributes(null);
     this.AbsorptionAttributes = new SAAbsorptionAttributes(null);
 }
Ejemplo n.º 2
0
		public EnhancementAttributes( string title )
		{
			Title = title;
			Attributes = new AosAttributes( null );
			WeaponAttributes = new AosWeaponAttributes( null );
			ArmorAttributes = new AosArmorAttributes( null );
			AbsorptionAttributes = new SAAbsorptionAttributes( null );
		}
 public SkullcapBearingTheCrestOfBlackthorn2()
     : base()
 {
     ReforgedSuffix = ReforgedSuffix.Blackthorn;
     this.m_AosWeaponAttributes = new AosWeaponAttributes(this);
     m_AosWeaponAttributes.HitLowerDefend = 30;
     Attributes.BonusStr = 10;
     Attributes.BonusDex = 5;
     StrRequirement = 45;
     Hue = 66;            
 }
Ejemplo n.º 4
0
		public ElvenGlasses() : base( 0x2FB8 )
		{
			Weight = 2;
			m_AosWeaponAttributes = new AosWeaponAttributes( this );
		}
Ejemplo n.º 5
0
		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize( reader );
			
			int version = reader.ReadInt();
			
			SaveFlag flags = (SaveFlag) reader.ReadInt();
			
			if ( GetSaveFlag( flags, SaveFlag.WeaponAttributes ) )
				m_AosWeaponAttributes = new AosWeaponAttributes( this, reader );
			else
				m_AosWeaponAttributes = new AosWeaponAttributes( this );
		}
Ejemplo n.º 6
0
		public AosWeaponAttributes( Item owner, AosWeaponAttributes other )
			: base( owner, other )
		{
		}
Ejemplo n.º 7
0
		public static bool SupportsAttribute(this Item item, out AosWeaponAttributes attrs)
		{
			BaseAttributes a;

			if (SupportsAttributes(item, "WeaponAttributes", out a))
			{
				attrs = (AosWeaponAttributes)a;
				return true;
			}

			attrs = null;
			return false;
		}
Ejemplo n.º 8
0
 public AosWeaponAttributes(Item owner, AosWeaponAttributes other)
     : base(owner, other)
 {
 }
 public static void RemoveAttribute( AosWeaponAttributes attrs, AosWeaponAttribute attr, int amount )
 {
     attrs[attr] = Math.Max( attrs[attr] - amount, 0 );
 }
 public static void ApplyAttribute( AosWeaponAttributes attrs, AosWeaponAttribute attr, int amount )
 {
     attrs[attr] += amount;
 }
Ejemplo n.º 11
0
        public static int GetChance( AosWeaponAttribute attr, AosWeaponAttributes itemAttrs )
        {
            int chance;

            switch ( attr )
            {
                case AosWeaponAttribute.DurabilityBonus: 		chance = itemAttrs[attr] / 50; break;
                case AosWeaponAttribute.LowerStatReq: 			chance = itemAttrs[attr] / 6; break;
                case AosWeaponAttribute.ResistPhysicalBonus:
                case AosWeaponAttribute.ResistFireBonus:
                case AosWeaponAttribute.ResistColdBonus:
                case AosWeaponAttribute.ResistPoisonBonus:
                case AosWeaponAttribute.ResistEnergyBonus:		chance = itemAttrs[attr]; break;
                default:
                    chance = itemAttrs[attr] / 2; break;
            }

            return chance;
        }
Ejemplo n.º 12
0
 private static void ApplyAttribute( AosWeaponAttributes attrs, int min, int max, AosWeaponAttribute attr, int low, int high, int scale )
 {
     attrs[attr] = Scale( min, max, low / scale, high / scale ) * scale;
 }
Ejemplo n.º 13
0
 private static void ApplyAttribute( AosWeaponAttributes attrs, int min, int max, AosWeaponAttribute attr, int low, int high )
 {
     attrs[attr] = Scale( min, max, low, high );
 }