mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
[NEC] Implemented Silkguard
This commit is contained in:
parent
38700469b0
commit
dc642adc74
2 changed files with 75 additions and 0 deletions
74
Mage.Sets/src/mage/cards/s/Silkguard.java
Normal file
74
Mage.Sets/src/mage/cards/s/Silkguard.java
Normal file
|
@ -0,0 +1,74 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.abilities.keyword.HexproofAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.permanent.ModifiedPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.targetadjustment.TargetAdjuster;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class Silkguard extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterControlledPermanent("Auras, Equipment, and modified creatures you control");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
SubType.AURA.getPredicate(),
|
||||
SubType.EQUIPMENT.getPredicate(),
|
||||
Predicates.and(
|
||||
ModifiedPredicate.instance,
|
||||
CardType.CREATURE.getPredicate()
|
||||
)
|
||||
));
|
||||
}
|
||||
|
||||
public Silkguard(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{G}");
|
||||
|
||||
// Put a +1/+1 counter on each of up to X target creatures you control.
|
||||
this.getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.P1P1.createInstance())
|
||||
.setText("put a +1/+1 counter on each of up to X target creatures you control"));
|
||||
this.getSpellAbility().setTargetAdjuster(SilkguardAdjuster.instance);
|
||||
|
||||
// Auras, Equipment, and modified creatures you control gain hexproof until end of turn.
|
||||
this.getSpellAbility().addEffect(new GainAbilityControlledEffect(
|
||||
HexproofAbility.getInstance(), Duration.EndOfTurn, filter
|
||||
));
|
||||
}
|
||||
|
||||
private Silkguard(final Silkguard card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Silkguard copy() {
|
||||
return new Silkguard(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum SilkguardAdjuster implements TargetAdjuster {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public void adjustTargets(Ability ability, Game game) {
|
||||
ability.getTargets().clear();
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(0, ability.getManaCostsToPay().getX()));
|
||||
}
|
||||
}
|
|
@ -114,6 +114,7 @@ public final class NeonDynastyCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Shifting Shadow", 109, Rarity.RARE, mage.cards.s.ShiftingShadow.class));
|
||||
cards.add(new SetCardInfo("Shimmer Myr", 157, Rarity.UNCOMMON, mage.cards.s.ShimmerMyr.class));
|
||||
cards.add(new SetCardInfo("Shorikai, Genesis Engine", 4, Rarity.MYTHIC, mage.cards.s.ShorikaiGenesisEngine.class));
|
||||
cards.add(new SetCardInfo("Silkguard", 29, Rarity.RARE, mage.cards.s.Silkguard.class));
|
||||
cards.add(new SetCardInfo("Silver Myr", 158, Rarity.COMMON, mage.cards.s.SilverMyr.class));
|
||||
cards.add(new SetCardInfo("Skycloud Expanse", 177, Rarity.RARE, mage.cards.s.SkycloudExpanse.class));
|
||||
cards.add(new SetCardInfo("Skysovereign, Consul Flagship", 159, Rarity.MYTHIC, mage.cards.s.SkysovereignConsulFlagship.class));
|
||||
|
|
Loading…
Reference in a new issue