Implemented Benthic Biomancer

This commit is contained in:
Evan Kranzler 2019-01-08 19:06:49 -05:00
parent dab064696d
commit 91f6b4b706
2 changed files with 84 additions and 0 deletions

View file

@ -0,0 +1,83 @@
package mage.cards.b;
import mage.MageInt;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.discard.DiscardControllerEffect;
import mage.abilities.keyword.AdaptAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.game.Game;
import mage.game.events.GameEvent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class BenthicBiomancer extends CardImpl {
public BenthicBiomancer(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}");
this.subtype.add(SubType.MERFOLK);
this.subtype.add(SubType.WIZARD);
this.subtype.add(SubType.MUTANT);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// {1}{U}: Adapt 1.
this.addAbility(new AdaptAbility(1, "{1}{U}"));
// Whenever one or more +1/+1 counters are put on Benthic Biomancer, draw a card, then discard a card.
this.addAbility(new GrowthChamberGuardianTriggeredAbility());
}
private BenthicBiomancer(final BenthicBiomancer card) {
super(card);
}
@Override
public BenthicBiomancer copy() {
return new BenthicBiomancer(this);
}
}
class GrowthChamberGuardianTriggeredAbility extends TriggeredAbilityImpl {
GrowthChamberGuardianTriggeredAbility() {
super(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), true);
this.addEffect(new DiscardControllerEffect(1));
}
private GrowthChamberGuardianTriggeredAbility(final GrowthChamberGuardianTriggeredAbility ability) {
super(ability);
}
@Override
public GrowthChamberGuardianTriggeredAbility copy() {
return new GrowthChamberGuardianTriggeredAbility(this);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.COUNTERS_ADDED;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
return event.getData().equals(CounterType.P1P1.getName())
&& event.getAmount() > 0
&& event.getTargetId().equals(this.getSourceId());
}
@Override
public String getRule() {
return "Whenever one or more +1/+1 counters are put on {this}, " +
"draw a card, then discard a card.";
}
}

View file

@ -43,6 +43,7 @@ public final class RavnicaAllegiance extends ExpansionSet {
cards.add(new SetCardInfo("Bankrupt in Blood", 62, Rarity.UNCOMMON, mage.cards.b.BankruptInBlood.class));
cards.add(new SetCardInfo("Basilica Bell-Haunt", 156, Rarity.UNCOMMON, mage.cards.b.BasilicaBellHaunt.class));
cards.add(new SetCardInfo("Bedevil", 157, Rarity.RARE, mage.cards.b.Bedevil.class));
cards.add(new SetCardInfo("Benthic Biomancer", 32, Rarity.RARE, mage.cards.b.BenthicBiomancer.class));
cards.add(new SetCardInfo("Biogenic Upgrade", 123, Rarity.UNCOMMON, mage.cards.b.BiogenicUpgrade.class));
cards.add(new SetCardInfo("Biomancer's Familiar", 158, Rarity.RARE, mage.cards.b.BiomancersFamiliar.class));
cards.add(new SetCardInfo("Blade Juggler", 63, Rarity.COMMON, mage.cards.b.BladeJuggler.class));