Moved SkipUntapStepEffect to common effects

This commit is contained in:
Zzooouhh 2017-10-12 18:27:01 +02:00 committed by GitHub
parent c3c8148baf
commit 1e11028c79

View file

@ -32,22 +32,17 @@ import mage.abilities.Ability;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect;
import mage.abilities.effects.common.SkipUntapStepEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.players.Player;
/**
*
* @author jeffwadsworth
* @author jeffwadsworth, edited by L_J
*/
public class Stasis extends CardImpl {
@ -71,28 +66,3 @@ public class Stasis extends CardImpl {
return new Stasis(this);
}
}
class SkipUntapStepEffect extends ContinuousRuleModifyingEffectImpl {
public SkipUntapStepEffect() {
super(Duration.WhileOnBattlefield, Outcome.Neutral, false, false);
staticText = "Players skip their untap steps";
}
public SkipUntapStepEffect(final SkipUntapStepEffect effect) {
super(effect);
}
@Override
public SkipUntapStepEffect copy() {
return new SkipUntapStepEffect(this);
}
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
Player controller = game.getPlayer(source.getControllerId());
return event.getType() == GameEvent.EventType.UNTAP_STEP
&& controller != null
&& game.getState().getPlayersInRange(controller.getId(), game).contains(event.getPlayerId());
}
}