It can be done pretty easily, you could even have a dynamic light damage the player, or any dynamic entity in the room. Just script it to effect all within the radius of the room size using something like "plraddhealth=-1" etc
A quick edit of the existing "plrhurtinzone.fpi" script like below and applied to a dynamic entity, you now have something you could just spawn into the room when the door closes and it will hurt the player. It also hurts the player faster the closer they get to it.
;Artificial Intelligence Script
;Header
desc = Plr Hurt In range
;Triggers
;change the 300 for the range of hurt you want (100 = a map square)
:plrdistwithin=300:state=1,plraddhealth=-1
;end of script