mirror of
https://github.com/magefree/mage.git
synced 2026-01-25 20:59:14 -08:00
Implemented Nikya of the Old Ways
This commit is contained in:
parent
32b800d99e
commit
d70743d4a5
2 changed files with 89 additions and 0 deletions
88
Mage.Sets/src/mage/cards/n/NikyaOfTheOldWays.java
Normal file
88
Mage.Sets/src/mage/cards/n/NikyaOfTheOldWays.java
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
package mage.cards.n;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.common.TapForManaAllTriggeredManaAbility;
|
||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||
import mage.abilities.effects.mana.AddManaOfAnyTypeProducedEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class NikyaOfTheOldWays extends CardImpl {
|
||||
|
||||
public NikyaOfTheOldWays(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{G}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.CENTAUR);
|
||||
this.subtype.add(SubType.DRUID);
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// You can't cast noncreature spells.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.BATTLEFIELD, new NikyaOfTheOldWaysCantCastEffect()
|
||||
));
|
||||
|
||||
// Whenever you tap a land for mana, add one mana of any type that land produced.
|
||||
AddManaOfAnyTypeProducedEffect effect = new AddManaOfAnyTypeProducedEffect();
|
||||
effect.setText("add one mana of any type that land produced");
|
||||
this.addAbility(new TapForManaAllTriggeredManaAbility(
|
||||
effect,
|
||||
new FilterControlledLandPermanent("you tap a land"),
|
||||
SetTargetPointer.PERMANENT)
|
||||
);
|
||||
}
|
||||
|
||||
private NikyaOfTheOldWays(final NikyaOfTheOldWays card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NikyaOfTheOldWays copy() {
|
||||
return new NikyaOfTheOldWays(this);
|
||||
}
|
||||
}
|
||||
|
||||
class NikyaOfTheOldWaysCantCastEffect extends ContinuousRuleModifyingEffectImpl {
|
||||
|
||||
NikyaOfTheOldWaysCantCastEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Detriment);
|
||||
staticText = "You can't cast noncreature spells";
|
||||
}
|
||||
|
||||
private NikyaOfTheOldWaysCantCastEffect(final NikyaOfTheOldWaysCantCastEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NikyaOfTheOldWaysCantCastEffect copy() {
|
||||
return new NikyaOfTheOldWaysCantCastEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.CAST_SPELL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (event.getPlayerId().equals(source.getControllerId())) {
|
||||
Card card = game.getCard(event.getSourceId());
|
||||
return card != null && !card.isCreature();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -92,6 +92,7 @@ public final class RavnicaAllegiance extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Mesmerizing Benthid", 43, Rarity.MYTHIC, mage.cards.m.MesmerizingBenthid.class));
|
||||
cards.add(new SetCardInfo("Ministrant of Obligation", 16, Rarity.UNCOMMON, mage.cards.m.MinistrantOfObligation.class));
|
||||
cards.add(new SetCardInfo("Mortify", 192, Rarity.UNCOMMON, mage.cards.m.Mortify.class));
|
||||
cards.add(new SetCardInfo("Nikya of the Old Ways", 193, Rarity.RARE, mage.cards.n.NikyaOfTheOldWays.class));
|
||||
cards.add(new SetCardInfo("Orzhov Guildgate", 252, Rarity.COMMON, mage.cards.o.OrzhovGuildgate.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Orzhov Guildgate", 253, Rarity.COMMON, mage.cards.o.OrzhovGuildgate.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Orzhov Locket", 236, Rarity.COMMON, mage.cards.o.OrzhovLocket.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue