[DSK] Implement Fear of Immobility

This commit is contained in:
theelk801 2024-09-01 10:58:08 -04:00
parent ae8ab5c165
commit 2e3ee82a7d
2 changed files with 73 additions and 0 deletions

View file

@ -0,0 +1,72 @@
package mage.cards.f;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.TapTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class FearOfImmobility extends CardImpl {
public FearOfImmobility(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{4}{W}");
this.subtype.add(SubType.NIGHTMARE);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
// When Fear of Immobility enters, tap up to one target creature. If an opponent controls that creature, put a stun counter on it.
Ability ability = new EntersBattlefieldTriggeredAbility(new TapTargetEffect());
ability.addEffect(new FearOfImmobilityEffect());
ability.addTarget(new TargetCreaturePermanent(0, 1));
this.addAbility(ability);
}
private FearOfImmobility(final FearOfImmobility card) {
super(card);
}
@Override
public FearOfImmobility copy() {
return new FearOfImmobility(this);
}
}
class FearOfImmobilityEffect extends OneShotEffect {
FearOfImmobilityEffect() {
super(Outcome.Benefit);
staticText = "If an opponent controls that creature, put a stun counter on it";
}
private FearOfImmobilityEffect(final FearOfImmobilityEffect effect) {
super(effect);
}
@Override
public FearOfImmobilityEffect copy() {
return new FearOfImmobilityEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
return permanent != null
&& game.getOpponents(source.getControllerId()).contains(permanent.getControllerId())
&& permanent.addCounters(CounterType.STUN.createInstance(), source, game);
}
}

View file

@ -26,6 +26,7 @@ public final class DuskmournHouseOfHorror extends ExpansionSet {
cards.add(new SetCardInfo("Disturbing Mirth", 212, Rarity.UNCOMMON, mage.cards.d.DisturbingMirth.class));
cards.add(new SetCardInfo("Doomsday Excruciator", 94, Rarity.RARE, mage.cards.d.DoomsdayExcruciator.class));
cards.add(new SetCardInfo("Enduring Tenacity", 95, Rarity.RARE, mage.cards.e.EnduringTenacity.class));
cards.add(new SetCardInfo("Fear of Immobility", 10, Rarity.COMMON, mage.cards.f.FearOfImmobility.class));
cards.add(new SetCardInfo("Fear of Lost Teeth", 97, Rarity.COMMON, mage.cards.f.FearOfLostTeeth.class));
cards.add(new SetCardInfo("Fear of Missing Out", 136, Rarity.RARE, mage.cards.f.FearOfMissingOut.class));
cards.add(new SetCardInfo("Forest", 276, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS));