mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
Fix Riftsweeper issue
This commit is contained in:
parent
06a280dd18
commit
ec8a25f2e1
1 changed files with 3 additions and 1 deletions
|
@ -15,6 +15,7 @@ import mage.cards.CardSetInfo;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
import mage.filter.common.FilterCreatureCard;
|
import mage.filter.common.FilterCreatureCard;
|
||||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||||
|
import mage.game.ExileZone;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
@ -102,13 +103,14 @@ class MirrorGolemEffect extends ContinuousEffectImpl {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Permanent sourceObject = game.getPermanent(source.getSourceId());
|
Permanent sourceObject = game.getPermanent(source.getSourceId());
|
||||||
|
ExileZone exileZone = game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, source.getSourceId()));
|
||||||
|
|
||||||
if (sourceObject == null || sourceObject.getImprinted() == null) {
|
if (sourceObject == null || sourceObject.getImprinted() == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (UUID imprinted : sourceObject.getImprinted()){
|
for (UUID imprinted : sourceObject.getImprinted()){
|
||||||
if (imprinted != null){
|
if (imprinted != null && exileZone.contains(imprinted)){
|
||||||
Card card = game.getCard(imprinted);
|
Card card = game.getCard(imprinted);
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
for (CardType cardType : card.getCardType()){
|
for (CardType cardType : card.getCardType()){
|
||||||
|
|
Loading…
Reference in a new issue