implement [BLB] Carrot Cake

This commit is contained in:
Susucre 2024-06-29 17:03:33 +02:00
parent 65828866ec
commit b59f8e889d
10 changed files with 89 additions and 34 deletions

View file

@ -0,0 +1,51 @@
package mage.cards.c;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SacrificeSourceTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.keyword.ScryEffect;
import mage.abilities.meta.OrTriggeredAbility;
import mage.abilities.token.FoodAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.game.permanent.token.RabbitToken;
import java.util.UUID;
/**
* @author Susucr
*/
public final class CarrotCake extends CardImpl {
public CarrotCake(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}{W}");
this.subtype.add(SubType.FOOD);
// When Carrot Cake enters and when you sacrifice it, create a 1/1 white Rabbit creature token and scry 1.
Ability ability = new OrTriggeredAbility(
Zone.ALL,
new CreateTokenEffect(new RabbitToken()),
new EntersBattlefieldTriggeredAbility(null),
new SacrificeSourceTriggeredAbility(null)
).setTriggerPhrase("When {this} enters and when you sacrifice it, ");
ability.addEffect(new ScryEffect(1).concatBy("and"));
this.addAbility(ability);
// {2}, {T}, Sacrifice Carrot Cake: You gain 3 life.
this.addAbility(new FoodAbility(true));
}
private CarrotCake(final CarrotCake card) {
super(card);
}
@Override
public CarrotCake copy() {
return new CarrotCake(this);
}
}

View file

@ -36,7 +36,7 @@ public final class DaemogothWoeEater extends CardImpl {
// When you sacrifice Daemogoth Woe-Eater, each opponent discards a card, you draw a card, and you gain 2 life. // When you sacrifice Daemogoth Woe-Eater, each opponent discards a card, you draw a card, and you gain 2 life.
Ability ability = new SacrificeSourceTriggeredAbility( Ability ability = new SacrificeSourceTriggeredAbility(
new DiscardEachPlayerEffect(TargetController.OPPONENT), false new DiscardEachPlayerEffect(TargetController.OPPONENT)
); );
ability.addEffect(new DrawCardSourceControllerEffect(1).concatBy(", you")); ability.addEffect(new DrawCardSourceControllerEffect(1).concatBy(", you"));
ability.addEffect(new GainLifeEffect(2).concatBy(", and")); ability.addEffect(new GainLifeEffect(2).concatBy(", and"));

View file

@ -20,13 +20,12 @@ import mage.game.stack.Spell;
import java.util.UUID; import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class FoulEmissary extends CardImpl { public final class FoulEmissary extends CardImpl {
public FoulEmissary(UUID ownerId, CardSetInfo setInfo) { public FoulEmissary(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}");
this.subtype.add(SubType.HUMAN, SubType.HORROR); this.subtype.add(SubType.HUMAN, SubType.HORROR);
this.power = new MageInt(1); this.power = new MageInt(1);
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
@ -52,7 +51,7 @@ public final class FoulEmissary extends CardImpl {
class FoulEmissaryTriggeredAbility extends SacrificeSourceTriggeredAbility { class FoulEmissaryTriggeredAbility extends SacrificeSourceTriggeredAbility {
public FoulEmissaryTriggeredAbility() { public FoulEmissaryTriggeredAbility() {
super(new CreateTokenEffect(new EldraziHorrorToken()), false); super(new CreateTokenEffect(new EldraziHorrorToken()));
setTriggerPhrase("When you sacrifice {this} while casting a spell with emerge, "); setTriggerPhrase("When you sacrifice {this} while casting a spell with emerge, ");
} }

View file

@ -1,7 +1,6 @@
package mage.cards.o; package mage.cards.o;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.AttacksAttachedTriggeredAbility; import mage.abilities.common.AttacksAttachedTriggeredAbility;
import mage.abilities.common.SacrificeSourceTriggeredAbility; import mage.abilities.common.SacrificeSourceTriggeredAbility;
@ -16,21 +15,22 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.AttachmentType; import mage.constants.AttachmentType;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SubType;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.target.TargetPlayer; import mage.target.TargetPlayer;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class OrdealOfErebos extends CardImpl { public final class OrdealOfErebos extends CardImpl {
public OrdealOfErebos(UUID ownerId, CardSetInfo setInfo) { public OrdealOfErebos(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{B}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}");
this.subtype.add(SubType.AURA); this.subtype.add(SubType.AURA);
@ -42,12 +42,12 @@ public final class OrdealOfErebos extends CardImpl {
this.addAbility(ability); this.addAbility(ability);
// Whenever enchanted creature attacks, put a +1/+1 counter on it. Then if it has three or more +1/+1 counters on it, sacrifice Ordeal of Erebos. // Whenever enchanted creature attacks, put a +1/+1 counter on it. Then if it has three or more +1/+1 counters on it, sacrifice Ordeal of Erebos.
ability = new AttacksAttachedTriggeredAbility(new AddCountersAttachedEffect(CounterType.P1P1.createInstance(),"it"), AttachmentType.AURA, false); ability = new AttacksAttachedTriggeredAbility(new AddCountersAttachedEffect(CounterType.P1P1.createInstance(), "it"), AttachmentType.AURA, false);
ability.addEffect(new ConditionalOneShotEffect(new SacrificeSourceEffect(), new AttachedToCounterCondition(CounterType.P1P1, 3), ability.addEffect(new ConditionalOneShotEffect(new SacrificeSourceEffect(), new AttachedToCounterCondition(CounterType.P1P1, 3),
"Then if it has three or more +1/+1 counters on it, sacrifice {this}")); "Then if it has three or more +1/+1 counters on it, sacrifice {this}"));
this.addAbility(ability); this.addAbility(ability);
// When you sacrifice Ordeal of Erebos, target player discards two cards. // When you sacrifice Ordeal of Erebos, target player discards two cards.
ability = new SacrificeSourceTriggeredAbility(new DiscardTargetEffect(2), false); ability = new SacrificeSourceTriggeredAbility(new DiscardTargetEffect(2));
ability.addTarget(new TargetPlayer()); ability.addTarget(new TargetPlayer());
this.addAbility(ability); this.addAbility(ability);

View file

@ -1,7 +1,6 @@
package mage.cards.o; package mage.cards.o;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.AttacksAttachedTriggeredAbility; import mage.abilities.common.AttacksAttachedTriggeredAbility;
import mage.abilities.common.SacrificeSourceTriggeredAbility; import mage.abilities.common.SacrificeSourceTriggeredAbility;
@ -16,20 +15,21 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.AttachmentType; import mage.constants.AttachmentType;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SubType;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class OrdealOfHeliod extends CardImpl { public final class OrdealOfHeliod extends CardImpl {
public OrdealOfHeliod(UUID ownerId, CardSetInfo setInfo) { public OrdealOfHeliod(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}");
this.subtype.add(SubType.AURA); this.subtype.add(SubType.AURA);
// Enchant creature // Enchant creature
@ -39,12 +39,12 @@ public final class OrdealOfHeliod extends CardImpl {
Ability ability = new EnchantAbility(auraTarget); Ability ability = new EnchantAbility(auraTarget);
this.addAbility(ability); this.addAbility(ability);
// Whenever enchanted creature attacks, put a +1/+1 counter on it. Then if it has three or more +1/+1 counters on it, sacrifice Ordeal of Heliod. // Whenever enchanted creature attacks, put a +1/+1 counter on it. Then if it has three or more +1/+1 counters on it, sacrifice Ordeal of Heliod.
ability = new AttacksAttachedTriggeredAbility(new AddCountersAttachedEffect(CounterType.P1P1.createInstance(),"it"), AttachmentType.AURA, false); ability = new AttacksAttachedTriggeredAbility(new AddCountersAttachedEffect(CounterType.P1P1.createInstance(), "it"), AttachmentType.AURA, false);
ability.addEffect(new ConditionalOneShotEffect(new SacrificeSourceEffect(), new AttachedToCounterCondition(CounterType.P1P1, 3), ability.addEffect(new ConditionalOneShotEffect(new SacrificeSourceEffect(), new AttachedToCounterCondition(CounterType.P1P1, 3),
"Then if it has three or more +1/+1 counters on it, sacrifice {this}")); "Then if it has three or more +1/+1 counters on it, sacrifice {this}"));
this.addAbility(ability); this.addAbility(ability);
// When you sacrifice Ordeal of Heliod, you gain 10 life. // When you sacrifice Ordeal of Heliod, you gain 10 life.
this.addAbility(new SacrificeSourceTriggeredAbility(new GainLifeEffect(10), false)); this.addAbility(new SacrificeSourceTriggeredAbility(new GainLifeEffect(10)));
} }
private OrdealOfHeliod(final OrdealOfHeliod card) { private OrdealOfHeliod(final OrdealOfHeliod card) {

View file

@ -1,7 +1,6 @@
package mage.cards.o; package mage.cards.o;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.AttacksAttachedTriggeredAbility; import mage.abilities.common.AttacksAttachedTriggeredAbility;
import mage.abilities.common.SacrificeSourceTriggeredAbility; import mage.abilities.common.SacrificeSourceTriggeredAbility;
@ -16,22 +15,23 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.AttachmentType; import mage.constants.AttachmentType;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SubType;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.filter.StaticFilters; import mage.filter.StaticFilters;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetCardInLibrary;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class OrdealOfNylea extends CardImpl { public final class OrdealOfNylea extends CardImpl {
public OrdealOfNylea(UUID ownerId, CardSetInfo setInfo) { public OrdealOfNylea(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}");
this.subtype.add(SubType.AURA); this.subtype.add(SubType.AURA);
@ -43,13 +43,13 @@ public final class OrdealOfNylea extends CardImpl {
this.addAbility(ability); this.addAbility(ability);
// Whenever enchanted creature attacks, put a +1/+1 counter on it. Then if it has three or more +1/+1 counters on it, sacrifice Ordeal of Nylea. // Whenever enchanted creature attacks, put a +1/+1 counter on it. Then if it has three or more +1/+1 counters on it, sacrifice Ordeal of Nylea.
ability = new AttacksAttachedTriggeredAbility(new AddCountersAttachedEffect(CounterType.P1P1.createInstance(),"it"), AttachmentType.AURA, false); ability = new AttacksAttachedTriggeredAbility(new AddCountersAttachedEffect(CounterType.P1P1.createInstance(), "it"), AttachmentType.AURA, false);
ability.addEffect(new ConditionalOneShotEffect(new SacrificeSourceEffect(), new AttachedToCounterCondition(CounterType.P1P1, 3), ability.addEffect(new ConditionalOneShotEffect(new SacrificeSourceEffect(), new AttachedToCounterCondition(CounterType.P1P1, 3),
"Then if it has three or more +1/+1 counters on it, sacrifice {this}")); "Then if it has three or more +1/+1 counters on it, sacrifice {this}"));
this.addAbility(ability); this.addAbility(ability);
// When you sacrifice Ordeal of Nylea, search your library for up to two basic land cards, put them onto the battlefield tapped, then shuffle your library. // When you sacrifice Ordeal of Nylea, search your library for up to two basic land cards, put them onto the battlefield tapped, then shuffle your library.
ability = new SacrificeSourceTriggeredAbility( ability = new SacrificeSourceTriggeredAbility(
new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0,2, StaticFilters.FILTER_CARD_BASIC_LANDS),true),false); new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 2, StaticFilters.FILTER_CARD_BASIC_LANDS), true));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -1,7 +1,6 @@
package mage.cards.o; package mage.cards.o;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.AttacksAttachedTriggeredAbility; import mage.abilities.common.AttacksAttachedTriggeredAbility;
import mage.abilities.common.SacrificeSourceTriggeredAbility; import mage.abilities.common.SacrificeSourceTriggeredAbility;
@ -16,21 +15,22 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.AttachmentType; import mage.constants.AttachmentType;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SubType;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.target.common.TargetAnyTarget; import mage.target.common.TargetAnyTarget;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author Plopman * @author Plopman
*/ */
public final class OrdealOfPurphoros extends CardImpl { public final class OrdealOfPurphoros extends CardImpl {
public OrdealOfPurphoros(UUID ownerId, CardSetInfo setInfo) { public OrdealOfPurphoros(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}");
this.subtype.add(SubType.AURA); this.subtype.add(SubType.AURA);
@ -41,13 +41,13 @@ public final class OrdealOfPurphoros extends CardImpl {
Ability ability = new EnchantAbility(auraTarget); Ability ability = new EnchantAbility(auraTarget);
this.addAbility(ability); this.addAbility(ability);
// Whenever enchanted creature attacks, put a +1/+1 counter on it. Then if it has three or more +1/+1 counters on it, sacrifice Ordeal of Purphoros. // Whenever enchanted creature attacks, put a +1/+1 counter on it. Then if it has three or more +1/+1 counters on it, sacrifice Ordeal of Purphoros.
ability = new AttacksAttachedTriggeredAbility(new AddCountersAttachedEffect(CounterType.P1P1.createInstance(),"it"), AttachmentType.AURA, false); ability = new AttacksAttachedTriggeredAbility(new AddCountersAttachedEffect(CounterType.P1P1.createInstance(), "it"), AttachmentType.AURA, false);
ability.addEffect(new ConditionalOneShotEffect(new SacrificeSourceEffect(), new AttachedToCounterCondition(CounterType.P1P1, 3), ability.addEffect(new ConditionalOneShotEffect(new SacrificeSourceEffect(), new AttachedToCounterCondition(CounterType.P1P1, 3),
"Then if it has three or more +1/+1 counters on it, sacrifice {this}")); "Then if it has three or more +1/+1 counters on it, sacrifice {this}"));
this.addAbility(ability); this.addAbility(ability);
// When you sacrifice Ordeal of Purphoros, it deals 3 damage to any target. // When you sacrifice Ordeal of Purphoros, it deals 3 damage to any target.
ability = new SacrificeSourceTriggeredAbility( ability = new SacrificeSourceTriggeredAbility(
new DamageTargetEffect(3, "it"),false); new DamageTargetEffect(3, "it"));
ability.addTarget(new TargetAnyTarget()); ability.addTarget(new TargetAnyTarget());
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -1,7 +1,6 @@
package mage.cards.o; package mage.cards.o;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.AttacksAttachedTriggeredAbility; import mage.abilities.common.AttacksAttachedTriggeredAbility;
import mage.abilities.common.SacrificeSourceTriggeredAbility; import mage.abilities.common.SacrificeSourceTriggeredAbility;
@ -16,20 +15,21 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.AttachmentType; import mage.constants.AttachmentType;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SubType;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class OrdealOfThassa extends CardImpl { public final class OrdealOfThassa extends CardImpl {
public OrdealOfThassa(UUID ownerId, CardSetInfo setInfo) { public OrdealOfThassa(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}");
this.subtype.add(SubType.AURA); this.subtype.add(SubType.AURA);
@ -40,12 +40,12 @@ public final class OrdealOfThassa extends CardImpl {
Ability ability = new EnchantAbility(auraTarget); Ability ability = new EnchantAbility(auraTarget);
this.addAbility(ability); this.addAbility(ability);
// Whenever enchanted creature attacks, put a +1/+1 counter on it. Then if it has three or more +1/+1 counters on it, sacrifice Ordeal of Thassa. // Whenever enchanted creature attacks, put a +1/+1 counter on it. Then if it has three or more +1/+1 counters on it, sacrifice Ordeal of Thassa.
ability = new AttacksAttachedTriggeredAbility(new AddCountersAttachedEffect(CounterType.P1P1.createInstance(),"it"), AttachmentType.AURA, false); ability = new AttacksAttachedTriggeredAbility(new AddCountersAttachedEffect(CounterType.P1P1.createInstance(), "it"), AttachmentType.AURA, false);
ability.addEffect(new ConditionalOneShotEffect(new SacrificeSourceEffect(), new AttachedToCounterCondition(CounterType.P1P1, 3), ability.addEffect(new ConditionalOneShotEffect(new SacrificeSourceEffect(), new AttachedToCounterCondition(CounterType.P1P1, 3),
"Then if it has three or more +1/+1 counters on it, sacrifice {this}")); "Then if it has three or more +1/+1 counters on it, sacrifice {this}"));
this.addAbility(ability); this.addAbility(ability);
// When you sacrifice Ordeal of Thassa, draw two cards. // When you sacrifice Ordeal of Thassa, draw two cards.
this.addAbility(new SacrificeSourceTriggeredAbility(new DrawCardSourceControllerEffect(2), false)); this.addAbility(new SacrificeSourceTriggeredAbility(new DrawCardSourceControllerEffect(2)));
} }

View file

@ -23,6 +23,7 @@ public final class Bloomburrow extends ExpansionSet {
cards.add(new SetCardInfo("Bria, Riptide Rogue", 379, Rarity.MYTHIC, mage.cards.b.BriaRiptideRogue.class)); cards.add(new SetCardInfo("Bria, Riptide Rogue", 379, Rarity.MYTHIC, mage.cards.b.BriaRiptideRogue.class));
cards.add(new SetCardInfo("Byrke, Long Ear of the Law", 380, Rarity.MYTHIC, mage.cards.b.ByrkeLongEarOfTheLaw.class)); cards.add(new SetCardInfo("Byrke, Long Ear of the Law", 380, Rarity.MYTHIC, mage.cards.b.ByrkeLongEarOfTheLaw.class));
cards.add(new SetCardInfo("Carrot Cake", 7, Rarity.COMMON, mage.cards.c.CarrotCake.class));
cards.add(new SetCardInfo("Early Winter", 93, Rarity.COMMON, mage.cards.e.EarlyWinter.class)); cards.add(new SetCardInfo("Early Winter", 93, Rarity.COMMON, mage.cards.e.EarlyWinter.class));
cards.add(new SetCardInfo("Lilypad Village", 255, Rarity.UNCOMMON, mage.cards.l.LilypadVillage.class)); cards.add(new SetCardInfo("Lilypad Village", 255, Rarity.UNCOMMON, mage.cards.l.LilypadVillage.class));
cards.add(new SetCardInfo("Lumra, Bellow of the Woods", 183, Rarity.MYTHIC, mage.cards.l.LumraBellowOfTheWoods.class)); cards.add(new SetCardInfo("Lumra, Bellow of the Woods", 183, Rarity.MYTHIC, mage.cards.l.LumraBellowOfTheWoods.class));

View file

@ -15,6 +15,10 @@ public class SacrificeSourceTriggeredAbility extends TriggeredAbilityImpl {
private final boolean setTargetPointer; private final boolean setTargetPointer;
public SacrificeSourceTriggeredAbility(Effect effect) {
this(effect, false);
}
public SacrificeSourceTriggeredAbility(Effect effect, boolean optional) { public SacrificeSourceTriggeredAbility(Effect effect, boolean optional) {
this(effect, optional, false); this(effect, optional, false);
} }