[BOT] Implemented Arcee, Sharpshooter / Arcee, Acrobatic Coupe

This commit is contained in:
Evan Kranzler 2022-10-13 20:30:46 -04:00
parent 379c2cc3ac
commit 6fdaa1f3c5
3 changed files with 177 additions and 0 deletions

View file

@ -0,0 +1,112 @@
package mage.cards.a;
import mage.MageInt;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.dynamicvalue.common.SavedDamageValue;
import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.keyword.LivingMetalAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.counters.CounterType;
import mage.game.Controllable;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.stack.Spell;
import mage.target.Target;
import java.util.Collection;
import java.util.Objects;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ArceeAcrobaticCoupe extends CardImpl {
public ArceeAcrobaticCoupe(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.VEHICLE);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
this.color.setRed(true);
this.color.setWhite(true);
this.nightCard = true;
// Living metal
this.addAbility(new LivingMetalAbility());
// Whenever you cast a spell that targets one or more creatures or Vehicles you control, put that many +1/+1 counters on Arcee. Convert Arcee.
this.addAbility(new ArceeAcrobaticCoupeTriggeredAbility());
}
private ArceeAcrobaticCoupe(final ArceeAcrobaticCoupe card) {
super(card);
}
@Override
public ArceeAcrobaticCoupe copy() {
return new ArceeAcrobaticCoupe(this);
}
}
class ArceeAcrobaticCoupeTriggeredAbility extends SpellCastControllerTriggeredAbility {
ArceeAcrobaticCoupeTriggeredAbility() {
super(new AddCountersSourceEffect(
CounterType.P1P1.createInstance(0),
SavedDamageValue.MANY, false
), false);
this.addEffect(new TransformSourceEffect());
}
private ArceeAcrobaticCoupeTriggeredAbility(final ArceeAcrobaticCoupeTriggeredAbility ability) {
super(ability);
}
@Override
public ArceeAcrobaticCoupeTriggeredAbility copy() {
return new ArceeAcrobaticCoupeTriggeredAbility(this);
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (!super.checkTrigger(event, game)) {
return false;
}
Spell spell = game.getSpell(event.getTargetId());
if (spell == null) {
return false;
}
int targets = spell
.getStackAbility()
.getTargets()
.stream()
.map(Target::getTargets)
.flatMap(Collection::stream)
.map(game::getPermanent)
.filter(Objects::nonNull)
.filter(permanent -> permanent.isCreature(game)
|| permanent.hasSubtype(SubType.VEHICLE, game))
.map(Controllable::getControllerId)
.map(this::isControlledBy)
.mapToInt(x -> x ? 1 : 0)
.sum();
if (targets > 0) {
this.getEffects().setValue("damage", targets);
return true;
}
return false;
}
@Override
public String getRule() {
return "Whenever you cast a spell that targets one or more creatures or Vehicles " +
"you control, put that many +1/+1 counters on {this}. Convert {this}.";
}
}

View file

@ -0,0 +1,63 @@
package mage.cards.a;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.RemoveVariableCountersSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.dynamicvalue.common.GetXValue;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.keyword.FirstStrikeAbility;
import mage.abilities.keyword.MoreThanMeetsTheEyeAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.counters.CounterType;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ArceeSharpshooter extends CardImpl {
public ArceeSharpshooter(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}{R}{W}");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.ROBOT);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
this.secondSideCardClazz = mage.cards.a.ArceeAcrobaticCoupe.class;
// More Than Meets the Eye {R}{W}
this.addAbility(new MoreThanMeetsTheEyeAbility(this, "{R}{W}"));
// First strike
this.addAbility(FirstStrikeAbility.getInstance());
// {1}, Remove one or more +1/+1 counters from Arcee: It deals that much damage to target creature. Convert Arcee.
Ability ability = new SimpleActivatedAbility(
new DamageTargetEffect(GetXValue.instance)
.setText("it deals that much damage to target creature"),
new GenericManaCost(1)
);
ability.addCost(new RemoveVariableCountersSourceCost(CounterType.P1P1.createInstance(), 1));
ability.addEffect(new TransformSourceEffect().setText("convert {this}"));
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}
private ArceeSharpshooter(final ArceeSharpshooter card) {
super(card);
}
@Override
public ArceeSharpshooter copy() {
return new ArceeSharpshooter(this);
}
}

View file

@ -19,6 +19,8 @@ public final class Transformers extends ExpansionSet {
super("Transformers", "BOT", ExpansionSet.buildDate(2022, 11, 18), SetType.SUPPLEMENTAL);
this.hasBasicLands = false;
cards.add(new SetCardInfo("Arcee, Acrobatic Coupe", 7, Rarity.MYTHIC, mage.cards.a.ArceeAcrobaticCoupe.class));
cards.add(new SetCardInfo("Arcee, Sharpshooter", 7, Rarity.MYTHIC, mage.cards.a.ArceeSharpshooter.class));
cards.add(new SetCardInfo("Blitzwing, Adaptive Assailant", 4, Rarity.MYTHIC, mage.cards.b.BlitzwingAdaptiveAssailant.class));
cards.add(new SetCardInfo("Blitzwing, Cruel Tormentor", 4, Rarity.MYTHIC, mage.cards.b.BlitzwingCruelTormentor.class));
cards.add(new SetCardInfo("Flamewar, Brash Veteran", 10, Rarity.MYTHIC, mage.cards.f.FlamewarBrashVeteran.class));