#include "gamesdef.h"
#include "misc.h"
#include "xy.h"
#include "var.h"
#include "sect.h"
#include "file.h"
#include "deity.h"
#include "path.h"
#include "nat.h"

double sector_mcost(type, effic)
int	type, effic;
{
	double	d;

	if (!(d = dchr[type].d_mcst))
		return -1.0;

	if (d < 25)
		d = (200 + (d - 3) * effic) / 500;
	else
		d = (d * 5 - effic) / 25;

	if (!d)
		return MIN_MOBCOST;
	return d;
}
