Trap damage is hardcoded in trapfunc.cpp, huh. That looks like something that ought to be moved out into JSON at some point, but I suspect this is some really old code that nobody’s touched in a long time.
If I’m reading this right, it does 3-5 cut to a monster, and 6-10 vs a player. I prefer using caltrops, which do 9-15 cut (9-30 player) as they’re smaller and can be made from nails once you get enough skill.
Pits do 10-20 bash. spiked/glassed pits 20-50 cut damage. Blade traps do 12 bash, 30 cut.