View Single Post
  #4  
Old 11-14-2012, 06:10 PM
Furniture
Hill Giant
 
Join Date: Aug 2012
Posts: 205
Default

When it comes to mitigation, what I'm looking to fix for low to mid game combat is basically:

1) Take more damage if mitigation rating is low

2) Take less damage if mitigation rating is high


Since these are tuned for higher level combat where you are expected to have very high mitigation it seems correct but like I said for lower level combat it is off.

I'm convinced theres somehow I can alter something in the following somehow to achieve my desired effects, but I havent figured it out yet:

Quote:
float d = 10.0;
float mit_roll = MakeRandomFloat(0, mitigation_rating);
float atk_roll = MakeRandomFloat(0, attack_rating);

if(atk_roll > mit_roll)
{
float a_diff = (atk_roll - mit_roll); //200
float thac0 = attack_rating * RuleR(Combat, ACthac0Factor); // 440
float thac0cap = ((attacker->GetLevel() * 9) + 20);
if(thac0 > thac0cap)
{
thac0 = thac0cap;
}
d -= 10.0 * (a_diff / thac0);
}
else if(mit_roll > atk_roll)
{
float m_diff = (mit_roll - atk_roll);
float thac20 = mitigation_rating * RuleR(Combat, ACthac20Factor);
float thac20cap = ((defender->GetLevel() * 9) + 20);
if(thac20 > thac20cap)
{
thac20 = thac20cap;
}
d += 10 * (m_diff / thac20);
}

if(d < 0.0)
{
d = 0.0;
}

if(d > 20)
{
d = 20.0;
}

float interval = (damage - minhit) / 20.0;
damage = damage - ((int)d * interval);
}

Any suggestions?
Reply With Quote