forked from External/mage
* 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:
parent
ba57478149
commit
9039eef0f9
40 changed files with 283 additions and 144 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue