mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
[C21] Implemented Sequence Engine
This commit is contained in:
parent
cf3b3cbb76
commit
de355a52e5
2 changed files with 67 additions and 0 deletions
66
Mage.Sets/src/mage/cards/s/SequenceEngine.java
Normal file
66
Mage.Sets/src/mage/cards/s/SequenceEngine.java
Normal file
|
@ -0,0 +1,66 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
|
||||
import mage.abilities.effects.common.ExileTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.QuandrixToken;
|
||||
import mage.target.common.TargetCardInGraveyard;
|
||||
import mage.target.targetadjustment.TargetAdjuster;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class SequenceEngine extends CardImpl {
|
||||
|
||||
public SequenceEngine(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}{G}");
|
||||
|
||||
// {X}, {T}: Exile target creature card with mana value X from a graveyard. Create a 0/0 green and blue Fractal creature token. Put X +1/+1 counters on it. Activate only as a sorcery.
|
||||
Ability ability = new ActivateAsSorceryActivatedAbility(
|
||||
new ExileTargetEffect()
|
||||
.setText("exile target creature card with mana value X from a graveyard."),
|
||||
new ManaCostsImpl<>("{X}")
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addEffect(QuandrixToken.getEffect(
|
||||
ManacostVariableValue.instance, "Put X +1/+1 counters on it"
|
||||
));
|
||||
ability.setTargetAdjuster(SequenceEngineAdjuster.instance);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private SequenceEngine(final SequenceEngine card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SequenceEngine copy() {
|
||||
return new SequenceEngine(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum SequenceEngineAdjuster implements TargetAdjuster {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public void adjustTargets(Ability ability, Game game) {
|
||||
int xValue = ability.getManaCostsToPay().getX();
|
||||
ability.getTargets().clear();
|
||||
FilterCard filter = new FilterCreatureCard("creature card with mana value " + xValue);
|
||||
filter.add(new ConvertedManaCostPredicate(ComparisonType.EQUAL_TO, xValue));
|
||||
ability.addTarget(new TargetCardInGraveyard(filter));
|
||||
}
|
||||
}
|
|
@ -73,6 +73,7 @@ public final class Commander2021Edition extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Sanctum Gargoyle", 102, Rarity.COMMON, mage.cards.s.SanctumGargoyle.class));
|
||||
cards.add(new SetCardInfo("Scrap Trawler", 260, Rarity.RARE, mage.cards.s.ScrapTrawler.class));
|
||||
cards.add(new SetCardInfo("Sculpting Steel", 261, Rarity.RARE, mage.cards.s.SculptingSteel.class));
|
||||
cards.add(new SetCardInfo("Sequence Engine", 67, Rarity.RARE, mage.cards.s.SequenceEngine.class));
|
||||
cards.add(new SetCardInfo("Slayers' Stronghold", 318, Rarity.RARE, mage.cards.s.SlayersStronghold.class));
|
||||
cards.add(new SetCardInfo("Sol Ring", 263, Rarity.UNCOMMON, mage.cards.s.SolRing.class));
|
||||
cards.add(new SetCardInfo("Solemn Simulacrum", 264, Rarity.RARE, mage.cards.s.SolemnSimulacrum.class));
|
||||
|
|
Loading…
Reference in a new issue