//:://////////////////////////////////////////////////
//:: shaz_lover_damaged
//::  based on NW_C2_DEFAULT6
//:: Default OnDamaged handler
/*
    If we get hit, complain, especially if its our "love" doing it,
	but ignore everything else
 */
//:://////////////////////////////////////////////////
// Shazbotian 060708

#include "nw_i0_generic"
#include "ginc_behavior"
#include "shaz_inc_love"

void main()
{
	object oPC = GetFirstPC();
	//SendMessageToPC(oPC, "shaz_lover_damaged!");
	
	// SHAZ: Here we'll do special "in love" behavior - in this case, complain if we get hurt, but do nothing
	object oLove = GetLocalObject(OBJECT_SELF, "ShazLoved");
	object oDamager = GetLastDamager();
	
	if(oDamager == oLove) {
		if(CanISpeakIntelligently()) {
			int iRandom = Random(2);
			if(iRandom == 0) {
				SpeakString("Oh my love, why do you hurt me so?!");
			} else if(iRandom == 1){
				SpeakString(GetFirstName(oLove) + ", you're breaking my heart!");
			}
		} else if(CanISpeakAtAll()) {
			SpeakString("Why you hurt me?! I friend!", TALKVOLUME_SHOUT);
		}
	} else if(d100(1) <= 50) {
		if(CanISpeakIntelligently()) {
			int iRandom = Random(3);
			if(iRandom == 0) {
				SpeakString("See how I bleed for you, my love?");
			} else if(iRandom == 1) {
				SpeakString("Save me, my love!", TALKVOLUME_SHOUT);
			} else if(iRandom == 2) {
				SpeakString("Oh, " + GetFirstName(oLove) + ", how I suffer for our love!");
			}
		} else if(CanISpeakAtAll()) {
			int iRandom = Random(2);
			if(iRandom == 0) {
				SpeakString("I hurt for you!", TALKVOLUME_SHOUT);
			} else if(iRandom == 1) {
				SpeakString("Ow, help friend!", TALKVOLUME_SHOUT);
			}
		}
	}

    // Send the user-defined event signal
    if(GetSpawnInCondition(NW_FLAG_DAMAGED_EVENT))
    {
        SignalEvent(OBJECT_SELF, EventUserDefined(EVENT_DAMAGED));
    }
}