forked from External/mage
fixed EntersBattlefieldTappedAbility - singleton was a bad idea
This commit is contained in:
parent
428609ab8b
commit
a99ef071c8
15 changed files with 24 additions and 27 deletions
|
|
@ -53,7 +53,7 @@ public class ReassemblingSkeleton extends CardImpl<ReassemblingSkeleton> {
|
|||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnSourceFromGraveyardToBattlefieldEffect(true), new ManaCostsImpl("{1}{B}")));
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(true), new ManaCostsImpl("{1}{B}")));
|
||||
}
|
||||
|
||||
public ReassemblingSkeleton(final ReassemblingSkeleton card) {
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public class RottingLegion extends CardImpl<RottingLegion> {
|
|||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
this.addAbility(EntersBattlefieldTappedAbility.getInstance());
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
}
|
||||
|
||||
public RottingLegion(final RottingLegion card) {
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public class CrumblingNecropolis extends CardImpl<CrumblingNecropolis> {
|
|||
public CrumblingNecropolis(UUID ownerId) {
|
||||
super(ownerId, 222, "Crumbling Necropolis", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, null);
|
||||
this.expansionSetCode = "ALA";
|
||||
this.addAbility(EntersBattlefieldTappedAbility.getInstance());
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
this.addAbility(new RedManaAbility());
|
||||
this.addAbility(new BlueManaAbility());
|
||||
this.addAbility(new BlackManaAbility());
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public class SavageLands extends CardImpl<SavageLands> {
|
|||
public SavageLands(UUID ownerId) {
|
||||
super(ownerId, 228, "Savage Lands", Rarity.UNCOMMON, new CardType[]{CardType.LAND}, null);
|
||||
this.expansionSetCode = "ALA";
|
||||
this.addAbility(EntersBattlefieldTappedAbility.getInstance());
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
this.addAbility(new RedManaAbility());
|
||||
this.addAbility(new GreenManaAbility());
|
||||
this.addAbility(new BlackManaAbility());
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public class CelestialColonnade extends CardImpl<CelestialColonnade> {
|
|||
public CelestialColonnade(UUID ownerId) {
|
||||
super(ownerId, 133, "Celestial Colonnade", Rarity.RARE, new CardType[]{CardType.LAND}, null);
|
||||
this.expansionSetCode = "WWK";
|
||||
this.addAbility(EntersBattlefieldTappedAbility.getInstance());
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
this.addAbility(new BlueManaAbility());
|
||||
this.addAbility(new WhiteManaAbility());
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new CelestialColonnadeToken(), "land"), new ManaCostsImpl("{3}{W}{U}")));
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ public class KhalniGarden extends CardImpl<KhalniGarden> {
|
|||
public KhalniGarden(UUID ownerId) {
|
||||
super(ownerId, 138, "Khalni Garden", Rarity.COMMON, new CardType[]{CardType.LAND}, null);
|
||||
this.expansionSetCode = "WWK";
|
||||
this.addAbility(EntersBattlefieldTappedAbility.getInstance());
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new PlantToken()), false));
|
||||
this.addAbility(new GreenManaAbility());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public class LavaclawReaches extends CardImpl<LavaclawReaches> {
|
|||
public LavaclawReaches(UUID ownerId) {
|
||||
super(ownerId, 139, "Lavaclaw Reaches", Rarity.RARE, new CardType[]{CardType.LAND}, null);
|
||||
this.expansionSetCode = "WWK";
|
||||
this.addAbility(EntersBattlefieldTappedAbility.getInstance());
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
this.addAbility(new BlackManaAbility());
|
||||
this.addAbility(new RedManaAbility());
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new LavaclawReachesToken(), "land"), new ManaCostsImpl("{1}{B}{R}")));
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public class RagingRavine extends CardImpl<RagingRavine> {
|
|||
public RagingRavine(UUID ownerId) {
|
||||
super(ownerId, 141, "Raging Ravine", Rarity.RARE, new CardType[]{CardType.LAND}, null);
|
||||
this.expansionSetCode = "WWK";
|
||||
this.addAbility(EntersBattlefieldTappedAbility.getInstance());
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
this.addAbility(new GreenManaAbility());
|
||||
this.addAbility(new RedManaAbility());
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new RagingRavineToken(), "land"), new ManaCostsImpl("{2}{R}{G}")));
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public class SejiriSteppe extends CardImpl<SejiriSteppe> {
|
|||
public SejiriSteppe(UUID ownerId) {
|
||||
super(ownerId, 142, "Sejiri Steppe", Rarity.COMMON, new CardType[]{CardType.LAND}, null);
|
||||
this.expansionSetCode = "WWK";
|
||||
this.addAbility(EntersBattlefieldTappedAbility.getInstance());
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new GainProtectionFromColorTargetEffect(Duration.EndOfTurn), false);
|
||||
ability.addTarget(new TargetControlledCreaturePermanent());
|
||||
ability.addChoice(new ChoiceColor());
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ public class StirringWildwood extends CardImpl<StirringWildwood> {
|
|||
public StirringWildwood(UUID ownerId) {
|
||||
super(ownerId, 144, "Stirring Wildwood", Rarity.RARE, new CardType[]{CardType.LAND}, null);
|
||||
this.expansionSetCode = "WWK";
|
||||
this.addAbility(EntersBattlefieldTappedAbility.getInstance());
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
this.addAbility(new GreenManaAbility());
|
||||
this.addAbility(new WhiteManaAbility());
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEOTEffect(new StirringWildwoodToken(), "land"), new ManaCostsImpl("{1}{G}{W}")));
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public class KabiraCrossroads extends CardImpl<KabiraCrossroads> {
|
|||
public KabiraCrossroads(UUID ownerId) {
|
||||
super(ownerId, 216, "Kabira Crossroads", Rarity.COMMON, new CardType[]{CardType.LAND}, null);
|
||||
this.expansionSetCode = "ZEN";
|
||||
this.addAbility(EntersBattlefieldTappedAbility.getInstance());
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(2), false));
|
||||
this.addAbility(new WhiteManaAbility());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ public class OranRiefTheVastwood extends CardImpl<OranRiefTheVastwood> {
|
|||
public OranRiefTheVastwood(UUID ownerId) {
|
||||
super(ownerId, 221, "Oran-Rief, the Vastwood", Rarity.RARE, new CardType[]{CardType.LAND}, null);
|
||||
this.expansionSetCode = "ZEN";
|
||||
this.addAbility(EntersBattlefieldTappedAbility.getInstance());
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
this.addAbility(new GreenManaAbility());
|
||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new OranRiefTheVastwoodEffect(), new TapSourceCost()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public class TeeteringPeaks extends CardImpl<TeeteringPeaks> {
|
|||
public TeeteringPeaks(UUID ownerId) {
|
||||
super(ownerId, 226, "Teetering Peaks", Rarity.COMMON, new CardType[]{CardType.LAND}, null);
|
||||
this.expansionSetCode = "ZEN";
|
||||
this.addAbility(EntersBattlefieldTappedAbility.getInstance());
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new BoostTargetEffect(2, 0, Duration.EndOfTurn), false);
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -40,20 +40,14 @@ import mage.abilities.effects.common.TapSourceEffect;
|
|||
*/
|
||||
public class EntersBattlefieldTappedAbility extends StaticAbility<EntersBattlefieldTappedAbility> {
|
||||
|
||||
private static final EntersBattlefieldTappedAbility fINSTANCE = new EntersBattlefieldTappedAbility();
|
||||
|
||||
private Object readResolve() throws ObjectStreamException {
|
||||
return fINSTANCE;
|
||||
}
|
||||
|
||||
public static EntersBattlefieldTappedAbility getInstance() {
|
||||
return fINSTANCE;
|
||||
}
|
||||
|
||||
private EntersBattlefieldTappedAbility() {
|
||||
public EntersBattlefieldTappedAbility() {
|
||||
super(Zone.BATTLEFIELD, new EntersBattlefieldEffect(new TapSourceEffect()));
|
||||
}
|
||||
|
||||
public EntersBattlefieldTappedAbility(final EntersBattlefieldTappedAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "{this} enters the battlefield tapped";
|
||||
|
|
@ -61,7 +55,7 @@ public class EntersBattlefieldTappedAbility extends StaticAbility<EntersBattlefi
|
|||
|
||||
@Override
|
||||
public EntersBattlefieldTappedAbility copy() {
|
||||
return fINSTANCE;
|
||||
return new EntersBattlefieldTappedAbility(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -135,10 +135,13 @@ public class Spell<T extends Spell<T>> implements StackObject, Card {
|
|||
if (!player.chooseTarget(ability.getEffects().get(0).getOutcome(), newTarget, ability, game))
|
||||
newTarget.addTarget(targetId, ability, game);
|
||||
}
|
||||
else {
|
||||
newTarget.addTarget(targetId, ability, game);
|
||||
}
|
||||
}
|
||||
target.getTargets().clear();
|
||||
target.clearChosen();
|
||||
for (UUID newTargetId: newTarget.getTargets()) {
|
||||
target.getTargets().add(newTargetId);
|
||||
target.addTarget(newTargetId, ability, game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue