/*
Mob Hatred
	Allows a mob to remember a character that attacks them.  If the
character flees, and comes back into the
	room, the mob attacks saying, 'I remember the likes of you!'.
This adds to the realism as well as preventing
	characters from fleeing, backstabing, fleeing, etc.
	It was coded for LUN telnet://lun.readiloan.com 1701 - a heavily
modified Rom 2.3
	Thor - thor@lun.readiloan.com
*/

add to fight.c
---
Add before: * Damage modifiers. in bool damage()
===
if (victim->hate)
        {
        free_string(victim->hate->name);
        victim->hate->name = str_dup(ch->name);
        victim->hate->who = ch;
        }
        else
        start_hating(victim,ch);


Add before:  * Check for parry.:
===
/* Hate */

bool is_hating(CHAR_DATA *ch, CHAR_DATA *victim)
{
        if (!ch->hate || ch->hate->who != victim)
        return FALSE;
        return TRUE;
}
void stop_hating(CHAR_DATA *ch)
{
        if (ch->hate)
        {
        free_string(ch->hate->name );
        free_mem(ch->hate, sizeof (HATE_DATA));
        ch->hate = NULL;
        }
        return;
}
void start_hating(CHAR_DATA *ch, CHAR_DATA *victim)
{
        if (ch->hate)
        stop_hating(ch);

        ch->hate = alloc_mem(sizeof( HATE_DATA));
        ch->hate->name = str_dup(victim->name);
        ch->hate->who = victim;
        return;
}

add to merc.h
---
In the /* fight.c */ group of function prototypes
===
bool    is_hating       args( ( CHAR_DATA *ch, CHAR_DATA *victim ) );
void    stop_hating     args( ( CHAR_DATA *ch ) );
void    stop_fighting   args( ( CHAR_DATA *ch, bool fBoth ) );

Add at the end of Structure Types
===
typedef struct  hate_data               HATE_DATA;

add to struct char_data right after: CHAR_DATA *         pet;
===
HATE_DATA *         hate;

Add before struct pc_data
===
struct hate_data
{
        char *          name;
        CHAR_DATA *     who;
};

add to act_wiz.c
---

Add right before the line: sprintf( buf, "Short description: %s\n\rLong
description: %s",
in do_mstat()
===
sprintf( buf, "Hating: %s\n\r",
        victim->hate    ? victim->hate->name : "(none)");
        send_to_char( buf, ch );

Add right after: REMOVE_BIT(rch->act,ACT_AGGRESSIVE); in do_peace():
and right before the }
===
stop_hating(rch);

Add to update.c
---

Add right before /*Wander*/ in mobile_update()
===
/*Hate*/
        {
        CHAR_DATA *rch;

        for (rch = ch->in_room->people; rch; rch = rch->next_in_room)
        {

        if ( is_hating(ch,rch) )
        {
                do_say( ch, "I remember the likes of you!");
                multi_hit( ch, rch, TYPE_UNDEFINED );
                break;
        }
        }
        }
