mirror of
https://github.com/correl/mage.git
synced 2024-12-27 20:06:31 +00:00
Implemented Nyxbloom Ancient
This commit is contained in:
parent
f166bbc354
commit
ea229c9e0c
2 changed files with 103 additions and 0 deletions
102
Mage.Sets/src/mage/cards/n/NyxbloomAncient.java
Normal file
102
Mage.Sets/src/mage/cards/n/NyxbloomAncient.java
Normal file
|
@ -0,0 +1,102 @@
|
||||||
|
package mage.cards.n;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.Mana;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.effects.ReplacementEffectImpl;
|
||||||
|
import mage.abilities.keyword.TrampleAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.*;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.events.GameEvent;
|
||||||
|
import mage.game.events.ManaEvent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class NyxbloomAncient extends CardImpl {
|
||||||
|
|
||||||
|
public NyxbloomAncient(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{4}{G}{G}{G}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.ELEMENTAL);
|
||||||
|
this.power = new MageInt(5);
|
||||||
|
this.toughness = new MageInt(5);
|
||||||
|
|
||||||
|
// Trample
|
||||||
|
this.addAbility(TrampleAbility.getInstance());
|
||||||
|
|
||||||
|
// If you tap a permanent for mana, it produces three times as much of that mana instead.
|
||||||
|
this.addAbility(new SimpleStaticAbility(new NyxbloomAncientReplacementEffect()));
|
||||||
|
}
|
||||||
|
|
||||||
|
private NyxbloomAncient(final NyxbloomAncient card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public NyxbloomAncient copy() {
|
||||||
|
return new NyxbloomAncient(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class NyxbloomAncientReplacementEffect extends ReplacementEffectImpl {
|
||||||
|
|
||||||
|
NyxbloomAncientReplacementEffect() {
|
||||||
|
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||||
|
staticText = "If you tap a permanent for mana, it produces three times as much of that mana instead";
|
||||||
|
}
|
||||||
|
|
||||||
|
private NyxbloomAncientReplacementEffect(NyxbloomAncientReplacementEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||||
|
Mana mana = ((ManaEvent) event).getMana();
|
||||||
|
if (mana.getBlack() > 0) {
|
||||||
|
mana.set(ManaType.BLACK, mana.getBlack() * 3);
|
||||||
|
}
|
||||||
|
if (mana.getBlue() > 0) {
|
||||||
|
mana.set(ManaType.BLUE, mana.getBlue() * 3);
|
||||||
|
}
|
||||||
|
if (mana.getWhite() > 0) {
|
||||||
|
mana.set(ManaType.WHITE, mana.getWhite() * 3);
|
||||||
|
}
|
||||||
|
if (mana.getGreen() > 0) {
|
||||||
|
mana.set(ManaType.GREEN, mana.getGreen() * 3);
|
||||||
|
}
|
||||||
|
if (mana.getRed() > 0) {
|
||||||
|
mana.set(ManaType.RED, mana.getRed() * 3);
|
||||||
|
}
|
||||||
|
if (mana.getColorless() > 0) {
|
||||||
|
mana.set(ManaType.COLORLESS, mana.getColorless() * 3);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checksEventType(GameEvent event, Game game) {
|
||||||
|
return event.getType() == GameEvent.EventType.TAPPED_FOR_MANA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||||
|
return event.getPlayerId().equals(source.getControllerId())
|
||||||
|
&& game.getPermanentOrLKIBattlefield(event.getSourceId()) != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public NyxbloomAncientReplacementEffect copy() {
|
||||||
|
return new NyxbloomAncientReplacementEffect(this);
|
||||||
|
}
|
||||||
|
}
|
|
@ -103,6 +103,7 @@ public final class TherosBeyondDeath extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Nylea, Keen-Eyed", 185, Rarity.MYTHIC, mage.cards.n.NyleaKeenEyed.class));
|
cards.add(new SetCardInfo("Nylea, Keen-Eyed", 185, Rarity.MYTHIC, mage.cards.n.NyleaKeenEyed.class));
|
||||||
cards.add(new SetCardInfo("Nyx Herald", 189, Rarity.UNCOMMON, mage.cards.n.NyxHerald.class));
|
cards.add(new SetCardInfo("Nyx Herald", 189, Rarity.UNCOMMON, mage.cards.n.NyxHerald.class));
|
||||||
cards.add(new SetCardInfo("Nyx Lotus", 235, Rarity.RARE, mage.cards.n.NyxLotus.class));
|
cards.add(new SetCardInfo("Nyx Lotus", 235, Rarity.RARE, mage.cards.n.NyxLotus.class));
|
||||||
|
cards.add(new SetCardInfo("Nyxbloom Ancient", 190, Rarity.MYTHIC, mage.cards.n.NyxbloomAncient.class));
|
||||||
cards.add(new SetCardInfo("Nyxborn Colossus", 191, Rarity.COMMON, mage.cards.n.NyxbornColossus.class));
|
cards.add(new SetCardInfo("Nyxborn Colossus", 191, Rarity.COMMON, mage.cards.n.NyxbornColossus.class));
|
||||||
cards.add(new SetCardInfo("Nyxborn Courser", 29, Rarity.COMMON, mage.cards.n.NyxbornCourser.class));
|
cards.add(new SetCardInfo("Nyxborn Courser", 29, Rarity.COMMON, mage.cards.n.NyxbornCourser.class));
|
||||||
cards.add(new SetCardInfo("Omen of the Forge", 145, Rarity.COMMON, mage.cards.o.OmenOfTheForge.class));
|
cards.add(new SetCardInfo("Omen of the Forge", 145, Rarity.COMMON, mage.cards.o.OmenOfTheForge.class));
|
||||||
|
|
Loading…
Reference in a new issue