mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
[NEO] Implemented Short Circuit
This commit is contained in:
parent
9e7b5cb040
commit
6d03ba601e
2 changed files with 68 additions and 0 deletions
67
Mage.Sets/src/mage/cards/s/ShortCircuit.java
Normal file
67
Mage.Sets/src/mage/cards/s/ShortCircuit.java
Normal file
|
@ -0,0 +1,67 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.AttachedToMatchesFilterCondition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||
import mage.abilities.effects.common.continuous.LoseAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.abilities.keyword.FlashAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AttachmentType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ShortCircuit extends CardImpl {
|
||||
|
||||
private static final Condition condition = new AttachedToMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_CREATURE);
|
||||
|
||||
public ShortCircuit(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}");
|
||||
|
||||
this.subtype.add(SubType.AURA);
|
||||
|
||||
// Flash
|
||||
this.addAbility(FlashAbility.getInstance());
|
||||
|
||||
// Enchant artifact or creature
|
||||
TargetPermanent auraTarget = new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_CREATURE);
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
|
||||
this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
|
||||
|
||||
// As long as enchanted permanent is a creature, it gets -3/-0 and loses flying.
|
||||
Ability ability = new SimpleStaticAbility(new ConditionalContinuousEffect(
|
||||
new BoostEnchantedEffect(-3, 0), condition,
|
||||
"as long as enchanted permanent is a creature, it gets -3/-0"
|
||||
));
|
||||
ability.addEffect(new ConditionalContinuousEffect(
|
||||
new LoseAbilityAttachedEffect(
|
||||
FlyingAbility.getInstance(), AttachmentType.AURA
|
||||
), condition, "and loses flying"
|
||||
));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private ShortCircuit(final ShortCircuit card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ShortCircuit copy() {
|
||||
return new ShortCircuit(this);
|
||||
}
|
||||
}
|
|
@ -183,6 +183,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Season of Renewal", 205, Rarity.COMMON, mage.cards.s.SeasonOfRenewal.class));
|
||||
cards.add(new SetCardInfo("Seshiro's Living Legacy", 210, Rarity.COMMON, mage.cards.s.SeshirosLivingLegacy.class));
|
||||
cards.add(new SetCardInfo("Seven-Tail Mentor", 36, Rarity.COMMON, mage.cards.s.SevenTailMentor.class));
|
||||
cards.add(new SetCardInfo("Short Circuit", 78, Rarity.COMMON, mage.cards.s.ShortCircuit.class));
|
||||
cards.add(new SetCardInfo("Siba Trespassers", 77, Rarity.COMMON, mage.cards.s.SibaTrespassers.class));
|
||||
cards.add(new SetCardInfo("Silver-Fur Master", 236, Rarity.UNCOMMON, mage.cards.s.SilverFurMaster.class));
|
||||
cards.add(new SetCardInfo("Sky-Blessed Samurai", 37, Rarity.UNCOMMON, mage.cards.s.SkyBlessedSamurai.class));
|
||||
|
|
Loading…
Reference in a new issue