mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
commit
31feb14bc0
1 changed files with 5 additions and 20 deletions
|
@ -9,10 +9,11 @@ import java.util.UUID;
|
||||||
import mage.constants.*;
|
import mage.constants.*;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.effects.ReplacementEffectImpl;
|
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
|
import mage.game.events.GameEvent.EventType;
|
||||||
|
import mage.abilities.effects.ContinuousRuleModifiyingEffectImpl;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -40,10 +41,10 @@ public class EonHub extends CardImpl {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class SkipUpkeepStepEffect extends ReplacementEffectImpl {
|
class SkipUpkeepStepEffect extends ContinuousRuleModifiyingEffectImpl {
|
||||||
|
|
||||||
public SkipUpkeepStepEffect() {
|
public SkipUpkeepStepEffect() {
|
||||||
super(Duration.WhileOnBattlefield, Outcome.Neutral);
|
super(Duration.WhileOnBattlefield, Outcome.Neutral, false, false);
|
||||||
staticText = "Players skip their upkeep steps";
|
staticText = "Players skip their upkeep steps";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,25 +57,9 @@ class SkipUpkeepStepEffect extends ReplacementEffectImpl {
|
||||||
return new SkipUpkeepStepEffect(this);
|
return new SkipUpkeepStepEffect(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean apply(Game game, Ability source) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean checksEventType(GameEvent event, Game game) {
|
|
||||||
return event.getType() == GameEvent.EventType.UPKEEP_STEP;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
return controller != null && controller.getInRange().contains(event.getPlayerId());
|
return event.getType() == EventType.UPKEEP_STEP && controller != null && controller.getInRange().contains(event.getPlayerId());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue