Re: Multi Attacks...

From: the count (goamkows@janeway.geog.scarolina.edu)
Date: 05/30/96


i'm not a real C programmer, but i play one in college ;P

anyway, i did my check for multiple attacks in fight.c in 
the hit function - at the end of the function:

 if ((GET_SKILL(ch, SKILL_SECOND_ATTACK) > 0) && (attack_num == 1)) {
    percent = number(1, 101);
    prob = GET_SKILL(ch, SKILL_SECOND_ATTACK);

    if (percent > prob)
      return;
    else {
        if (GET_POS(victim) == POS_DEAD)
          return;
       else
        hit(ch, FIGHTING(ch), TYPE_UNDEFINED, 2);
         }
    }

have to remember to add attack_num as a paramter in the hit function
and change all the calls accordingly, but there weren't too many.

probably not the best or most effiecent way (like i said, i'm not a
real C programmer... ;)  but then i have a fairly low player limit (20) 
and am on a fast machine, so it doesn't seem to be a problem :)



This archive was generated by hypermail 2b30 : 12/18/00 PST