Add a line to remove from grave to avoid duplicates

This commit is contained in:
Alexsandro 2017-12-13 00:19:22 -02:00
parent d765b2b108
commit ae329fd81f

View file

@ -37,11 +37,15 @@ import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
import mage.abilities.keyword.TransformAbility;
import mage.cards.i.InfectiousCurse;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.i.InfectiousCurse;
import mage.constants.*;
import mage.constants.CardType;
import mage.constants.CostModificationType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
@ -56,8 +60,8 @@ public class AccursedWitch extends CardImpl {
public AccursedWitch(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.SHAMAN);
this.subtype.add("Human");
this.subtype.add("Shaman");
this.power = new MageInt(4);
this.toughness = new MageInt(2);
@ -106,6 +110,7 @@ class AccursedWitchReturnTransformedEffect extends OneShotEffect {
//note: should check for null after game.getCard
Card card = game.getCard(source.getSourceId());
if (card != null) {
card.removeFromZone(game, Zone.GRAVEYARD, source.getSourceId());
card.putOntoBattlefield(game, Zone.BATTLEFIELD, source.getSourceId(), source.getControllerId(), false);
}
}