T
TDarien
Guest
Interpreting peeking out of cover as approaching a creature feels like a mangling of the word to me.
That's just it. The rules don't technically allow you to "peek out" of cover.
"A target has total cover if it is completely concealed by an obstacle." (pg. 74). This means you can't see it, and therefore it can't see you from its current position, and therefore can't attack because you also have total cover from it. ("A target with total cover can’t be targeted directly by an attack or a spell").
In order to see it, you'll need to physically move out of total cover. Now you could certainly move only a foot, giving you 3/4 cover from the target (and since you're against the cover, it wouldn't have cover from you, unless it was also against it on the other side --my call as a DM). At that point you're visible, and would lose the benefit of hiding.
Now. Under most circumstances I would allow you to retain the advantage of being hidden, but that is 100% my call as a DM. You could then make your attack with advantage, and move back into total cover. But you were visible for a second, and if,say, a creature was specifically looking for you to come out of cover (i.e. readied an action to attack you if you appeared), it would be able to react to that.