[BOT] Implemented Jetfire, Ingenious Scientist / Jetfire, Air Guardian

This commit is contained in:
Evan Kranzler 2022-10-13 19:42:29 -04:00
parent 406ed996b1
commit 3ac222270e
3 changed files with 163 additions and 0 deletions

View file

@ -0,0 +1,58 @@
package mage.cards.j;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.effects.keyword.AdaptEffect;
import mage.abilities.keyword.FlyingAbility;
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 java.util.UUID;
/**
* @author TheElk801
*/
public final class JetfireAirGuardian extends CardImpl {
public JetfireAirGuardian(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.VEHICLE);
this.power = new MageInt(3);
this.toughness = new MageInt(4);
this.color.setBlue(true);
this.nightCard = true;
// Living metal
this.addAbility(new LivingMetalAbility());
// Flying
this.addAbility(FlyingAbility.getInstance());
// {U}{U}{U}: Convert Jetfire, then adapt 3.
Ability ability = new SimpleActivatedAbility(
new TransformSourceEffect()
.setText("convert {this}"),
new ManaCostsImpl<>("{U}{U}{U}")
);
ability.addEffect(new AdaptEffect(3).concatBy(", then"));
this.addAbility(ability);
}
private JetfireAirGuardian(final JetfireAirGuardian card) {
super(card);
}
@Override
public JetfireAirGuardian copy() {
return new JetfireAirGuardian(this);
}
}

View file

@ -0,0 +1,103 @@
package mage.cards.j;
import mage.MageInt;
import mage.Mana;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.VariableCost;
import mage.abilities.costs.common.RemoveVariableCountersTargetCost;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.TransformSourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.MoreThanMeetsTheEyeAbility;
import mage.abilities.mana.builder.ConditionalManaBuilder;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.counters.CounterType;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.token.PowerstoneToken;
import mage.players.Player;
import mage.target.TargetPlayer;
import mage.util.CardUtil;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class JetfireIngeniousScientist extends CardImpl {
public JetfireIngeniousScientist(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}{U}");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.ROBOT);
this.power = new MageInt(3);
this.toughness = new MageInt(4);
this.secondSideCardClazz = mage.cards.j.JetfireAirGuardian.class;
// More Than Meets the Eye {3}{U}
this.addAbility(new MoreThanMeetsTheEyeAbility(this, "{3}{U}"));
// Flying
this.addAbility(FlyingAbility.getInstance());
// Remove one or more +1/+1 counters from among artifacts you control: Target player adds that much {C}. This mana can't be spent to cast nonartifact spells. Convert Jetfire.
Ability ability = new SimpleActivatedAbility(
new JetfireIngeniousScientistEffect(),
new RemoveVariableCountersTargetCost(
StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACTS,
CounterType.P1P1, "one or more", 1
)
);
ability.addEffect(new TransformSourceEffect().setText("convert {this}"));
ability.addTarget(new TargetPlayer());
this.addAbility(ability);
}
private JetfireIngeniousScientist(final JetfireIngeniousScientist card) {
super(card);
}
@Override
public JetfireIngeniousScientist copy() {
return new JetfireIngeniousScientist(this);
}
}
class JetfireIngeniousScientistEffect extends OneShotEffect {
JetfireIngeniousScientistEffect() {
super(Outcome.Benefit);
staticText = "target player adds that much {C}. This mana can't be spent to cast nonartifact spells";
}
private JetfireIngeniousScientistEffect(final JetfireIngeniousScientistEffect effect) {
super(effect);
}
@Override
public JetfireIngeniousScientistEffect copy() {
return new JetfireIngeniousScientistEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
int countersRemoved = CardUtil.castStream(
source.getCosts().stream(), VariableCost.class
).mapToInt(VariableCost::getAmount).sum();
if (player == null || countersRemoved < 1) {
return false;
}
ConditionalManaBuilder manaBuilder = PowerstoneToken.makeBuilder();
Mana mana = manaBuilder.setMana(Mana.ColorlessMana(countersRemoved), source, game).build();
player.getManaPool().addMana(mana, game, source);
return true;
}
}

View file

@ -23,6 +23,8 @@ public final class Transformers extends ExpansionSet {
cards.add(new SetCardInfo("Flamewar, Streetwise Operative", 10, Rarity.MYTHIC, mage.cards.f.FlamewarStreetwiseOperative.class)); cards.add(new SetCardInfo("Flamewar, Streetwise Operative", 10, Rarity.MYTHIC, mage.cards.f.FlamewarStreetwiseOperative.class));
cards.add(new SetCardInfo("Goldbug, Humanity's Ally", 11, Rarity.MYTHIC, mage.cards.g.GoldbugHumanitysAlly.class)); cards.add(new SetCardInfo("Goldbug, Humanity's Ally", 11, Rarity.MYTHIC, mage.cards.g.GoldbugHumanitysAlly.class));
cards.add(new SetCardInfo("Goldbug, Scrappy Scout", 11, Rarity.MYTHIC, mage.cards.g.GoldbugScrappyScout.class)); cards.add(new SetCardInfo("Goldbug, Scrappy Scout", 11, Rarity.MYTHIC, mage.cards.g.GoldbugScrappyScout.class));
cards.add(new SetCardInfo("Jetfire, Air Guardian", 3, Rarity.MYTHIC, mage.cards.j.JetfireAirGuardian.class));
cards.add(new SetCardInfo("Jetfire, Ingenious Scientist", 3, Rarity.MYTHIC, mage.cards.j.JetfireIngeniousScientist.class));
cards.add(new SetCardInfo("Ultra Magnus, Armored Carrier", 15, Rarity.MYTHIC, mage.cards.u.UltraMagnusArmoredCarrier.class)); cards.add(new SetCardInfo("Ultra Magnus, Armored Carrier", 15, Rarity.MYTHIC, mage.cards.u.UltraMagnusArmoredCarrier.class));
cards.add(new SetCardInfo("Ultra Magnus, Tactician", 15, Rarity.MYTHIC, mage.cards.u.UltraMagnusTactician.class)); cards.add(new SetCardInfo("Ultra Magnus, Tactician", 15, Rarity.MYTHIC, mage.cards.u.UltraMagnusTactician.class));
} }