fix for gate to the afterlife

This commit is contained in:
igoudt 2017-04-30 10:26:47 +02:00
parent 3f125db074
commit f9a5bc59c3

View file

@ -30,6 +30,9 @@ package mage.cards.g;
import java.util.UUID; import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
import mage.abilities.common.LeavesBattlefieldAllTriggeredAbility;
import mage.abilities.common.LeavesBattlefieldTriggeredAbility;
import mage.abilities.common.PutIntoGraveFromBattlefieldAllTriggeredAbility;
import mage.abilities.condition.common.CardsInControllerGraveCondition; import mage.abilities.condition.common.CardsInControllerGraveCondition;
import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
@ -76,7 +79,7 @@ public class GateToTheAfterlife extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
// Whenever a nontoken creature you control dies, you gain 1 life. Then you may draw a card. If you do, discard a card. // Whenever a nontoken creature you control dies, you gain 1 life. Then you may draw a card. If you do, discard a card.
Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new GainLifeEffect(1), filter, false); Ability ability = new PutIntoGraveFromBattlefieldAllTriggeredAbility(new GainLifeEffect(1), false, filter, false, true);
Effect effect = new DrawDiscardControllerEffect(1, 1, true); Effect effect = new DrawDiscardControllerEffect(1, 1, true);
effect.setText("Then you may draw a card. If you do, discard a card"); effect.setText("Then you may draw a card. If you do, discard a card");
ability.addEffect(effect); ability.addEffect(effect);