public static void GiveBandage(Mobile m, Mobile targ)
{
if (ChanceToRecover > 0)
{
if (Utility.Random(100) >= ChanceToRecover - 1)
{
m.AddToBackpack(new BloodyBandage());
m.SendMessage("You were able to recover a soiled bandage.");
}
}
else
{
double primary = m.Skills[BandageContext.GetPrimarySkill(targ)].Base;
double secondary = m.Skills[BandageContext.GetSecondarySkill(targ)].Base;
double skillz = (primary * (2.0 / 3.0)) + (secondary * (1.0 / 3.0)); // primary and secondary GM should = 100
double chance = (((double)ScaledChanceToRecover / 100) * skillz);
// TEST VALUES
// -----------
// 100 healing and anatomy = 100 skillz
// 50 ScaledChanceToRecover = 50 chance
// -----------
// 100 healing and 50 anatomy = ~83.3 skillz
// 50 ScaledChanceToRecover = ~41.6 chance
// -----------
// 50 healing and 100 anatomy = ~66.6 skillz
// 50 ScaledChanceToRecover = ~33.3 chance
if (chance >= Utility.Random(100))
{
FinishGiveBandage(m);
}
}
}