updated functionality of traps to handle if the player has the
protection item in their inventory