318 is suddenly doing THIS:

check fuel filter first and fuel pump ,could be starving. then a compression test will eliminate mechanical. electrical comes next.A weak coil will do the same thing youre describing as it cant fire the fuel above idle. good luck and keep us posted