Implemented Archipelagore

This commit is contained in:
Evan Kranzler 2020-04-09 17:06:55 -04:00
parent 4cf38a2c4b
commit ffe407601c
2 changed files with 64 additions and 0 deletions

View file

@ -0,0 +1,63 @@
package mage.cards.a;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.MutatesSourceTriggeredAbility;
import mage.abilities.dynamicvalue.common.SourceMutatedCount;
import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect;
import mage.abilities.effects.common.TapTargetEffect;
import mage.abilities.keyword.MutateAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.game.Game;
import mage.target.common.TargetCreaturePermanent;
import mage.target.targetadjustment.TargetAdjuster;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class Archipelagore extends CardImpl {
public Archipelagore(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}{U}");
this.subtype.add(SubType.LEVIATHAN);
this.power = new MageInt(7);
this.toughness = new MageInt(7);
// Mutate {5}{U}
this.addAbility(new MutateAbility(this, "{5}{U}"));
// Whenever this creature mutates, tap up to X target creatures, where X is the number of times this creature has mutated. Those creatures don't untap during their controller's next untap step.
Ability ability = new MutatesSourceTriggeredAbility(new TapTargetEffect(
"up to X target creatures, where X is the number of times this creature has mutated."
));
ability.addEffect(new DontUntapInControllersNextUntapStepTargetEffect("Those creatures"));
ability.setTargetAdjuster(ArchipelagoreAdjuster.instance);
this.addAbility(ability);
}
private Archipelagore(final Archipelagore card) {
super(card);
}
@Override
public Archipelagore copy() {
return new Archipelagore(this);
}
}
enum ArchipelagoreAdjuster implements TargetAdjuster {
instance;
@Override
public void adjustTargets(Ability ability, Game game) {
int mutateCount = SourceMutatedCount.instance.calculate(game, ability, null);
ability.getTargets().clear();
ability.addTarget(new TargetCreaturePermanent(0, mutateCount));
}
}

View file

@ -62,6 +62,7 @@ public final class IkoriaLairOfBehemoths extends ExpansionSet {
cards.add(new SetCardInfo("Alert Heedbonder", 218, Rarity.UNCOMMON, mage.cards.a.AlertHeedbonder.class));
cards.add(new SetCardInfo("Almighty Brushwagg", 143, Rarity.COMMON, mage.cards.a.AlmightyBrushwagg.class));
cards.add(new SetCardInfo("Archipelagore", 41, Rarity.UNCOMMON, mage.cards.a.Archipelagore.class));
cards.add(new SetCardInfo("Barrier Breach", 145, Rarity.UNCOMMON, mage.cards.b.BarrierBreach.class));
cards.add(new SetCardInfo("Bastion of Remembrance", 73, Rarity.UNCOMMON, mage.cards.b.BastionOfRemembrance.class));
cards.add(new SetCardInfo("Blood Curdle", 75, Rarity.COMMON, mage.cards.b.BloodCurdle.class));