mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
[ONE] Implement Serum Snare (#10002)
This commit is contained in:
parent
6cf239f63e
commit
f66644994f
2 changed files with 69 additions and 0 deletions
68
Mage.Sets/src/mage/cards/s/SerumSnare.java
Normal file
68
Mage.Sets/src/mage/cards/s/SerumSnare.java
Normal file
|
@ -0,0 +1,68 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CounterTargetEffect;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
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 mage.target.common.TargetNonlandPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class SerumSnare extends CardImpl {
|
||||
public SerumSnare(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
|
||||
|
||||
//Return target nonland permanent to its owner’s hand. If that permanent had mana value 3 or less, proliferate.
|
||||
this.getSpellAbility().addEffect(new SerumSnareEffect());
|
||||
this.getSpellAbility().addTarget(new TargetNonlandPermanent());
|
||||
}
|
||||
|
||||
private SerumSnare(final SerumSnare card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SerumSnare copy() {
|
||||
return new SerumSnare(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SerumSnareEffect extends OneShotEffect {
|
||||
|
||||
public SerumSnareEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "Return target nonland permanent to its owner's hand. If that permanent had mana value 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 SerumSnareEffect(final SerumSnareEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SerumSnareEffect copy() {
|
||||
return new SerumSnareEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
MageObject object = game.getObject(source.getFirstTarget());
|
||||
if (object == null) {
|
||||
return false;
|
||||
}
|
||||
new ReturnToHandTargetEffect().apply(game, source);
|
||||
int manaValue = object.getManaValue();
|
||||
if (manaValue <= 3) {
|
||||
new ProliferateEffect().apply(game, source);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -188,6 +188,7 @@ public final class PhyrexiaAllWillBeOne extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Sawblade Scamp", 147, Rarity.COMMON, mage.cards.s.SawbladeScamp.class));
|
||||
cards.add(new SetCardInfo("Scheming Aspirant", 107, Rarity.UNCOMMON, mage.cards.s.SchemingAspirant.class));
|
||||
cards.add(new SetCardInfo("Seachrome Coast", 258, Rarity.RARE, mage.cards.s.SeachromeCoast.class));
|
||||
cards.add(new SetCardInfo("Serum Snare", 68, Rarity.UNCOMMON, mage.cards.s.SerumSnare.class));
|
||||
cards.add(new SetCardInfo("Serum Sovereign", 405, Rarity.RARE, mage.cards.s.SerumSovereign.class));
|
||||
cards.add(new SetCardInfo("Sheoldred's Edict", 108, Rarity.UNCOMMON, mage.cards.s.SheoldredsEdict.class));
|
||||
cards.add(new SetCardInfo("Sheoldred's Headcleaver", 109, Rarity.COMMON, mage.cards.s.SheoldredsHeadcleaver.class));
|
||||
|
|
Loading…
Reference in a new issue