Aggressive mobs

From: Mark Garringer (zizazat@rmii.com)
Date: 07/17/95


I am having a slight problem with mine. In 2.2

Say I have a mob flagged:

special, scavenger, aggressive evil, and memory

It will not attack evil. Here is my aggessive code from mobact.c

            if (IS_SET(ch->specials2.act, MOB_AGGRESSIVE)) {
               found = FALSE;
               for (tmp_ch = world[ch->in_room].people; tmp_ch && !found; 
                   tmp_ch = tmp_ch->next_in_room) {
                  if (CAN_SEE(ch, tmp_ch) && !PRF_FLAGGED(tmp_ch, 
PRF_NOHASSLE)) {
                     if (!IS_SET(ch->specials2.act, MOB_WIMPY) || 
!AWAKE(tmp_ch)) {
                        if ((IS_SET(ch->specials2.act, 
MOB_AGGRESSIVE_EVIL) && 
                            IS_EVIL(tmp_ch) || IS_TSALARI(tmp_ch) || 
IS_MARDUK(tmp_ch) || IS_MARDUK_PAL(tmp_ch)) || 
                            (IS_SET(ch->specials2.act, 
MOB_AGGRESSIVE_GOOD) && 
                            IS_GOOD(tmp_ch) || IS_AO(tmp_ch) || 
IS_AO_PAL(tmp_ch)) || 
                            (IS_SET(ch->specials2.act, 
MOB_AGGRESSIVE_NEUTRAL) && 
                            IS_NEUTRAL(tmp_ch)) ||
                            (IS_SET(ch->specials2.act, 
MOB_AGGRESSIVE_MARDUK) &&
                            IS_MARDUK(tmp_ch) || IS_TSALARI(tmp_ch)) || 
                            (!IS_SET(ch->specials2.act, 
MOB_AGGRESSIVE_EVIL) && 
                            !IS_SET(ch->specials2.act, 
MOB_AGGRESSIVE_NEUTRAL) && 
                            !IS_SET(ch->specials2.act, 
MOB_AGGRESSIVE_GOOD) ) &&
                            !IS_SET(ch->specials2.act, 
MOB_AGGRESSIVE_MARDUK) ) {
                                if (ch != tmp_ch) {
                                 hit(ch, tmp_ch, 0); 
                                 found = FALSE;
                                } else {
                                 found = TRUE;

etc...

--Ziz, NetShamen



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