本文整理汇总了C#中AosWeaponAttribute类的典型用法代码示例。如果您正苦于以下问题:C# AosWeaponAttribute类的具体用法?C# AosWeaponAttribute怎么用?C# AosWeaponAttribute使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AosWeaponAttribute类属于命名空间,在下文中一共展示了AosWeaponAttribute类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetValue
public static int GetValue(Mobile m, AosWeaponAttribute att)
{
if (EnhancementList.ContainsKey(m))
return EnhancementList[m].WeaponAttributes[att];
else
return 0;
}
示例2: WeaponAttributeInfo
public WeaponAttributeInfo(AosWeaponAttribute attribute, string name, AttributeCategory category, int xp, int maxvalue)
{
this.m_Attribute = attribute;
this.m_Name = name;
this.m_Category = category;
this.m_XP = xp;
this.m_MaxValue = maxvalue;
}
示例3: ExpireTimer
public ExpireTimer(BaseWeapon weapon, AosWeaponAttribute attribute, Mobile from, TimeSpan delay)
: base(TimeSpan.FromSeconds(1.0), TimeSpan.FromSeconds(1.0))
{
m_From = from;
this.m_Weapon = weapon;
this.m_Attribute = attribute;
this.m_End = DateTime.UtcNow + delay;
this.Priority = TimerPriority.TwoFiftyMS;
}
示例4: GetChance
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;
}
示例5: GetValue
public int this[AosWeaponAttribute attribute]
{
get { return GetValue( (int)attribute ); }
set { SetValue( (int)attribute, value ); }
}
示例6: ApplyAttribute
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;
}
示例7: GetModForAttribute
public static int GetModForAttribute(AosWeaponAttribute attr)
{
foreach (KeyValuePair<int, ImbuingDefinition> kvp in m_Table)
{
int mod = kvp.Key;
ImbuingDefinition def = kvp.Value;
if (def.Attribute is AosWeaponAttribute && (AosWeaponAttribute)def.Attribute == attr)
return mod;
}
return -1;
}
示例8:
public int this[AosWeaponAttribute attribute]
{
get
{
return this.ExtendedGetValue((int)attribute);
}
set
{
this.SetValue((int)attribute, value);
}
}
示例9: RemoveAttribute
public static void RemoveAttribute( AosWeaponAttributes attrs, AosWeaponAttribute attr, int amount )
{
attrs[attr] = Math.Max( attrs[attr] - amount, 0 );
}
示例10: IsHitAreaOrSpell
private static bool IsHitAreaOrSpell(AosWeaponAttribute attr, int mod)
{
if (attr >= AosWeaponAttribute.HitMagicArrow && attr <= AosWeaponAttribute.HitDispel)
return mod >= 35 && mod <= 39;
else if (attr >= AosWeaponAttribute.HitColdArea && attr <= AosWeaponAttribute.HitPhysicalArea)
return mod >= 30 && mod <= 34;
return false;
}
示例11: BonusAttribute
public BonusAttribute( AosWeaponAttribute attr, int amount )
: this((object)attr, amount)
{
}
示例12: ApplyAttribute
public static void ApplyAttribute( AosWeaponAttributes attrs, AosWeaponAttribute attr, int amount )
{
attrs[attr] += amount;
}
示例13: GetPropRange
public static int[] GetPropRange(Item item, AosWeaponAttribute attr)
{
if (Core.SA && item is BaseWeapon && (attr == AosWeaponAttribute.HitLeechHits || attr == AosWeaponAttribute.HitLeechMana))
{
BaseWeapon wep = item as BaseWeapon;
int max = (int)(wep.MlSpeed * 2500 / (100 + wep.Attributes.WeaponSpeed));
if (wep is BaseRanged) max /= 2;
return new int[] { 2, max };
}
switch (attr)
{
case AosWeaponAttribute.DurabilityBonus:
case AosWeaponAttribute.LowerStatReq: return new int[] { 10, 100 };
case AosWeaponAttribute.HitLeechHits:
case AosWeaponAttribute.HitLeechMana:
case AosWeaponAttribute.HitLeechStam:
case AosWeaponAttribute.HitLowerAttack:
case AosWeaponAttribute.HitLowerDefend:
case AosWeaponAttribute.HitMagicArrow:
case AosWeaponAttribute.HitHarm:
case AosWeaponAttribute.HitLightning:
case AosWeaponAttribute.HitFireball:
case AosWeaponAttribute.HitDispel:
case AosWeaponAttribute.HitColdArea:
case AosWeaponAttribute.HitFireArea:
case AosWeaponAttribute.HitPhysicalArea:
case AosWeaponAttribute.HitPoisonArea:
case AosWeaponAttribute.HitCurse:
case AosWeaponAttribute.HitFatigue:
case AosWeaponAttribute.HitManaDrain: return new int[] { 2, 50 };
case AosWeaponAttribute.HitEnergyArea:
case AosWeaponAttribute.ResistFireBonus:
case AosWeaponAttribute.ResistColdBonus:
case AosWeaponAttribute.ResistPoisonBonus:
case AosWeaponAttribute.ResistEnergyBonus:
case AosWeaponAttribute.ResistPhysicalBonus: return new int[] { 1, 15 };
case AosWeaponAttribute.MageWeapon: return new int[] { 1, 10 };
case AosWeaponAttribute.SelfRepair: return new int[] { 1, 5 };
case AosWeaponAttribute.SplinteringWeapon: return new int[] { 5, 30 };
default:
case AosWeaponAttribute.UseBestSkill:
case AosWeaponAttribute.BattleLust:
case AosWeaponAttribute.BloodDrinker: return new int[] { 1, 1 };
}
}
示例14: GetValue
public static int GetValue(Mobile m, AosWeaponAttribute attribute)
{
return 0;
}
示例15: GetPropRange
public static int[] GetPropRange(AosWeaponAttribute attr)
{
switch (attr)
{
case AosWeaponAttribute.DurabilityBonus:
case AosWeaponAttribute.LowerStatReq: return new int[] { 10, 100 };
case AosWeaponAttribute.HitLeechHits:
case AosWeaponAttribute.HitLeechMana:
case AosWeaponAttribute.HitLeechStam:
case AosWeaponAttribute.HitLowerAttack:
case AosWeaponAttribute.HitLowerDefend:
case AosWeaponAttribute.HitMagicArrow:
case AosWeaponAttribute.HitHarm:
case AosWeaponAttribute.HitLightning:
case AosWeaponAttribute.HitFireball:
case AosWeaponAttribute.HitDispel:
case AosWeaponAttribute.HitColdArea:
case AosWeaponAttribute.HitFireArea:
case AosWeaponAttribute.HitPhysicalArea:
case AosWeaponAttribute.HitPoisonArea:
case AosWeaponAttribute.HitCurse:
case AosWeaponAttribute.HitFatigue:
case AosWeaponAttribute.HitManaDrain: return new int[] { 2, 50 };
case AosWeaponAttribute.HitEnergyArea:
case AosWeaponAttribute.ResistFireBonus:
case AosWeaponAttribute.ResistColdBonus:
case AosWeaponAttribute.ResistPoisonBonus:
case AosWeaponAttribute.ResistEnergyBonus:
case AosWeaponAttribute.ResistPhysicalBonus: return new int[] { 1, 15 };
case AosWeaponAttribute.MageWeapon: return new int[] { 1, 10 };
case AosWeaponAttribute.SelfRepair: return new int[] { 1, 5 };
case AosWeaponAttribute.SplinteringWeapon: return new int[] { 5, 30 };
default:
case AosWeaponAttribute.UseBestSkill:
case AosWeaponAttribute.BattleLust:
case AosWeaponAttribute.BloodDrinker: return new int[] { 1, 1 };
}
}