Several cards and abilities provide the opportunity for an ally to obtain a card out of turn (e.g. Volcanic Glass, Mazahaedron's Worldheart Shard, Yan Magda's Imperium Ritual). These cards and abilities will specify if the current player gains the card and gifts it to an ally, or if the ally gains the card. The player who gains the card takes advantage of any effect that triggers when the card is gained. This will typically be the player who's turn it is, not the ally who ends up with the card (Imperium Ritual is an exception).