DHIT & THIT Thanks for Help!

From: Tarot (tarot@erinet.com)
Date: 06/04/96


Thanks to all who helped!

Here's the code I wrote for DHIT and THIT (players only)  It is automatic,
no skill required.  And it gives even low levels the chance to DHIT and even
THIT. I am still gonna add something for a DEX modifier.  I tested it and it
works with no prob!

    /* Do double hit player */
    percent = number(1, 101);  
    prob = 101 - (3 * GET_LEVEL(ch));
    if (percent >= prob && GET_CLASS(ch) == CLASS_WARRIOR && !IS_NPC(ch) &&
FIGHTING(ch))
      hit(ch, FIGHTING(ch), TYPE_UNDEFINED);
    
    /* Do triple hit player */
    percent = number(1, 101);  
    prob = 101 - (1 * GET_LEVEL(ch));
    if (percent >= prob && GET_CLASS(ch) == CLASS_WARRIOR && !IS_NPC(ch) &&
FIGHTING(ch))
      hit(ch, FIGHTING(ch), TYPE_UNDEFINED);

You can change the !IS_NPC to IS_NPC and add a check for DHIT or THIT flag
for mobs, you can also give mobs a set percent to DHIT.
      Builder of Worlds / IMP Want-a-be 
          I thought C was a letter!
 //////// //////// //////// //////// ////////
   //    //    // //    // //    //    //
  //    //////// //////// //    //    //
 //    //    // // \\    //    //    //
//    //    // //   \\  ////////    //
 http://www.erinet.com/tarot/index.html
Download the newest version of WorldBuilder
                  Alpha 3



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