Ok so let’s say I have a Library of Leng in play, which has different Oracle text btw. Then later I play Midnight Oil. My understanding is that due to the timestamp, the handsize modification of Oil is used instead of the Library.
My question then is what happens at the end step if you have to discard because of having too many cards?
Does this count as an ‘effect’ that Library of Leng will allow you to discard to the top of your deck?
If so, I presume you will still take the 1 damage per card from the Oil...
For the purposes of Library of Leng, discarding excess cards due to C.R. 514.1 is not an effect (because it's not "something that happens in the game as a result of a spell or ability" [C.R. 609.1]).
Midnight Oil's last ability will trigger even if the card discarded doesn't end up in the graveyard (another example is the madness keyword [C.R. 702.34a]) (review C.R. 701.8a).
EDIT (Jul. 2, 2020): Edited to conform to rule update with Core Set 2021.
An effect is something that happens in the game as a result of a spell or ability.
609.1. An effect is something that happens in the game as a result of a spell or ability. When a spell, activated ability, or triggered ability resolves, it may create one or more one-shot or continuous effects. Static abilities may create one or more continuous effects. Text itself is never an effect.
The end of turn discard, however, is because of a rule, specifically this one:
514. Cleanup Step
514.1. First, if the active player’s hand contains more cards than his or her maximum hand size (normally seven), he or she discards enough cards to reduce his or her hand size to that number. This turn-based action doesn’t use the stack.
So since the discard is due to a rule and not due to an effect, the Library's replacement effect doesn't apply and the cards go to the graveyard.
Note, that 609.1 also means, that the Library will not apply to discard as a cost.
My question then is what happens at the end step if you have to discard because of having too many cards?
Does this count as an ‘effect’ that Library of Leng will allow you to discard to the top of your deck?
If so, I presume you will still take the 1 damage per card from the Oil...
Midnight Oil's last ability will trigger even if the card discarded doesn't end up in the graveyard (another example is the madness keyword [C.R. 702.34a]) (review C.R. 701.8a).
EDIT (Jul. 2, 2020): Edited to conform to rule update with Core Set 2021.
The end of turn discard, however, is because of a rule, specifically this one:
So since the discard is due to a rule and not due to an effect, the Library's replacement effect doesn't apply and the cards go to the graveyard.
Note, that 609.1 also means, that the Library will not apply to discard as a cost.
Former Rules Advisor
"Everything's better with pirates." - Lodge
(The Gamers: Dorkness Rising)
"Any sufficiently analyzed magic is indistinguishable from science."
(Girl Genius - Fairy Tale Theater Break - Cinderella, end of volume 8)