Thread: Combat
View Single Post
  #20  
Old 01-23-2002, 11:53 AM
RadiationVibe
Fire Beetle
 
Join Date: Jan 2002
Posts: 8
Default

I understand why level is there. It's just that the "/2" part isn't necessary.

If you pull that out, like below, the result for hitsuccess will be exactly the same. It affects the individual numbers, but when you divide them by each other the net result is the same.

float attacker = this->GetLevel() * (this->GetDEX()/6)+this->GetSTR()+atkbonus+this->pp.skills[skillinuse]);
float defender = other->GetLevel()* (other->GetAC()+(pp.skills[DEFENSE]/2)+other->GetINT()+other->GetAGI());

float hitsuccess = (attacker / defender);
Reply With Quote