mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
[ZNR] Implemented Nahiri's Binding
This commit is contained in:
parent
204418a8fd
commit
21454f9b58
4 changed files with 68 additions and 2 deletions
47
Mage.Sets/src/mage/cards/n/NahirisBinding.java
Normal file
47
Mage.Sets/src/mage/cards/n/NahirisBinding.java
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
package mage.cards.n;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.combat.CantBlockAttackActivateAttachedEffect;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
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 NahirisBinding extends CardImpl {
|
||||
|
||||
public NahirisBinding(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}{W}");
|
||||
|
||||
this.subtype.add(SubType.AURA);
|
||||
|
||||
// Enchant creature or planeswalker
|
||||
TargetPermanent auraTarget = new TargetPermanent(StaticFilters.FILTER_PERMANENT_CREATURE_OR_PLANESWALKER);
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
|
||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Enchanted permanent can't attack or block, and its activated abilities can't be activated.
|
||||
this.addAbility(new SimpleStaticAbility(new CantBlockAttackActivateAttachedEffect("permanent")));
|
||||
}
|
||||
|
||||
private NahirisBinding(final NahirisBinding card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NahirisBinding copy() {
|
||||
return new NahirisBinding(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -215,6 +215,7 @@ public final class ZendikarRising extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Murasa Rootgrazer", 229, Rarity.UNCOMMON, mage.cards.m.MurasaRootgrazer.class));
|
||||
cards.add(new SetCardInfo("Murasa Sproutling", 196, Rarity.UNCOMMON, mage.cards.m.MurasaSproutling.class));
|
||||
cards.add(new SetCardInfo("Murkwater Pathway", 260, Rarity.RARE, mage.cards.m.MurkwaterPathway.class));
|
||||
cards.add(new SetCardInfo("Nahiri's Binding", 29, Rarity.COMMON, mage.cards.n.NahirisBinding.class));
|
||||
cards.add(new SetCardInfo("Nahiri's Lithoforming", 151, Rarity.RARE, mage.cards.n.NahirisLithoforming.class));
|
||||
cards.add(new SetCardInfo("Nahiri, Heir of the Ancients", 230, Rarity.MYTHIC, mage.cards.n.NahiriHeirOfTheAncients.class));
|
||||
cards.add(new SetCardInfo("Needleverge Pathway", 263, Rarity.RARE, mage.cards.n.NeedlevergePathway.class));
|
||||
|
|
|
|||
|
|
@ -12,8 +12,12 @@ import mage.game.permanent.Permanent;
|
|||
public class CantBlockAttackActivateAttachedEffect extends RestrictionEffect {
|
||||
|
||||
public CantBlockAttackActivateAttachedEffect() {
|
||||
this("creature");
|
||||
}
|
||||
|
||||
public CantBlockAttackActivateAttachedEffect(String enchantedName) {
|
||||
super(Duration.WhileOnBattlefield);
|
||||
staticText = "Enchanted creature can't attack or block, and its activated abilities can't be activated";
|
||||
staticText = "Enchanted " + enchantedName + " can't attack or block, and its activated abilities can't be activated";
|
||||
}
|
||||
|
||||
public CantBlockAttackActivateAttachedEffect(final CantBlockAttackActivateAttachedEffect effect) {
|
||||
|
|
|
|||
|
|
@ -441,10 +441,24 @@ public final class StaticFilters {
|
|||
|
||||
static {
|
||||
FILTER_PERMANENT_CREATURE_OR_PLANESWALKER_A.add(
|
||||
Predicates.or(CardType.CREATURE.getPredicate(), CardType.PLANESWALKER.getPredicate()));
|
||||
Predicates.or(
|
||||
CardType.CREATURE.getPredicate(),
|
||||
CardType.PLANESWALKER.getPredicate()
|
||||
));
|
||||
FILTER_PERMANENT_CREATURE_OR_PLANESWALKER_A.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterPermanent FILTER_PERMANENT_CREATURE_OR_PLANESWALKER = new FilterPermanent("creature or planeswalker");
|
||||
|
||||
static {
|
||||
FILTER_PERMANENT_CREATURE_OR_PLANESWALKER.add(
|
||||
Predicates.or(
|
||||
CardType.CREATURE.getPredicate(),
|
||||
CardType.PLANESWALKER.getPredicate()
|
||||
));
|
||||
FILTER_PERMANENT_CREATURE_OR_PLANESWALKER.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterCreaturePermanent FILTER_PERMANENT_A_CREATURE = new FilterCreaturePermanent("a creature");
|
||||
|
||||
static {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue