mirror of
https://github.com/correl/mage.git
synced 2024-12-25 19:25:41 +00:00
Implemented Mass Manipulation
This commit is contained in:
parent
e36663c647
commit
47b943021f
3 changed files with 61 additions and 2 deletions
50
Mage.Sets/src/mage/cards/m/MassManipulation.java
Normal file
50
Mage.Sets/src/mage/cards/m/MassManipulation.java
Normal file
|
@ -0,0 +1,50 @@
|
|||
package mage.cards.m;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.common.continuous.GainControlTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.game.Game;
|
||||
import mage.target.common.TargetCreatureOrPlaneswalker;
|
||||
import mage.target.targetadjustment.TargetAdjuster;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class MassManipulation extends CardImpl {
|
||||
|
||||
public MassManipulation(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{X}{U}{U}{U}{U}");
|
||||
|
||||
// Gain control of X target creatures and/or planeswalkers.
|
||||
this.getSpellAbility().addEffect(
|
||||
new GainControlTargetEffect(Duration.Custom, true)
|
||||
.setText("Gain control of X target creatures and/or planeswalkers.")
|
||||
);
|
||||
this.getSpellAbility().addTarget(new TargetCreatureOrPlaneswalker());
|
||||
this.getSpellAbility().setTargetAdjuster(MassManipulationAdjuster.instance);
|
||||
}
|
||||
|
||||
private MassManipulation(final MassManipulation card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MassManipulation copy() {
|
||||
return new MassManipulation(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum MassManipulationAdjuster implements TargetAdjuster {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public void adjustTargets(Ability ability, Game game) {
|
||||
ability.getTargets().clear();
|
||||
ability.addTarget(new TargetCreatureOrPlaneswalker(ability.getManaCosts().getX()));
|
||||
}
|
||||
}
|
|
@ -58,6 +58,7 @@ public final class RavnicaAllegiance extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Judith, the Scourge Diva", 185, Rarity.RARE, mage.cards.j.JudithTheScourgeDiva.class));
|
||||
cards.add(new SetCardInfo("Kaya, Orzhov Usurper", 186, Rarity.MYTHIC, mage.cards.k.KayaOrzhovUsurper.class));
|
||||
cards.add(new SetCardInfo("Light Up the Stage", 107, Rarity.UNCOMMON, mage.cards.l.LightUpTheStage.class));
|
||||
cards.add(new SetCardInfo("Mass Manipulation", 42, Rarity.RARE, mage.cards.m.MassManipulation.class));
|
||||
cards.add(new SetCardInfo("Mortify", 192, Rarity.UNCOMMON, mage.cards.m.Mortify.class));
|
||||
cards.add(new SetCardInfo("Orzhov Guildgate", 252, Rarity.COMMON, mage.cards.o.OrzhovGuildgate.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Orzhov Guildgate", 253, Rarity.COMMON, mage.cards.o.OrzhovGuildgate.class, NON_FULL_USE_VARIOUS));
|
||||
|
|
|
@ -1,20 +1,28 @@
|
|||
|
||||
package mage.target.common;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.filter.common.FilterCreatureOrPlaneswalkerPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class TargetCreatureOrPlaneswalker extends TargetPermanent {
|
||||
|
||||
public TargetCreatureOrPlaneswalker() {
|
||||
this(1);
|
||||
}
|
||||
|
||||
public TargetCreatureOrPlaneswalker(int numTargets) {
|
||||
this(numTargets, numTargets);
|
||||
}
|
||||
|
||||
public TargetCreatureOrPlaneswalker(int minNumTargets, int maxNumTargets) {
|
||||
this(1, 1, new FilterCreatureOrPlaneswalkerPermanent(), false);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue