mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 21:42:07 -08:00
* Elsha of the Infinite - fixed that it gives flash ability to cards in the hand instead library's top card (closes #7605);
This commit is contained in:
parent
b968637e20
commit
d343511d73
6 changed files with 90 additions and 8 deletions
|
|
@ -1,8 +1,5 @@
|
|||
|
||||
|
||||
package mage.abilities.effects.common.continuous;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.abilities.keyword.MorphAbility;
|
||||
|
|
@ -14,8 +11,9 @@ import mage.constants.Outcome;
|
|||
import mage.filter.FilterCard;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
||||
|
|
@ -69,10 +67,10 @@ public class CastAsThoughItHadFlashAllEffect extends AsThoughEffectImpl {
|
|||
Card cardCopy = card.copy();
|
||||
cardCopy.getCardType().clear();
|
||||
cardCopy.addCardType(CardType.CREATURE);
|
||||
return filter.match(cardCopy, game);
|
||||
return filter.match(cardCopy, source.getSourceId(), affectedControllerId, game);
|
||||
}
|
||||
}
|
||||
return filter.match(card, game);
|
||||
return filter.match(card, source.getSourceId(), affectedControllerId, game);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -98,6 +98,6 @@ public class PlayTheTopCardEffect extends AsThoughEffectImpl {
|
|||
}
|
||||
|
||||
// must be correct card
|
||||
return filter.match(cardToCheck, source.getSourceId(), source.getControllerId(), game);
|
||||
return filter.match(cardToCheck, source.getSourceId(), affectedControllerId, game);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,6 +77,6 @@ public class PlayLandsFromGraveyardControllerEffect extends AsThoughEffectImpl {
|
|||
}
|
||||
|
||||
// must be correct card
|
||||
return filter.match(cardToCheck, source.getSourceId(), source.getControllerId(), game);
|
||||
return filter.match(cardToCheck, source.getSourceId(), affectedControllerId, game);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
package mage.filter.predicate.mageobject;
|
||||
|
||||
import mage.cards.Card;
|
||||
import mage.filter.predicate.ObjectPlayer;
|
||||
import mage.filter.predicate.ObjectPlayerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
* @author JayDi85
|
||||
*/
|
||||
|
||||
public enum CardOnTopOfLibraryPredicate implements ObjectPlayerPredicate<ObjectPlayer<Card>> {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(ObjectPlayer<Card> input, Game game) {
|
||||
Player player = game.getPlayer(input.getObject().getOwnerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Card topCard = player.getLibrary().getFromTop(game);
|
||||
return topCard != null && topCard.getId().equals(input.getObject().getMainCard().getId());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue