Some clean up changes.

This commit is contained in:
LevelX2 2016-10-02 17:27:05 +02:00
parent 5469facdd6
commit 5d94ed8dd0
43 changed files with 187 additions and 343 deletions

View file

@ -82,9 +82,7 @@ class ChancellorEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
ability.setSourceId(source.getSourceId());
ability.setControllerId(source.getControllerId());
game.addDelayedTriggeredAbility(ability);
game.addDelayedTriggeredAbility(ability, source);
return true;
}

View file

@ -29,10 +29,7 @@ public class MistmeadowWitchEffect extends OneShotEffect {
if (permanent.moveToExile(source.getSourceId(), "Mistmeadow Witch Exile", source.getSourceId(), game)) {
//create delayed triggered ability
AtTheBeginOfNextEndStepDelayedTriggeredAbility delayedAbility = new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new ReturnFromExileEffect(source.getSourceId(), Zone.BATTLEFIELD));
delayedAbility.setSourceId(source.getSourceId());
delayedAbility.setControllerId(source.getControllerId());
delayedAbility.setSourceObject(source.getSourceObject(game), game);
game.addDelayedTriggeredAbility(delayedAbility);
game.addDelayedTriggeredAbility(delayedAbility, source);
return true;
}
}

View file

@ -47,26 +47,19 @@ import mage.util.CardUtil;
*/
public class ReturnToHandTargetEffect extends OneShotEffect {
boolean withName;
protected boolean multitargetHandling;
public ReturnToHandTargetEffect() {
this(true);
this(false);
}
public ReturnToHandTargetEffect(boolean withName) {
this(withName, false);
}
public ReturnToHandTargetEffect(boolean withName, boolean multitargetHandling) {
public ReturnToHandTargetEffect(boolean multitargetHandling) {
super(Outcome.ReturnToHand);
this.withName = withName;
this.multitargetHandling = multitargetHandling;
}
public ReturnToHandTargetEffect(final ReturnToHandTargetEffect effect) {
super(effect);
this.withName = effect.withName;
this.multitargetHandling = effect.multitargetHandling;
}