[WHO] Implement Vislor Turlough

This commit is contained in:
theelk801 2025-05-02 10:04:53 -04:00
parent 3138dc4b1e
commit 67baf777ce
3 changed files with 134 additions and 5 deletions

View file

@ -0,0 +1,129 @@
package mage.cards.v;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.dynamicvalue.common.CardsInControllerHandCount;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
import mage.abilities.effects.common.combat.GoadTargetEffect;
import mage.abilities.effects.common.continuous.GainControlTargetEffect;
import mage.abilities.keyword.DoctorsCompanionAbility;
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.TargetPlayer;
import mage.target.common.TargetOpponent;
import mage.target.targetpointer.FixedTarget;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class VislorTurlough extends CardImpl {
public VislorTurlough(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.ROGUE);
this.power = new MageInt(2);
this.toughness = new MageInt(5);
// Deal with the Black Guardian -- When Vislor Turlough enters the battlefield, you may have an opponent gain control of it. If you do, it's goaded for as long as they control it.
this.addAbility(new EntersBattlefieldTriggeredAbility(new VislorTurloughEffect(), true)
.withFlavorWord("Deal with the Black Guardian"));
// At the beginning of your end step, draw a card, then you lose life equal to the number of cards in your hand.
Ability ability = new BeginningOfEndStepTriggeredAbility(new DrawCardSourceControllerEffect(1));
ability.addEffect(new LoseLifeSourceControllerEffect(CardsInControllerHandCount.ANY)
.setText(", then you lose life equal to the number of cards in your hand"));
this.addAbility(ability);
// Doctor's companion
this.addAbility(DoctorsCompanionAbility.getInstance());
}
private VislorTurlough(final VislorTurlough card) {
super(card);
}
@Override
public VislorTurlough copy() {
return new VislorTurlough(this);
}
}
class VislorTurloughEffect extends OneShotEffect {
VislorTurloughEffect() {
super(Outcome.Benefit);
staticText = "have an opponent gain control of it. If you do, it's goaded for as long as they control it";
}
private VislorTurloughEffect(final VislorTurloughEffect effect) {
super(effect);
}
@Override
public VislorTurloughEffect copy() {
return new VislorTurloughEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
if (player == null || permanent == null) {
return false;
}
TargetPlayer target = new TargetOpponent(0, 1, true);
player.choose(Outcome.GainControl, target, source, game);
Player opponent = game.getPlayer(target.getFirstTarget());
if (opponent == null) {
return false;
}
game.addEffect(new GainControlTargetEffect(
Duration.Custom, true, opponent.getId()
).setTargetPointer(new FixedTarget(permanent, game)), source);
game.addEffect(new VislorTurloughGoadEffect(opponent.getId(), permanent, game), source);
return true;
}
}
class VislorTurloughGoadEffect extends GoadTargetEffect {
private final UUID controllerId;
VislorTurloughGoadEffect(UUID controllerId, Permanent permanent, Game game) {
super(Duration.Custom);
this.controllerId = controllerId;
this.setTargetPointer(new FixedTarget(permanent, game));
}
private VislorTurloughGoadEffect(final VislorTurloughGoadEffect effect) {
super(effect);
this.controllerId = effect.controllerId;
}
@Override
public VislorTurloughGoadEffect copy() {
return new VislorTurloughGoadEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
if (permanent != null && permanent.isControlledBy(controllerId)) {
return super.apply(game, source);
}
discard();
return false;
}
}

View file

@ -1150,10 +1150,10 @@ public final class DoctorWho extends ExpansionSet {
cards.add(new SetCardInfo("Vineglimmer Snarl", 329, Rarity.RARE, mage.cards.v.VineglimmerSnarl.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Vineglimmer Snarl", 532, Rarity.RARE, mage.cards.v.VineglimmerSnarl.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Vineglimmer Snarl", 920, Rarity.RARE, mage.cards.v.VineglimmerSnarl.class, NON_FULL_USE_VARIOUS));
//cards.add(new SetCardInfo("Vislor Turlough", 377, Rarity.RARE, mage.cards.v.VislorTurlough.class, NON_FULL_USE_VARIOUS));
//cards.add(new SetCardInfo("Vislor Turlough", 679, Rarity.RARE, mage.cards.v.VislorTurlough.class, NON_FULL_USE_VARIOUS));
//cards.add(new SetCardInfo("Vislor Turlough", 74, Rarity.RARE, mage.cards.v.VislorTurlough.class, NON_FULL_USE_VARIOUS));
//cards.add(new SetCardInfo("Vislor Turlough", 968, Rarity.RARE, mage.cards.v.VislorTurlough.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Vislor Turlough", 377, Rarity.RARE, mage.cards.v.VislorTurlough.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Vislor Turlough", 679, Rarity.RARE, mage.cards.v.VislorTurlough.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Vislor Turlough", 74, Rarity.RARE, mage.cards.v.VislorTurlough.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Vislor Turlough", 968, Rarity.RARE, mage.cards.v.VislorTurlough.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Vrestin, Menoptra Leader", 1042, Rarity.RARE, mage.cards.v.VrestinMenoptraLeader.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Vrestin, Menoptra Leader", 166, Rarity.RARE, mage.cards.v.VrestinMenoptraLeader.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Vrestin, Menoptra Leader", 451, Rarity.RARE, mage.cards.v.VrestinMenoptraLeader.class, NON_FULL_USE_VARIOUS));

View file

@ -33,7 +33,7 @@ public class GoadTargetEffect extends ContinuousEffectImpl {
super(duration, Layer.RulesEffects, SubLayer.NA, Outcome.Detriment);
}
private GoadTargetEffect(final GoadTargetEffect effect) {
protected GoadTargetEffect(final GoadTargetEffect effect) {
super(effect);
}