Re: new Skills

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


Just a quick note:  If you wish to put the victim in a pos where he cannot
hit back, you must set the GET_POS(vict) = POS_INCAP(vict)  if the vict is
stunned and has HPs above 0 he will reset to the standing pos and can hit
back.  Below is my code for the stun skill, if stun is successful the vict
cannot attack back for one round, this is new code and not fully tested.

ACMD(do_stun)
{
  struct char_data *vict;
  int percent, prob;

  one_argument(argument, arg);

  if (GET_CLASS(ch) != CLASS_WARRIOR) {
    send_to_char("You'd better leave all the martial arts to fighters.\r\n",
ch);
    return;
  }
  if (!(vict = get_char_room_vis(ch, arg))) {
    if (FIGHTING(ch)) {
      vict = FIGHTING(ch);
    } else {
      send_to_char("Stun who?\r\n", ch);
      return;
    }
  }
  if (vict == ch) {
    send_to_char("Aren't we funny today...\r\n", ch);
    return;
  }
  if (!GET_EQ(ch, WEAR_WIELD)) {
    send_to_char("You need to wield a weapon to make it a success.\r\n", ch);
    return;
  }
  percent = percent = ((10 - (GET_AC(vict) / 10)) << 1) + number(1, 101);	/*
101% is a complete failure */
  prob = GET_SKILL(ch, SKILL_STUN);
  
  if (MOB_FLAGGED(vict, MOB_NOSTUN))
    percent = 101;
  
  if (percent > prob) {
    damage(ch, vict, 0, SKILL_STUN);
    send_to_char("Your stun failed.\r\n", ch);
  } else {
    damage(ch, vict, 1, SKILL_STUN);
    GET_POS(vict) = POS_INCAP;
    send_to_char("You hit a stunning Blow!\r\n",ch);
    WAIT_STATE(vict, PULSE_VIOLENCE);
  }
  WAIT_STATE(ch, PULSE_VIOLENCE * 3);
}



At 04:20 PM 6/5/96 EDT, you wrote:
>Dude its very simple... do a grep -i bash * >> bash.lines
>look at bash lines.. in the actual code for bash just make a identical one
of it, and change
>the bash to paralyze... then change the wait_state thing to a higher
number, and the persons position
>into POS_STUNNED
>Then of cours eyou must go  to the other files that are listed in
bash.lines and add the paralyze skill
>say full heal is just a hack of heal with the actually code bein
>GET_CHAR_HIT(victim) = GET_CHAR_MAXHIT(victim) i belice thats it... look in
class.c in do_start when it does
>that line to intiate full hp for new characters.
>
>
---
      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