Ibuprofen is normally better for your liver than acetaminophen. (paracetamol). Normally that is, as I’m reluctant to say how "well" your liver could be after a night of pills, powders, and play.
As babydoc indicated, acetaminophen can get metabolised into toxic N-acetyl-beta-benzoquinone imine, which can then lead to cell death. That can happen if: A) The dose is high or B) liver function has been affected.
web page
Everything being ok; low dose, liver functioning healthy etc., Paracetamol is metabolised by addition of a sulphate group or a glucuronide to the OH in position 4 of the aromatic ring. However enzymes for this job aren't always overabundant and they try to do the job quickly. If they are prioritised for Phase II metabolism, the liver calls on the heroes and villains of biochemistry, the P450 cytochromes (2E1 and 1A2)to deal with paracetamol. It’s these guys that produce the toxic intermediate.
Ibuprofen has a carboxylic acid group (COOH ) on the end of a molecule, which makes it somewhat like the C end of an amino acid. Your body has enzymes everywhere to deal with these sorts of compounds. In addition, these (NSAIDS) drugs work by inhibiting COX 1 & 2 enzymes. COX1 has different functions, and drugs which affect COX1 produce unwanted side effects such as nausea, skin reactions etc.
Ibuprofen on the other hand virtually ignores COX1 enzymes, and instead works by inhibiting COX2 types, which control inflammation - just the thing you want to reduce.
It’s unlikely the same cytochromes involved in metabolizing Ibuprofen (Phase I CYP 2C9) are affected by amphetamine, although amphetamine is listed as a CYP inhibitor (The only references I could find were to 2D6). Incidentally 2C9 is the metabolic pathway for THC.
In summary then, ibuprofen is generally better for you than acetaminophen. I haven’t heard of any reported amphetamine /codeine interactions, or ibuprofen /amphetamine interactions.
Like most things, the less NSAIDs are used, the better they tend to work. If you are not predisposed to headaches, but find they are a usual part of a hangover, try drinking more water during and after your play.
[Edit: paragraphed for VB; p_d]