[MKM] Kellan, Inquisitive Prodigy (#11819)

This commit is contained in:
Matthew Wilson 2024-02-22 03:54:21 +02:00 committed by GitHub
parent 540ee3cd6d
commit 41201a922e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 103 additions and 0 deletions

View file

@ -0,0 +1,102 @@
package mage.cards.k;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continuous.PlayAdditionalLandsControllerEffect;
import mage.abilities.effects.keyword.InvestigateEffect;
import mage.cards.AdventureCard;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.TargetPermanent;
/**
*
* @author DominionSpy
*/
public final class KellanInquisitiveProdigy extends AdventureCard {
public KellanInquisitiveProdigy(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, new CardType[]{CardType.SORCERY}, "{2}{G}{U}", "Tail the Suspect", "{G}{U}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.FAERIE);
this.subtype.add(SubType.DETECTIVE);
this.power = new MageInt(3);
this.toughness = new MageInt(4);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Vigilance
this.addAbility(VigilanceAbility.getInstance());
// Whenever Kellan, Inquisitive Prodigy attacks, destroy up to one target artifact. If you controlled that permanent, draw a card.
Ability ability = new AttacksTriggeredAbility(new KellanInquisitiveProdigyEffect());
ability.addTarget(new TargetPermanent(0, 1, StaticFilters.FILTER_PERMANENT_ARTIFACT));
this.addAbility(ability);
// Tail the Suspect
// Investigate. You may play an additional land this turn.
this.getSpellCard().getSpellAbility().addEffect(new InvestigateEffect());
this.getSpellCard().getSpellAbility().addEffect(new PlayAdditionalLandsControllerEffect(1, Duration.EndOfTurn));
this.finalizeAdventure();
}
private KellanInquisitiveProdigy(final KellanInquisitiveProdigy card) {
super(card);
}
@Override
public KellanInquisitiveProdigy copy() {
return new KellanInquisitiveProdigy(this);
}
}
class KellanInquisitiveProdigyEffect extends OneShotEffect {
KellanInquisitiveProdigyEffect() {
super(Outcome.Benefit);
staticText = "destroy up to one target artifact. " +
"If you controlled that permanent, draw a card";
}
private KellanInquisitiveProdigyEffect(final KellanInquisitiveProdigyEffect effect) {
super(effect);
}
@Override
public KellanInquisitiveProdigyEffect copy() {
return new KellanInquisitiveProdigyEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
if (controller == null || permanent == null) {
return false;
}
boolean isMine = permanent.isControlledBy(source.getControllerId());
permanent.destroy(source, game, false);
if (isMine) {
controller.drawCards(1, source, game);
}
return true;
}
}

View file

@ -139,6 +139,7 @@ public final class MurdersAtKarlovManor extends ExpansionSet {
cards.add(new SetCardInfo("Izoni, Center of the Web", 209, Rarity.RARE, mage.cards.i.IzoniCenterOfTheWeb.class));
cards.add(new SetCardInfo("Jaded Analyst", 62, Rarity.COMMON, mage.cards.j.JadedAnalyst.class));
cards.add(new SetCardInfo("Judith, Carnage Connoisseur", 210, Rarity.RARE, mage.cards.j.JudithCarnageConnoisseur.class));
cards.add(new SetCardInfo("Kellan, Inquisitive Prodigy", 212, Rarity.RARE, mage.cards.k.KellanInquisitiveProdigy.class));
cards.add(new SetCardInfo("Knife", 134, Rarity.UNCOMMON, mage.cards.k.Knife.class));
cards.add(new SetCardInfo("Kraul Whipcracker", 213, Rarity.UNCOMMON, mage.cards.k.KraulWhipcracker.class));
cards.add(new SetCardInfo("Krenko's Buzzcrusher", 136, Rarity.RARE, mage.cards.k.KrenkosBuzzcrusher.class));