forked from External/mage
[PIP] Implement Electrosiphon (#11964)
This commit is contained in:
parent
57a1e9ae08
commit
35bec7102c
2 changed files with 70 additions and 0 deletions
66
Mage.Sets/src/mage/cards/e/Electrosiphon.java
Normal file
66
Mage.Sets/src/mage/cards/e/Electrosiphon.java
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
package mage.cards.e;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.target.TargetSpell;
|
||||
|
||||
/**
|
||||
* @author Cguy7777
|
||||
*/
|
||||
public final class Electrosiphon extends CardImpl {
|
||||
|
||||
public Electrosiphon(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}{U}{R}");
|
||||
|
||||
// Counter target spell. You get an amount of {E} equal to its mana value.
|
||||
this.getSpellAbility().addTarget(new TargetSpell());
|
||||
this.getSpellAbility().addEffect(new ElectrosiphonEffect());
|
||||
}
|
||||
|
||||
private Electrosiphon(final Electrosiphon card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Electrosiphon copy() {
|
||||
return new Electrosiphon(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ElectrosiphonEffect extends OneShotEffect {
|
||||
|
||||
ElectrosiphonEffect() {
|
||||
super(Outcome.Detriment);
|
||||
this.staticText = "Counter target spell. You get an amount of {E} <i>(energy counters)</i> equal to its mana value";
|
||||
}
|
||||
|
||||
private ElectrosiphonEffect(final ElectrosiphonEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Spell spell = game.getStack().getSpell(getTargetPointer().getFirst(game, source));
|
||||
if (spell == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
game.getStack().counter(spell.getId(), source, game);
|
||||
new GetEnergyCountersControllerEffect(spell.getManaValue()).apply(game, source);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ElectrosiphonEffect copy() {
|
||||
return new ElectrosiphonEffect(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -89,6 +89,10 @@ public final class Fallout extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Dr. Madison Li", 3, Rarity.MYTHIC, mage.cards.d.DrMadisonLi.class));
|
||||
cards.add(new SetCardInfo("Dragonskull Summit", 261, Rarity.RARE, mage.cards.d.DragonskullSummit.class));
|
||||
cards.add(new SetCardInfo("Drowned Catacomb", 262, Rarity.RARE, mage.cards.d.DrownedCatacomb.class));
|
||||
cards.add(new SetCardInfo("Electrosiphon", 104, Rarity.RARE, mage.cards.e.Electrosiphon.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Electrosiphon", 414, Rarity.RARE, mage.cards.e.Electrosiphon.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Electrosiphon", 632, Rarity.RARE, mage.cards.e.Electrosiphon.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Electrosiphon", 942, Rarity.RARE, mage.cards.e.Electrosiphon.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Entrapment Maneuver", 160, Rarity.RARE, mage.cards.e.EntrapmentManeuver.class));
|
||||
cards.add(new SetCardInfo("Everflowing Chalice", 230, Rarity.UNCOMMON, mage.cards.e.EverflowingChalice.class));
|
||||
cards.add(new SetCardInfo("Evolving Wilds", 263, Rarity.COMMON, mage.cards.e.EvolvingWilds.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue