The ghosts didn't help, either. It was always a nasty shock when one of them glided suddenly through a door you were trying to open. Nearly Headless Nick was always happy to point new Gryffindors in the right direction, but Peeves the Poltergeist was worth two locked doors and a trick staircase if you met him when you were late for class. He would drop wastepaper baskets on your head, pull rugs from under your feet, pelt you with bits of chalk, or sneak up behind you, invisible, grab your nose, and screech, “GOT YOUR CONK!”
I can't figure out what "Peeves the Poltergeist was worth two locked doors and a trick staircase" truly mean in this context. The word 'worth' here doesn't seem to make any sense to me. Can someone help me to understand it?
P.S. This is from Harry Potter.