* Added early event type check for replacement effects to speed up game execution (not all effects already implement the new check).

This commit is contained in:
LevelX2 2014-12-26 17:28:13 +01:00
parent ba57478149
commit 9039eef0f9
40 changed files with 283 additions and 144 deletions

View file

@ -37,11 +37,21 @@ import mage.game.events.GameEvent;
* @author BetaSteward_at_googlemail.com
*/
public interface ReplacementEffect extends ContinuousEffect {
boolean replaceEvent(GameEvent event, Ability source, Game game);
/**
* This check for the relevant events is called at first to prevent further actions if
* the current event is ignored from this effect
* @param event
* @param game
* @return
*/
boolean checksEventType(GameEvent event, Game game);
boolean applies(GameEvent event, Ability source, Game game);
boolean hasSelfScope();
@Override
public ContinuousEffect copy();