Skip to content

Commit

Permalink
Reverts
Browse files Browse the repository at this point in the history
  • Loading branch information
kamronbatman committed Feb 6, 2025
1 parent 2207d95 commit 0b1f0a6
Showing 1 changed file with 20 additions and 43 deletions.
63 changes: 20 additions & 43 deletions Projects/UOContent/Items/Armor/BaseArmor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -887,39 +887,21 @@ public CraftAttributeInfo GetResourceAttrs() =>

public int GetProtOffset()
{
if (Core.UOR)
return _protectionLevel switch
{
return _protectionLevel switch
{
ArmorProtectionLevel.Defense => 2,
ArmorProtectionLevel.Guarding => 4,
ArmorProtectionLevel.Hardening => 6,
ArmorProtectionLevel.Fortification => 8,
ArmorProtectionLevel.Invulnerability => 10,
_ => 0
};
}
else
{
return _protectionLevel switch
{
ArmorProtectionLevel.Defense => 5,
ArmorProtectionLevel.Guarding => 10,
ArmorProtectionLevel.Hardening => 15,
ArmorProtectionLevel.Fortification => 20,
ArmorProtectionLevel.Invulnerability => 25,
_ => 0
};
}
ArmorProtectionLevel.Guarding => 1,
ArmorProtectionLevel.Hardening => 2,
ArmorProtectionLevel.Fortification => 3,
ArmorProtectionLevel.Invulnerability => 4,
_ => 0
};
}

public int GetDurabilityBonus()
{
var bonus = _quality == ArmorQuality.Exceptional ? 20 : 0;

if (Core.UOR)
{
bonus += _durability switch
var bonus = _durability switch
{
ArmorDurabilityLevel.Durable => 20,
ArmorDurabilityLevel.Substantial => 50,
Expand All @@ -928,27 +910,22 @@ public int GetDurabilityBonus()
ArmorDurabilityLevel.Indestructible => 120,
_ => 0
};
}
else
{
bonus += _durability switch

if (Core.AOS)
{
ArmorDurabilityLevel.Durable => 5,
ArmorDurabilityLevel.Substantial => 10,
ArmorDurabilityLevel.Massive => 15,
ArmorDurabilityLevel.Fortified => 20,
ArmorDurabilityLevel.Indestructible => 25,
_ => 0
};
}
var resInfo = CraftResources.GetInfo(_resource);
bonus += ArmorAttributes.DurabilityBonus + (resInfo?.AttributeInfo?.ArmorDurability ?? 0);
}

if (Core.AOS)
{
var resInfo = CraftResources.GetInfo(_resource);
bonus += ArmorAttributes.DurabilityBonus + (resInfo?.AttributeInfo?.ArmorDurability ?? 0);
if (_quality == ArmorQuality.Exceptional)
{
return bonus + 20;
}

return bonus;
}

return bonus;
return (int)_durability * 5 + ((int)_quality - 1) * 10;
}

public static void ValidateMobile(Mobile m)
Expand Down

0 comments on commit 0b1f0a6

Please sign in to comment.