Fixes brace style (#248)

This commit is contained in:
Kamron Batman 2020-09-13 21:49:46 -07:00 • committed by GitHub
parent a236617ad9
commit 8149620b0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1503 changed files with 28575 additions and 1717 deletions

View file

@ -22,7 +22,10 @@ namespace Server.Items
var ar = base.ArmorRating;
if (m != null)
{
return m.Skills.Parry.Value * ar / 200.0 + 1.0;
}
return ar;
}
}
@ -43,7 +46,9 @@ namespace Server.Items
if (version < 1)
{
if (this is Aegis)
{
return;
}
// The 15 bonus points to resistances are not applied to shields on OSI.
PhysicalBonus = 0;
@ -68,14 +73,20 @@ namespace Server.Items
var absorbed = (int)(halfArmor + halfArmor * Utility.RandomDouble());
if (absorbed < 2)
{
absorbed = 2;
}
int wear;
if (weapon.Type == WeaponType.Bashing)
{
wear = absorbed / 2;
}
else
{
wear = Utility.Random(2);
}
if (wear > 0 && MaxHitPoints > 0)
{
@ -97,11 +108,13 @@ namespace Server.Items
MaxHitPoints -= wear;
if (Parent is Mobile mobile)
{
mobile.LocalOverheadMessage(
MessageType.Regular,
0x3B2,
1061121
); // Your equipment is severely damaged.
}
}
else
{
@ -115,13 +128,18 @@ namespace Server.Items
}
if (!(Parent is Mobile owner))
{
return damage;
}
var ar = ArmorRating;
var chance = (owner.Skills.Parry.Value - ar * 2.0) / 100.0;
if (chance < 0.01)
{
chance = 0.01;
}
/*
FORMULA: Displayed AR = ((Parrying Skill * Base AR of Shield) <EFBFBD> 200) + 1
@ -132,12 +150,18 @@ namespace Server.Items
if (owner.CheckSkill(SkillName.Parry, chance))
{
if (weapon.Skill == SkillName.Archery)
{
damage -= (int)ar;
}
else
{
damage -= (int)(ar / 2.0);
}
if (damage < 0)
{
damage = 0;
}
owner.FixedEffect(0x37B9, 10, 16);