Speaking of Wrap, it seems like when you switch out of a Wrap, the PP decrement and damage recalc for the new Wrap are applied, but not the new accuracy check, as evidenced by the hits that occur when the first random number is greater than 216. I know all three are supposed to be ignored when you stay in and Wrap is allowed to continue, but not when you switch out and the Pokemon is forced to use a new Wrap. Note that the accuracy check is not skipped when a new Wrap PP is used after the existing Wrap is allowed to end, as evidenced by the miss on turn 11.