mirror of
https://github.com/correl/mage.git
synced 2025-03-30 17:00:10 -09:00
Implemented Doomed Artisan
This commit is contained in:
parent
c27a3eaa82
commit
b6b65215e8
4 changed files with 109 additions and 0 deletions
Mage.Sets/src/mage
Mage/src/main/java/mage
57
Mage.Sets/src/mage/cards/d/DoomedArtisan.java
Normal file
57
Mage.Sets/src/mage/cards/d/DoomedArtisan.java
Normal file
|
@ -0,0 +1,57 @@
|
|||
package mage.cards.d;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.combat.CantAttackBlockAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.permanent.token.DoomedArtisanToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class DoomedArtisan extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter
|
||||
= new FilterCreaturePermanent(SubType.SCULPTURE, "Sculptures you control");
|
||||
|
||||
static {
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public DoomedArtisan(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.ARTIFICER);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Sculptures you control can't attack or block.
|
||||
this.addAbility(new SimpleStaticAbility(new CantAttackBlockAllEffect(Duration.WhileOnBattlefield, filter)));
|
||||
|
||||
// At the beginning of your end step, create a colorless Sculpture artifact creature token with "This creature's power and toughness are equal to the number of Sculptures you control"
|
||||
this.addAbility(new BeginningOfEndStepTriggeredAbility(
|
||||
new CreateTokenEffect(new DoomedArtisanToken()), TargetController.YOU, false)
|
||||
);
|
||||
}
|
||||
|
||||
private DoomedArtisan(final DoomedArtisan card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DoomedArtisan copy() {
|
||||
return new DoomedArtisan(this);
|
||||
}
|
||||
}
|
|
@ -39,6 +39,7 @@ public final class Commander2019Edition extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Den Protector", 161, Rarity.RARE, mage.cards.d.DenProtector.class));
|
||||
cards.add(new SetCardInfo("Dimir Aqueduct", 239, Rarity.UNCOMMON, mage.cards.d.DimirAqueduct.class));
|
||||
cards.add(new SetCardInfo("Dockside Extortionist", 24, Rarity.RARE, mage.cards.d.DocksideExtortionist.class));
|
||||
cards.add(new SetCardInfo("Doomed Artisan", 3, Rarity.RARE, mage.cards.d.DoomedArtisan.class));
|
||||
cards.add(new SetCardInfo("Echoing Truth", 84, Rarity.COMMON, mage.cards.e.EchoingTruth.class));
|
||||
cards.add(new SetCardInfo("Evolving Wilds", 241, Rarity.COMMON, mage.cards.e.EvolvingWilds.class));
|
||||
cards.add(new SetCardInfo("Explore", 164, Rarity.COMMON, mage.cards.e.Explore.class));
|
||||
|
|
|
@ -292,6 +292,7 @@ public enum SubType {
|
|||
SCION("Scion", SubTypeSet.CreatureType),
|
||||
SCORPION("Scorpion", SubTypeSet.CreatureType),
|
||||
SCOUT("Scout", SubTypeSet.CreatureType),
|
||||
SCULPTURE("Sculpture", SubTypeSet.CreatureType),
|
||||
SERF("Serf", SubTypeSet.CreatureType),
|
||||
SERPENT("Serpent", SubTypeSet.CreatureType),
|
||||
SERVO("Servo", SubTypeSet.CreatureType),
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
package mage.game.permanent.token;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class DoomedArtisanToken extends TokenImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter
|
||||
= new FilterCreaturePermanent(SubType.SCULPTURE, "Sculptures you control");
|
||||
|
||||
static {
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter);
|
||||
|
||||
public DoomedArtisanToken() {
|
||||
super("Sculpture", "colorless Sculpture artifact creature token with \"This creature's power and toughness are each equal to the number of Sculptures you control\"");
|
||||
setOriginalExpansionSetCode("C19");
|
||||
cardType.add(CardType.ARTIFACT);
|
||||
cardType.add(CardType.CREATURE);
|
||||
subtype.add(SubType.SCULPTURE);
|
||||
|
||||
power = new MageInt(0);
|
||||
toughness = new MageInt(0);
|
||||
|
||||
// This creature's power and toughness are each equal to the number of Sculpturess you control.
|
||||
this.addAbility(new SimpleStaticAbility(new SetPowerToughnessSourceEffect(xValue, Duration.EndOfGame)));
|
||||
}
|
||||
|
||||
private DoomedArtisanToken(final DoomedArtisanToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public DoomedArtisanToken copy() {
|
||||
return new DoomedArtisanToken(this);
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue