> Has anyone turned the thaco - diceroll > victim_ac into a formula? > Or is there anyone out there with better math logic that can turn > this into something like percent_chance = thaco .. ave_dice_roll .. > victim_ac?? > > Taking into account, thaco range, hitroll range, ac range, etc?? Go through the same routine as in hit() to get their modified thac0 with damroll, str bonus etc (to avoid repetative code you could make a calc_thac0() function) and the victims ac. Chance to hit in % is MIN(95, MAX((19 - (thac0 - ac)) *5), 5) MIN and MAX because you always hit on a 1 and miss on a 20. To do the actual calculations, I would do the following: Get each char's % with the above formula multiply them by their avg. damage (taking into account spells for mages, which will be pretty hard) multiply them by their hitpoints, and see which total is higher This would tell you who would have the best chance of winning in a matchup. to display, you could use a line of ifs... if(chnum > (victnum *2)) send_to_char("An easy fight!"); else if... all the way to else if((chnum * 2) < victnum)) send_to_char("Your bloody remains would be scattered to the seven winds."); if you want cons to change when you are in a group, you multiply all the char's %s and avg dams together like above, then add them all, giving you total damage for the group. Then take the damage for all...blah its getting a bit long...if you wanna know more mail me at blaizeofshadow@juno.com ^Blaize^ ________________________________________________________________ GET INTERNET ACCESS FROM JUNO! Juno offers FREE or PREMIUM Internet access for less! Join Juno today! For your FREE software, visit: http://dl.www.juno.com/get/tagj. -- +---------------------------------------------------------------+ | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html | +---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/05/01 PST