Multi Attack Pointers [by ?]
Snippet Posted Wednesday, August 12th @ 11:31:57 PM, by George Greer in the Skills dept.
. Click the link below to read it or download it.

From:  ?
Subject: Multiple Attacks

To have multi attack working, you need to follow the instructions
below...
In 'spell_parser.c', you will need to add in the double attack, triple
attack, etc at the bottom and set up the appropriate SPELLO for it.
Ensure that the number you assign for it you also assign in the header
file also.
In 'fight.c' in perform_violence, you will need to add the following:

        if (AWAKE(ch) && (ch->in_room == ch->specials.fighting->in_room)) {
           hit(ch, ch->specials.fighting, TYPE_UNDEFINED);
        if((GET_SKILL(ch, SKILL_SECOND) > 0)) {
           if(GET_SKILL(ch, SKILL_SECOND) > number(1,200)-5*GET_LEVEL(ch))

      if(FIGHTING(ch));
                 hit(ch,FIGHTING(ch),TYPE_UNDEFINED);
        }
        if(!IS_NPC(ch) && (GET_SKILL(ch, SKILL_HEXA) > 0)) {
           for(i=0;i<4;i++){
              if(GET_SKILL(ch, SKILL_HEXA) > number(1,500)-10*GET_LEVEL(ch))

         if(FIGHTING(ch));
                    hit(ch,FIGHTING(ch),TYPE_UNDEFINED);
           }
        }
        if(IS_AFFECTED(ch,AFF_HASTE)) {
           if(FIGHTING(ch));
              hit(ch,FIGHTING(ch),TYPE_UNDEFINED);
        }
      } else { /* Not in same room */
         stop_fighting(ch);

Explanation... the first if+hit are standard code, the second if,
nested within checks for a SKILL_SECOND, which is our second attack,
the third if, SKILL_HEXA checks for 4 times attack (don't ask why it is
called hexa and not quad) then the third if, is just there for an affect
of HASTE (our haste spell)
In 'spells.h' add a #define SKILL_SECOND (or whatever you want to call
it), followed by the number of the skill you assigned in the SPELLO.


<< Multi Attack for Mobs [by Christian Duvall] | Reply | View as text | Threaded | Multiple Greeting Screens [by Erik Lundin] >>

 


Related Links
  download
Related Articles
More by greerga
 
 

CircleMUD Snippets
 
Note: Not all of these snippets will work perfectly with your version of code, so be prepared to fix one or two bugs that may arise, and please let me know what you needed to do to fix it. Sending a corrected version is always welcome.
Finally, if you wish to use any of the snippets from this page, you are more than welcome, just mention the authors in your credits. If you wish to release any of these snippets to the public on another site, contact me FIRST.