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); }
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; }
public ElvenGlasses() : base( 0x2FB8 ) { Weight = 2; m_AosWeaponAttributes = new AosWeaponAttributes( this ); }
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 ); }
public AosWeaponAttributes( Item owner, AosWeaponAttributes other ) : base( owner, other ) { }
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; }
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; }
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; }
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; }
private static void ApplyAttribute( AosWeaponAttributes attrs, int min, int max, AosWeaponAttribute attr, int low, int high ) { attrs[attr] = Scale( min, max, low, high ); }