mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
refactor a card with craft
This commit is contained in:
parent
7609c3087c
commit
8158751813
2 changed files with 40 additions and 39 deletions
|
|
@ -1,20 +1,9 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapTargetCost;
|
||||
import mage.abilities.effects.common.continuous.AddCardTypeSourceEffect;
|
||||
import mage.abilities.keyword.CrewAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.TransformingDoubleFacedCard;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledArtifactPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -23,30 +12,10 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class BladewheelChariot extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter
|
||||
= new FilterControlledArtifactPermanent("other untapped artifacts you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
filter.add(TappedPredicate.UNTAPPED);
|
||||
}
|
||||
|
||||
public BladewheelChariot(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "");
|
||||
|
||||
this.subtype.add(SubType.VEHICLE);
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(5);
|
||||
this.nightCard = true;
|
||||
this.color.setWhite(true);
|
||||
|
||||
// Tap two other untapped artifacts you control: Bladewheel Chariot becomes an artifact creature until end of turn.
|
||||
this.addAbility(new SimpleActivatedAbility(new AddCardTypeSourceEffect(
|
||||
Duration.EndOfTurn, CardType.ARTIFACT, CardType.CREATURE
|
||||
).setText("{this} becomes an artifact creature until end of turn"), new TapTargetCost(new TargetControlledPermanent(2, filter))));
|
||||
|
||||
// Crew 1
|
||||
this.addAbility(new CrewAbility(1));
|
||||
TransformingDoubleFacedCard.copyToBackFace(new mage.cards.s.SpringLoadedSawblades(ownerId, setInfo), this);
|
||||
}
|
||||
|
||||
private BladewheelChariot(final BladewheelChariot card) {
|
||||
|
|
|
|||
|
|
@ -2,45 +2,77 @@ package mage.cards.s;
|
|||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapTargetCost;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.AddCardTypeSourceEffect;
|
||||
import mage.abilities.keyword.CraftAbility;
|
||||
import mage.abilities.keyword.CrewAbility;
|
||||
import mage.abilities.keyword.FlashAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.TransformingDoubleFacedCard;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledArtifactPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterOpponentsCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class SpringLoadedSawblades extends CardImpl {
|
||||
public final class SpringLoadedSawblades extends TransformingDoubleFacedCard {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterOpponentsCreaturePermanent("tapped creature an opponent controls");
|
||||
private static final FilterControlledPermanent filter2
|
||||
= new FilterControlledArtifactPermanent("other untapped artifacts you control");
|
||||
|
||||
static {
|
||||
filter.add(TappedPredicate.TAPPED);
|
||||
filter2.add(AnotherPredicate.instance);
|
||||
filter2.add(TappedPredicate.UNTAPPED);
|
||||
}
|
||||
|
||||
public SpringLoadedSawblades(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}{W}");
|
||||
super(
|
||||
ownerId, setInfo,
|
||||
new CardType[]{CardType.ARTIFACT}, new SubType[]{}, "{1}{W}",
|
||||
"Bladewheel Chariot",
|
||||
new CardType[]{CardType.ARTIFACT}, new SubType[]{SubType.VEHICLE}, "W"
|
||||
);
|
||||
this.getRightHalfCard().setPT(5, 5);
|
||||
|
||||
this.secondSideCardClazz = mage.cards.b.BladewheelChariot.class;
|
||||
|
||||
// Flash
|
||||
this.addAbility(FlashAbility.getInstance());
|
||||
this.getLeftHalfCard().addAbility(FlashAbility.getInstance());
|
||||
|
||||
// When Spring-Loaded Sawblades enters the battlefield, it deals 5 damage to target tapped creature an opponent controls.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(5, "it"));
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
this.getLeftHalfCard().addAbility(ability);
|
||||
|
||||
// Craft with artifact {3}{W}
|
||||
this.addAbility(new CraftAbility("{3}{W}"));
|
||||
this.getLeftHalfCard().addAbility(new CraftAbility("{3}{W}"));
|
||||
|
||||
// Bladewheel Chariot
|
||||
// Tap two other untapped artifacts you control: Bladewheel Chariot becomes an artifact creature until end of turn.
|
||||
this.getRightHalfCard().addAbility(new SimpleActivatedAbility(new AddCardTypeSourceEffect(
|
||||
Duration.EndOfTurn, CardType.ARTIFACT, CardType.CREATURE
|
||||
).setText("{this} becomes an artifact creature until end of turn"), new TapTargetCost(new TargetControlledPermanent(2, filter2))));
|
||||
|
||||
// Crew 1
|
||||
this.getRightHalfCard().addAbility(new CrewAbility(1));
|
||||
|
||||
this.finalizeDFC();
|
||||
}
|
||||
|
||||
private SpringLoadedSawblades(final SpringLoadedSawblades card) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue