mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
[ZNR] Implemented Forsaken Monument
This commit is contained in:
parent
6bc695fd1e
commit
d9c72120ec
2 changed files with 101 additions and 0 deletions
100
Mage.Sets/src/mage/cards/f/ForsakenMonument.java
Normal file
100
Mage.Sets/src/mage/cards/f/ForsakenMonument.java
Normal file
|
@ -0,0 +1,100 @@
|
|||
package mage.cards.f;
|
||||
|
||||
import mage.Mana;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.abilities.effects.mana.BasicManaEffect;
|
||||
import mage.abilities.mana.TriggeredManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorlessPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.ManaEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ForsakenMonument extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("colorles creatures");
|
||||
private static final FilterSpell filter2 = new FilterSpell("a colorless spell");
|
||||
|
||||
static {
|
||||
filter.add(ColorlessPredicate.instance);
|
||||
filter2.add(ColorlessPredicate.instance);
|
||||
}
|
||||
|
||||
public ForsakenMonument(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{5}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
|
||||
// Colorless creatures you control get +2/+2.
|
||||
this.addAbility(new SimpleStaticAbility(new BoostControlledEffect(
|
||||
2, 2, Duration.WhileOnBattlefield, filter
|
||||
)));
|
||||
|
||||
// Whenever you tap a permanent for {C}, add an additional {C}.
|
||||
this.addAbility(new ForsakenMonumentTriggeredManaAbility());
|
||||
|
||||
// Whenever you cast a colorless spell, you gain 2 life.
|
||||
this.addAbility(new SpellCastControllerTriggeredAbility(new GainLifeEffect(2), filter2, false));
|
||||
}
|
||||
|
||||
private ForsakenMonument(final ForsakenMonument card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForsakenMonument copy() {
|
||||
return new ForsakenMonument(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ForsakenMonumentTriggeredManaAbility extends TriggeredManaAbility {
|
||||
|
||||
ForsakenMonumentTriggeredManaAbility() {
|
||||
super(Zone.BATTLEFIELD, new BasicManaEffect(Mana.ColorlessMana(1)));
|
||||
}
|
||||
|
||||
private ForsakenMonumentTriggeredManaAbility(final ForsakenMonumentTriggeredManaAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.TAPPED_FOR_MANA;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent permanent = game.getPermanentOrLKIBattlefield(event.getSourceId());
|
||||
ManaEvent mEvent = (ManaEvent) event;
|
||||
if (permanent == null || !mEvent.getPlayerId().equals(getControllerId())) {
|
||||
return false;
|
||||
}
|
||||
return mEvent.getMana().getColorless() > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForsakenMonumentTriggeredManaAbility copy() {
|
||||
return new ForsakenMonumentTriggeredManaAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever you tap a permanent for {C}, add an additional {C}.";
|
||||
}
|
||||
}
|
|
@ -183,6 +183,7 @@ public final class ZendikarRising extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Fireblade Charger", 139, Rarity.UNCOMMON, mage.cards.f.FirebladeCharger.class));
|
||||
cards.add(new SetCardInfo("Fissure Wizard", 140, Rarity.COMMON, mage.cards.f.FissureWizard.class));
|
||||
cards.add(new SetCardInfo("Forest", 278, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("Forsaken Monument", 244, Rarity.MYTHIC, mage.cards.f.ForsakenMonument.class));
|
||||
cards.add(new SetCardInfo("Ghastly Gloomhunter", 103, Rarity.COMMON, mage.cards.g.GhastlyGloomhunter.class));
|
||||
cards.add(new SetCardInfo("Glacial Grasp", 59, Rarity.COMMON, mage.cards.g.GlacialGrasp.class));
|
||||
cards.add(new SetCardInfo("Glasspool Mimic", 60, Rarity.RARE, mage.cards.g.GlasspoolMimic.class));
|
||||
|
|
Loading…
Reference in a new issue