[J22] Implement Hold for Questioning

This commit is contained in:
Evan Kranzler 2022-11-26 09:10:39 -05:00
parent e97311f21f
commit 65ce12bcfd
2 changed files with 58 additions and 0 deletions

View file

@ -0,0 +1,57 @@
package mage.cards.h;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.CantActivateAbilitiesAttachedEffect;
import mage.abilities.effects.common.DontUntapInControllersUntapStepEnchantedEffect;
import mage.abilities.effects.common.TapEnchantedEffect;
import mage.abilities.effects.keyword.InvestigateEffect;
import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class HoldForQuestioning extends CardImpl {
public HoldForQuestioning(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}");
this.subtype.add(SubType.AURA);
// Enchant creature or planeswalker
TargetPermanent auraTarget = new TargetPermanent(StaticFilters.FILTER_PERMANENT_CREATURE_OR_PLANESWALKER);
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
this.addAbility(new EnchantAbility(auraTarget));
// When Hold for Questioning enters the battlefield, tap enchanted permanent and investigate.
Ability ability = new EntersBattlefieldTriggeredAbility(new TapEnchantedEffect("permanent"));
ability.addEffect(new InvestigateEffect().concatBy("and"));
this.addAbility(ability);
// Enchanted permanent doesn't untap during its controller's untap step and its activated abilities can't be activated.
ability = new SimpleStaticAbility(new DontUntapInControllersUntapStepEnchantedEffect("permanent"));
ability.addEffect(new CantActivateAbilitiesAttachedEffect().setText("and its activated abilities can't be activated"));
this.addAbility(ability);
}
private HoldForQuestioning(final HoldForQuestioning card) {
super(card);
}
@Override
public HoldForQuestioning copy() {
return new HoldForQuestioning(this);
}
}

View file

@ -335,6 +335,7 @@ public final class Jumpstart2022 extends ExpansionSet {
cards.add(new SetCardInfo("Heirloom Blade", 775, Rarity.UNCOMMON, mage.cards.h.HeirloomBlade.class));
cards.add(new SetCardInfo("Hero's Blade", 776, Rarity.UNCOMMON, mage.cards.h.HerosBlade.class));
cards.add(new SetCardInfo("Hieroglyphic Illumination", 307, Rarity.COMMON, mage.cards.h.HieroglyphicIllumination.class));
cards.add(new SetCardInfo("Hold for Questioning", 11, Rarity.UNCOMMON, mage.cards.h.HoldForQuestioning.class));
cards.add(new SetCardInfo("Hooded Assassin", 426, Rarity.COMMON, mage.cards.h.HoodedAssassin.class));
cards.add(new SetCardInfo("Hooting Mandrills", 671, Rarity.COMMON, mage.cards.h.HootingMandrills.class));
cards.add(new SetCardInfo("Hordeling Outburst", 552, Rarity.UNCOMMON, mage.cards.h.HordelingOutburst.class));