Re: Charisma

From: Lincoln Chan (linc@CSUA.Berkeley.EDU)
Date: 07/18/95

Daniel, try looking at the code before making suggestions.  number() is
a random (laugh, psuedo-random) function that returns a number from
value a to value b (inclusive).  Also, the aggressive mob check is not
in update.c (update.c?!?  what version are you looking at?!?).

data, here's your CHA suggestion encoded.  Just cut and paste.

mobact.c: void mobile_activity(void)

/* Aggressive Mobs */
  found = FALSE;
  for (vict = world[ch->in_room].people; vict && !found; 
       vict = vict->next_in_room) {
    if (IS_NPC(vict) || !CAN_SEE(ch, vict) || PRF_FLAGGED(vict, PRF_NOHASSLE))
    if (MOB_FLAGGED(ch, MOB_WIMPY) && AWAKE(vict))
        (MOB_FLAGGED(ch, MOB_AGGR_EVIL) && IS_EVIL(vict)) ||
        (MOB_FLAGGED(ch, MOB_AGGR_NEUTRAL) && IS_NEUTRAL(vict)) ||
        (MOB_FLAGGED(ch, MOB_AGGR_GOOD) && IS_GOOD(vict))) {
      if (number(0, 20) <= GET_CHA(vict)) {
        act("$n looks at $N with an indifference.", 
            FALSE, ch, 0, vict, TO_ROOM);
	act("$N looks at you with an indifference.",
	    FALSE, vict, 0, ch, TO_CHAR);
      } else { 
        hit(ch, vict, TYPE_UNDEFINED);
        found = TRUE;

/* Keep in mind that if the room's full of good looking players, you'll most
   likely get spammed with "indifference" text.  Good suggestion, heard it
   before, kept it off my mud because you compromise the "rear tank" concept,
   which may be a good thing for some muds, but I don't like it.  Otherwise,
   good idea, since CHA's gotta be good for something!  (It's also been
   suggested that CHA be good for shopkeeper discounts as well as affecting
   charm in some way; I've yet to decide on a good way to imp these ideas
   because I ended up finding ways of abusing these new features.) */

I would suggest you put your idea in mobact.c because if you add it in
act.movement.c, it only checks charisma upon room entry.  Sooner or later,
upon the mobile_activity pulse, the aggressives will attack regardless of

linc aka Aladdin of Eternity DikuMUD

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