Device for electric discharge alloying