mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
implement [YMID] Hollowhenge Wrangler; Forsaken Crossroads (#12793)
This commit is contained in:
parent
5abf295ba2
commit
3d05eb035b
5 changed files with 170 additions and 1 deletions
90
Mage.Sets/src/mage/cards/f/ForsakenCrossroads.java
Normal file
90
Mage.Sets/src/mage/cards/f/ForsakenCrossroads.java
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
package mage.cards.f;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AsEntersBattlefieldAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.ChooseColorEffect;
|
||||
import mage.abilities.effects.keyword.ScryEffect;
|
||||
import mage.abilities.effects.mana.AddManaChosenColorEffect;
|
||||
import mage.abilities.mana.SimpleManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Svyatoslav28
|
||||
*/
|
||||
public final class ForsakenCrossroads extends CardImpl {
|
||||
|
||||
public ForsakenCrossroads(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
|
||||
|
||||
|
||||
// Forsaken Crossroads enters tapped.
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
|
||||
// As Forsaken Crossroads enters, choose a color.
|
||||
this.addAbility(new AsEntersBattlefieldAbility(new ChooseColorEffect(Outcome.Neutral)));
|
||||
|
||||
// When Forskaken Crossroads enters, scry 1. If you weren’t the starting player, you may untap Forsaken Crossroads instead.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new ForsakenCrossroadsEffect()));
|
||||
|
||||
// {T}: Add one mana of the chosen color.
|
||||
this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new AddManaChosenColorEffect(), new TapSourceCost()));
|
||||
}
|
||||
|
||||
private ForsakenCrossroads(final ForsakenCrossroads card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForsakenCrossroads copy() {
|
||||
return new ForsakenCrossroads(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ForsakenCrossroadsEffect extends OneShotEffect {
|
||||
|
||||
ForsakenCrossroadsEffect() {
|
||||
super(Outcome.PutCardInPlay);
|
||||
this.staticText = "scry 1. If you weren't the starting player, you may untap {this} instead.";
|
||||
}
|
||||
|
||||
private ForsakenCrossroadsEffect(final ForsakenCrossroadsEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForsakenCrossroadsEffect copy() {
|
||||
return new ForsakenCrossroadsEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null && !controller.getId().equals(game.getStartingPlayerId())) {
|
||||
if (controller.chooseUse(Outcome.Untap, "Untap {this} instead of scrying 1?", "", "Untap", "Scry 1", source, game)) {
|
||||
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
permanent.untap(game);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
OneShotEffect scryEffect = new ScryEffect(1);
|
||||
scryEffect.apply(game, source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
72
Mage.Sets/src/mage/cards/h/HollowhengeWrangler.java
Normal file
72
Mage.Sets/src/mage/cards/h/HollowhengeWrangler.java
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
package mage.cards.h;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.ActivateIfConditionActivatedAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.costs.common.DiscardCardCost;
|
||||
import mage.abilities.effects.common.ConjureCardEffect;
|
||||
import mage.abilities.effects.common.SeekCardEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Svyatoslav28
|
||||
*/
|
||||
|
||||
public final class HollowhengeWrangler extends CardImpl {
|
||||
|
||||
public HollowhengeWrangler(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}");
|
||||
|
||||
this.subtype.add(SubType.ELEMENTAL);
|
||||
this.power = new MageInt(6);
|
||||
this.toughness = new MageInt(6);
|
||||
|
||||
// When Hollowhenge Wrangler enters the battlefield, seek a land card.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new SeekCardEffect(StaticFilters.FILTER_CARD_LAND)));
|
||||
|
||||
// Discard a land card: Conjure a card named Hollowhenge Beast into your hand.
|
||||
// You may also activate this ability while Hollowhenge Wrangler is in your graveyard.
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(
|
||||
Zone.ALL, new ConjureCardEffect("Hollowhenge Beast"), new DiscardCardCost(StaticFilters.FILTER_CARD_LAND), HollowhengeWranglerCondition.instance
|
||||
);
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
|
||||
private HollowhengeWrangler(final HollowhengeWrangler card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HollowhengeWrangler copy() {
|
||||
return new HollowhengeWrangler(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum HollowhengeWranglerCondition implements Condition {
|
||||
instance;
|
||||
private static final List<Zone> zones = Arrays.asList(Zone.BATTLEFIELD, Zone.GRAVEYARD);
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return zones.contains(game.getState().getZone(source.getSourceId()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "You may also activate this ability while {this} is in your graveyard";
|
||||
}
|
||||
}
|
||||
|
|
@ -25,6 +25,8 @@ public final class AlchemyInnistrad extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Cursebound Witch", 24, Rarity.UNCOMMON, mage.cards.c.CurseboundWitch.class));
|
||||
cards.add(new SetCardInfo("Expedition Supplier", 6, Rarity.RARE, mage.cards.e.ExpeditionSupplier.class));
|
||||
cards.add(new SetCardInfo("Faithful Disciple", 7, Rarity.UNCOMMON, mage.cards.f.FaithfulDisciple.class));
|
||||
cards.add(new SetCardInfo("Forsaken Crossroads", 63, Rarity.RARE, mage.cards.f.ForsakenCrossroads.class));
|
||||
cards.add(new SetCardInfo("Hollowhenge Wrangler", 51, Rarity.RARE, mage.cards.h.HollowhengeWrangler.class));
|
||||
cards.add(new SetCardInfo("Ishkanah, Broodmother", 52, Rarity.MYTHIC, mage.cards.i.IshkanahBroodmother.class));
|
||||
cards.add(new SetCardInfo("Key to the Archive", 59, Rarity.RARE, mage.cards.k.KeyToTheArchive.class));
|
||||
cards.add(new SetCardInfo("Kindred Denial", 18, Rarity.UNCOMMON, mage.cards.k.KindredDenial.class));
|
||||
|
|
|
|||
|
|
@ -100,6 +100,7 @@ public class MysteryBooster2 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Flusterstorm", 163, Rarity.RARE, mage.cards.f.Flusterstorm.class));
|
||||
cards.add(new SetCardInfo("Foil", 243, Rarity.COMMON, mage.cards.f.Foil.class));
|
||||
cards.add(new SetCardInfo("Forest Bear", 206, Rarity.COMMON, mage.cards.f.ForestBear.class));
|
||||
cards.add(new SetCardInfo("Forsaken Crossroads", 264, Rarity.UNCOMMON, mage.cards.f.ForsakenCrossroads.class));
|
||||
cards.add(new SetCardInfo("Future Sight", 122, Rarity.RARE, mage.cards.f.FutureSight.class));
|
||||
cards.add(new SetCardInfo("Gerrard, Weatherlight Hero", 251, Rarity.RARE, mage.cards.g.GerrardWeatherlightHero.class));
|
||||
cards.add(new SetCardInfo("Ghost Quarter", 109, Rarity.UNCOMMON, mage.cards.g.GhostQuarter.class));
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ public class ActivateIfConditionActivatedAbility extends ActivatedAbilityImpl {
|
|||
public ActivateIfConditionActivatedAbility(Effect effect, Cost cost, Condition condition) {
|
||||
this(Zone.BATTLEFIELD, effect, cost, condition, TimingRule.INSTANT);
|
||||
}
|
||||
|
||||
|
||||
public ActivateIfConditionActivatedAbility(Zone zone, Effect effect, Cost cost, Condition condition) {
|
||||
this(zone, effect, cost, condition, TimingRule.INSTANT);
|
||||
}
|
||||
|
|
@ -34,6 +34,10 @@ public class ActivateIfConditionActivatedAbility extends ActivatedAbilityImpl {
|
|||
@Override
|
||||
public String getRule() {
|
||||
StringBuilder sb = new StringBuilder(super.getRule());
|
||||
if (condition.toString().startsWith("You may also")) {
|
||||
sb.append(' ').append(condition.toString()).append('.');
|
||||
return sb.toString();
|
||||
}
|
||||
if (condition instanceof InvertCondition) {
|
||||
sb.append(" You can't activate this ability ");
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue