View Single Post
  #12  
Old 07-03-2002, 01:23 PM
Merkur
Sarnak
 
Join Date: Mar 2002
Posts: 53
Default

yeah im bored atm - bored enough to visit this board and answer this question

First: Min and Max damage values will never be the 'final' damage. Depending on your AC it will be reduced up to umm 70% ? not sure anymore.

Second: there is a bug
i think if you add/edit this two lines it would work fine, but of course I didn't test it

for (int ix = 0;ix != atks;ix++){
if(min_dmg != 0 && max_dmg != 0 && min_dmg <= max_dmg)
{
if (max_dmg == min_dmg)
currenthit= min_dmg;

else
currenthit = min_dmg + (float)rand()/RAND_MAX*(max_dmg-min_dmg);
basedamage = min_dmg + (max_dmg-min_dmg)/2;
}
else
currenthit = (float)basedamage-basedamage/100*25 + (float)rand()/RAND_MAX *$
damage = currenthit - (float)basedamage/100*basedefend;
Reply With Quote