mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 21:42:07 -08:00
Implemented optional execution for some replacement effects.
This commit is contained in:
parent
9d1b8192d4
commit
a92e6591fc
8 changed files with 33 additions and 13 deletions
|
|
@ -71,7 +71,8 @@ public class EvilTwin extends CardImpl<EvilTwin> {
|
|||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new EntersBattlefieldEffect(new CopyPermanentEffect(new EvilTwinApplyToPermanent()),
|
||||
"You may have {this} enter the battlefield as a copy of any creature on the battlefield except it gains \"{U}{B}, {T}: Destroy target creature with the same name as this creature\"")));
|
||||
"You may have {this} enter the battlefield as a copy of any creature on the battlefield except it gains \"{U}{B}, {T}: Destroy target creature with the same name as this creature\"",
|
||||
true)));
|
||||
}
|
||||
|
||||
public EvilTwin(final EvilTwin card) {
|
||||
|
|
|
|||
|
|
@ -65,7 +65,8 @@ public class PhantasmalImage extends CardImpl<PhantasmalImage> {
|
|||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(0);
|
||||
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new EntersBattlefieldEffect(new PhantasmalImageCopyEffect(), abilityText));
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new EntersBattlefieldEffect(
|
||||
new PhantasmalImageCopyEffect(), abilityText, true));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,11 @@ public class PhyrexianMetamorph extends CardImpl<PhyrexianMetamorph> {
|
|||
this.color.setBlue(true);
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(0);
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new EntersBattlefieldEffect(new PhyrexianMetamorphEffect(), "You may have {this} enter the battlefield as a copy of any artifact or creature on the battlefield, except it's an artifact in addition to its other types"));
|
||||
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new EntersBattlefieldEffect(
|
||||
new PhyrexianMetamorphEffect(),
|
||||
"You may have {this} enter the battlefield as a copy of any artifact or creature on the battlefield, except it's an artifact in addition to its other types",
|
||||
true));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@
|
|||
package mage.sets.planechase2012;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
|
|
@ -61,10 +61,10 @@ public class SakashimasStudent extends CardImpl<SakashimasStudent> {
|
|||
// Ninjutsu {1}{U}
|
||||
this.addAbility(new NinjutsuAbility(new ManaCostsImpl("{1}{U}")));
|
||||
// You may have Sakashima's Student enter the battlefield as a copy of any creature on the battlefield, except it's still a Ninja in addition to its other creature types.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Constants.Zone.BATTLEFIELD,
|
||||
new EntersBattlefieldEffect(new CopyPermanentEffect(new SakashimasStudentApplyToPermanent()),
|
||||
"You may have {this} enter the battlefield as a copy of any creature on the battlefield, except it's still a Ninja in addition to its other creature types")));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,new EntersBattlefieldEffect(
|
||||
new CopyPermanentEffect(new SakashimasStudentApplyToPermanent()),
|
||||
"You may have {this} enter the battlefield as a copy of any creature on the battlefield, except it's still a Ninja in addition to its other creature types",
|
||||
true)));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,10 @@ public class Clone extends CardImpl<Clone> {
|
|||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(0);
|
||||
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new EntersBattlefieldEffect(new CopyPermanentEffect(), "You may have {this} enter the battlefield as a copy of any creature on the battlefield"));
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new EntersBattlefieldEffect(
|
||||
new CopyPermanentEffect(),
|
||||
"You may have {this} enter the battlefield as a copy of any creature on the battlefield",
|
||||
true));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,10 @@ public class SculptingSteel extends CardImpl<SculptingSteel> {
|
|||
this.expansionSetCode = "10E";
|
||||
|
||||
// You may have Sculpting Steel enter the battlefield as a copy of any artifact on the battlefield.
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new EntersBattlefieldEffect(new CopyPermanentEffect(filter), "You may have {this} enter the battlefield as a copy of any artifact on the battlefield"));
|
||||
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new EntersBattlefieldEffect(
|
||||
new CopyPermanentEffect(filter),
|
||||
"You may have {this} enter the battlefield as a copy of any artifact on the battlefield",
|
||||
true));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,10 @@ public class Vesuva extends CardImpl<Vesuva> {
|
|||
this.expansionSetCode = "TSP";
|
||||
|
||||
// You may have Vesuva enter the battlefield tapped as a copy of any land on the battlefield.
|
||||
EntersBattlefieldEffect effect = new EntersBattlefieldEffect(new TapSourceEffect(true), "You may have {this} enter the battlefield tapped as a copy of any land on the battlefield");
|
||||
EntersBattlefieldEffect effect = new EntersBattlefieldEffect(
|
||||
new TapSourceEffect(true),
|
||||
"You may have {this} enter the battlefield tapped as a copy of any land on the battlefield",
|
||||
true);
|
||||
effect.addEffect(new CopyPermanentEffect(filter));
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@
|
|||
package mage.sets.worldwake;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
|
|
@ -40,6 +40,7 @@ import mage.cards.CardImpl;
|
|||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -52,6 +53,7 @@ public class JwariShapeshifter extends CardImpl<JwariShapeshifter> {
|
|||
static {
|
||||
filter.add(new SubtypePredicate("Ally"));
|
||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||
filter.add(new AnotherPredicate()); // needed because during enters_the_battlefield event the creature is already targetable although it shouldn't
|
||||
}
|
||||
|
||||
public JwariShapeshifter(UUID ownerId) {
|
||||
|
|
@ -65,7 +67,10 @@ public class JwariShapeshifter extends CardImpl<JwariShapeshifter> {
|
|||
this.toughness = new MageInt(0);
|
||||
|
||||
// You may have Jwari Shapeshifter enter the battlefield as a copy of any Ally creature on the battlefield.
|
||||
Ability ability = new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new EntersBattlefieldEffect(new CopyPermanentEffect(filter), "You may have {this} enter the battlefield as a copy of any Ally creature on the battlefield"));
|
||||
Ability ability = new SimpleStaticAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new EntersBattlefieldEffect(new CopyPermanentEffect(filter), null,
|
||||
"You may have {this} enter the battlefield as a copy of any Ally creature on the battlefield", true, true));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue