mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
[MOM] Implement Wrenn and Realmbreaker
This commit is contained in:
parent
372b088f2b
commit
4706b695e7
3 changed files with 135 additions and 0 deletions
73
Mage.Sets/src/mage/cards/w/WrennAndRealmbreaker.java
Normal file
73
Mage.Sets/src/mage/cards/w/WrennAndRealmbreaker.java
Normal file
|
@ -0,0 +1,73 @@
|
|||
package mage.cards.w;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.GetEmblemEffect;
|
||||
import mage.abilities.effects.common.MillThenPutInHandEffect;
|
||||
import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.abilities.keyword.HexproofAbility;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.abilities.mana.AnyColorManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.command.emblems.WrennAndRealmbreakerEmblem;
|
||||
import mage.game.permanent.token.custom.CreatureToken;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class WrennAndRealmbreaker extends CardImpl {
|
||||
|
||||
public WrennAndRealmbreaker(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{1}{G}{G}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.WRENN);
|
||||
this.setStartingLoyalty(4);
|
||||
|
||||
// Lands you control have "{T}: Add one mana of any color."
|
||||
this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect(
|
||||
new AnyColorManaAbility(), Duration.WhileOnBattlefield,
|
||||
StaticFilters.FILTER_LANDS, false
|
||||
)));
|
||||
|
||||
// +1: Up to one target land you control becomes a 3/3 Elemental creature with vigilance, hexproof, and haste until your next turn. It's still a land.
|
||||
Ability ability = new LoyaltyAbility(new BecomesCreatureTargetEffect(
|
||||
new CreatureToken(
|
||||
3, 3, "3/3 Elemental creature " +
|
||||
"with vigilance, hexproof, and haste", SubType.ELEMENTAL
|
||||
).withAbility(VigilanceAbility.getInstance())
|
||||
.withAbility(HexproofAbility.getInstance())
|
||||
.withAbility(HasteAbility.getInstance()),
|
||||
false, true, Duration.UntilYourNextEndStep
|
||||
), 1);
|
||||
ability.addTarget(new TargetPermanent(0, 1, StaticFilters.FILTER_CONTROLLED_PERMANENT_LAND));
|
||||
this.addAbility(ability);
|
||||
|
||||
// -2: Mill three cards. You may put a permanent card from among the milled cards into your hand.
|
||||
this.addAbility(new LoyaltyAbility(new MillThenPutInHandEffect(5, StaticFilters.FILTER_CARD_A_PERMANENT), -2));
|
||||
|
||||
// -7: You get an emblem with "You may play lands and cast permanent spells from your graveyard."
|
||||
this.addAbility(new LoyaltyAbility(new GetEmblemEffect(new WrennAndRealmbreakerEmblem()), -7));
|
||||
}
|
||||
|
||||
private WrennAndRealmbreaker(final WrennAndRealmbreaker card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WrennAndRealmbreaker copy() {
|
||||
return new WrennAndRealmbreaker(this);
|
||||
}
|
||||
}
|
|
@ -79,6 +79,7 @@ public final class MarchOfTheMachine extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Transcendent Message", 83, Rarity.RARE, mage.cards.t.TranscendentMessage.class));
|
||||
cards.add(new SetCardInfo("Voldaren Thrillseeker", 171, Rarity.RARE, mage.cards.v.VoldarenThrillseeker.class));
|
||||
cards.add(new SetCardInfo("Wind-Scarred Crag", 276, Rarity.COMMON, mage.cards.w.WindScarredCrag.class));
|
||||
cards.add(new SetCardInfo("Wrenn and Realmbreaker", 217, Rarity.MYTHIC, mage.cards.w.WrennAndRealmbreaker.class));
|
||||
cards.add(new SetCardInfo("Yargle and Multani", 256, Rarity.RARE, mage.cards.y.YargleAndMultani.class));
|
||||
cards.add(new SetCardInfo("Zephyr Winder", 328, Rarity.COMMON, mage.cards.z.ZephyrWinder.class));
|
||||
}
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
package mage.game.command.emblems;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.AsThoughEffectType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.command.Emblem;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class WrennAndRealmbreakerEmblem extends Emblem {
|
||||
|
||||
// -7: You get an emblem with "You may play lands and cast permanent spells from your graveyard."
|
||||
public WrennAndRealmbreakerEmblem() {
|
||||
this.setName("Emblem Wrenn");
|
||||
this.setExpansionSetCodeForImage("MOM");
|
||||
this.getAbilities().add(new SimpleStaticAbility(Zone.COMMAND, new WrennAndRealmbreakerEmblemEffect()));
|
||||
}
|
||||
}
|
||||
|
||||
class WrennAndRealmbreakerEmblemEffect extends AsThoughEffectImpl {
|
||||
|
||||
public WrennAndRealmbreakerEmblemEffect() {
|
||||
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
staticText = "you may play lands and cast permanent spells from your graveyard";
|
||||
}
|
||||
|
||||
public WrennAndRealmbreakerEmblemEffect(final WrennAndRealmbreakerEmblemEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WrennAndRealmbreakerEmblemEffect copy() {
|
||||
return new WrennAndRealmbreakerEmblemEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
|
||||
if (!source.isControlledBy(affectedControllerId)) {
|
||||
return false;
|
||||
}
|
||||
Card card = game.getCard(objectId);
|
||||
return card != null
|
||||
&& card.isPermanent(game)
|
||||
&& card.isOwnedBy(source.getControllerId())
|
||||
&& game.getState().getZone(objectId) == Zone.GRAVEYARD;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue