mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 10:40:06 -08:00
[SPE] Implement Grasping Tentacles
This commit is contained in:
parent
c4eaafc6b1
commit
c5275befb0
2 changed files with 79 additions and 0 deletions
76
Mage.Sets/src/mage/cards/g/GraspingTentacles.java
Normal file
76
Mage.Sets/src/mage/cards/g/GraspingTentacles.java
Normal file
|
|
@ -0,0 +1,76 @@
|
||||||
|
package mage.cards.g;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.MillCardsTargetEffect;
|
||||||
|
import mage.cards.Card;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.TargetCard;
|
||||||
|
import mage.target.common.TargetCardInGraveyard;
|
||||||
|
import mage.target.common.TargetOpponent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class GraspingTentacles extends CardImpl {
|
||||||
|
|
||||||
|
public GraspingTentacles(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{U}{B}");
|
||||||
|
|
||||||
|
// Target opponent mills eight cards. You may put an artifact card from that player's graveyard onto the battlefield under your control.
|
||||||
|
this.getSpellAbility().addEffect(new MillCardsTargetEffect(8));
|
||||||
|
this.getSpellAbility().addEffect(new GraspingTentaclesEffect());
|
||||||
|
this.getSpellAbility().addTarget(new TargetOpponent());
|
||||||
|
}
|
||||||
|
|
||||||
|
private GraspingTentacles(final GraspingTentacles card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GraspingTentacles copy() {
|
||||||
|
return new GraspingTentacles(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class GraspingTentaclesEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
GraspingTentaclesEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "you may put an artifact card from that player's " +
|
||||||
|
"graveyard onto the battlefield under your control";
|
||||||
|
}
|
||||||
|
|
||||||
|
private GraspingTentaclesEffect(final GraspingTentaclesEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GraspingTentaclesEffect copy() {
|
||||||
|
return new GraspingTentaclesEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
Player opponent = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||||
|
if (controller == null || opponent == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
TargetCard target = new TargetCardInGraveyard(
|
||||||
|
0, 1, StaticFilters.FILTER_CARD_ARTIFACT, true
|
||||||
|
);
|
||||||
|
controller.choose(Outcome.PutCardInPlay, opponent.getGraveyard(), target, source, game);
|
||||||
|
Card card = game.getCard(target.getFirstTarget());
|
||||||
|
return card != null && controller.moveCards(card, Zone.BATTLEFIELD, source, game);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package mage.sets;
|
package mage.sets;
|
||||||
|
|
||||||
import mage.cards.ExpansionSet;
|
import mage.cards.ExpansionSet;
|
||||||
|
import mage.constants.Rarity;
|
||||||
import mage.constants.SetType;
|
import mage.constants.SetType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -18,5 +19,7 @@ public final class MarvelsSpiderManEternal extends ExpansionSet {
|
||||||
super("Marvel's Spider-Man Eternal", "SPE", ExpansionSet.buildDate(2025, 9, 26), SetType.EXPANSION);
|
super("Marvel's Spider-Man Eternal", "SPE", ExpansionSet.buildDate(2025, 9, 26), SetType.EXPANSION);
|
||||||
this.blockName = "Marvel's Spider-Man"; // for sorting in GUI
|
this.blockName = "Marvel's Spider-Man"; // for sorting in GUI
|
||||||
this.hasBasicLands = false; // temporary
|
this.hasBasicLands = false; // temporary
|
||||||
|
|
||||||
|
cards.add(new SetCardInfo("Grasping Tentacles", 21, Rarity.RARE, mage.cards.g.GraspingTentacles.class));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue