- Added Lim-Dul's Cohort and Mind Whip.

This commit is contained in:
Jeff 2018-12-31 14:05:46 -06:00
parent 43d305a4b1
commit dad4ce3312
4 changed files with 147 additions and 0 deletions

View file

@ -0,0 +1,45 @@
package mage.cards.l;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.BlocksOrBecomesBlockedTriggeredAbility;
import mage.abilities.effects.common.CantBeRegeneratedTargetEffect;
import mage.constants.SubType;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.filter.common.FilterCreaturePermanent;
/**
*
* @author jeffwadsworth
*/
public final class LimDulsCohort extends CardImpl {
public LimDulsCohort(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{B}");
this.subtype.add(SubType.ZOMBIE);
this.power = new MageInt(2);
this.toughness = new MageInt(3);
// Whenever Lim-Dûl's Cohort blocks or becomes blocked by a creature, that creature can't be regenerated this turn.
this.addAbility(new BlocksOrBecomesBlockedTriggeredAbility(
new CantBeRegeneratedTargetEffect(Duration.EndOfTurn),
new FilterCreaturePermanent(),
false,
"Whenever {this} blocks or becomes blocked by a creature, that creature can't be regenerated this turn.",
true));
}
private LimDulsCohort(final LimDulsCohort card) {
super(card);
}
@Override
public LimDulsCohort copy() {
return new LimDulsCohort(this);
}
}

View file

@ -0,0 +1,99 @@
package mage.cards.m;
import java.util.UUID;
import mage.constants.SubType;
import mage.target.common.TargetCreaturePermanent;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.DoUnlessTargetPlayerOrTargetsControllerPaysEffect;
import mage.constants.Outcome;
import mage.target.TargetPermanent;
import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.TargetController;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.targetpointer.FixedTarget;
/**
*
* @author jeffwadsworth
*/
public final class MindWhip extends CardImpl {
public MindWhip(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}{B}");
this.subtype.add(SubType.AURA);
// Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent();
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
Ability ability = new EnchantAbility(auraTarget.getTargetName());
this.addAbility(ability);
// At the beginning of the upkeep of enchanted creature's controller, that player may pay {3}. If he or she doesn't, Mind Whip deals 2 damage to that player and you tap that creature.
Effect effect = new DoUnlessTargetPlayerOrTargetsControllerPaysEffect(new MindWhipEffect(),
new ManaCostsImpl("{3}"),
"");
effect.setText("that player may pay {3}. If he or she doesn't, {this} deals 2 damage to that player and you tap that creature.");
this.addAbility(new BeginningOfUpkeepTriggeredAbility(
effect,
TargetController.CONTROLLER_ATTACHED_TO, false));
}
private MindWhip(final MindWhip card) {
super(card);
}
@Override
public MindWhip copy() {
return new MindWhip(this);
}
}
class MindWhipEffect extends OneShotEffect {
public MindWhipEffect() {
super(Outcome.Neutral);
staticText = "";
}
public MindWhipEffect(final MindWhipEffect effect) {
super(effect);
}
@Override
public boolean apply(Game game, Ability source) {
Player controllerOfEnchantedCreature = game.getPlayer(targetPointer.getFirst(game, source));
Permanent mindWhip = game.getPermanent(source.getSourceId());
if (controllerOfEnchantedCreature != null
&& mindWhip != null) {
Permanent enchantedCreature = game.getPermanent(mindWhip.getAttachedTo());
if (enchantedCreature != null) {
Effect effect = new DamageTargetEffect(2);
effect.setTargetPointer(new FixedTarget(controllerOfEnchantedCreature.getId()));
effect.apply(game, source);
enchantedCreature.tap(game);
return true;
}
}
return false;
}
@Override
public MindWhipEffect copy() {
return new MindWhipEffect(this);
}
}

View file

@ -205,6 +205,7 @@ public final class IceAge extends ExpansionSet {
cards.add(new SetCardInfo("Leshrac's Sigil", 144, Rarity.UNCOMMON, mage.cards.l.LeshracsSigil.class));
cards.add(new SetCardInfo("Lhurgoyf", 252, Rarity.RARE, mage.cards.l.Lhurgoyf.class));
cards.add(new SetCardInfo("Lightning Blow", 42, Rarity.RARE, mage.cards.l.LightningBlow.class));
cards.add(new SetCardInfo("Lim-Dul's Cohort", 145, Rarity.COMMON, mage.cards.l.LimDulsCohort.class));
cards.add(new SetCardInfo("Lim-Dul's Hex", 146, Rarity.UNCOMMON, mage.cards.l.LimDulsHex.class));
cards.add(new SetCardInfo("Lure", 253, Rarity.UNCOMMON, mage.cards.l.Lure.class));
cards.add(new SetCardInfo("Magus of the Unseen", 82, Rarity.RARE, mage.cards.m.MagusOfTheUnseen.class));
@ -217,6 +218,7 @@ public final class IceAge extends ExpansionSet {
cards.add(new SetCardInfo("Meteor Shower", 202, Rarity.COMMON, mage.cards.m.MeteorShower.class));
cards.add(new SetCardInfo("Mind Ravel", 147, Rarity.COMMON, mage.cards.m.MindRavel.class));
cards.add(new SetCardInfo("Mind Warp", 148, Rarity.UNCOMMON, mage.cards.m.MindWarp.class));
cards.add(new SetCardInfo("Mind Whip", 149, Rarity.RARE, mage.cards.m.MindWhip.class));
cards.add(new SetCardInfo("Minion of Leshrac", 150, Rarity.RARE, mage.cards.m.MinionOfLeshrac.class));
cards.add(new SetCardInfo("Minion of Tevesh Szat", 151, Rarity.RARE, mage.cards.m.MinionOfTeveshSzat.class));
cards.add(new SetCardInfo("Mistfolk", 84, Rarity.COMMON, mage.cards.m.Mistfolk.class));

View file

@ -169,6 +169,7 @@ public final class MastersEditionIV extends ExpansionSet {
cards.add(new SetCardInfo("Library of Leng", 211, Rarity.COMMON, mage.cards.l.LibraryOfLeng.class));
cards.add(new SetCardInfo("Lich", 89, Rarity.RARE, mage.cards.l.Lich.class));
cards.add(new SetCardInfo("Lifeforce", 160, Rarity.RARE, mage.cards.l.Lifeforce.class));
cards.add(new SetCardInfo("Lim-Dul's Cohort", 90, Rarity.COMMON, mage.cards.l.LimDulsCohort.class));
cards.add(new SetCardInfo("Living Lands", 161, Rarity.RARE, mage.cards.l.LivingLands.class));
cards.add(new SetCardInfo("Living Wall", 212, Rarity.UNCOMMON, mage.cards.l.LivingWall.class));
cards.add(new SetCardInfo("Mahamoti Djinn", 52, Rarity.RARE, mage.cards.m.MahamotiDjinn.class));