it would still do 40 damage :/
i learned this from annoying experience from a while back, but i tested it again in po just a minute ago to make sure, and it still just does 40 damage. same applies to night shade, seismic toss, and all other moves like that. ( sonicboom is one )
EDIT: " yes, you still take damage. ( just tested to make sure on PO ) 10% as usual =D " : my comment