Sorry, I misread what you posted before. Unfortunately I don't believe it is possible to make Infinite Health work with everything, due to the way the codes work. If an attack would one-shot you without the code activated, it will still kill you with it activated.