Ok, I am having a moment of complete retardation. I made a couple changes and converted this system to an if/else fall through. This basically proved that my calculation is producing the final case (changed the damage mod to prove this, using 5 for both start and end was a bad choice to start with).
Basically it looks like this is producing a 0
double healthpercent = this.Hits / this.HitsMax;
Say a mob is at 8,400 Hits out of 10,000 HitsMax shouldn't this give healthpercent a value of 0.84?
Basically filling these numbers into the forumula:
0.84 = 8400/10000
I think at this juncture I need to step away from the PC for a little bit and clear my mind.
what I currently have coded for the OnDamage:
public override void OnDamage(int amount, Mobile from, bool willKill)
{
double healthpercent = this.Hits / this.HitsMax;
if (healthpercent > 0.8)
{
healthbasedamage = 0;
return;
}
else
if (healthpercent > 0.6 && healthpercent <= 0.8)
{
healthbasedamage = 1;
return;
}
else
if (healthpercent > 0.4 && healthpercent <= 0.6)
{
healthbasedamage = 2;
return;
}
else
if (healthpercent > 0.2 && healthpercent <= 0.4)
{
healthbasedamage = 3;
return;
}
else
if (healthpercent <= 0.2)
{
healthbasedamage = 4;
return;
}
}