As far as I understand it, terrain does not even have a material attribute.
For ricochets, such as you described them, several additions would have to be added.
A) Terrain material in MCD file. (So that we can know if it is wood, metal or something else. There is sound which walking over it makes at offset 0x34, which is closest, but you can't tell wood from dirt on that one.)
B) An option to select what damage types ricochet off which materials, and at what maximal angles. You would not want plasma, for example to bounce off of metal. Or for that matter, a bullet hitting a wooden fence straight, then bouncing back and hitting the soldier who fired it.
C) The geometry would have to recognise at what angle it was hit, to determine if the ricochet happens, and where to.
D) As Solarius Scorch mentioned, there should be other interactions, such as overpenetration, passing straight through, no damage to specific materials (electric to metal).