Re: Bpl 16 Num of Mob Attacks

From: Peter Ajamian (pajamian@cheapsam.com)
Date: 01/11/00


Ray Campbell wrote:
>
> Hmmm, well, was just searching through the code for a while (fight.c)
> because players were questioning the reason why mobs didn't hit them
> back when they fought them.  I thought this was very odd seeming that I
> haven't attacked the perform_violence routine at all.  So I looked at it
> and noticed this comment:
> (approx. line 975 in stock bpl16 code.)
>
> /* have to implement a better way for number of attacks for mobs*/
> num_of_attacks += ((int) GET_LEVEL(ch) / 10) - 1;

note the assignment operator is +=, not =.  that is equivalent to

 num_of_attacks = num_of_attacks + ((int) GET_LEVEL(ch) / 10) - 1;

> Oh yes, and this:
>
>     /* reset to 1 attack */
>     num_of_attacks = 1;
> comes a little before that previous code, but still if a mob is level 10
> or below the -1 makes it so that it has 0 attacks.  Absurd, just absurd.

No, it would be 1 because it's adding 0 to the previous value of 1.

Reagards, Peter


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/10/01 PDT