mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Implemented Ionize
This commit is contained in:
parent
09f41d9b6a
commit
95cbde5907
2 changed files with 64 additions and 0 deletions
63
Mage.Sets/src/mage/cards/i/Ionize.java
Normal file
63
Mage.Sets/src/mage/cards/i/Ionize.java
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
package mage.cards.i;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.CounterTargetEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class Ionize extends CardImpl {
|
||||||
|
|
||||||
|
public Ionize(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}{R}");
|
||||||
|
|
||||||
|
// Counter target spell. Ionize deals 2 damage to that spell's controller.
|
||||||
|
this.getSpellAbility().addEffect(new IonizeEffect());
|
||||||
|
}
|
||||||
|
|
||||||
|
public Ionize(final Ionize card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Ionize copy() {
|
||||||
|
return new Ionize(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class IonizeEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
public IonizeEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
this.staticText = "Counter target spell. "
|
||||||
|
+ "{this} deals 2 damage to that spell's controller.";
|
||||||
|
}
|
||||||
|
|
||||||
|
public IonizeEffect(final IonizeEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IonizeEffect copy() {
|
||||||
|
return new IonizeEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player player = game.getPlayer(game.getControllerId(source.getSourceId()));
|
||||||
|
new CounterTargetEffect().apply(game, source);
|
||||||
|
if (player == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return player.damage(2, source.getSourceId(), game, false, true) > 0;
|
||||||
|
}
|
||||||
|
}
|
|
@ -53,6 +53,7 @@ public final class GuildsOfRavnica extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Healer's Hawk", 14, Rarity.COMMON, mage.cards.h.HealersHawk.class));
|
cards.add(new SetCardInfo("Healer's Hawk", 14, Rarity.COMMON, mage.cards.h.HealersHawk.class));
|
||||||
cards.add(new SetCardInfo("Hypothesizzle", 178, Rarity.COMMON, mage.cards.h.Hypothesizzle.class));
|
cards.add(new SetCardInfo("Hypothesizzle", 178, Rarity.COMMON, mage.cards.h.Hypothesizzle.class));
|
||||||
cards.add(new SetCardInfo("Impervious Greatwurm", 273, Rarity.MYTHIC, mage.cards.i.ImperviousGreatwurm.class));
|
cards.add(new SetCardInfo("Impervious Greatwurm", 273, Rarity.MYTHIC, mage.cards.i.ImperviousGreatwurm.class));
|
||||||
|
cards.add(new SetCardInfo("Ionize", 179, Rarity.RARE, mage.cards.i.Ionize.class));
|
||||||
cards.add(new SetCardInfo("Island", 261, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Island", 261, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));
|
||||||
cards.add(new SetCardInfo("Izoni, Thousand-Eyed", 180, Rarity.RARE, mage.cards.i.IzoniThousandEyed.class));
|
cards.add(new SetCardInfo("Izoni, Thousand-Eyed", 180, Rarity.RARE, mage.cards.i.IzoniThousandEyed.class));
|
||||||
cards.add(new SetCardInfo("Izzet Guildgate", 251, Rarity.COMMON, mage.cards.i.IzzetGuildgate.class));
|
cards.add(new SetCardInfo("Izzet Guildgate", 251, Rarity.COMMON, mage.cards.i.IzzetGuildgate.class));
|
||||||
|
|
Loading…
Reference in a new issue