[JOU] Added 2 cards and made some fixes to JOU cards.

This commit is contained in:
LevelX2 2014-04-16 01:41:41 +02:00
parent 5410e10581
commit fb145b2811
7 changed files with 189 additions and 20 deletions

View file

@ -43,7 +43,11 @@ import mage.game.permanent.Permanent;
public abstract class RestrictionEffect<T extends RestrictionEffect<T>> extends ContinuousEffectImpl<T> {
public RestrictionEffect(Duration duration) {
super(duration, Outcome.Detriment);
this(duration, Outcome.Detriment);
}
public RestrictionEffect(Duration duration, Outcome outcome) {
super(duration, outcome);
this.effectType = EffectType.RESTRICTION;
}

View file

@ -31,6 +31,7 @@ import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.effects.RestrictionEffect;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.Target;
@ -43,7 +44,7 @@ import mage.target.Target;
public class CantBeBlockedTargetEffect extends RestrictionEffect<CantBeBlockedTargetEffect> {
public CantBeBlockedTargetEffect(Duration duration) {
super(duration);
super(duration, Outcome.Benefit);
}
public CantBeBlockedTargetEffect(final CantBeBlockedTargetEffect effect) {
@ -52,10 +53,7 @@ public class CantBeBlockedTargetEffect extends RestrictionEffect<CantBeBlockedTa
@Override
public boolean applies(Permanent permanent, Ability source, Game game) {
if (this.getTargetPointer().getTargets(game, source).contains(permanent.getId())) {
return true;
}
return false;
return this.getTargetPointer().getTargets(game, source).contains(permanent.getId());
}
@Override