mirror of
https://github.com/correl/mage.git
synced 2024-12-30 19:10:36 +00:00
[NEO] Implemented Born to Drive
This commit is contained in:
parent
a43a0f37a3
commit
02a560d637
2 changed files with 78 additions and 0 deletions
77
Mage.Sets/src/mage/cards/b/BornToDrive.java
Normal file
77
Mage.Sets/src/mage/cards/b/BornToDrive.java
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
package mage.cards.b;
|
||||||
|
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.condition.Condition;
|
||||||
|
import mage.abilities.condition.common.AttachedToMatchesFilterCondition;
|
||||||
|
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||||
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
|
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||||
|
import mage.abilities.effects.common.AttachEffect;
|
||||||
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||||
|
import mage.abilities.hint.Hint;
|
||||||
|
import mage.abilities.hint.ValueHint;
|
||||||
|
import mage.abilities.keyword.ChannelAbility;
|
||||||
|
import mage.abilities.keyword.EnchantAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.game.permanent.token.PilotToken;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class BornToDrive extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterPermanent filter = new FilterControlledPermanent();
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(Predicates.or(
|
||||||
|
CardType.CREATURE.getPredicate(),
|
||||||
|
SubType.VEHICLE.getPredicate()
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter);
|
||||||
|
private static final Hint hint = new ValueHint("Creatures and Vehicles you control", xValue);
|
||||||
|
private static final Condition condition = new AttachedToMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_CREATURE);
|
||||||
|
|
||||||
|
public BornToDrive(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.AURA);
|
||||||
|
|
||||||
|
// Enchant artifact or creature
|
||||||
|
TargetPermanent auraTarget = new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_CREATURE);
|
||||||
|
this.getSpellAbility().addTarget(auraTarget);
|
||||||
|
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
|
||||||
|
this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
|
||||||
|
|
||||||
|
// As long as enchanted permanent is a creature, it gets +1/+1 for each creature and/or Vehicle you control.
|
||||||
|
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
|
||||||
|
new BoostEnchantedEffect(xValue, xValue), condition, "as long as enchanted permanent " +
|
||||||
|
"is a creature, it gets +1/+1 for each creature and/or Vehicle you control"
|
||||||
|
)).addHint(hint));
|
||||||
|
|
||||||
|
// Channel — {2}{W}, Discard Born to Drive: Create two 1/1 colorless Pilot creature tokens with "This creature crews Vehicles as though its power were 2 greater."
|
||||||
|
this.addAbility(new ChannelAbility("{2}{W}", new CreateTokenEffect(new PilotToken(), 2)));
|
||||||
|
}
|
||||||
|
|
||||||
|
private BornToDrive(final BornToDrive card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BornToDrive copy() {
|
||||||
|
return new BornToDrive(this);
|
||||||
|
}
|
||||||
|
}
|
|
@ -50,6 +50,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Bloodfell Caves", 264, Rarity.COMMON, mage.cards.b.BloodfellCaves.class));
|
cards.add(new SetCardInfo("Bloodfell Caves", 264, Rarity.COMMON, mage.cards.b.BloodfellCaves.class));
|
||||||
cards.add(new SetCardInfo("Blossoming Sands", 265, Rarity.COMMON, mage.cards.b.BlossomingSands.class));
|
cards.add(new SetCardInfo("Blossoming Sands", 265, Rarity.COMMON, mage.cards.b.BlossomingSands.class));
|
||||||
cards.add(new SetCardInfo("Boon of Boseiju", 176, Rarity.UNCOMMON, mage.cards.b.BoonOfBoseiju.class));
|
cards.add(new SetCardInfo("Boon of Boseiju", 176, Rarity.UNCOMMON, mage.cards.b.BoonOfBoseiju.class));
|
||||||
|
cards.add(new SetCardInfo("Born to Drive", 6, Rarity.UNCOMMON, mage.cards.b.BornToDrive.class));
|
||||||
cards.add(new SetCardInfo("Boseiju Reaches Skyward", 177, Rarity.UNCOMMON, mage.cards.b.BoseijuReachesSkyward.class));
|
cards.add(new SetCardInfo("Boseiju Reaches Skyward", 177, Rarity.UNCOMMON, mage.cards.b.BoseijuReachesSkyward.class));
|
||||||
cards.add(new SetCardInfo("Branch of Boseiju", 177, Rarity.UNCOMMON, mage.cards.b.BranchOfBoseiju.class));
|
cards.add(new SetCardInfo("Branch of Boseiju", 177, Rarity.UNCOMMON, mage.cards.b.BranchOfBoseiju.class));
|
||||||
cards.add(new SetCardInfo("Brilliant Restoration", 7, Rarity.RARE, mage.cards.b.BrilliantRestoration.class));
|
cards.add(new SetCardInfo("Brilliant Restoration", 7, Rarity.RARE, mage.cards.b.BrilliantRestoration.class));
|
||||||
|
|
Loading…
Reference in a new issue