Re: adding new levels gone off topic, and onto flaming

From: John Evans (evansj@HI-LINE.NET)
Date: 11/20/97

On Thu, 20 Nov 1997, Anthony J rye wrote:

> >
> > There are plenty of mobs in AD&D that don't actually die when
> here would be a challenging program. Creating a Mob that can only be
> killed with silver weapons (ravenloft)
>  wererats,werebears,etc...

Add a new int to the obj_data struct in structs.h like so:

int material;           /* The stuff the obj is made of */

Also in structs.h add lines like:
#define ITEM_MAT_UNDEFINED      -1
#define ITEM_MAT_LEATHER        0
#define ITEM_MAT_SILVER         1
#define ITEM_MAT_IRON           2
#define  etc.....

in utils.h add:
#define GET_OBJ_MATERIAL(obj)   ((obj)->obj_flags.material)

And in hit() in fight.c add a check like:

  dam = 0;

> or how about coming up with a regeneration code for trolls and High
> leveled Npc(like wizards)?

Add the following in structs.h:
#define MOB_REGENERATE  (1 << 18)       /* Mob regenerates */

in mobile_activity() in mobact.c add something like:

  GET_HIT(ch) += GET_LEVEL(ch);  /* Can use some other formula if ya want */
  GET_HIT(ch) = MIN(GET_HIT(ch), GET_MAX_HIT(ch));
             /* Ensure they don't go over max_hits. */

All of this is mailer code, so it prolly won't work if you just Plug 'n'
Pray. If it does work like I posted, then I'll be kinda surprised. :)

John Evans <>

May the source be with you.

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

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