|
Charisma Affecting Aggressiveness [by Lincoln Chan] |
|
|
|
Posted Wednesday, August 12th @ 11:25:05 PM, by George Greer in the Utils dept.
. Click the link below to read it or download it.
From: Lincoln Chan <linc@CSUA.Berkeley.EDU>
Subject: Re: Charisma
mobact.c: void mobile_activity(void)
/* Aggressive Mobs */
if (MOB_FLAGGED(ch, MOB_AGGRESSIVE | MOB_AGGR_TO_ALIGN)) {
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))
continue;
if (MOB_FLAGGED(ch, MOB_WIMPY) && AWAKE(vict))
continue;
if (!MOB_FLAGGED(ch, MOB_AGGR_TO_ALIGN) ||
(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_NOTVICT);
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
charisma.
<< Change Ownership Command [by Crimson Wizard] | Reply | View as text | Flattened | Clan Code. Mmmmm. [by Mehdi Keddache] >> |
|
Related Links |
|
|
|
CircleMUD Snippets |
|
|
Note: Not all of these snippets will work perfectly with
your version of code, so be prepared to fix one
or two bugs that may arise, and please let me know
what you needed to do to fix it. Sending a corrected
version is always welcome.
|
Finally, if you wish to use any of the snippets from this
page, you are more than welcome, just mention the
authors in your credits. If you wish to release any
of these snippets to the public on another site,
contact me FIRST.
|
|
|
|
|
|
|