Re: OLC

From: Gary Barnett (gbarnett@POLARNET.COM)
Date: 02/24/98


On Tuesday, February 24, 1998 10:02 AM, Chuck Reed [SMTP:creed@I-55.COM]
wrote:
> Umm, I'm confused as to what the hell is going on in this area of medit.c
>
> case MEDIT_NUM_HP_DICE:
>     GET_HIT(OLC_MOB(d)) = MAX(0, MIN(30, atoi(arg)));
>     break;
>
>   case MEDIT_SIZE_HP_DICE:
>     GET_MANA(OLC_MOB(d)) = MAX(0, MIN(1000, atoi(arg)));
>     break;
>
>   case MEDIT_ADD_HP:
>     GET_MOVE(OLC_MOB(d)) = MAX(0, MIN(3000, atoi(arg)));
>     break;

I know.. It's a very odd feeling you get when you find that piece of code.
:-)

X rolls of an X sided die + x hp is what it's doing, but it stores it in the
hit, mana and move locations when writing/reading from the disk files. It
works.. but I yanked it just out of principle.

Another one like that is the mob/prf flag union in one of the char structs..
Took me a while to figure that one out; I thought I was having some very
strange memory buffer problem until I found that union statement.

--Mallory


     +------------------------------------------------------------+
     | 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