forked from External/mage
Implemented Kadena's Silencer
This commit is contained in:
parent
6a35a083ab
commit
9409cb2629
2 changed files with 76 additions and 0 deletions
75
Mage.Sets/src/mage/cards/k/KadenasSilencer.java
Normal file
75
Mage.Sets/src/mage/cards/k/KadenasSilencer.java
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
package mage.cards.k;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.MorphAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class KadenasSilencer extends CardImpl {
|
||||
|
||||
public KadenasSilencer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}");
|
||||
|
||||
this.subtype.add(SubType.NAGA);
|
||||
this.subtype.add(SubType.WIZARD);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// When Kadena's Silencer is turned face up, counter all abilities your opponents control.
|
||||
this.addAbility(new TurnedFaceUpSourceTriggeredAbility(new KadenasSilencerEffect()));
|
||||
|
||||
// Megamorph {1}{U}
|
||||
this.addAbility(new MorphAbility(this, new ManaCostsImpl("{1}{U}"), true));
|
||||
}
|
||||
|
||||
private KadenasSilencer(final KadenasSilencer card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KadenasSilencer copy() {
|
||||
return new KadenasSilencer(this);
|
||||
}
|
||||
}
|
||||
|
||||
class KadenasSilencerEffect extends OneShotEffect {
|
||||
|
||||
KadenasSilencerEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "counter all abilities your opponents control.";
|
||||
}
|
||||
|
||||
private KadenasSilencerEffect(final KadenasSilencerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KadenasSilencerEffect copy() {
|
||||
return new KadenasSilencerEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Set<UUID> opps = game.getOpponents(source.getControllerId());
|
||||
game.getStack()
|
||||
.stream()
|
||||
.filter(stackObject -> stackObject instanceof Ability)
|
||||
.filter(stackObject -> opps.contains(stackObject.getControllerId()))
|
||||
.forEach(stackObject -> game.getStack().counter(stackObject.getId(), source.getSourceId(), game));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -22,6 +22,7 @@ public final class Commander2019Edition extends ExpansionSet {
|
|||
|
||||
cards.add(new SetCardInfo("Anje's Ravager", 22, Rarity.RARE, mage.cards.a.AnjesRavager.class));
|
||||
cards.add(new SetCardInfo("Ghired, Conclave Exile", 42, Rarity.MYTHIC, mage.cards.g.GhiredConclaveExile.class));
|
||||
cards.add(new SetCardInfo("Kadena's Silencer", 8, Rarity.RARE, mage.cards.k.KadenasSilencer.class));
|
||||
cards.add(new SetCardInfo("Seedborn Muse", 179, Rarity.RARE, mage.cards.s.SeedbornMuse.class));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue