[COMPLETE] Parry / Bushido [Fix] negative parry.
wrong/missing math && missing skill based parrychance bump of 5% (GM bushido).
fixed - while using a shield with parry and bushido, if parry is lower, it would return a negative number in certain situations. this fix's that.
also, i added that if you have GM bushido to the list of skills at gm that gives you a minimum of 5% parry, as that is the case on EA. so if bushido OR parry are at 100+, you will have a minimum of 5% skill in parry.
Link: http://uo.stratics.com/content/skills/parrying.php
Note: It's not tested, but it doesn't prevent the server from loading. i didn't see a reason to test it, i tested to make sure it would throw a negative number at me before the fix though.
wrong/missing math && missing skill based parrychance bump of 5% (GM bushido).
fixed - while using a shield with parry and bushido, if parry is lower, it would return a negative number in certain situations. this fix's that.
also, i added that if you have GM bushido to the list of skills at gm that gives you a minimum of 5% parry, as that is the case on EA. so if bushido OR parry are at 100+, you will have a minimum of 5% skill in parry.
Code:
Index: BaseWeapon.cs
===================================================================
--- BaseWeapon.cs (revision 319)
+++ BaseWeapon.cs (working copy)
@@ -1058,9 +1058,12 @@
{
double chance = (parry - bushidoNonRacial) / 400.0; //As per OSI, no negitive effect from the Racial stuffs, ie, 120 parry and '0' bushido with humans
+ if ( chance <= 0 ) //chance shouldn't go below 0
+ chance = 0;
+
- // Parry over 100 grants a 5% bonus.
- if ( parry >= 100.0 )
+ // Parry/bushido over 100 grants a 5% bonus.
+ if ( parry >= 100.0 || bushido >= 100.0)
chance += 0.05;
// Evasion grants a variable bonus post ML. 50% prior.
Link: http://uo.stratics.com/content/skills/parrying.php
Note: It's not tested, but it doesn't prevent the server from loading. i didn't see a reason to test it, i tested to make sure it would throw a negative number at me before the fix though.