[BRO] Implemented The Mightstone and Weakstone

This commit is contained in:
Evan Kranzler 2022-09-29 22:49:05 -04:00
parent 278feb9b9a
commit 518602bf61
4 changed files with 67 additions and 1 deletions

View file

@ -0,0 +1,58 @@
package mage.cards.t;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.mana.ConditionalColorlessManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.game.permanent.token.PowerstoneToken;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class TheMightstoneAndWeakstone extends CardImpl {
public TheMightstoneAndWeakstone(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{5}");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.POWERSTONE);
// When The Mightstone and Weakstone enters the battlefield, choose one --
// * Draw two cards.
Ability ability = new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1));
// * Target creature gets -5/-5 until end of turn.
ability.addMode(new Mode(new BoostTargetEffect(-5, -5)).addTarget(new TargetCreaturePermanent()));
this.addAbility(ability);
// {T}: Add {C}{C}. This mana can't be spent to cast nonartifact spells.
this.addAbility(new ConditionalColorlessManaAbility(2, PowerstoneToken.makeBuilder()));
// (Melds with Urza, Lord Protector)
this.addAbility(new SimpleStaticAbility(
Zone.ALL, new InfoEffect("<i>(Melds with Urza, Lord Protector)</i>")
));
}
private TheMightstoneAndWeakstone(final TheMightstoneAndWeakstone card) {
super(card);
}
@Override
public TheMightstoneAndWeakstone copy() {
return new TheMightstoneAndWeakstone(this);
}
}

View file

@ -27,6 +27,7 @@ public final class TheBrothersWar extends ExpansionSet {
cards.add(new SetCardInfo("Plains", 278, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Plains", 278, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Recruitment Officer", 23, Rarity.UNCOMMON, mage.cards.r.RecruitmentOfficer.class)); cards.add(new SetCardInfo("Recruitment Officer", 23, Rarity.UNCOMMON, mage.cards.r.RecruitmentOfficer.class));
cards.add(new SetCardInfo("Swamp", 282, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Swamp", 282, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("The Mightstone and Weakstone", 238, Rarity.RARE, mage.cards.t.TheMightstoneAndWeakstone.class));
} }
// @Override // @Override

View file

@ -47,6 +47,7 @@ public enum SubType {
FOOD("Food", SubTypeSet.ArtifactType), FOOD("Food", SubTypeSet.ArtifactType),
FORTIFICATION("Fortification", SubTypeSet.ArtifactType), FORTIFICATION("Fortification", SubTypeSet.ArtifactType),
GOLD("Gold", SubTypeSet.ArtifactType), GOLD("Gold", SubTypeSet.ArtifactType),
POWERSTONE("Powerstone", SubTypeSet.ArtifactType),
TREASURE("Treasure", SubTypeSet.ArtifactType), TREASURE("Treasure", SubTypeSet.ArtifactType),
VEHICLE("Vehicle", SubTypeSet.ArtifactType), VEHICLE("Vehicle", SubTypeSet.ArtifactType),
// 205.3m : Creatures and tribals share their lists of subtypes; these subtypes are called creature types. // 205.3m : Creatures and tribals share their lists of subtypes; these subtypes are called creature types.

View file

@ -12,6 +12,7 @@ import mage.abilities.mana.builder.ConditionalManaBuilder;
import mage.abilities.mana.conditional.ManaCondition; import mage.abilities.mana.conditional.ManaCondition;
import mage.cards.Card; import mage.cards.Card;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.game.Game; import mage.game.Game;
import mage.game.command.Commander; import mage.game.command.Commander;
import mage.game.stack.Spell; import mage.game.stack.Spell;
@ -29,9 +30,10 @@ public final class PowerstoneToken extends TokenImpl {
public PowerstoneToken() { public PowerstoneToken() {
super("Powerstone Token", "Powerstone token"); super("Powerstone Token", "Powerstone token");
cardType.add(CardType.ARTIFACT); cardType.add(CardType.ARTIFACT);
subtype.add(SubType.POWERSTONE);
// {T}: Add {C}. This mana can't be spent to cast a nonartifact spell. // {T}: Add {C}. This mana can't be spent to cast a nonartifact spell.
this.addAbility(new ConditionalColorlessManaAbility(1, new PowerstoneTokenManaBuilder())); this.addAbility(new ConditionalColorlessManaAbility(1, makeBuilder()));
availableImageSetCodes = Arrays.asList("DMU"); availableImageSetCodes = Arrays.asList("DMU");
} }
@ -43,6 +45,10 @@ public final class PowerstoneToken extends TokenImpl {
public PowerstoneToken copy() { public PowerstoneToken copy() {
return new PowerstoneToken(this); return new PowerstoneToken(this);
} }
public static PowerstoneTokenManaBuilder makeBuilder() {
return new PowerstoneTokenManaBuilder();
}
} }
class PowerstoneTokenManaBuilder extends ConditionalManaBuilder { class PowerstoneTokenManaBuilder extends ConditionalManaBuilder {