THAC0's and saves

@kirk.geog.sc.edu
Date: 10/11/96


has anybody done away with the cumbersome tables for these two
things (THAC0 and saving throws)?  
replace them with something like:

int find_thaco(struct char_data *ch) {
  int i;

  if (GET_CLASS(ch) == CLASS_WARRIOR)
	i = GET_LEVEL(ch);
  if (GET_CLASS(ch) == CLASS_CLERIC)
	i = (GET_LEVEL(ch) * (float)2/3);  
  if (GET_CLASS(ch) == CLASS_THIEF)
	i = (GET_LEVEL(ch) / 2);
  etc...

  return i;
}

then in fight.c, replace the line
calc_thaco = thaco[(int) GET_CLASS(ch)][(int) GET_LEVEL(ch)];
with
calc_thaco = (20 - find_thaco(ch));

it would seem a similar thing might also be done with saving throws.

this would make it trivial to change the rate of thaco improvement,
trivial to add new classes, trivial to change the size of the dice you
use for hit rolls, and if you add more levels, you don't have to spend
any time expanding these tables. 

anybody see any potential pitfalls with this method?  
+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/18/00 PST