[BRO] Implement Repair and Recharge

This commit is contained in:
Evan Kranzler 2022-11-03 21:18:14 -04:00
parent 927ea5da9e
commit afb7d75007
2 changed files with 49 additions and 0 deletions

View file

@ -0,0 +1,48 @@
package mage.cards.r;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.FilterCard;
import mage.filter.predicate.Predicates;
import mage.game.permanent.token.PowerstoneToken;
import mage.target.common.TargetCardInYourGraveyard;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class RepairAndRecharge extends CardImpl {
private static final FilterCard filter
= new FilterCard("artifact, enchantment, or planeswalker card from your graveyard");
static {
filter.add(Predicates.or(
CardType.ARTIFACT.getPredicate(),
CardType.ENCHANTMENT.getPredicate(),
CardType.PLANESWALKER.getPredicate()
));
}
public RepairAndRecharge(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{W}{W}");
// Return target artifact, enchantment, or planeswalker card from your graveyard to the battlefield. Create a tapped Powerstone token.
this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect());
this.getSpellAbility().addEffect(new CreateTokenEffect(new PowerstoneToken(), 1, true));
this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter));
}
private RepairAndRecharge(final RepairAndRecharge card) {
super(card);
}
@Override
public RepairAndRecharge copy() {
return new RepairAndRecharge(this);
}
}

View file

@ -131,6 +131,7 @@ public final class TheBrothersWar extends ExpansionSet {
cards.add(new SetCardInfo("Raze to the Ground", 149, Rarity.COMMON, mage.cards.r.RazeToTheGround.class));
cards.add(new SetCardInfo("Reconstructed Thopter", 242, Rarity.UNCOMMON, mage.cards.r.ReconstructedThopter.class));
cards.add(new SetCardInfo("Recruitment Officer", 23, Rarity.UNCOMMON, mage.cards.r.RecruitmentOfficer.class));
cards.add(new SetCardInfo("Repair and Recharge", 24, Rarity.UNCOMMON, mage.cards.r.RepairAndRecharge.class));
cards.add(new SetCardInfo("Rust Goliath", 204, Rarity.COMMON, mage.cards.r.RustGoliath.class));
cards.add(new SetCardInfo("Sardian Cliffstomper", 151, Rarity.UNCOMMON, mage.cards.s.SardianCliffstomper.class));
cards.add(new SetCardInfo("Scrapwork Cohort", 37, Rarity.COMMON, mage.cards.s.ScrapworkCohort.class));