Formatting FIxes (#58)

This commit is contained in:
Kamron Batman 2019-10-04 23:08:13 -07:00 • committed by GitHub
parent 57fb9fb525
commit 096d39609e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1318 changed files with 11633 additions and 22129 deletions

View file

@ -37,21 +37,11 @@ namespace Server.Engines.Craft
m_Deed = deed;
}
private int GetWeakenChance(Mobile mob, SkillName skill, int curHits, int maxHits)
{
// 40% - (1% per hp lost) - (1% per 10 craft skill)
return 40 + (maxHits - curHits) - (int)((m_Deed?.SkillLevel ?? mob.Skills[skill].Value) / 10);
}
private int GetWeakenChance(Mobile mob, SkillName skill, int curHits, int maxHits) => 40 + (maxHits - curHits) - (int)((m_Deed?.SkillLevel ?? mob.Skills[skill].Value) / 10);
private bool CheckWeaken(Mobile mob, SkillName skill, int curHits, int maxHits)
{
return GetWeakenChance(mob, skill, curHits, maxHits) > Utility.Random(100);
}
private bool CheckWeaken(Mobile mob, SkillName skill, int curHits, int maxHits) => GetWeakenChance(mob, skill, curHits, maxHits) > Utility.Random(100);
private int GetRepairDifficulty(int curHits, int maxHits)
{
return (maxHits - curHits) * 1250 / Math.Max(maxHits, 1) - 250;
}
private int GetRepairDifficulty(int curHits, int maxHits) => (maxHits - curHits) * 1250 / Math.Max(maxHits, 1) - 250;
private bool CheckRepairDifficulty(Mobile mob, SkillName skill, int curHits, int maxHits)
{