Re: CODE: Double hit and Remort classes?

From: Malcor (malcor@cyberportal.net)
Date: 07/06/96


At 04:20 PM 7/4/96 -0700, you wrote:
>Are there any documents or code snippits out there for the two folowing
subjects:
>
>Remort classes: Once a player gets to the immortal level (level 31) and
wants to 
>continue playing as a mortal, he or she can 'remort' to a previously
unavailable class?
Sorry still trying to mouch that code :)

>DoubleHit: A skill for warriors that allows him to hit more then once a
round, I have 
>also seen this as a spell called 'haste'. Does anyone know where I can get
docs or code 
"Second attack skill" :)
after this line in fight.c:

 extern struct dex_app_type dex_app[];

  /*                                         */
  /* insert skill check and haste check here */
  /*                                         */

  if(IS_AFFECTED(ch, AFF_HASTE))
    round += 1;

  if (IS_NPC(ch)){
    for(j = 0; j < ((int)(GET_LEVEL(ch)/10)); j++){
      percent1 = ((10 - (GET_AC(victim) / 10)) << 1) + number(1, 101); /* 101% $
      if (percent1 <= 30)
        round++;}
    }
  else
    percent = ((10 - (GET_AC(victim) / 10)) << 1) + number(1, 101); /*101% is a
  prob = GET_SKILL(ch, SKILL_SECOND_ATTACK);
    if (prob >= percent)
       round += 1;                   


>snippits for these two things? Also in the doublehit thing, if you have
double hit, and 
>'haste' on, you hit 3 times a round?

Haste:

ACAST(cast_haste)
{
   switch (type) {
   case SPELL_TYPE_SPELL:
      spell_haste(level, ch, victim, 0);
      break;
   case SPELL_TYPE_POTION:
      spell_haste(level, ch, ch, 0);
      break;
   case SPELL_TYPE_SCROLL:      
 if (tar_obj)
         return;
      if (!victim)
         victim = ch;
      spell_haste(level, ch, victim, 0);
      break;
   case SPELL_TYPE_WAND:
      if (tar_obj)
         return;
      spell_haste(level, ch, victim, 0);
      break;
   case SPELL_TYPE_STAFF:
      for (victim = world[ch->in_room].people ;
          victim ; victim = victim->next_in_room)
         if (victim != ch)
            spell_haste(level, ch, victim, 0);
      break;                                   
 default :
      log("SYSERR: Serious screw-up in haste!");
      break;
   }
}                                   

>thanks,
>
>SLiVER
>

Well that is what i use on 2.2 hope it help :) just put haste defined and in
fight.c it will be added :)

Malcor



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