mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 10:40:06 -08:00
[TLE] Implement The Cabbage Merchant
This commit is contained in:
parent
0ec783cfdc
commit
c5a52232d0
2 changed files with 68 additions and 0 deletions
67
Mage.Sets/src/mage/cards/t/TheCabbageMerchant.java
Normal file
67
Mage.Sets/src/mage/cards/t/TheCabbageMerchant.java
Normal file
|
|
@ -0,0 +1,67 @@
|
||||||
|
package mage.cards.t;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.common.DealsDamageToYouAllTriggeredAbility;
|
||||||
|
import mage.abilities.common.SpellCastOpponentTriggeredAbility;
|
||||||
|
import mage.abilities.costs.common.TapTargetCost;
|
||||||
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
|
import mage.abilities.effects.common.SacrificeControllerEffect;
|
||||||
|
import mage.abilities.mana.AnyColorManaAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.SuperType;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.filter.predicate.permanent.TappedPredicate;
|
||||||
|
import mage.game.permanent.token.FoodToken;
|
||||||
|
import mage.target.common.TargetControlledPermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class TheCabbageMerchant extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterControlledPermanent filter
|
||||||
|
= new FilterControlledPermanent(SubType.FOOD, "untapped Foods you control");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(TappedPredicate.UNTAPPED);
|
||||||
|
}
|
||||||
|
|
||||||
|
public TheCabbageMerchant(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}");
|
||||||
|
|
||||||
|
this.supertype.add(SuperType.LEGENDARY);
|
||||||
|
this.subtype.add(SubType.HUMAN);
|
||||||
|
this.subtype.add(SubType.CITIZEN);
|
||||||
|
this.power = new MageInt(2);
|
||||||
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
|
// Whenever an opponent casts a noncreature spell, create a Food token.
|
||||||
|
this.addAbility(new SpellCastOpponentTriggeredAbility(
|
||||||
|
new CreateTokenEffect(new FoodToken()), StaticFilters.FILTER_SPELL_NON_CREATURE, false
|
||||||
|
));
|
||||||
|
|
||||||
|
// Whenever a creature deals combat damage to you, sacrifice a Food token.
|
||||||
|
this.addAbility(new DealsDamageToYouAllTriggeredAbility(
|
||||||
|
StaticFilters.FILTER_PERMANENT_CREATURE,
|
||||||
|
new SacrificeControllerEffect(StaticFilters.FILTER_CONTROLLED_FOOD, 1, ""), true
|
||||||
|
));
|
||||||
|
|
||||||
|
// Tap two untapped Foods you control: Add one mana of any color.
|
||||||
|
this.addAbility(new AnyColorManaAbility(new TapTargetCost(new TargetControlledPermanent(2, filter))));
|
||||||
|
}
|
||||||
|
|
||||||
|
private TheCabbageMerchant(final TheCabbageMerchant card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TheCabbageMerchant copy() {
|
||||||
|
return new TheCabbageMerchant(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -35,6 +35,7 @@ public final class AvatarTheLastAirbenderEternal extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Elephant-Rat", 228, Rarity.COMMON, mage.cards.e.ElephantRat.class));
|
cards.add(new SetCardInfo("Elephant-Rat", 228, Rarity.COMMON, mage.cards.e.ElephantRat.class));
|
||||||
cards.add(new SetCardInfo("Force of Negation", 13, Rarity.MYTHIC, mage.cards.f.ForceOfNegation.class));
|
cards.add(new SetCardInfo("Force of Negation", 13, Rarity.MYTHIC, mage.cards.f.ForceOfNegation.class));
|
||||||
cards.add(new SetCardInfo("Katara, Waterbending Master", 93, Rarity.MYTHIC, mage.cards.k.KataraWaterbendingMaster.class));
|
cards.add(new SetCardInfo("Katara, Waterbending Master", 93, Rarity.MYTHIC, mage.cards.k.KataraWaterbendingMaster.class));
|
||||||
|
cards.add(new SetCardInfo("The Cabbage Merchant", 134, Rarity.RARE, mage.cards.t.TheCabbageMerchant.class));
|
||||||
cards.add(new SetCardInfo("The Great Henge", 41, Rarity.MYTHIC, mage.cards.t.TheGreatHenge.class));
|
cards.add(new SetCardInfo("The Great Henge", 41, Rarity.MYTHIC, mage.cards.t.TheGreatHenge.class));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue