#library "AMMODROPSTER"
#include "zcommon.acs"

Script "ZandroUniversalInv_CVar" (Void)
{
	SetResultValue(GetCvar("zandrouniversalinv_power"));
}

Script "AmmoDrop_Fodder_Kill_Reward" KILL
{
	if(!CheckFlag(0, "ISMONSTER"))
	{
		terminate;
	}
	if(GetActorProperty(0, APROP_SpawnHealth) <= 30)
	{
		DropItem(0, "EmergencyAmmoSatchel", -1, 15); // was 10
		DropItem(0, "PortableFieldKit", -1, 15); // was 10
		DropItem(0, "MissilePod", -1, 13);       // was 8
		DropItem(0, "SupplyPack", -1, 11);       // was 6
		DropItem(0, "PortableArmorSet", -1, 15); // was 10
		DropItem(0, "DeployableSentryBox", -1, 13); // was 8
		DropItem(0, "DeployableShield", -1, 13);    // was 8
		DropItem(0, "PackMedikit", -1, 17);      // was 12
		DropItem(0, "PackArmor", -1, 17);        // was 12
	}
}

// -----------------------------------------------------------
// Tier 2 - Mooks (30–150 HP)  -- +5 applied
// -----------------------------------------------------------
Script "AmmoDrop_Mook_Kill_Reward" KILL
{
	if(!CheckFlag(0, "ISMONSTER"))
	{
		terminate;
	}
	if(GetActorProperty(0, APROP_SpawnHealth) >= 30)
	if(GetActorProperty(0, APROP_SpawnHealth) <= 150)
	{
		DropItem(0, "EmergencyAmmoSatchel", -1, 23);
		DropItem(0, "PortableFieldKit", -1, 23); // was 18
		DropItem(0, "MissilePod", -1, 19);       // was 14
		DropItem(0, "SupplyPack", -1, 15);       // was 10
		DropItem(0, "PortableArmorSet", -1, 23); // was 18
		DropItem(0, "DeployableSentryBox", -1, 17); // was 12
		DropItem(0, "DeployableShield", -1, 17);    // was 12
		DropItem(0, "PackMedikit", -1, 25);      // was 20
		DropItem(0, "PackArmor", -1, 25);        // was 20
	}
}

// -----------------------------------------------------------
// Tier 3 - MicroBoss (150–500 HP)  -- +13 applied
// -----------------------------------------------------------
Script "AmmoDrop_MicroBoss_Kill_Reward" KILL
{
	if(!CheckFlag(0, "ISMONSTER"))
	{
		terminate;
	}
	if(GetActorProperty(0, APROP_SpawnHealth) >= 150)
	if(GetActorProperty(0, APROP_SpawnHealth) <= 500)
	{
		DropItem(0, "EmergencyAmmoSatchel", -1, 50);
		DropItem(0, "PortableFieldKit", -1, 50); // was 37
		DropItem(0, "MissilePod", -1, 42);       // was 29
		DropItem(0, "SupplyPack", -1, 34);       // was 21
		DropItem(0, "PortableArmorSet", -1, 50); // was 37
		DropItem(0, "DeployableSentryBox", -1, 36); // was 23
		DropItem(0, "DeployableShield", -1, 36);    // was 23
		DropItem(0, "PackMedikit", -1, 54);      // was 41
		DropItem(0, "PackArmor", -1, 54);        // was 41
		DropItem(0, "MarineReinforcementsBeacon", -1, 6); // was 21
	}
}

// -----------------------------------------------------------
// Tier 4 - MiniBoss (500–1000 HP)  -- +13 applied
// -----------------------------------------------------------
Script "AmmoDrop_MiniBoss_Kill_Reward" KILL
{
	if(!CheckFlag(0, "ISMONSTER"))
	{
		terminate;
	}
	if(GetActorProperty(0, APROP_SpawnHealth) >= 500)
	if(GetActorProperty(0, APROP_SpawnHealth) <= 1000)
	{
		DropItem(0, "EmergencyAmmoSatchel", -1, 66);
		DropItem(0, "PortableFieldKit", -1, 66); // was 53
		DropItem(0, "MissilePod", -1, 58);       // was 45
		DropItem(0, "SupplyPack", -1, 46);       // was 33
		DropItem(0, "PortableArmorSet", -1, 66); // was 53
		DropItem(0, "DeployableSentryBox", -1, 50); // was 37
		DropItem(0, "DeployableShield", -1, 50);    // was 37
		DropItem(0, "PackMedikit", -1, 74);      // was 61
		DropItem(0, "PackArmor", -1, 74);        // was 61
		DropItem(0, "MarineReinforcementsBeacon", -1, 18); // was 33
	}
}

// -----------------------------------------------------------
// Tier 5 - Boss (≥ 2000 HP)  -- +13 applied
// -----------------------------------------------------------
Script "AmmoDrop_Boss_Kill_Reward" KILL
{
	if(!CheckFlag(0, "ISMONSTER"))
	{
		terminate;
	}
	if(GetActorProperty(0, APROP_SpawnHealth) >= 2000)
	{
		DropItem(0, "EmergencyAmmoSatchel", -1, 82);
		DropItem(0, "PortableFieldKit", -1, 82); // was 69
		DropItem(0, "MissilePod", -1, 74);       // was 61
		DropItem(0, "SupplyPack", -1, 58);       // was 45
		DropItem(0, "PortableArmorSet", -1, 82); // was 69
		DropItem(0, "DeployableSentryBox", -1, 66); // was 53
		DropItem(0, "DeployableShield", -1, 66);    // was 53
		DropItem(0, "PackMedikit", -1, 90);      // was 77
		DropItem(0, "PackArmor", -1, 90);        // was 77
		DropItem(0, "MarineReinforcementsBeacon", -1, 64); // was 45
	}
}
