some more changes to CDA effects, tested and working correctly

This commit is contained in:
Evan Kranzler 2017-10-02 16:32:36 -04:00
parent 6b2c20b29e
commit 549103a2f0
7 changed files with 19 additions and 12 deletions

View file

@ -17,11 +17,11 @@ import mage.filter.predicate.permanent.AnotherPredicate;
import mage.target.common.TargetControlledPermanent;
public class ApocalypseDemon extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("nother creature");
static {
filter.add(new CardTypePredicate(CardType.CREATURE));
static {
filter.add(new CardTypePredicate(CardType.CREATURE));
filter.add(new AnotherPredicate());
}
@ -37,10 +37,10 @@ public class ApocalypseDemon extends CardImpl {
// At the beginning of your upkeep, tap Apocalypse Demon unless you sacrifice another creature.
TapSourceUnlessPaysEffect tapEffect = new TapSourceUnlessPaysEffect(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
tapEffect.setText("At the beginning of your upkeep, tap Apocalypse Demon unless you sacrifice another creature.");
tapEffect.setText("tap {this} unless you sacrifice another creature.");
this.addAbility(new BeginningOfUpkeepTriggeredAbility(tapEffect, TargetController.YOU, false));
}
}
public ApocalypseDemon(final ApocalypseDemon apocalypseDemon) {
super(apocalypseDemon);
}

View file

@ -17,11 +17,8 @@ import mage.util.SubTypeList;
import java.io.Serializable;
import java.util.EnumSet;
import java.util.Iterator;
import java.util.List;
import java.util.UUID;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect;
public interface MageObject extends MageItem, Serializable {
@ -201,7 +198,7 @@ public interface MageObject extends MageItem, Serializable {
TextPart addTextPart(TextPart textPart);
public void removePTCDA();
void removePTCDA();
default void changeSubType(SubType fromSubType, SubType toSubType) {

View file

@ -342,6 +342,7 @@ public abstract class MageObjectImpl implements MageObject {
}
}
@Override
public void removePTCDA() {
for (Iterator<Ability> iter = this.getAbilities().iterator(); iter.hasNext();) {
Ability ability = iter.next();

View file

@ -215,4 +215,7 @@ public abstract class Designation implements MageObject {
throw new UnsupportedOperationException("Unsupported operation");
}
@Override
public void removePTCDA() {
}
}

View file

@ -249,4 +249,7 @@ public class Commander implements CommandObject {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
@Override
public void removePTCDA() {
}
}

View file

@ -268,4 +268,7 @@ public abstract class StackObjImpl implements StackObject {
return name;
}
@Override
public void removePTCDA() {
}
}

View file

@ -50,7 +50,7 @@ public interface StackObject extends MageObject, Controllable {
// int getConvertedManaCost();
boolean chooseNewTargets(Game game, UUID playerId, boolean forceChange, boolean onlyOneTarget, FilterPermanent filterNewTarget);
StackObject createCopyOnStack(Game game, Ability source, UUID newControllerId, boolean chooseNewTargets);
@Override