public void updateRange()
	{
		float gold = player.getResource(core.ResourceType.GOLD)/(float)unit.cost.gold;
		float wood = player.getResource(core.ResourceType.WOOD)/(float)unit.cost.wood;
		float ore = player.getResource(core.ResourceType.ORE)/(float)unit.cost.ore;
		float min = castle.getAvailableToRecruit(unit.level);
		if (gold < min) min = gold;
		if (wood < min) min = wood;
		if (ore < min) min = ore;
		int max = (int)min;
		amount.setRange(0, max);
		amount.setValue(0);
		available.setText("<i>("+castle.getAvailableToRecruit(unit.level)+" dostępnych)</i>");
	}