Let's say I have The Ur-DragonThe Ur-Dragon and a ton of dragons on the field. I attack with enough dragons to draw my remaining library (as per The Ur-Dragon's ability "Whenever one or more dragons you control attack, draw that many cards"), I draw Lich's Mirror and use Ur-Dragon's "put a permanent from your hand onto the battlefield" effect to play Lich's Mirror. Would I lose as soon as I draw my entire library? Would I get a chance to trigger Lich's Mirror?