mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
[ONE] Implement Reject Imperfection (#10001)
This commit is contained in:
parent
ea5ad0524b
commit
6cf239f63e
2 changed files with 67 additions and 0 deletions
66
Mage.Sets/src/mage/cards/r/RejectImperfection.java
Normal file
66
Mage.Sets/src/mage/cards/r/RejectImperfection.java
Normal file
|
@ -0,0 +1,66 @@
|
|||
package mage.cards.r;
|
||||
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CounterTargetEffect;
|
||||
import mage.abilities.effects.common.counter.ProliferateEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.target.TargetSpell;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class RejectImperfection extends CardImpl {
|
||||
public RejectImperfection(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}{U}");
|
||||
|
||||
//Counter target spell. If that spell’s mana value was 3 or less, proliferate.
|
||||
this.getSpellAbility().addEffect(new RejectImperfectionEffect());
|
||||
this.getSpellAbility().addTarget(new TargetSpell());
|
||||
}
|
||||
|
||||
private RejectImperfection(final RejectImperfection card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RejectImperfection copy() {
|
||||
return new RejectImperfection(this);
|
||||
}
|
||||
}
|
||||
|
||||
class RejectImperfectionEffect extends OneShotEffect {
|
||||
|
||||
public RejectImperfectionEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "Counter target spell. If that spell's mana value was 3 or less, proliferate. " +
|
||||
"<i>(Choose any number of permanents and/or players, then give each another counter of each kind already there.)</i>";
|
||||
}
|
||||
|
||||
private RejectImperfectionEffect(final RejectImperfectionEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RejectImperfectionEffect copy() {
|
||||
return new RejectImperfectionEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
MageObject object = game.getObject(source.getFirstTarget());
|
||||
if (object == null) {
|
||||
return false;
|
||||
}
|
||||
new CounterTargetEffect().apply(game, source);
|
||||
int manaValue = object.getManaValue();
|
||||
if (manaValue <= 3) {
|
||||
new ProliferateEffect().apply(game, source);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -180,6 +180,7 @@ public final class PhyrexiaAllWillBeOne extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Ravenous Necrotitan", 106, Rarity.UNCOMMON, mage.cards.r.RavenousNecrotitan.class));
|
||||
cards.add(new SetCardInfo("Razorverge Thicket", 257, Rarity.RARE, mage.cards.r.RazorvergeThicket.class));
|
||||
cards.add(new SetCardInfo("Rebel Salvo", 144, Rarity.UNCOMMON, mage.cards.r.RebelSalvo.class));
|
||||
cards.add(new SetCardInfo("Reject Imperfection", 67, Rarity.UNCOMMON, mage.cards.r.RejectImperfection.class));
|
||||
cards.add(new SetCardInfo("Resistance Reunited", 31, Rarity.UNCOMMON, mage.cards.r.ResistanceReunited.class));
|
||||
cards.add(new SetCardInfo("Resistance Skywarden", 146, Rarity.UNCOMMON, mage.cards.r.ResistanceSkywarden.class));
|
||||
cards.add(new SetCardInfo("Ribskiff", 240, Rarity.UNCOMMON, mage.cards.r.Ribskiff.class));
|
||||
|
|
Loading…
Reference in a new issue