Uncanny dodge does not allow a creature to keep its Dexterity bonus to Armor Class (if any) when it physically cannot move. If you're grappled, held, helpless, incapacitated, pinned, or stunned, you lose your Dexterity bonus to Armor Class. If you're attacked while climbing, you also cannot use...