How drunk am I and when can I drive again?
TSQL, 301, 299, 219, 206 Bytes
Input goes into temp table #I
(you said any format :)
SELECT * INTO #I FROM (
VALUES
(4,'shots','booze')
,(1,'glasses','wine')
,(2,'bottles','beer')
,(3, 'glasses','water')
) A (Q, V, N)
Code:
SELECT IIF(L<0,0,L),IIF(10*L-.5<0,0,10*L-.5)FROM(SELECT SUM(Q*S*P)L FROM(VALUES('bo%',.5),('be%',.1),('wi%',.2),('wa%',-.1))A(W,S),(VALUES('s%',.2),('g%',2),('b%',5))B(X,P),#I WHERE N LIKE W AND V LIKE X)A;
Thanks for the ideas to improve it, Micky T :)
JavaScript (ES6), 131
a=>a.map(s=>([a,b,c]=s.split` `,t+=a*[50,20,2]['bgs'.search(b[0])]*~-'0236'['aeio'.search(c[1])]),t=0)&&[t>0?t/100:0,t>50?t/10-5:0]
Less golfed
a=>(
t=0,
a.map(s=>(
[a,b,c] = s.split` `,
t += a * [50,20,2]['bgs'.search(b[0])] // char 0 is unique
* [-1,1,2,5]['aeio'.search(c[1])] // char 1 is unique
// golfed: add 1 to get a string of dingle digits, the sub 1 using ~-
)
),
[ t>0 ? t/100 : 0, t>50 ? t/10-5 : 0]
)