Merge pull request #4241 from Alexsandr0x/AccursedWitch-bug

Fix Accursed Witch to avoid duplicated card
This commit is contained in:
Oleg Agafonov 2017-12-19 19:48:20 +04:00 committed by GitHub
commit a47374cdb7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,10 +37,10 @@ import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.cost.CostModificationEffectImpl; import mage.abilities.effects.common.cost.CostModificationEffectImpl;
import mage.abilities.keyword.TransformAbility; import mage.abilities.keyword.TransformAbility;
import mage.cards.i.InfectiousCurse;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.cards.i.InfectiousCurse;
import mage.constants.*; import mage.constants.*;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
@ -106,6 +106,7 @@ class AccursedWitchReturnTransformedEffect extends OneShotEffect {
//note: should check for null after game.getCard //note: should check for null after game.getCard
Card card = game.getCard(source.getSourceId()); Card card = game.getCard(source.getSourceId());
if (card != null) { if (card != null) {
card.removeFromZone(game, Zone.GRAVEYARD, source.getSourceId());
card.putOntoBattlefield(game, Zone.BATTLEFIELD, source.getSourceId(), source.getControllerId(), false); card.putOntoBattlefield(game, Zone.BATTLEFIELD, source.getSourceId(), source.getControllerId(), false);
} }
} }