mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
Revert connectSource changes from TapTargetEffect. Not needed anymore.
This commit is contained in:
parent
705bdabafb
commit
ab0e4b0ddc
10 changed files with 10 additions and 28 deletions
|
@ -68,7 +68,7 @@ public class WhipVine1 extends CardImpl {
|
||||||
// You may choose not to untap Whip Vine during your untap step.
|
// You may choose not to untap Whip Vine during your untap step.
|
||||||
this.addAbility(new SkipUntapOptionalAbility());
|
this.addAbility(new SkipUntapOptionalAbility());
|
||||||
// {tap}: Tap target creature with flying blocked by Whip Vine. That creature doesn't untap during its controller's untap step for as long as Whip Vine remains tapped.
|
// {tap}: Tap target creature with flying blocked by Whip Vine. That creature doesn't untap during its controller's untap step for as long as Whip Vine remains tapped.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(true), new TapSourceCost());
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new TapSourceCost());
|
||||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with flying blocked by {this}");
|
FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with flying blocked by {this}");
|
||||||
filter.add(new AbilityPredicate(FlyingAbility.class));
|
filter.add(new AbilityPredicate(FlyingAbility.class));
|
||||||
filter.add(new BlockedByIdPredicate(this.getId()));
|
filter.add(new BlockedByIdPredicate(this.getId()));
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class PhyrexianGremlins extends CardImpl {
|
||||||
// You may choose not to untap Phyrexian Gremlins during your untap step.
|
// You may choose not to untap Phyrexian Gremlins during your untap step.
|
||||||
this.addAbility(new SkipUntapOptionalAbility());
|
this.addAbility(new SkipUntapOptionalAbility());
|
||||||
// {tap}: Tap target artifact. It doesn't untap during its controller's untap step for as long as Phyrexian Gremlins remains tapped.
|
// {tap}: Tap target artifact. It doesn't untap during its controller's untap step for as long as Phyrexian Gremlins remains tapped.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(true), new TapSourceCost());
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new TapSourceCost());
|
||||||
ability.addTarget(new TargetArtifactPermanent());
|
ability.addTarget(new TargetArtifactPermanent());
|
||||||
ability.addEffect(new DontUntapAsLongAsSourceTappedEffect());
|
ability.addEffect(new DontUntapAsLongAsSourceTappedEffect());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class MoleWorms extends CardImpl {
|
||||||
// You may choose not to untap Mole Worms during your untap step.
|
// You may choose not to untap Mole Worms during your untap step.
|
||||||
this.addAbility(new SkipUntapOptionalAbility());
|
this.addAbility(new SkipUntapOptionalAbility());
|
||||||
// {tap}: Tap target land. It doesn't untap during its controller's untap step for as long as Mole Worms remains tapped.
|
// {tap}: Tap target land. It doesn't untap during its controller's untap step for as long as Mole Worms remains tapped.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(true), new TapSourceCost());
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new TapSourceCost());
|
||||||
ability.addTarget(new TargetLandPermanent());
|
ability.addTarget(new TargetLandPermanent());
|
||||||
ability.addEffect(new DontUntapAsLongAsSourceTappedEffect());
|
ability.addEffect(new DontUntapAsLongAsSourceTappedEffect());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
|
@ -55,7 +55,7 @@ public class DesertersQuarters extends CardImpl {
|
||||||
this.addAbility(new SkipUntapOptionalAbility());
|
this.addAbility(new SkipUntapOptionalAbility());
|
||||||
|
|
||||||
// {6}, T: Tap target creature. It doesn't untap during its controller's untap step for as long as Deserter's Quarters remains tapped.
|
// {6}, T: Tap target creature. It doesn't untap during its controller's untap step for as long as Deserter's Quarters remains tapped.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(true), new GenericManaCost(6));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new GenericManaCost(6));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
ability.addTarget(new TargetCreaturePermanent());
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
ability.addEffect(new DontUntapAsLongAsSourceTappedEffect());
|
ability.addEffect(new DontUntapAsLongAsSourceTappedEffect());
|
||||||
|
|
|
@ -61,7 +61,7 @@ public class SandSquid extends CardImpl {
|
||||||
// You may choose not to untap Sand Squid during your untap step.
|
// You may choose not to untap Sand Squid during your untap step.
|
||||||
this.addAbility(new SkipUntapOptionalAbility());
|
this.addAbility(new SkipUntapOptionalAbility());
|
||||||
// {tap}: Tap target creature. That creature doesn't untap during its controller's untap step for as long as Sand Squid remains tapped.
|
// {tap}: Tap target creature. That creature doesn't untap during its controller's untap step for as long as Sand Squid remains tapped.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(true), new TapSourceCost());
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new TapSourceCost());
|
||||||
ability.addTarget(new TargetCreaturePermanent());
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
ability.addEffect(new DontUntapAsLongAsSourceTappedEffect());
|
ability.addEffect(new DontUntapAsLongAsSourceTappedEffect());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
|
@ -67,7 +67,7 @@ public class AmberPrison extends CardImpl {
|
||||||
this.addAbility(new SkipUntapOptionalAbility());
|
this.addAbility(new SkipUntapOptionalAbility());
|
||||||
|
|
||||||
// {4}, {tap}: Tap target artifact, creature, or land. That permanent doesn't untap during its controller's untap step for as long as Amber Prison remains tapped.
|
// {4}, {tap}: Tap target artifact, creature, or land. That permanent doesn't untap during its controller's untap step for as long as Amber Prison remains tapped.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(true), new GenericManaCost(4));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new GenericManaCost(4));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
ability.addTarget(new TargetPermanent(filter));
|
ability.addTarget(new TargetPermanent(filter));
|
||||||
ability.addEffect(new DontUntapAsLongAsSourceTappedEffect());
|
ability.addEffect(new DontUntapAsLongAsSourceTappedEffect());
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class RustTick extends CardImpl {
|
||||||
this.addAbility(new SkipUntapOptionalAbility());
|
this.addAbility(new SkipUntapOptionalAbility());
|
||||||
|
|
||||||
// {1}, {tap}: Tap target artifact. It doesn't untap during its controller's untap step for as long as Rust Tick remains tapped.
|
// {1}, {tap}: Tap target artifact. It doesn't untap during its controller's untap step for as long as Rust Tick remains tapped.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(true), new GenericManaCost(1));
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new GenericManaCost(1));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
ability.addTarget(new TargetArtifactPermanent());
|
ability.addTarget(new TargetArtifactPermanent());
|
||||||
ability.addEffect(new DontUntapAsLongAsSourceTappedEffect());
|
ability.addEffect(new DontUntapAsLongAsSourceTappedEffect());
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class ThalakosDreamsower extends CardImpl {
|
||||||
// You may choose not to untap Thalakos Dreamsower during your untap step.
|
// You may choose not to untap Thalakos Dreamsower during your untap step.
|
||||||
this.addAbility(new SkipUntapOptionalAbility());
|
this.addAbility(new SkipUntapOptionalAbility());
|
||||||
// Whenever Thalakos Dreamsower deals damage to an opponent, tap target creature. That creature doesn't untap during its controller's untap step for as long as Thalakos Dreamsower remains tapped.
|
// Whenever Thalakos Dreamsower deals damage to an opponent, tap target creature. That creature doesn't untap during its controller's untap step for as long as Thalakos Dreamsower remains tapped.
|
||||||
Ability ability = new DealsDamageToOpponentTriggeredAbility(new TapTargetEffect(true), false);
|
Ability ability = new DealsDamageToOpponentTriggeredAbility(new TapTargetEffect(), false);
|
||||||
ability.addTarget(new TargetCreaturePermanent());
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
ability.addEffect(new DontUntapAsLongAsSourceTappedEffect());
|
ability.addEffect(new DontUntapAsLongAsSourceTappedEffect());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class ManaLeech extends CardImpl {
|
||||||
// You may choose not to untap Mana Leech during your untap step.
|
// You may choose not to untap Mana Leech during your untap step.
|
||||||
this.addAbility(new SkipUntapOptionalAbility());
|
this.addAbility(new SkipUntapOptionalAbility());
|
||||||
// {tap}: Tap target land. It doesn't untap during its controller's untap step for as long as Mana Leech remains tapped.
|
// {tap}: Tap target land. It doesn't untap during its controller's untap step for as long as Mana Leech remains tapped.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(true), new TapSourceCost());
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TapTargetEffect(), new TapSourceCost());
|
||||||
ability.addTarget(new TargetLandPermanent());
|
ability.addTarget(new TargetLandPermanent());
|
||||||
ability.addEffect(new DontUntapAsLongAsSourceTappedEffect());
|
ability.addEffect(new DontUntapAsLongAsSourceTappedEffect());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
|
@ -43,23 +43,12 @@ import mage.util.CardUtil;
|
||||||
*/
|
*/
|
||||||
public class TapTargetEffect extends OneShotEffect {
|
public class TapTargetEffect extends OneShotEffect {
|
||||||
|
|
||||||
private final boolean connectSource;
|
|
||||||
|
|
||||||
public TapTargetEffect() {
|
public TapTargetEffect() {
|
||||||
this(null, false);
|
super(Outcome.Tap);
|
||||||
}
|
|
||||||
|
|
||||||
public TapTargetEffect(boolean connectSource) {
|
|
||||||
this(null, connectSource);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public TapTargetEffect(String text) {
|
public TapTargetEffect(String text) {
|
||||||
this(text, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public TapTargetEffect(String text, boolean connectSource) {
|
|
||||||
super(Outcome.Tap);
|
super(Outcome.Tap);
|
||||||
this.connectSource = connectSource;
|
|
||||||
if(text != null) {
|
if(text != null) {
|
||||||
this.staticText = text;
|
this.staticText = text;
|
||||||
}
|
}
|
||||||
|
@ -67,7 +56,6 @@ public class TapTargetEffect extends OneShotEffect {
|
||||||
|
|
||||||
public TapTargetEffect(final TapTargetEffect effect) {
|
public TapTargetEffect(final TapTargetEffect effect) {
|
||||||
super(effect);
|
super(effect);
|
||||||
this.connectSource = effect.connectSource;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -81,12 +69,6 @@ public class TapTargetEffect extends OneShotEffect {
|
||||||
Permanent permanent = game.getPermanent(target);
|
Permanent permanent = game.getPermanent(target);
|
||||||
if (permanent != null) {
|
if (permanent != null) {
|
||||||
permanent.tap(game);
|
permanent.tap(game);
|
||||||
if(connectSource) {
|
|
||||||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
|
||||||
if(sourcePermanent != null) {
|
|
||||||
sourcePermanent.addConnectedCard(sourcePermanent.getName(), permanent.getId());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue