mirror of
https://github.com/correl/mage.git
synced 2024-12-30 19:10:36 +00:00
Spectral Shield (ICE)
Spectral Shield (ME3) added.
This commit is contained in:
parent
3510ac0957
commit
302c3d3cc0
3 changed files with 98 additions and 1 deletions
95
Mage.Sets/src/mage/cards/s/SpectralShield.java
Normal file
95
Mage.Sets/src/mage/cards/s/SpectralShield.java
Normal file
|
@ -0,0 +1,95 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.CantBeTargetedAttachedEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author dragonfyre23
|
||||
* effect based on AntiMagicAura
|
||||
*/
|
||||
|
||||
public final class SpectralShield extends CardImpl {
|
||||
|
||||
public SpectralShield(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}{U}");
|
||||
this.subtype.add(SubType.AURA);
|
||||
|
||||
// Enchant creature
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Enchanted creature get's +0/+2
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(0,2, Duration.WhileOnBattlefield)));
|
||||
|
||||
// Enchanted creature can't be the target of spells and can't be enchanted by other Auras.
|
||||
CantBeTargetedAttachedEffect cantTargetEffect = new CantBeTargetedAttachedEffect(new FilterSpell("spells"), Duration.WhileOnBattlefield, AttachmentType.AURA, TargetController.ANY);
|
||||
Ability ability2 = new SimpleStaticAbility(Zone.BATTLEFIELD, cantTargetEffect);
|
||||
ability2.addEffect(new mage.cards.s.SpectralShieldRuleEffect());
|
||||
this.addAbility(ability2);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public SpectralShield(final mage.cards.s.SpectralShield card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public mage.cards.s.SpectralShield copy() {
|
||||
return new mage.cards.s.SpectralShield(this);
|
||||
}
|
||||
}
|
||||
|
||||
// 9/25/2006 ruling: If Consecrate Land enters the battlefield attached to a land that's enchanted by other Auras, those Auras are put into their owners' graveyards.
|
||||
class SpectralShieldRuleEffect extends ContinuousRuleModifyingEffectImpl {
|
||||
|
||||
public SpectralShieldRuleEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Detriment);
|
||||
staticText = "and can't be enchanted by other Auras";
|
||||
}
|
||||
|
||||
public SpectralShieldRuleEffect(final mage.cards.s.SpectralShieldRuleEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public mage.cards.s.SpectralShieldRuleEffect copy() {
|
||||
return new mage.cards.s.SpectralShieldRuleEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.ATTACH || event.getType() == EventType.STAY_ATTACHED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
Permanent sourceObject = game.getPermanent(source.getSourceId());
|
||||
if (sourceObject != null && sourceObject.getAttachedTo() != null) {
|
||||
if (event.getTargetId().equals(sourceObject.getAttachedTo())) {
|
||||
return !event.getSourceId().equals(source.getSourceId());
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -319,6 +319,7 @@ public final class IceAge extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Soul Barrier", 103, Rarity.UNCOMMON, mage.cards.s.SoulBarrier.class));
|
||||
cards.add(new SetCardInfo("Soul Burn", 161, Rarity.COMMON, mage.cards.s.SoulBurn.class));
|
||||
cards.add(new SetCardInfo("Soul Kiss", 162, Rarity.COMMON, mage.cards.s.SoulKiss.class));
|
||||
cards.add(new SetCardInfo("Spectral Shield", 302, Rarity.UNCOMMON, mage.cards.s.SpectralShield.class));
|
||||
cards.add(new SetCardInfo("Spoils of Evil", 163, Rarity.RARE, mage.cards.s.SpoilsOfEvil.class));
|
||||
cards.add(new SetCardInfo("Staff of the Ages", 340, Rarity.RARE, mage.cards.s.StaffOfTheAges.class));
|
||||
cards.add(new SetCardInfo("Stampede", 265, Rarity.RARE, mage.cards.s.Stampede.class));
|
||||
|
|
|
@ -96,7 +96,7 @@ public final class MastersEditionIII extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Forest", 228, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Forest", 229, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Forest", 230, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Forked Lightning", 100, Rarity.UNCOMMON, mage.cards.f.ForkedLightning.class));
|
||||
cards.add(new SetCardInfo("Forked Lightning", 100, Rarity.UNCOMMON, mage.cards.f.ForkedLightning.class));
|
||||
cards.add(new SetCardInfo("Freyalise's Winds", 119, Rarity.RARE, mage.cards.f.FreyalisesWinds.class));
|
||||
cards.add(new SetCardInfo("Frost Giant", 101, Rarity.UNCOMMON, mage.cards.f.FrostGiant.class));
|
||||
cards.add(new SetCardInfo("Gabriel Angelfire", 148, Rarity.RARE, mage.cards.g.GabrielAngelfire.class));
|
||||
|
@ -201,6 +201,7 @@ public final class MastersEditionIII extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Slashing Tiger", 133, Rarity.COMMON, mage.cards.s.SlashingTiger.class));
|
||||
cards.add(new SetCardInfo("Sol Grail", 201, Rarity.COMMON, mage.cards.s.SolGrail.class));
|
||||
cards.add(new SetCardInfo("Sorrow's Path", 211, Rarity.RARE, mage.cards.s.SorrowsPath.class));
|
||||
cards.add(new SetCardInfo("Spectral Shield", 176, Rarity.UNCOMMON, mage.cards.s.SpectralShield.class));
|
||||
cards.add(new SetCardInfo("Spirit Shackle", 74, Rarity.COMMON, mage.cards.s.SpiritShackle.class));
|
||||
cards.add(new SetCardInfo("Spoils of Victory", 134, Rarity.COMMON, mage.cards.s.SpoilsOfVictory.class));
|
||||
cards.add(new SetCardInfo("Stangg", 177, Rarity.UNCOMMON, mage.cards.s.Stangg.class));
|
||||
|
|
Loading…
Reference in a new issue