mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Added Intet, the Dreamer
This commit is contained in:
parent
e75076d62e
commit
3d07dd5956
2 changed files with 8 additions and 7 deletions
|
@ -44,7 +44,6 @@ import mage.constants.Outcome;
|
||||||
import mage.constants.Rarity;
|
import mage.constants.Rarity;
|
||||||
import mage.constants.SubLayer;
|
import mage.constants.SubLayer;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.filter.FilterPermanent;
|
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.game.permanent.token.Token;
|
import mage.game.permanent.token.Token;
|
||||||
|
|
|
@ -46,6 +46,7 @@ import mage.constants.Outcome;
|
||||||
import mage.constants.Rarity;
|
import mage.constants.Rarity;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
import mage.players.Library;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.target.targetpointer.FixedTarget;
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
|
@ -84,7 +85,7 @@ class IntetTheDreamerEffect extends OneShotEffect {
|
||||||
|
|
||||||
public IntetTheDreamerEffect() {
|
public IntetTheDreamerEffect() {
|
||||||
super(Outcome.Benefit);
|
super(Outcome.Benefit);
|
||||||
this.staticText = "Exile the top card of your library face down";
|
this.staticText = "exile the top card of your library face down";
|
||||||
}
|
}
|
||||||
|
|
||||||
public IntetTheDreamerEffect(final IntetTheDreamerEffect effect) {
|
public IntetTheDreamerEffect(final IntetTheDreamerEffect effect) {
|
||||||
|
@ -99,10 +100,11 @@ class IntetTheDreamerEffect extends OneShotEffect {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (controller != null) {
|
if (controller != null && controller.getLibrary().size() > 0) {
|
||||||
if (controller.getLibrary().size() > 0) {
|
Library library = controller.getLibrary();
|
||||||
Card card = controller.getLibrary().removeFromTop(game);
|
Card card = library.removeFromTop(game);
|
||||||
card.setFaceDown(true);
|
if (card != null) {
|
||||||
|
controller.moveCardToExileWithInfo(card, source.getSourceId(), "Intet, the Dreamer <this card may be played as long as Intet is on the battlefield>", source.getSourceId(), game, Zone.LIBRARY);
|
||||||
ContinuousEffect effect = new IntetTheDreamerCastFromExileEffect();
|
ContinuousEffect effect = new IntetTheDreamerCastFromExileEffect();
|
||||||
effect.setTargetPointer(new FixedTarget(card.getId()));
|
effect.setTargetPointer(new FixedTarget(card.getId()));
|
||||||
game.addEffect(effect, source);
|
game.addEffect(effect, source);
|
||||||
|
@ -116,7 +118,7 @@ class IntetTheDreamerEffect extends OneShotEffect {
|
||||||
class IntetTheDreamerCastFromExileEffect extends AsThoughEffectImpl {
|
class IntetTheDreamerCastFromExileEffect extends AsThoughEffectImpl {
|
||||||
|
|
||||||
public IntetTheDreamerCastFromExileEffect() {
|
public IntetTheDreamerCastFromExileEffect() {
|
||||||
super(AsThoughEffectType.PLAY_FROM_NON_HAND_ZONE, Duration.EndOfTurn, Outcome.Benefit);
|
super(AsThoughEffectType.PLAY_FROM_NON_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit);
|
||||||
staticText = "You may play the card from exile eithout paying its mana cost for as long as {this} remains on the battlefield";
|
staticText = "You may play the card from exile eithout paying its mana cost for as long as {this} remains on the battlefield";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue