think the idea is that you can spend keys on a door to partially reduce its key count, like if you have 5 keys and touch a 20 cost door, you lose all your keys and the door cost reduces to 15
Yeah, you got it right!