forked from External/mage
Made some targets required. Added message to replacement effect of Cavern of Soul to inform player being not able to counter.
This commit is contained in:
parent
94d8ff554f
commit
4fec6e4d7b
19 changed files with 53 additions and 32 deletions
|
|
@ -67,7 +67,7 @@ public class AvenMimeomancer extends CardImpl<AvenMimeomancer> {
|
|||
|
||||
// At the beginning of your upkeep, you may put a feather counter on target creature. If you do, that creature is 3/1 and has flying for as long as it has a feather counter on it.
|
||||
Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.FEATHER.createInstance()), TargetController.YOU, true);
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
ability.addTarget(new TargetCreaturePermanent(true));
|
||||
ability.addEffect(new AvenEffect());
|
||||
ability.addEffect(new AvenEffect2());
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ public class BituminousBlast extends CardImpl<BituminousBlast> {
|
|||
this.expansionSetCode = "ARB";
|
||||
this.color.setBlack(true);
|
||||
this.color.setRed(true);
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(true));
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(4));
|
||||
this.addAbility(new CascadeAbility());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public class ColossalMight extends CardImpl<ColossalMight> {
|
|||
this.expansionSetCode = "ARB";
|
||||
this.color.setRed(true);
|
||||
this.color.setGreen(true);
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(true));
|
||||
this.getSpellAbility().addEffect(new BoostTargetEffect(4, 2, Duration.EndOfTurn));
|
||||
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ public class Crystallization extends CardImpl<Crystallization> {
|
|||
this.color.setWhite(true);
|
||||
|
||||
// Enchant creature
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent(true);
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public class DemonicDread extends CardImpl<DemonicDread> {
|
|||
this.addAbility(new CascadeAbility());
|
||||
|
||||
// Target creature can't block this turn.
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(true));
|
||||
this.getSpellAbility().addEffect(new CantBlockTargetEffect(Duration.EndOfTurn));
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ public class GiantAmbushBeetle extends CardImpl<GiantAmbushBeetle> {
|
|||
|
||||
// When Giant Ambush Beetle enters the battlefield, you may have target creature block it this turn if able.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new MustBeBlockedByTargetSourceEffect(Duration.EndOfTurn), true);
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
ability.addTarget(new TargetCreaturePermanent(true));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public class IntimidationBolt extends CardImpl<IntimidationBolt> {
|
|||
// Intimidation Bolt deals 3 damage to target creature. Other creatures can't attack this turn.
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(3));
|
||||
this.getSpellAbility().addEffect(new IntimidationEffect(Duration.EndOfTurn));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(true));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public class MagefireWings extends CardImpl<MagefireWings> {
|
|||
this.color.setBlue(true);
|
||||
this.color.setRed(true);
|
||||
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent(true);
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
|
|
|
|||
|
|
@ -62,8 +62,8 @@ public class NayaSojourners extends CardImpl<NayaSojourners> {
|
|||
// When you cycle Naya Sojourners or it dies, you may put a +1/+1 counter on target creature.
|
||||
Ability ability1 = new CycleTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()));
|
||||
Ability ability2 = new DiesTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()));
|
||||
ability1.addTarget(new TargetCreaturePermanent());
|
||||
ability2.addTarget(new TargetCreaturePermanent());
|
||||
ability1.addTarget(new TargetCreaturePermanent(true));
|
||||
ability2.addTarget(new TargetCreaturePermanent(true));
|
||||
this.addAbility(ability1);
|
||||
this.addAbility(ability2);
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public class SangriteBacklash extends CardImpl<SangriteBacklash> {
|
|||
this.color.setBlack(true);
|
||||
|
||||
// Enchant creature
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent(true);
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ public class SigilOfTheNayanGods extends CardImpl<SigilOfTheNayanGods> {
|
|||
this.color.setGreen(true);
|
||||
this.color.setWhite(true);
|
||||
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent(true);
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
|
||||
this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ public class SlaveOfBolas extends CardImpl<SlaveOfBolas> {
|
|||
this.getSpellAbility().addEffect(new UntapTargetEffect());
|
||||
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn));
|
||||
this.getSpellAbility().addEffect(new SlaveOfBolasEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(true));
|
||||
}
|
||||
|
||||
public SlaveOfBolas(final SlaveOfBolas card) {
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public class StunSniper extends CardImpl<StunSniper> {
|
|||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new GenericManaCost(1));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addEffect(new TapTargetEffect());
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
ability.addTarget(new TargetCreaturePermanent(true));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,9 @@ public class Terminate extends CardImpl<Terminate> {
|
|||
this.expansionSetCode = "ARB";
|
||||
this.color.setBlack(true);
|
||||
this.color.setRed(true);
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
|
||||
// Destroy target creature. It can't be regenerated.
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(true));
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,8 +27,10 @@
|
|||
*/
|
||||
package mage.sets.avacynrestored;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.ConditionalMana;
|
||||
import mage.constants.*;
|
||||
import mage.MageObject;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -44,6 +46,12 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.repository.CardRepository;
|
||||
import mage.choices.Choice;
|
||||
import mage.choices.ChoiceImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.WatcherScope;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
|
@ -51,10 +59,6 @@ import mage.game.stack.Spell;
|
|||
import mage.players.Player;
|
||||
import mage.watchers.WatcherImpl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author noxx
|
||||
|
|
@ -226,6 +230,11 @@ class CavernOfSoulsCantCounterEffect extends ReplacementEffectImpl<CavernOfSouls
|
|||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
Player caster = game.getPlayer(event.getPlayerId());
|
||||
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||
if (caster != null) {
|
||||
game.informPlayer(caster, "This spell can't be countered because a colored mana from " + sourceObject.getName() + " was spent to cast it.");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,14 +28,14 @@
|
|||
package mage.sets.darkascension;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.DamageControllerEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -56,7 +56,7 @@ public class ForgeDevil extends CardImpl<ForgeDevil> {
|
|||
// When Forge Devil enters the battlefield, it deals 1 damage to target creature and 1 damage to you.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(1));
|
||||
ability.addEffect(new DamageControllerEffect(1));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
ability.addTarget(new TargetCreaturePermanent(true));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,14 +29,14 @@
|
|||
package mage.sets.mirrodinbesieged;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.abilities.keyword.InfectAbility;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
|
|
@ -63,9 +63,13 @@ public class PhyrexianCrusader extends CardImpl<PhyrexianCrusader> {
|
|||
this.color.setBlack(true);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// First strike,
|
||||
this.addAbility(FirstStrikeAbility.getInstance());
|
||||
// protection from red and from white
|
||||
this.addAbility(new ProtectionAbility(filter));
|
||||
this.addAbility(new ProtectionAbility(filter2));
|
||||
// Infect
|
||||
this.addAbility(InfectAbility.getInstance());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,14 +28,15 @@
|
|||
package mage.sets.planechase;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
|
||||
import mage.abilities.effects.common.ShuffleSpellEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetCardInGraveyard;
|
||||
|
||||
/**
|
||||
|
|
@ -43,7 +44,7 @@ import mage.target.common.TargetCardInGraveyard;
|
|||
* @author Loki
|
||||
*/
|
||||
public class BeaconOfUnrest extends CardImpl<BeaconOfUnrest> {
|
||||
private static final FilterCard filter = new FilterCard("artifact or creature");
|
||||
private static final FilterCard filter = new FilterCard("artifact or creature card from a graveyard");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
|
|
@ -60,7 +61,9 @@ public class BeaconOfUnrest extends CardImpl<BeaconOfUnrest> {
|
|||
// Put target artifact or creature card from a graveyard onto the battlefield under your control. Shuffle Beacon of Unrest into its owner's library.
|
||||
this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect());
|
||||
this.getSpellAbility().addEffect(ShuffleSpellEffect.getInstance());
|
||||
this.getSpellAbility().addTarget(new TargetCardInGraveyard(filter));
|
||||
Target target = new TargetCardInGraveyard(filter);
|
||||
target.setRequired(true);
|
||||
this.getSpellAbility().addTarget(target);
|
||||
}
|
||||
|
||||
public BeaconOfUnrest(final BeaconOfUnrest card) {
|
||||
|
|
|
|||
|
|
@ -71,8 +71,11 @@ public class ShuffleSpellEffect extends PostResolveEffect<ShuffleSpellEffect> im
|
|||
|
||||
@Override
|
||||
public void postResolve(Card card, Ability source, UUID controllerId, Game game) {
|
||||
card.moveToZone(Zone.LIBRARY, source.getId(), game, false);
|
||||
Player player = game.getPlayer(card.getOwnerId());
|
||||
if (player != null) player.shuffleLibrary(game);
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Player owner = game.getPlayer(card.getOwnerId());
|
||||
if (controller != null && owner != null) {
|
||||
controller.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.STACK, true, true);
|
||||
owner.shuffleLibrary(game);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue