mirror of
https://github.com/correl/mage.git
synced 2025-04-11 17:00:08 -09:00
Merge pull request #7861 from jmharmon/master
[MH2] Implement Altar of the Goyf, Blazing Rootwalla, Clattering Augur, and Damn
This commit is contained in:
commit
f09e6cc9ac
5 changed files with 245 additions and 0 deletions
Mage.Sets/src/mage
98
Mage.Sets/src/mage/cards/a/AltarOfTheGoyf.java
Normal file
98
Mage.Sets/src/mage/cards/a/AltarOfTheGoyf.java
Normal file
|
@ -0,0 +1,98 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.CardTypesInGraveyardCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author jmharmon
|
||||
*/
|
||||
|
||||
public final class AltarOfTheGoyf extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("Lhurgoyf creatures");
|
||||
|
||||
static {
|
||||
filter.add(CardType.CREATURE.getPredicate());
|
||||
filter.add(SubType.LHURGOYF.getPredicate());
|
||||
}
|
||||
|
||||
public AltarOfTheGoyf(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.TRIBAL, CardType.ARTIFACT}, "{5}");
|
||||
|
||||
this.subtype.add(SubType.LHURGOYF);
|
||||
|
||||
// Whenever a creature you control attacks alone, it gets +X/+X until end of turn, where X is the number of card types among cards in all graveyard.
|
||||
this.addAbility(new AltarOfTheGoyfAbility().addHint(CardTypesInGraveyardCount.ALL));
|
||||
|
||||
// Lhurgoyf creatures you control have trample.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield, filter)));
|
||||
}
|
||||
|
||||
private AltarOfTheGoyf(final AltarOfTheGoyf card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AltarOfTheGoyf copy() {
|
||||
return new AltarOfTheGoyf(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AltarOfTheGoyfAbility extends TriggeredAbilityImpl{
|
||||
|
||||
public AltarOfTheGoyfAbility() {
|
||||
super(Zone.BATTLEFIELD, new BoostTargetEffect(
|
||||
CardTypesInGraveyardCount.instance, CardTypesInGraveyardCount.instance, Duration.EndOfTurn, true), false);
|
||||
}
|
||||
|
||||
public AltarOfTheGoyfAbility(final AltarOfTheGoyfAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AltarOfTheGoyfAbility copy() {
|
||||
return new AltarOfTheGoyfAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.DECLARED_ATTACKERS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (game.isActivePlayer(this.controllerId)) {
|
||||
if (game.getCombat().attacksAlone()) {
|
||||
this.getEffects().setTargetPointer(new
|
||||
FixedTarget(game.getCombat().getAttackers().get(0), game)); {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever a creature you control attacks alone, " +
|
||||
"it gets +X/+X until end of turn, " +
|
||||
"where X is the number of card types among cards in all graveyard.";
|
||||
}
|
||||
}
|
46
Mage.Sets/src/mage/cards/b/BlazingRootwalla.java
Normal file
46
Mage.Sets/src/mage/cards/b/BlazingRootwalla.java
Normal file
|
@ -0,0 +1,46 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.LimitedTimesPerTurnActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.keyword.MadnessAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author jmharmon
|
||||
*/
|
||||
|
||||
public final class BlazingRootwalla extends CardImpl {
|
||||
|
||||
public BlazingRootwalla(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}");
|
||||
|
||||
this.subtype.add(SubType.LIZARD);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// {R}: Blazing Rootwalla gets +2/+0 until end of turn. Activate this ability only once each turn.
|
||||
this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD,
|
||||
new BoostSourceEffect(2, 0, Duration.EndOfTurn), new ManaCostsImpl("{R}")));
|
||||
|
||||
// Madness{0}
|
||||
this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{0}")));
|
||||
}
|
||||
|
||||
private BlazingRootwalla(final BlazingRootwalla card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlazingRootwalla copy() {
|
||||
return new BlazingRootwalla(this);
|
||||
}
|
||||
}
|
57
Mage.Sets/src/mage/cards/c/ClatteringAugur.java
Normal file
57
Mage.Sets/src/mage/cards/c/ClatteringAugur.java
Normal file
|
@ -0,0 +1,57 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.CantBlockAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
|
||||
import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author jmharmon
|
||||
*/
|
||||
|
||||
public final class ClatteringAugur extends CardImpl {
|
||||
|
||||
public ClatteringAugur(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
|
||||
|
||||
this.subtype.add(SubType.ZOMBIE);
|
||||
this.subtype.add(SubType.SHAMAN);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Clattering Augur can’t block.
|
||||
this.addAbility(new CantBlockAbility());
|
||||
|
||||
// When Clattering Augur enters the battlefield, you draw a card and you lose 1 life.
|
||||
Effect drawEffect = new DrawCardSourceControllerEffect(1, "you");
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(drawEffect);
|
||||
Effect lifeEffect = new LoseLifeSourceControllerEffect(1);
|
||||
ability.addEffect(lifeEffect.concatBy("and"));
|
||||
this.addAbility(ability);
|
||||
|
||||
// {2}{B}{B}: Return Clattering Augur from your graveyard to your hand.
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), new ManaCostsImpl("{2}{B}{B}")));
|
||||
}
|
||||
|
||||
private ClatteringAugur(final ClatteringAugur card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClatteringAugur copy() {
|
||||
return new ClatteringAugur(this);
|
||||
}
|
||||
}
|
40
Mage.Sets/src/mage/cards/d/Damn.java
Normal file
40
Mage.Sets/src/mage/cards/d/Damn.java
Normal file
|
@ -0,0 +1,40 @@
|
|||
package mage.cards.d;
|
||||
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.DestroyAllEffect;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.keyword.OverloadAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author jmharmon
|
||||
*/
|
||||
|
||||
public final class Damn extends CardImpl {
|
||||
|
||||
public Damn(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{B}{B}");
|
||||
|
||||
// Destroy target creature. A creature destroyed this way can’t be regenerated.
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect(true));
|
||||
|
||||
// Overload {2}{W}{W} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of “target” with “each.”)
|
||||
this.addAbility(new OverloadAbility(this, new DestroyAllEffect(FILTER_PERMANENT_CREATURES, true), new ManaCostsImpl("{2}{W}{W")));
|
||||
}
|
||||
|
||||
private Damn(final Damn card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Damn copy() {
|
||||
return new Damn(this);
|
||||
}
|
||||
}
|
|
@ -29,6 +29,7 @@ public final class ModernHorizons2 extends ExpansionSet {
|
|||
|
||||
cards.add(new SetCardInfo("Abiding Grace", 1, Rarity.UNCOMMON, mage.cards.a.AbidingGrace.class));
|
||||
cards.add(new SetCardInfo("Abundant Harvest", 147, Rarity.COMMON, mage.cards.a.AbundantHarvest.class));
|
||||
cards.add(new SetCardInfo("Altar of the Goyf", 220, Rarity.UNCOMMON, mage.cards.a.AltarOfTheGoyf.class));
|
||||
cards.add(new SetCardInfo("Academy Manufactor", 219, Rarity.RARE, mage.cards.a.AcademyManufactor.class));
|
||||
cards.add(new SetCardInfo("Aeromoeba", 37, Rarity.COMMON, mage.cards.a.Aeromoeba.class));
|
||||
cards.add(new SetCardInfo("Aeve, Progenitor Ooze", 148, Rarity.RARE, mage.cards.a.AeveProgenitorOoze.class));
|
||||
|
@ -49,6 +50,7 @@ public final class ModernHorizons2 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Barbed Spike", 5, Rarity.UNCOMMON, mage.cards.b.BarbedSpike.class));
|
||||
cards.add(new SetCardInfo("Batterbone", 221, Rarity.UNCOMMON, mage.cards.b.Batterbone.class));
|
||||
cards.add(new SetCardInfo("Battle Plan", 114, Rarity.COMMON, mage.cards.b.BattlePlan.class));
|
||||
cards.add(new SetCardInfo("Blazing Rootwalla", 115, Rarity.UNCOMMON, mage.cards.b.BlazingRootwalla.class));
|
||||
cards.add(new SetCardInfo("Blacksmith's Skill", 6, Rarity.COMMON, mage.cards.b.BlacksmithsSkill.class));
|
||||
cards.add(new SetCardInfo("Blessed Respite", 150, Rarity.UNCOMMON, mage.cards.b.BlessedRespite.class));
|
||||
cards.add(new SetCardInfo("Bloodbraid Marauder", 116, Rarity.RARE, mage.cards.b.BloodbraidMarauder.class));
|
||||
|
@ -72,6 +74,7 @@ public final class ModernHorizons2 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Chance Encounter", 277, Rarity.RARE, mage.cards.c.ChanceEncounter.class));
|
||||
cards.add(new SetCardInfo("Chatterfang, Squirrel General", 151, Rarity.MYTHIC, mage.cards.c.ChatterfangSquirrelGeneral.class));
|
||||
cards.add(new SetCardInfo("Chatterstorm", 152, Rarity.COMMON, mage.cards.c.Chatterstorm.class));
|
||||
cards.add(new SetCardInfo("Clattering Augur", 79, Rarity.UNCOMMON, mage.cards.c.ClatteringAugur.class));
|
||||
cards.add(new SetCardInfo("Chitterspitter", 153, Rarity.RARE, mage.cards.c.Chitterspitter.class));
|
||||
cards.add(new SetCardInfo("Chrome Courier", 190, Rarity.COMMON, mage.cards.c.ChromeCourier.class));
|
||||
cards.add(new SetCardInfo("Combine Chrysalis", 191, Rarity.UNCOMMON, mage.cards.c.CombineChrysalis.class));
|
||||
|
@ -80,6 +83,7 @@ public final class ModernHorizons2 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Crack Open", 154, Rarity.COMMON, mage.cards.c.CrackOpen.class));
|
||||
cards.add(new SetCardInfo("Cursed Totem", 295, Rarity.RARE, mage.cards.c.CursedTotem.class));
|
||||
cards.add(new SetCardInfo("Dakkon, Shadow Slayer", 192, Rarity.MYTHIC, mage.cards.d.DakkonShadowSlayer.class));
|
||||
cards.add(new SetCardInfo("Damn", 80, Rarity.RARE, mage.cards.d.Damn.class));
|
||||
cards.add(new SetCardInfo("Darkmoss Bridge", 245, Rarity.COMMON, mage.cards.d.DarkmossBridge.class));
|
||||
cards.add(new SetCardInfo("Dauthi Voidwalker", 81, Rarity.RARE, mage.cards.d.DauthiVoidwalker.class));
|
||||
cards.add(new SetCardInfo("Deepwood Denizen", 155, Rarity.COMMON, mage.cards.d.DeepwoodDenizen.class));
|
||||
|
|
Loading…
Add table
Reference in a new issue