>If someone comes up with a formula that mimics the existing tables exactly, >we'll put it in. At present, someone has made one that comes close. The problem with this is that the existing tables don't all follow a real formula. In fact, some are more than a little bit random. Is it possible that they might be altered? For instance: Magic-Users default Save vs. Paralyzation starts at a base of 70 at level 1, and then drops in this order: -1,-1,-1,-1,-1,-2,-2,-1,-1,-2,-2,-1,-1,0,-1,-1,-1, -2,-2,-1,-1,-2,-2,-2,-2,-2 . It would be impossible to write a formula to figure out those values, and a case statment is the best way to do it if the values go in that order. However, if you take a look, there are 14 -1's, 13 -2's, and 1 0. If it were modified to go, perhaps, -1 for even levels and -2 for odd levels, you would get the same result, although the end result would have a minimum value of 27 instead of 28, but that could be fixed as well by simply making it max out at level 29 instead of 30, or by just not allowing it to return a value lower than 28. Of course I could be wrong... I'm not sure exactly how to check the even/odd-ness of integers in C. Here is an attempt at what it might look like: [*WARNING: PSUEDO-CODE*] int slevel; int base; switch (level) { case 0: return 90; break; case 1: return 70; break; default: base = 70; for (slevel = level; slevel > 0; slevel--) { if (slevel is odd) base -= 2; else base -= 1; } } Comments? (Or a way to check even/odd-ness) - Scott Bowden +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST