mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
Shapeshifter's Marrow minor changes.
This commit is contained in:
parent
18a8d3de77
commit
3afd2fd57d
1 changed files with 29 additions and 26 deletions
|
@ -28,6 +28,7 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
|
@ -45,18 +46,18 @@ import mage.game.Game;
|
|||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* author HCrescent
|
||||
*/
|
||||
public class ShapeshiftersMarrow extends CardImpl {
|
||||
|
||||
|
||||
public ShapeshiftersMarrow(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}{U}");
|
||||
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}{U}");
|
||||
|
||||
// At the beginning of each opponent's upkeep, that player reveals the top card of his or her library. If it's a creature card, the player puts the card into his or her graveyard and Shapeshifter's Marrow becomes a copy of that card. (If it does, it loses this ability.)
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new ShapeshiftersMarrowEffect(), TargetController.OPPONENT, false));
|
||||
}
|
||||
|
||||
|
||||
public ShapeshiftersMarrow(final ShapeshiftersMarrow card) {
|
||||
super(card);
|
||||
}
|
||||
|
@ -65,41 +66,43 @@ public class ShapeshiftersMarrow extends CardImpl {
|
|||
public ShapeshiftersMarrow copy() {
|
||||
return new ShapeshiftersMarrow(this);
|
||||
}
|
||||
|
||||
class ShapeshiftersMarrowEffect extends OneShotEffect {
|
||||
|
||||
|
||||
public ShapeshiftersMarrowEffect() {
|
||||
super(Outcome.BecomeCreature);
|
||||
this.staticText = "that player reveals the top card of his or her library. If it's a creature card, the player puts the card into his or her graveyard and Shapeshifter's Marrow becomes a copy of that card. (If it does, it loses this ability.)";
|
||||
this.staticText = "that player reveals the top card of his or her library. If it's a creature card, the player puts the card into his or her graveyard and {this} becomes a copy of that card. (If it does, it loses this ability.)";
|
||||
}
|
||||
|
||||
|
||||
public ShapeshiftersMarrowEffect(final ShapeshiftersMarrowEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ShapeshiftersMarrowEffect copy() {
|
||||
return new ShapeshiftersMarrowEffect(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player activePlayer = game.getPlayer(this.getTargetPointer().getFirst(game, source));
|
||||
if (activePlayer != null) {
|
||||
Card card = activePlayer.getLibrary().getFromTop(game);
|
||||
if (card != null) {
|
||||
activePlayer.revealCards("Shapeshifter's Marrow", new CardsImpl(card), game);
|
||||
if (card.getCardType().contains(CardType.CREATURE)) {
|
||||
activePlayer.moveCards(activePlayer.getLibrary().getTopCards(game, 1), Zone.GRAVEYARD, source, game);
|
||||
CopyEffect copyEffect = new CopyEffect(Duration.Custom, card, source.getSourceId());
|
||||
game.addEffect(copyEffect, source);
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player activePlayer = game.getPlayer(this.getTargetPointer().getFirst(game, source));
|
||||
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||
if (activePlayer != null && sourceObject != null) {
|
||||
Card card = activePlayer.getLibrary().getFromTop(game);
|
||||
if (card != null) {
|
||||
activePlayer.revealCards(sourceObject.getIdName(), new CardsImpl(card), game);
|
||||
if (card.getCardType().contains(CardType.CREATURE)) {
|
||||
activePlayer.moveCards(activePlayer.getLibrary().getTopCards(game, 1), Zone.GRAVEYARD, source, game);
|
||||
CopyEffect copyEffect = new CopyEffect(Duration.Custom, card, source.getSourceId());
|
||||
game.addEffect(copyEffect, source);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue