Permanent target = game.getPermanent(targetPointer.getFirst(game, source));
Player player = game.getPlayer(source.getControllerId());
if (target != null && player != null) {
if (target.isTapped()) {
if (player.chooseUse(Outcome.Untap, "Untap that permanent?", game)) {
target.untap(game);
}
} else {
if (player.chooseUse(Outcome.Tap, "Tap that permanent?", game)) {
target.tap(game);
}