Re: [STOCK BUG ?!?] Some serious thac0 stuff bug...

From: Johan Dustler (Johan.Dustler@epk.ericsson.se)
Date: 12/18/96


> From: ia_remko@cs.utwente.nl (Remko M. Wiersma)
> 
> Hi!
> 
> Erm... Since I wanted to write a new and better do_consider command, that
> does not only just compare two levels, but uses armor class, hitroll,
> damroll etc., I did some research on what on earth the thac0 stuff was about.
> In the documentation (if I'm not mistaking it was in defs.doc) a simple
> example was presented:
> 
> >          Your <THAC0> is 14 (ei. level 7 fighter). You are fighting
> >          an opponent with <AC> '3'. Thus to hit <AC> 0 you must
> >          roll a 14 or greater. To hit <AC> 3 you must then roll
> >          11 (14-3) or greater. If you had to hit <AC> '-3' you
> >          would have to roll 17 (14-(-3)) or greater on a 20 sided
> >          dice.
> 
> This leads to: I would hit the guy if only I would roll a number such that
> my thac0 reduced with it gives me my opponents ac or less, right ? In other
> words: 
> 
> thac0 - diceroll <= victim_ac
> 
> Ok. Simple enough. Next thing, I checked out the do_hit function, to see
> how much damage a player would do on the average. After some calculations
> we got the thac0 of the player, the victim_ac and some diceroll.
> Then we check wether or not we hit the guy, with:
> 
> >  if ((((diceroll < 20) && AWAKE(victim)) &&
> >       ((diceroll == 1) || ((calc_thaco - diceroll) > victim_ac))))
> 
> Erm........
> 
> Didn't I just come to the opposite (not taking into account the AWAKE and
> diceroll </== stuff) ?!?
> 
> Now: did I do something wrong or is this a BUG in stock circle ?
> 

Your calculations are right, but if you check the code again, you
will see that the check is made to see if it is a miss. If the
check is true, damage() is called with a value of 0.
+-----------------------------------------------------------+
| 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