[bpl14] Mob Multi Attack

From: Scorn (scorn@RMI.NET)
Date: 09/17/98

ok i look on the ftp site and see yet another multiple attack snippet this
one includes mobs and pcs.  So i look it over and notice that once again
the mob or pc always hits.  No random rolling.  I know it has been hard for
me to get any sort of rolling function out of my mobs hit functions however
my pc's roll just fine if skilled in fifth attack and my pc rolls and
misses his second attack it stops there.  but using the same primace on my
mobs fails they still hit all 5 attacks.  Dont get me wrong if you want
your chars to always hit i am not here to criticize i actually just need
help to get my mobs to roll like my pcs.  Here is my pc code so someone
could help me with mobs either through private mail or the list becuase i
do believe it is cirle related.  BTW i tried the one on the snippets page
but there must be a conflict with my current code because it crashes on
startup.(Since mobs dont use skills i tried putting MOB_ATTACK2 flags still
hit all 5 times.)

if (GET_SKILL(ch, SKILL_SECOND_ATTACK) >= number(1, 101)) {
    if (GET_SKILL(ch, SKILL_THIRD_ATTACK) >= number(1, 201)) apr++;
 if (GET_SKILL(ch, SKILL_FOURTH_ATTACK) >= number(1, 301)) apr++;
 if (GET_SKILL(ch, SKILL_FIFTH_ATTACK) >= number(1, 401)) apr++;
 if (GET_SKILL(ch, SKILL_SIXTH_ATTACK) >= number(1, 501)) apr++;
apr = MAX(-1, MIN(apr, 6));

     if (apr >= 0) {
       for (; apr >= 0 && FIGHTING(ch); apr--)
     hit(ch, FIGHTING(ch), TYPE_UNDEFINED);

sorry bout the spam

     | 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