mirror of
https://github.com/correl/mage.git
synced 2024-11-28 19:19:55 +00:00
[SLD] Implemented Dustin, Gadget Genius
This commit is contained in:
parent
4c93eda485
commit
3bba2a308d
4 changed files with 122 additions and 0 deletions
83
Mage.Sets/src/mage/cards/d/DustinGadgetGenius.java
Normal file
83
Mage.Sets/src/mage/cards/d/DustinGadgetGenius.java
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
package mage.cards.d;
|
||||||
|
|
||||||
|
import mage.ConditionalMana;
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.MageObject;
|
||||||
|
import mage.Mana;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.condition.Condition;
|
||||||
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
|
import mage.abilities.keyword.FriendsForeverAbility;
|
||||||
|
import mage.abilities.mana.ConditionalColorlessManaAbility;
|
||||||
|
import mage.abilities.mana.builder.ConditionalManaBuilder;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.SuperType;
|
||||||
|
import mage.game.Game;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class DustinGadgetGenius extends CardImpl {
|
||||||
|
|
||||||
|
public DustinGadgetGenius(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{U}");
|
||||||
|
|
||||||
|
this.addSuperType(SuperType.LEGENDARY);
|
||||||
|
this.subtype.add(SubType.HUMAN);
|
||||||
|
this.power = new MageInt(2);
|
||||||
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
|
// {T}: Add {C}{C}. Spend this mana only to cast artifact spells or activate abilities of artifacts.
|
||||||
|
this.addAbility(new ConditionalColorlessManaAbility(
|
||||||
|
new TapSourceCost(), 2, new DustinGadgetGeniusManaBuilder()
|
||||||
|
));
|
||||||
|
|
||||||
|
// Friends forever
|
||||||
|
this.addAbility(FriendsForeverAbility.getInstance());
|
||||||
|
}
|
||||||
|
|
||||||
|
private DustinGadgetGenius(final DustinGadgetGenius card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DustinGadgetGenius copy() {
|
||||||
|
return new DustinGadgetGenius(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class DustinGadgetGeniusManaBuilder extends ConditionalManaBuilder {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ConditionalMana build(Object... options) {
|
||||||
|
return new DustinGadgetGeniusConditionalMana(this.mana);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getRule() {
|
||||||
|
return "Spend this mana only to cast artifact spells or activate abilities of artifacts";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class DustinGadgetGeniusConditionalMana extends ConditionalMana {
|
||||||
|
|
||||||
|
DustinGadgetGeniusConditionalMana(Mana mana) {
|
||||||
|
super(mana);
|
||||||
|
addCondition(DustinGadgetGeniusCondition.instance);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
enum DustinGadgetGeniusCondition implements Condition {
|
||||||
|
instance;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
MageObject object = game.getObject(source.getSourceId());
|
||||||
|
return object != null && object.isArtifact(game);
|
||||||
|
}
|
||||||
|
}
|
|
@ -274,6 +274,7 @@ public class SecretLairDrop extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Impact Tremors", 313, Rarity.RARE, mage.cards.i.ImpactTremors.class));
|
cards.add(new SetCardInfo("Impact Tremors", 313, Rarity.RARE, mage.cards.i.ImpactTremors.class));
|
||||||
cards.add(new SetCardInfo("Primal Vigor", 314, Rarity.RARE, mage.cards.p.PrimalVigor.class));
|
cards.add(new SetCardInfo("Primal Vigor", 314, Rarity.RARE, mage.cards.p.PrimalVigor.class));
|
||||||
cards.add(new SetCardInfo("Commander's Sphere", 315, Rarity.RARE, mage.cards.c.CommandersSphere.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Commander's Sphere", 315, Rarity.RARE, mage.cards.c.CommandersSphere.class, NON_FULL_USE_VARIOUS));
|
||||||
|
cards.add(new SetCardInfo("Dustin, Gadget Genius", 342, Rarity.RARE, mage.cards.d.DustinGadgetGenius.class));
|
||||||
cards.add(new SetCardInfo("Generous Gift", 369, Rarity.RARE, mage.cards.g.GenerousGift.class));
|
cards.add(new SetCardInfo("Generous Gift", 369, Rarity.RARE, mage.cards.g.GenerousGift.class));
|
||||||
cards.add(new SetCardInfo("Chain Lightning", 370, Rarity.RARE, mage.cards.c.ChainLightning.class));
|
cards.add(new SetCardInfo("Chain Lightning", 370, Rarity.RARE, mage.cards.c.ChainLightning.class));
|
||||||
cards.add(new SetCardInfo("Kodama's Reach", 371, Rarity.RARE, mage.cards.k.KodamasReach.class));
|
cards.add(new SetCardInfo("Kodama's Reach", 371, Rarity.RARE, mage.cards.k.KodamasReach.class));
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
package mage.abilities.keyword;
|
||||||
|
|
||||||
|
import mage.abilities.MageSingleton;
|
||||||
|
import mage.abilities.StaticAbility;
|
||||||
|
import mage.constants.Zone;
|
||||||
|
|
||||||
|
import java.io.ObjectStreamException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public class FriendsForeverAbility extends StaticAbility implements MageSingleton {
|
||||||
|
|
||||||
|
private static final FriendsForeverAbility instance = new FriendsForeverAbility();
|
||||||
|
|
||||||
|
private Object readResolve() throws ObjectStreamException {
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static FriendsForeverAbility getInstance() {
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
private FriendsForeverAbility() {
|
||||||
|
super(Zone.BATTLEFIELD, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getRule() {
|
||||||
|
return "Friends forever <i>(You can have two commanders if both have friends forever.)</i>";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FriendsForeverAbility copy() {
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
}
|
|
@ -48,6 +48,7 @@ Flying|instance|
|
||||||
Forestcycling|cost|
|
Forestcycling|cost|
|
||||||
Forestwalk|new|
|
Forestwalk|new|
|
||||||
Foretell|card, manaString|
|
Foretell|card, manaString|
|
||||||
|
Friends forever|instance|
|
||||||
Haste|instance|
|
Haste|instance|
|
||||||
Hexproof|instance|
|
Hexproof|instance|
|
||||||
Improvise|new|
|
Improvise|new|
|
||||||
|
|
Loading…
Reference in a new issue