#library "NEXMAS"
#include "zcommon.acs"

//Inspiration taken from Dr. Blood's kill scripts

Script "I Got A Present For Ya" KILL
{
    if (GetCVar("nx_xmas") == 1)
	{
        if(!CheckFlag(0,"ISMONSTER"))terminate;
	    if(LegGang())DropItem(0,"LegendaryPresent",1,32);
	    else if(LegBigGang())DropItem(0,"LegendaryPresent",1,64);
	    else if(LegSuperGang())DropItem(0,"LegendaryPresent",1,128);
	    else if(MadGang())DropItem(0,"EnragedLegendaryPresent",1,32);
	    else if(MadBigGang())DropItem(0,"EnragedLegendaryPresent",1,64);
	    else if(MadSuperGang())DropItem(0,"EnragedLegendaryPresent",1,128);
	    else if(NemGang())DropItem(0,"NemesisPresent",1,32);
	    else if(NemBigGang())DropItem(0,"NemesisPresent",1,64);
	    else if(NemSuperGang())DropItem(0,"NemesisPresent",1,128);
		else if(ZamGang())DropItem(0,"ZamasuPresent",1,32);
	    else if(ZamBigGang())DropItem(0,"ZamasuPresent",1,64);
	    else if(ZamSuperGang())DropItem(0,"ZamasuPresent",1,128);
		else if(MLGGang())DropItem(0,"MLGPresent",1,32);
	    else if(PhaseGang())DropItem(0,"PhasePresent",1,16);
	    else if(PhaseBigGang())DropItem(0,"PhasePresent",1,32);
	    else if(PhaseSuperGang())DropItem(0,"PhasePresent",1,128);
	    else if(CheckFlag(0, "BOSS") == True) 
	    { 
	        DropItem(0,"RandomPresentSpawner",1,168);
	    }
		else { DropItem(0,"RandomPresentSpawner",1,4); }
	}
}

Function bool LegGang(void)
{
	if(CheckActorClass(0,"LegendaryZombie4"))return TRUE;
 	else if(CheckActorClass(0,"LegendaryAssaultCaptain2"))return TRUE;
	else if(CheckActorClass(0,"TrueLegendaryZombie"))return TRUE;
	else if(CheckActorClass(0,"LegendaryLieutenant"))return TRUE;
	else if(CheckActorClass(0,"LegendaryLieutenant3"))return TRUE;
	else if(CheckActorClass(0,"LegendaryStealthTrooper2"))return TRUE;
    else if(CheckActorClass(0,"LegendaryCommando2"))return TRUE;
	else if(CheckActorClass(0,"LegendaryGeneral"))return TRUE;
	else if(CheckActorClass(0,"LegendaryImp2"))return TRUE;
	else if(CheckActorClass(0,"LegendaryPhaseImp"))return TRUE;
	else if(CheckActorClass(0,"LegendaryFiend2"))return TRUE;
	else if(CheckActorClass(0,"LegendarySuicideBomber"))return TRUE;
	else if(CheckActorClass(0,"LegendaryBeheadedKamikaze"))return TRUE;
    else if(CheckActorClass(0,"LegendarySoul2"))return TRUE;
	else if(CheckActorClass(0,"LegendaryHeroSoul"))return TRUE;
	else if(CheckActorClass(0,"LegendaryRevolverZombie2"))return TRUE;
	else if(CheckActorClass(0,"LegendaryRevolverZombie3"))return TRUE;
	else if(CheckActorClass(0,"LegendaryCowboy"))return TRUE;
	else if(CheckActorClass(0,"LegendarySuperShotgunZombie"))return TRUE;
	else if(CheckActorClass(0,"LegChainsawZombie"))return TRUE;
	return FALSE;
}

Function bool LegBigGang(void)
{
	if(CheckActorClass(0,"ActuallyGoodLegendaryDoomguy"))return TRUE;
    else if(CheckActorClass(0,"LegendaryApparition"))return TRUE;
	else if(CheckActorClass(0,"LegendaryRedeemer2"))return TRUE;
	else if(CheckActorClass(0,"LegendaryNecromancer"))return TRUE;
	else if(CheckActorClass(0,"LegendaryTormentor2"))return TRUE;
	else if(CheckActorClass(0,"LegendaryBabySentient2"))return TRUE;
	else if(CheckActorClass(0,"LegendaryBabyDemolisher"))return TRUE;
	else if(CheckActorClass(0,"AlternateLegendaryBehemoth2"))return TRUE;
	else if(CheckActorClass(0,"AlternateLegRev"))return TRUE;
	else if(CheckActorClass(0,"LegendaryHellKnight2"))return TRUE;
	else if(CheckActorClass(0,"LegendaryCybruiser"))return TRUE;
	else if(CheckActorClass(0,"LegendaryCyberNoble2"))return TRUE;
	else if(CheckActorClass(0,"LegendaryAfrit"))return TRUE;
	else if(CheckActorClass(0,"LegendaryArchon"))return TRUE;
	else if(CheckActorClass(0,"LegendaryVile"))return TRUE;
	else if(CheckActorClass(0,"LegendaryCrusader"))return TRUE;
	else if(CheckActorClass(0,"LegendaryVessel"))return TRUE;
	else if(CheckActorClass(0,"LegendaryKrieger"))return TRUE;
	else if(CheckActorClass(0,"LegendaryKaguya"))return TRUE;
	else if(CheckActorClass(0,"LegendaryChair"))return TRUE;
	return FALSE;
}

Function bool LegSuperGang(void)
{
	if(CheckActorClass(0,"LegendarySentient3"))return TRUE;
	else if(CheckActorClass(0,"TrueLegendarySentient4"))return TRUE;
	else if(CheckActorClass(0,"LegendaryCyberdemon4"))return TRUE;
	else if(CheckActorClass(0,"TrueLegendaryCyberdemon4"))return TRUE;
	else if(CheckActorClass(0,"TrueLegendaryCyberdemonNormal4"))return TRUE;
	else if(CheckActorClass(0,"LegendaryAnnihilator3"))return TRUE;
	else if(CheckActorClass(0,"TrueLegendaryCardinal4"))return TRUE;
	else if(CheckActorClass(0,"LegendaryTerminator2"))return TRUE;
	else if(CheckActorClass(0,"CorruptedLegendaryCardinal"))return TRUE;
	else if(CheckActorClass(0,"Hibachi"))return TRUE;
	return FALSE;
}

Function bool MadGang(void)
{
	if(CheckActorClass(0,"EnragedLegendaryZombie2"))return TRUE;
	else if(CheckActorClass(0,"EnragedLegendaryZombie3"))return TRUE;
 	else if(CheckActorClass(0,"EnragedLegendaryAssaultCaptain2"))return TRUE;
	else if(CheckActorClass(0,"EnragedLegendaryAssaultCaptain3"))return TRUE;
	else if(CheckActorClass(0,"EnragedLegendaryLieutenant"))return TRUE;
	else if(CheckActorClass(0,"EnragedLegendaryLieutenan3"))return TRUE;
	else if(CheckActorClass(0,"EnragedLegendaryCommando2"))return TRUE;
	else if(CheckActorClass(0,"EnragedLegendaryCommando3"))return TRUE;
	else if(CheckActorClass(0,"EnragedLegendaryStealthTrooper2"))return TRUE;
	else if(CheckActorClass(0,"EnragedLegendaryStealthTrooper3"))return TRUE;
	else if(CheckActorClass(0,"EnragedLegendaryImp2"))return TRUE;
	else if(CheckActorClass(0,"EnragedLegendaryImp3"))return TRUE;
	else if(CheckActorClass(0,"EnragedLegendaryFiend2"))return TRUE;
	else if(CheckActorClass(0,"EnragedLegendaryFiend3"))return TRUE;
	else if(CheckActorClass(0,"EnragedLegendarySuicideBomber"))return TRUE;
	else if(CheckActorClass(0,"EnragedLegendarySuicideBomber3"))return TRUE;
    else if(CheckActorClass(0,"EnragedLegendarySoul"))return TRUE;
	return FALSE;
}

Function bool MadBigGang(void)
{
	if(CheckActorClass(0,"EnragedLegendaryRedeemer2"))return TRUE;
	else if(CheckActorClass(0,"EnragedLegendaryRedeemer3"))return TRUE;
	else if(CheckActorClass(0,"EnragedLegendaryNecromancer2"))return TRUE;
	else if(CheckActorClass(0,"EnragedLegendaryNecromancer3"))return TRUE;
	else if(CheckActorClass(0,"EnragedLegendaryTormentor2"))return TRUE;
	else if(CheckActorClass(0,"EnragedLegendaryTormentor3"))return TRUE;
	else if(CheckActorClass(0,"EnragedLegendaryBabySentient2"))return TRUE;
	else if(CheckActorClass(0,"EnragedLegendaryBabySentient3"))return TRUE;
	else if(CheckActorClass(0,"EnragedLegendaryBehemoth2"))return TRUE;
	else if(CheckActorClass(0,"EnragedLegendaryBehemoth3"))return TRUE;
	else if(CheckActorClass(0,"EnragedLegendaryRevenant2"))return TRUE;
	else if(CheckActorClass(0,"EnragedLegendaryRevenant3"))return TRUE;
    else if(CheckActorClass(0,"EnragedLegendaryHellKnight2"))return TRUE;
	else if(CheckActorClass(0,"EnragedLegendaryHellKnight3"))return TRUE;
	else if(CheckActorClass(0,"EnragedLegendaryCybruiser2"))return TRUE;
	else if(CheckActorClass(0,"EnragedLegendaryCybruiser3"))return TRUE;
	return FALSE;
}

Function bool MadSuperGang(void)
{
	if(CheckActorClass(0,"EnragedLegendarySentient2"))return TRUE;
	else if(CheckActorClass(0,"EnragedLegendaryCyberdemon"))return TRUE;
	return FALSE;
}

Function bool NemGang(void)
{
	if(CheckActorClass(0,"NemesisZombie2"))return TRUE;
	else if(CheckActorClass(0,"NemesisZombie3"))return TRUE;
 	else if(CheckActorClass(0,"NemesisAssaultCaptain2"))return TRUE;
	else if(CheckActorClass(0,"NemesisAssaultCaptain3"))return TRUE;
	else if(CheckActorClass(0,"NemesisSuperShotgunZombie2"))return TRUE;
	else if(CheckActorClass(0,"NemesisSuperShotgunZombie3"))return TRUE;
	else if(CheckActorClass(0,"NemesisCommando2"))return TRUE;
	else if(CheckActorClass(0,"NemesisCommando3"))return TRUE;
	else if(CheckActorClass(0,"NemesisStealthTrooper2"))return TRUE;
	else if(CheckActorClass(0,"NemesisStealthTrooper3"))return TRUE;
    else if(CheckActorClass(0,"NemesisImp2"))return TRUE;
	else if(CheckActorClass(0,"NemesisImp3"))return TRUE;
	else if(CheckActorClass(0,"NemesisSuicideBomber"))return TRUE;
	else if(CheckActorClass(0,"NemesisSuicideBomber3"))return TRUE;
	else if(CheckActorClass(0,"VexedNemesisSuicideBomber"))return TRUE;
	else if(CheckActorClass(0,"NemesisFiend2"))return TRUE;
	else if(CheckActorClass(0,"NemesisFiend3"))return TRUE;
	else if(CheckActorClass(0,"NemesisChainsawZombie2"))return TRUE;
	else if(CheckActorClass(0,"NemesisChainsawZombie3"))return TRUE;
	else if(CheckActorClass(0,"NemesisSoul"))return TRUE;
    else if(CheckActorClass(0,"VexedNemesisSoul"))return TRUE;
	else if(CheckActorClass(0,"VexedNemesisZombie"))return TRUE;
	else if(CheckActorClass(0,"VexedNemesisAssaultCaptain"))return TRUE;
	else if(CheckActorClass(0,"VexedNemesisCommando"))return TRUE;
	else if(CheckActorClass(0,"VexedNemesisStealthTrooper"))return TRUE;
	else if(CheckActorClass(0,"VexedNemesisImp"))return TRUE;
	return FALSE;
}

Function bool NemBigGang(void)
{
	if(CheckActorClass(0,"NemesisDefiler2"))return TRUE;
	else if(CheckActorClass(0,"NemesisDefiler3"))return TRUE;
	else if(CheckActorClass(0,"NemesisTormentor2"))return TRUE;
	else if(CheckActorClass(0,"NemesisTormentor3"))return TRUE;
	else if(CheckActorClass(0,"NemesisBabySentient2"))return TRUE;
	else if(CheckActorClass(0,"NemesisBabySentient3"))return TRUE;
	else if(CheckActorClass(0,"NemesisBehemoth2"))return TRUE;
	else if(CheckActorClass(0,"NemesisBehemoth3"))return TRUE;
	else if(CheckActorClass(0,"NemesisRevenant2"))return TRUE;
	else if(CheckActorClass(0,"NemesisRevenant3"))return TRUE;
	else if(CheckActorClass(0,"NemesisHellKnight2"))return TRUE;
	else if(CheckActorClass(0,"NemesisHellKnight3"))return TRUE;
	else if(CheckActorClass(0,"NemesisCyberNoble2"))return TRUE;
	else if(CheckActorClass(0,"NemesisCyberNoble3"))return TRUE;
	else if(CheckActorClass(0,"NemesisExile2"))return TRUE;
	else if(CheckActorClass(0,"NemesisExile3"))return TRUE;
	else if(CheckActorClass(0,"VexedNemesisChainsawZombie"))return TRUE;
	else if(CheckActorClass(0,"VexedNemesisFiend"))return TRUE;
	else if(CheckActorClass(0,"VexedNemesisRedeemer"))return TRUE;
	else if(CheckActorClass(0,"VexedNemesisBabySentient"))return TRUE;
	else if(CheckActorClass(0,"VexedNemesisGoliath"))return TRUE;
	else if(CheckActorClass(0,"VexedNemesisRevenant"))return TRUE;
	else if(CheckActorClass(0,"VexedNemesisArchon"))return TRUE;
	else if(CheckActorClass(0,"VexedNemesisCydestroyer"))return TRUE;
	else if(CheckActorClass(0,"VexedNemesisExileFinal"))return TRUE;
	return FALSE;
}

Function bool NemSuperGang(void)
{
	if(CheckActorClass(0,"NemHellsmithSpread"))return TRUE;
	else if(CheckActorClass(0,"NemesisSentient"))return TRUE;
	else if(CheckActorClass(0,"NemesisCyberdemon"))return TRUE;
	else if(CheckActorClass(0,"VexedNemesisSentient"))return TRUE;
	return FALSE;
}

Function bool ZamGang(void)
{
	if(CheckActorClass(0,"ZamasuZombie"))return TRUE;
 	else if(CheckActorClass(0,"ZamasuAssaultCaptain"))return TRUE;
	else if(CheckActorClass(0,"ZamasuStealthTrooper"))return TRUE;
	else if(CheckActorClass(0,"ZamasuNightmare"))return TRUE;
    else if(CheckActorClass(0,"ZamasuImp"))return TRUE;
	else if(CheckActorClass(0,"ZamasuSoul"))return TRUE;
	else if(CheckActorClass(0,"ZamasuGeneralRoasterock"))return TRUE;
	return FALSE;
}

Function bool ZamBigGang(void)
{
	if(CheckActorClass(0,"NewZamasuHellKnight"))return TRUE;
	return FALSE;
}

Function bool ZamSuperGang(void)
{
	//if(CheckActorClass(0,"ZamasuHellsmith"))return TRUE; (Unfinished ZAMASU Boss)
	if(CheckActorClass(0,"INFZamasuSentient"))return TRUE;
	else if(CheckActorClass(0,"ZamasuCyberDemon"))return TRUE;
	else if(CheckActorClass(0,"INFZamasuLord"))return TRUE;
	return FALSE;
}

Function bool MLGGang(void)
{
	if(CheckActorClass(0,"MLGZombie"))return TRUE;
 	else if(CheckActorClass(0,"MLGAssaultCaptain"))return TRUE;
	else if(CheckActorClass(0,"MLGZamasuStealthTrooper"))return TRUE;
	return FALSE;
}

Function bool PhaseGang(void)
{
	if(CheckActorClass(0,"PhaseShotgunCommando"))return TRUE;
	else if(CheckActorClass(0,"PhaseImp"))return TRUE;
    else if(CheckActorClass(0,"PhaseGuardianCube"))return TRUE;
	else if(CheckActorClass(0,"PhaseCacodemon"))return TRUE;
	else if(CheckActorClass(0,"PhaseElemental"))return TRUE;
	return FALSE;
}

Function bool PhaseBigGang(void)
{
	if(CheckActorClass(0,"Phasemoon"))return TRUE;
	else if(CheckActorClass(0,"PhaseNightmare"))return TRUE;
	else if(CheckActorClass(0,"PhaseGhoul"))return TRUE;
	else if(CheckActorClass(0,"PhaseOverlord"))return TRUE;
	else if(CheckActorClass(0,"PhaseWarlord2"))return TRUE;
	else if(CheckActorClass(0,"Manipulator"))return TRUE;
	else if(CheckActorClass(0,"PhaseExile"))return TRUE;
    else if(CheckActorClass(0,"NexusPhaseCyberdemon"))return TRUE;
	return FALSE;
}

Function bool PhaseSuperGang(void)
{
	if(CheckActorClass(0,"sin-genjitsu3"))return TRUE;
	else if(CheckActorClass(0,"AbyssalSatyrVoid"))return TRUE;
	return FALSE;
}

Script 21060 (void) NET //Hotkey to use all presents by Dr. Blood
{
	if(CheckInventory("NemesisPresentItem"))UseInventory("NemesisPresentItem");
	else if(CheckInventory("EnragedLegendaryPresentItem"))UseInventory("EnragedLegendaryPresentItem");
	else if(CheckInventory("LegendaryPresentItem"))UseInventory("LegendaryPresentItem");
	else if(CheckInventory("PhasePresentItem"))UseInventory("PhasePresentItem");
	else if(CheckInventory("DarkPresentItem"))UseInventory("DarkPresentItem");
	else if(CheckInventory("GreenRedPresentItem"))UseInventory("GreenRedPresentItem");
	else if(CheckInventory("WhiteRedPresentItem"))UseInventory("WhiteRedPresentItem");
	else if(CheckInventory("RedWhitePresentItem"))UseInventory("RedWhitePresentItem");
	else if(CheckInventory("RedGreenPresentItem"))UseInventory("RedGreenPresentItem");
	else if(CheckInventory("ZamasuPresentItem"))UseInventory("ZamasuPresentItem");
	else if(CheckInventory("CursedPresentItem"))UseInventory("CursedPresentItem");
	else if(CheckInventory("HellfirePresentItem"))UseInventory("HellfirePresentItem");
	else if(CheckInventory("HackroidPresentItem"))UseInventory("HackroidPresentItem");
	else if(CheckInventory("MLGPresentItem"))UseInventory("MLGPresentItem");
}