[NEO] Implemented Mech Hangar (#8645)

This commit is contained in:
Craig Brennan 2022-02-04 23:23:01 +00:00 committed by GitHub
parent 1b247d37fd
commit e51a77f7a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 63 additions and 0 deletions

View file

@ -0,0 +1,62 @@
package mage.cards.m;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.continuous.AddCardTypeTargetEffect;
import mage.abilities.mana.ColorlessManaAbility;
import mage.abilities.mana.ConditionalAnyColorManaAbility;
import mage.abilities.mana.conditional.ConditionalSpellManaBuilder;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.FilterPermanent;
import mage.filter.FilterSpell;
import mage.filter.predicate.Predicates;
import mage.target.TargetPermanent;
/**
*
* @author Addictiveme
*/
public final class MechHangar extends CardImpl {
private static final FilterSpell filter = new FilterSpell("a Pilot or Vehicle spell");
static {
filter.add(Predicates.or(SubType.VEHICLE.getPredicate(), SubType.PILOT.getPredicate()));
}
public MechHangar(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.LAND},"");
// {T}: Add {C}.
this.addAbility(new ColorlessManaAbility());
// {T}: Add one mana of any color. Spend this mana only to cast a Pilot or Vehicle spell.
this.addAbility(new ConditionalAnyColorManaAbility(new TapSourceCost(), 1, new ConditionalSpellManaBuilder(filter), true));
// {3}, {T}, Target Vehicle becomes an artifact creature until end of turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCardTypeTargetEffect(
Duration.EndOfTurn, CardType.ARTIFACT, CardType.CREATURE)
.setText("Target Vehicle becomes an artifact creature until end of turn"), new GenericManaCost(3));
ability.addCost(new TapSourceCost());
ability.addTarget(new TargetPermanent(new FilterPermanent(SubType.VEHICLE, "Vehicle")));
this.addAbility(ability);
}
private MechHangar(final MechHangar card) {
super(card);
}
@Override
public MechHangar copy() {
return new MechHangar(this);
}
}

View file

@ -116,6 +116,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet {
cards.add(new SetCardInfo("Lion Sash", 26, Rarity.RARE, mage.cards.l.LionSash.class));
cards.add(new SetCardInfo("Lizard Blades", 153, Rarity.RARE, mage.cards.l.LizardBlades.class));
cards.add(new SetCardInfo("Malicious Malfunction", 110, Rarity.UNCOMMON, mage.cards.m.MaliciousMalfunction.class));
cards.add(new SetCardInfo("Mech Hangar", 270, Rarity.UNCOMMON, mage.cards.m.MechHangar.class));
cards.add(new SetCardInfo("Memory of Toshiro", 108, Rarity.UNCOMMON, mage.cards.m.MemoryOfToshiro.class));
cards.add(new SetCardInfo("Michiko's Reign of Truth", 29, Rarity.UNCOMMON, mage.cards.m.MichikosReignOfTruth.class));
cards.add(new SetCardInfo("Mnemonic Sphere", 64, Rarity.COMMON, mage.cards.m.MnemonicSphere.class));