forked from External/mage
[TLA] Implement Buzzard-Wasp Colony
This commit is contained in:
parent
5f8f0c96f3
commit
0df1c4b128
2 changed files with 100 additions and 0 deletions
99
Mage.Sets/src/mage/cards/b/BuzzardWaspColony.java
Normal file
99
Mage.Sets/src/mage/cards/b/BuzzardWaspColony.java
Normal file
|
|
@ -0,0 +1,99 @@
|
||||||
|
package mage.cards.b;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.DiesCreatureTriggeredAbility;
|
||||||
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.DoIfCostPaid;
|
||||||
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.counters.Counter;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||||
|
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||||
|
import mage.filter.predicate.permanent.CounterAnyPredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class BuzzardWaspColony extends CardImpl {
|
||||||
|
|
||||||
|
private static final FilterPermanent filter = new FilterControlledCreaturePermanent("another creature you control");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(AnotherPredicate.instance);
|
||||||
|
filter.add(CounterAnyPredicate.instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
public BuzzardWaspColony(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.BIRD);
|
||||||
|
this.subtype.add(SubType.INSECT);
|
||||||
|
this.power = new MageInt(2);
|
||||||
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
|
// Flying
|
||||||
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
|
// When this creature enters, you may sacrifice an artifact or creature. If you do, draw a card.
|
||||||
|
this.addAbility(new EntersBattlefieldTriggeredAbility(new DoIfCostPaid(
|
||||||
|
new DrawCardSourceControllerEffect(1),
|
||||||
|
new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_CREATURE)
|
||||||
|
)));
|
||||||
|
|
||||||
|
// Whenever another creature you control dies, if it had counters on it, put its counters on this creature.
|
||||||
|
this.addAbility(new DiesCreatureTriggeredAbility(new BuzzardWaspColonyEffect(), false, filter));
|
||||||
|
}
|
||||||
|
|
||||||
|
private BuzzardWaspColony(final BuzzardWaspColony card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BuzzardWaspColony copy() {
|
||||||
|
return new BuzzardWaspColony(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class BuzzardWaspColonyEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
BuzzardWaspColonyEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "if it had counters on it, put its counters on {this}";
|
||||||
|
}
|
||||||
|
|
||||||
|
private BuzzardWaspColonyEffect(final BuzzardWaspColonyEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BuzzardWaspColonyEffect copy() {
|
||||||
|
return new BuzzardWaspColonyEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
|
||||||
|
Permanent creature = (Permanent) getValue("creatureDied");
|
||||||
|
if (permanent == null || creature == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
for (Counter counter : creature.getCounters(game).values()) {
|
||||||
|
permanent.addCounters(counter.copy(), source, game);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -42,6 +42,7 @@ public final class AvatarTheLastAirbender extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Barrels of Blasting Jelly", 254, Rarity.COMMON, mage.cards.b.BarrelsOfBlastingJelly.class));
|
cards.add(new SetCardInfo("Barrels of Blasting Jelly", 254, Rarity.COMMON, mage.cards.b.BarrelsOfBlastingJelly.class));
|
||||||
cards.add(new SetCardInfo("Beetle-Headed Merchants", 86, Rarity.COMMON, mage.cards.b.BeetleHeadedMerchants.class));
|
cards.add(new SetCardInfo("Beetle-Headed Merchants", 86, Rarity.COMMON, mage.cards.b.BeetleHeadedMerchants.class));
|
||||||
cards.add(new SetCardInfo("Bender's Waterskin", 255, Rarity.COMMON, mage.cards.b.BendersWaterskin.class));
|
cards.add(new SetCardInfo("Bender's Waterskin", 255, Rarity.COMMON, mage.cards.b.BendersWaterskin.class));
|
||||||
|
cards.add(new SetCardInfo("Buzzard-Wasp Colony", 88, Rarity.UNCOMMON, mage.cards.b.BuzzardWaspColony.class));
|
||||||
cards.add(new SetCardInfo("Cat-Gator", 91, Rarity.UNCOMMON, mage.cards.c.CatGator.class));
|
cards.add(new SetCardInfo("Cat-Gator", 91, Rarity.UNCOMMON, mage.cards.c.CatGator.class));
|
||||||
cards.add(new SetCardInfo("Cat-Owl", 212, Rarity.COMMON, mage.cards.c.CatOwl.class));
|
cards.add(new SetCardInfo("Cat-Owl", 212, Rarity.COMMON, mage.cards.c.CatOwl.class));
|
||||||
cards.add(new SetCardInfo("Corrupt Court Official", 92, Rarity.COMMON, mage.cards.c.CorruptCourtOfficial.class));
|
cards.add(new SetCardInfo("Corrupt Court Official", 92, Rarity.COMMON, mage.cards.c.CorruptCourtOfficial.class));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue