forked from External/mage
[WOE] Implement Up the Beanstalk (#10941)
* [WHO] Implement Up the Beanstalk * use OrTriggeredAbility
This commit is contained in:
parent
200f951c75
commit
8a986d3ca7
2 changed files with 49 additions and 0 deletions
48
Mage.Sets/src/mage/cards/u/UpTheBeanstalk.java
Normal file
48
Mage.Sets/src/mage/cards/u/UpTheBeanstalk.java
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
package mage.cards.u;
|
||||
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.meta.OrTriggeredAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ManaValuePredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public final class UpTheBeanstalk extends CardImpl {
|
||||
|
||||
private static FilterSpell filter = new FilterSpell("spell with mana value 5 or greater");
|
||||
|
||||
static {
|
||||
filter.add(new ManaValuePredicate(ComparisonType.OR_GREATER, 5));
|
||||
}
|
||||
|
||||
public UpTheBeanstalk(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}");
|
||||
|
||||
// When Up the Beanstalk enters the battlefield and whenever you cast a spell with mana value 5 or greater, draw a card.
|
||||
this.addAbility(new OrTriggeredAbility(
|
||||
Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), false,
|
||||
"When {this} enters the battlefield and whenever you cast a spell with mana value 5 or greater, ",
|
||||
new EntersBattlefieldTriggeredAbility(null),
|
||||
new SpellCastControllerTriggeredAbility(null, filter, false)
|
||||
));
|
||||
}
|
||||
|
||||
private UpTheBeanstalk(final UpTheBeanstalk card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UpTheBeanstalk copy() {
|
||||
return new UpTheBeanstalk(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -160,6 +160,7 @@ public final class WildsOfEldraine extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Twisted Fealty", 154, Rarity.UNCOMMON, mage.cards.t.TwistedFealty.class));
|
||||
cards.add(new SetCardInfo("Twisted Sewer-Witch", 114, Rarity.UNCOMMON, mage.cards.t.TwistedSewerWitch.class));
|
||||
cards.add(new SetCardInfo("Two-Headed Hunter", 155, Rarity.UNCOMMON, mage.cards.t.TwoHeadedHunter.class));
|
||||
cards.add(new SetCardInfo("Up the Beanstalk", 195, Rarity.COMMON, mage.cards.u.UpTheBeanstalk.class));
|
||||
cards.add(new SetCardInfo("Virtue of Knowledge", 76, Rarity.MYTHIC, mage.cards.v.VirtueOfKnowledge.class));
|
||||
cards.add(new SetCardInfo("Virtue of Loyalty", 38, Rarity.MYTHIC, mage.cards.v.VirtueOfLoyalty.class));
|
||||
cards.add(new SetCardInfo("Virtue of Persistence", 115, Rarity.MYTHIC, mage.cards.v.VirtueOfPersistence.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue