mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
removed redundant modifiers from interfaces
This commit is contained in:
parent
18b4be3ec7
commit
fde10788db
53 changed files with 762 additions and 755 deletions
|
|
@ -4,5 +4,6 @@ package mage.client.util;
|
|||
* @author nantuko
|
||||
*/
|
||||
public interface Command {
|
||||
public void execute();
|
||||
|
||||
void execute();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,11 +17,12 @@ import java.beans.PropertyChangeListener;
|
|||
* @author Clemens Koza
|
||||
*/
|
||||
public interface BoundBean {
|
||||
public void addPropertyChangeListener(PropertyChangeListener listener);
|
||||
|
||||
public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener);
|
||||
void addPropertyChangeListener(PropertyChangeListener listener);
|
||||
|
||||
public void removePropertyChangeListener(PropertyChangeListener listener);
|
||||
void addPropertyChangeListener(String propertyName, PropertyChangeListener listener);
|
||||
|
||||
public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener);
|
||||
void removePropertyChangeListener(PropertyChangeListener listener);
|
||||
|
||||
void removePropertyChangeListener(String propertyName, PropertyChangeListener listener);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,22 +23,23 @@ import org.mage.plugins.card.dl.beans.properties.bound.BoundProperties;
|
|||
* @author Clemens Koza
|
||||
*/
|
||||
public interface Properties {
|
||||
public <T> Property<T> property(String name, Property<T> property);
|
||||
|
||||
public <E> List<E> list(String name, List<E> list);
|
||||
<T> Property<T> property(String name, Property<T> property);
|
||||
|
||||
public <E> Set<E> set(String name, Set<E> set);
|
||||
<E> List<E> list(String name, List<E> list);
|
||||
|
||||
public <K, V> Map<K, V> map(String name, Map<K, V> map);
|
||||
<E> Set<E> set(String name, Set<E> set);
|
||||
|
||||
<K, V> Map<K, V> map(String name, Map<K, V> map);
|
||||
|
||||
|
||||
public <T> Property<T> property(String name, T value);
|
||||
<T> Property<T> property(String name, T value);
|
||||
|
||||
public <T> Property<T> property(String name);
|
||||
<T> Property<T> property(String name);
|
||||
|
||||
public <E> List<E> list(String name);
|
||||
<E> List<E> list(String name);
|
||||
|
||||
public <E> Set<E> set(String name);
|
||||
<E> Set<E> set(String name);
|
||||
|
||||
public <K, V> Map<K, V> map(String name);
|
||||
<K, V> Map<K, V> map(String name);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,19 +14,20 @@ package org.mage.plugins.card.dl.beans.properties;
|
|||
* @author Clemens Koza
|
||||
*/
|
||||
public interface Property<T> {
|
||||
public void setValue(T value);
|
||||
|
||||
public T getValue();
|
||||
void setValue(T value);
|
||||
|
||||
T getValue();
|
||||
|
||||
/**
|
||||
* A property's hash code is its value's hashCode, or {@code null} if the value is null.
|
||||
*/
|
||||
@Override
|
||||
public int hashCode();
|
||||
int hashCode();
|
||||
|
||||
/**
|
||||
* Two properties are equal if their values are equal.
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object obj);
|
||||
boolean equals(Object obj);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,22 +3,23 @@ package org.mage.plugins.card.utils;
|
|||
import java.awt.*;
|
||||
|
||||
public interface ImageManager {
|
||||
public Image getAppImage();
|
||||
public Image getAppSmallImage();
|
||||
public Image getAppFlashedImage();
|
||||
|
||||
public Image getSicknessImage();
|
||||
public Image getDayImage();
|
||||
public Image getNightImage();
|
||||
Image getAppImage();
|
||||
Image getAppSmallImage();
|
||||
Image getAppFlashedImage();
|
||||
|
||||
public Image getDlgAcceptButtonImage();
|
||||
public Image getDlgActiveAcceptButtonImage();
|
||||
public Image getDlgCancelButtonImage();
|
||||
public Image getDlgActiveCancelButtonImage();
|
||||
public Image getDlgPrevButtonImage();
|
||||
public Image getDlgActivePrevButtonImage();
|
||||
public Image getDlgNextButtonImage();
|
||||
public Image getDlgActiveNextButtonImage();
|
||||
Image getSicknessImage();
|
||||
Image getDayImage();
|
||||
Image getNightImage();
|
||||
|
||||
public Image getPhaseImage(String phase);
|
||||
Image getDlgAcceptButtonImage();
|
||||
Image getDlgActiveAcceptButtonImage();
|
||||
Image getDlgCancelButtonImage();
|
||||
Image getDlgActiveCancelButtonImage();
|
||||
Image getDlgPrevButtonImage();
|
||||
Image getDlgActivePrevButtonImage();
|
||||
Image getDlgNextButtonImage();
|
||||
Image getDlgActiveNextButtonImage();
|
||||
|
||||
Image getPhaseImage(String phase);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import mage.view.CardView;
|
|||
* @author nantuko
|
||||
*/
|
||||
public interface CardInfoPane {
|
||||
public void setCard (final CardView card);
|
||||
public boolean isCurrentCard (CardView card);
|
||||
|
||||
void setCard (final CardView card);
|
||||
boolean isCurrentCard (CardView card);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,5 +13,5 @@ public interface Action {
|
|||
/**
|
||||
* Executes action.
|
||||
*/
|
||||
public void execute() throws MageException;
|
||||
void execute() throws MageException;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,11 +16,11 @@ public interface ActionWithResult<T> {
|
|||
* Executes and returns result.
|
||||
* @return
|
||||
*/
|
||||
public T execute() throws MageException;
|
||||
T execute() throws MageException;
|
||||
|
||||
/**
|
||||
* Defines negative result specific for type <T>.
|
||||
* @return
|
||||
*/
|
||||
public T negativeResult();
|
||||
T negativeResult();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,11 +38,11 @@ import mage.utils.MageVersion;
|
|||
*/
|
||||
public interface MageClient extends CallbackClient {
|
||||
|
||||
public UUID getId();
|
||||
public MageVersion getVersion();
|
||||
public void connected(String message);
|
||||
public void disconnected();
|
||||
public void showMessage(String message);
|
||||
public void showError(String message);
|
||||
UUID getId();
|
||||
MageVersion getVersion();
|
||||
void connected(String message);
|
||||
void disconnected();
|
||||
void showMessage(String message);
|
||||
void showError(String message);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,5 @@ package mage.interfaces.callback;
|
|||
*/
|
||||
public interface CallbackClient {
|
||||
|
||||
public void processCallback(ClientCallback callback);
|
||||
|
||||
void processCallback(ClientCallback callback);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ import java.util.UUID;
|
|||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public interface Room extends Remote {
|
||||
public UUID getChatId();
|
||||
public UUID getRoomId();
|
||||
|
||||
UUID getChatId();
|
||||
UUID getRoomId();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,6 +36,5 @@ import mage.MageException;
|
|||
*/
|
||||
public interface GameCallback {
|
||||
|
||||
public void gameResult(String result) throws MageException;
|
||||
|
||||
void gameResult(String result) throws MageException;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -638,6 +638,6 @@ public class GameController implements GameCallback {
|
|||
}
|
||||
|
||||
interface Command {
|
||||
public void execute(UUID player);
|
||||
void execute(UUID player);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,17 +45,17 @@ import mage.view.TableView;
|
|||
*/
|
||||
public interface GamesRoom extends Room {
|
||||
|
||||
public List<TableView> getTables();
|
||||
public List<MatchView> getFinished();
|
||||
public List<String> getPlayers();
|
||||
public boolean joinTable(UUID userId, UUID tableId, String name, String playerType, int skill, DeckCardLists deckList) throws MageException;
|
||||
public boolean joinTournamentTable(UUID userId, UUID tableId, String name, String playerType, int skill) throws GameException;
|
||||
public TableView createTable(UUID userId, MatchOptions options);
|
||||
public TableView createTournamentTable(UUID userId, TournamentOptions options);
|
||||
public void removeTable(UUID userId, UUID tableId);
|
||||
public void removeTable(UUID tableId);
|
||||
public TableView getTable(UUID tableId);
|
||||
public void leaveTable(UUID userId, UUID tableId);
|
||||
public boolean watchTable(UUID userId, UUID tableId) throws MageException;
|
||||
List<TableView> getTables();
|
||||
List<MatchView> getFinished();
|
||||
List<String> getPlayers();
|
||||
boolean joinTable(UUID userId, UUID tableId, String name, String playerType, int skill, DeckCardLists deckList) throws MageException;
|
||||
boolean joinTournamentTable(UUID userId, UUID tableId, String name, String playerType, int skill) throws GameException;
|
||||
TableView createTable(UUID userId, MatchOptions options);
|
||||
TableView createTournamentTable(UUID userId, TournamentOptions options);
|
||||
void removeTable(UUID userId, UUID tableId);
|
||||
void removeTable(UUID tableId);
|
||||
TableView getTable(UUID tableId);
|
||||
void leaveTable(UUID userId, UUID tableId);
|
||||
boolean watchTable(UUID userId, UUID tableId) throws MageException;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,29 +5,29 @@ package mage.server.services;
|
|||
*/
|
||||
public interface LogKeys {
|
||||
|
||||
public static final String KEY_GAME_STARTED = "gameStarted";
|
||||
String KEY_GAME_STARTED = "gameStarted";
|
||||
|
||||
public static final String KEY_USER_CONNECTED = "userConnected";
|
||||
String KEY_USER_CONNECTED = "userConnected";
|
||||
|
||||
public static final String KEY_ADMIN_CONNECTED = "adminConnected";
|
||||
String KEY_ADMIN_CONNECTED = "adminConnected";
|
||||
|
||||
public static final String KEY_SESSION_KILLED = "sessionKilled";
|
||||
String KEY_SESSION_KILLED = "sessionKilled";
|
||||
|
||||
public static final String KEY_SESSION_DISCONNECTED = "sessionDisconnected";
|
||||
String KEY_SESSION_DISCONNECTED = "sessionDisconnected";
|
||||
|
||||
public static final String KEY_SESSION_DISCONNECTED_BY_ADMIN = "sessionDisconnectedByAdmin";
|
||||
String KEY_SESSION_DISCONNECTED_BY_ADMIN = "sessionDisconnectedByAdmin";
|
||||
|
||||
public static final String KEY_NOT_VALID_SESSION = "sessionNotValid";
|
||||
String KEY_NOT_VALID_SESSION = "sessionNotValid";
|
||||
|
||||
public static final String KEY_NOT_VALID_SESSION_INTERNAL = "sessionNotValidInternal";
|
||||
String KEY_NOT_VALID_SESSION_INTERNAL = "sessionNotValidInternal";
|
||||
|
||||
public static final String KEY_TABLE_CREATED = "tableCreated";
|
||||
String KEY_TABLE_CREATED = "tableCreated";
|
||||
|
||||
public static final String KEY_TOURNAMENT_TABLE_CREATED = "tournamentTableCreated";
|
||||
String KEY_TOURNAMENT_TABLE_CREATED = "tournamentTableCreated";
|
||||
|
||||
public static final String KEY_WRONG_VERSION = "wrongVersion";
|
||||
String KEY_WRONG_VERSION = "wrongVersion";
|
||||
|
||||
public static final String KEY_NOT_ADMIN = "notAdminRestrictedOperation";
|
||||
String KEY_NOT_ADMIN = "notAdminRestrictedOperation";
|
||||
|
||||
public static final String KEY_FEEDBACK_ADDED = "feedbackAdded";
|
||||
String KEY_FEEDBACK_ADDED = "feedbackAdded";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,5 @@ import java.util.UUID;
|
|||
*/
|
||||
public interface MageItem extends Serializable {
|
||||
|
||||
public UUID getId();
|
||||
|
||||
UUID getId();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,36 +12,36 @@ import java.util.List;
|
|||
|
||||
public interface MageObject extends MageItem, Serializable {
|
||||
|
||||
public String getName();
|
||||
public void setName(String name);
|
||||
String getName();
|
||||
void setName(String name);
|
||||
|
||||
public List<CardType> getCardType();
|
||||
public List<String> getSubtype();
|
||||
public boolean hasSubtype(String subtype);
|
||||
public List<String> getSupertype();
|
||||
List<CardType> getCardType();
|
||||
List<String> getSubtype();
|
||||
boolean hasSubtype(String subtype);
|
||||
List<String> getSupertype();
|
||||
|
||||
public Abilities<Ability> getAbilities();
|
||||
public ObjectColor getColor();
|
||||
public ManaCosts<ManaCost> getManaCost();
|
||||
Abilities<Ability> getAbilities();
|
||||
ObjectColor getColor();
|
||||
ManaCosts<ManaCost> getManaCost();
|
||||
|
||||
public MageInt getPower();
|
||||
public MageInt getToughness();
|
||||
MageInt getPower();
|
||||
MageInt getToughness();
|
||||
|
||||
public void adjustChoices(Ability ability, Game game);
|
||||
public void adjustCosts(Ability ability, Game game);
|
||||
public void adjustTargets(Ability ability, Game game);
|
||||
void adjustChoices(Ability ability, Game game);
|
||||
void adjustCosts(Ability ability, Game game);
|
||||
void adjustTargets(Ability ability, Game game);
|
||||
|
||||
public MageObject copy();
|
||||
MageObject copy();
|
||||
|
||||
/**
|
||||
* Defines that MageObject is a copy of another object
|
||||
* @param isCopy
|
||||
*/
|
||||
public void setCopy(boolean isCopy);
|
||||
void setCopy(boolean isCopy);
|
||||
|
||||
/**
|
||||
* Checks if current MageObject is a copy of another object
|
||||
* @return
|
||||
*/
|
||||
public boolean isCopy();
|
||||
boolean isCopy();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ public interface Abilities<T extends Ability> extends List<T>, Serializable {
|
|||
* @see mage.cards.CardImpl#getRules()
|
||||
* @see mage.abilities.keyword.LevelAbility#getRule()
|
||||
*/
|
||||
public List<String> getRules(String source);
|
||||
List<String> getRules(String source);
|
||||
|
||||
/**
|
||||
* Retrieves all activated abilities for the given {@link Zone}.
|
||||
|
|
@ -69,7 +69,7 @@ public interface Abilities<T extends Ability> extends List<T>, Serializable {
|
|||
*
|
||||
* @see mage.cards.CardImpl#getSpellAbility()
|
||||
*/
|
||||
public Abilities<ActivatedAbility> getActivatedAbilities(Zone zone);
|
||||
Abilities<ActivatedAbility> getActivatedAbilities(Zone zone);
|
||||
|
||||
/**
|
||||
* Retrieves all {@link ManaAbility mana abilities} in the given {@link Zone}.
|
||||
|
|
@ -81,7 +81,7 @@ public interface Abilities<T extends Ability> extends List<T>, Serializable {
|
|||
* @see mage.players.PlayerImpl#getManaAvailable(mage.game.Game)
|
||||
* @see mage.players.PlayerImpl#getAvailableManaProducers(mage.game.Game)
|
||||
*/
|
||||
public Abilities<ManaAbility> getManaAbilities(Zone zone);
|
||||
Abilities<ManaAbility> getManaAbilities(Zone zone);
|
||||
|
||||
/**
|
||||
* Retrieves all {@link ManaAbility mana abilities} in the given {@link Zone} that can be used.
|
||||
|
|
@ -93,7 +93,7 @@ public interface Abilities<T extends Ability> extends List<T>, Serializable {
|
|||
* @see mage.players.PlayerImpl#getManaAvailable(mage.game.Game)
|
||||
* @see mage.players.PlayerImpl#getAvailableManaProducers(mage.game.Game)
|
||||
*/
|
||||
public Abilities<ManaAbility> getAvailableManaAbilities(Zone zone, Game game);
|
||||
Abilities<ManaAbility> getAvailableManaAbilities(Zone zone, Game game);
|
||||
|
||||
/**
|
||||
* Retrieves all {@link StaticAbility static abilities} in the given {@link Zone}.
|
||||
|
|
@ -108,14 +108,14 @@ public interface Abilities<T extends Ability> extends List<T>, Serializable {
|
|||
* @see mage.abilities.effects.ContinuousEffects#asThough(java.util.UUID, mage.Constants.AsThoughEffectType, mage.game.Game)
|
||||
* @see mage.abilities.effects.ContinuousEffects#costModification(mage.abilities.Ability, mage.game.Game)
|
||||
*/
|
||||
public Abilities<StaticAbility> getStaticAbilities(Zone zone);
|
||||
Abilities<StaticAbility> getStaticAbilities(Zone zone);
|
||||
|
||||
/**
|
||||
* Retrieves all {@link EvasionAbility evasion abilities}.
|
||||
*
|
||||
* @return The {@link EvasionAbility evasion abilities}.
|
||||
*/
|
||||
public Abilities<EvasionAbility> getEvasionAbilities();
|
||||
Abilities<EvasionAbility> getEvasionAbilities();
|
||||
|
||||
/**
|
||||
* Retrieves all {@link TriggeredAbility triggered abilities} for the given
|
||||
|
|
@ -128,7 +128,7 @@ public interface Abilities<T extends Ability> extends List<T>, Serializable {
|
|||
* @see mage.game.permanent.PermanentImpl#checkTriggers(mage.game.events.GameEvent, mage.game.Game)
|
||||
* @see mage.game.permanent.PermanentCard#checkPermanentOnlyTriggers(mage.game.events.ZoneChangeEvent, mage.game.Game)
|
||||
*/
|
||||
public Abilities<TriggeredAbility> getTriggeredAbilities(Zone zone);
|
||||
Abilities<TriggeredAbility> getTriggeredAbilities(Zone zone);
|
||||
|
||||
/**
|
||||
* Retrieves all {@link ProtectionAbility protection abilities}.
|
||||
|
|
@ -139,7 +139,7 @@ public interface Abilities<T extends Ability> extends List<T>, Serializable {
|
|||
* @see mage.players.PlayerImpl#hasProtectionFrom(mage.MageObject)
|
||||
* @see mage.players.PlayerImpl#canDamage(mage.MageObject)
|
||||
*/
|
||||
public Abilities<ProtectionAbility> getProtectionAbilities();
|
||||
Abilities<ProtectionAbility> getProtectionAbilities();
|
||||
|
||||
/**
|
||||
* TODO Method is unused, keep it around?
|
||||
|
|
@ -150,7 +150,7 @@ public interface Abilities<T extends Ability> extends List<T>, Serializable {
|
|||
*
|
||||
* @return A numeral value representing the 'strength' or effectiveness of the abilities?
|
||||
*/
|
||||
public int getOutcomeTotal();
|
||||
int getOutcomeTotal();
|
||||
|
||||
/**
|
||||
* Sets the controller of this set of abilities.
|
||||
|
|
@ -162,7 +162,7 @@ public interface Abilities<T extends Ability> extends List<T>, Serializable {
|
|||
* @see mage.game.permanent.PermanentImpl#changeControllerId(java.util.UUID, mage.game.Game)
|
||||
* @see mage.game.permanent.PermanentCard#copyFromCard(mage.cards.Card)
|
||||
*/
|
||||
public void setControllerId(UUID controllerId);
|
||||
void setControllerId(UUID controllerId);
|
||||
|
||||
/**
|
||||
* Sets the source of this set of abilities.
|
||||
|
|
@ -171,17 +171,17 @@ public interface Abilities<T extends Ability> extends List<T>, Serializable {
|
|||
*
|
||||
* @see mage.cards.CardImpl#assignNewId()
|
||||
*/
|
||||
public void setSourceId(UUID sourceId);
|
||||
void setSourceId(UUID sourceId);
|
||||
|
||||
/**
|
||||
* Assigns a new {@link java.util.UUID}
|
||||
*/
|
||||
public void newId();
|
||||
void newId();
|
||||
|
||||
/**
|
||||
* Assigns a new {@link java.util.UUID}
|
||||
*/
|
||||
public void newOriginalId();
|
||||
void newOriginalId();
|
||||
|
||||
/**
|
||||
* Searches this set of abilities to see if the ability represented by the abilityId
|
||||
|
|
@ -190,7 +190,7 @@ public interface Abilities<T extends Ability> extends List<T>, Serializable {
|
|||
* @param abilityId
|
||||
* @return
|
||||
*/
|
||||
public boolean containsKey(UUID abilityId);
|
||||
boolean containsKey(UUID abilityId);
|
||||
|
||||
/**
|
||||
* TODO Method is unused, keep it around?
|
||||
|
|
@ -200,7 +200,7 @@ public interface Abilities<T extends Ability> extends List<T>, Serializable {
|
|||
* @param abilityId
|
||||
* @return
|
||||
*/
|
||||
public T get(UUID abilityId);
|
||||
T get(UUID abilityId);
|
||||
|
||||
/**
|
||||
* TODO The usage of this method seems redundant to that of {@link #containsKey(java.util.UUID)}
|
||||
|
|
@ -212,7 +212,7 @@ public interface Abilities<T extends Ability> extends List<T>, Serializable {
|
|||
* @param ability
|
||||
* @return
|
||||
*/
|
||||
public boolean contains(T ability);
|
||||
boolean contains(T ability);
|
||||
|
||||
/**
|
||||
* Searches this set of abilities for the existence of each of the passed in
|
||||
|
|
@ -221,7 +221,7 @@ public interface Abilities<T extends Ability> extends List<T>, Serializable {
|
|||
* @param abilities
|
||||
* @return True if the passed in set of abilities is also in this set of abilities.
|
||||
*/
|
||||
public boolean containsAll(Abilities<T> abilities);
|
||||
boolean containsAll(Abilities<T> abilities);
|
||||
|
||||
/**
|
||||
* Copies this set of abilities. This copy should be new instances of all
|
||||
|
|
@ -229,7 +229,7 @@ public interface Abilities<T extends Ability> extends List<T>, Serializable {
|
|||
*
|
||||
* @return
|
||||
*/
|
||||
public Abilities<T> copy();
|
||||
Abilities<T> copy();
|
||||
|
||||
public String getValue();
|
||||
String getValue();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public interface Ability extends Controllable, Serializable {
|
|||
* @return A {@link java.util.UUID} which the game will use to store and retrieve
|
||||
* the exact instance of this ability.
|
||||
*/
|
||||
public UUID getId();
|
||||
UUID getId();
|
||||
|
||||
/**
|
||||
* Assigns a new {@link java.util.UUID}
|
||||
|
|
@ -71,7 +71,7 @@ public interface Ability extends Controllable, Serializable {
|
|||
* @see mage.game.GameImpl#addTriggeredAbility(mage.abilities.TriggeredAbility)
|
||||
* @see mage.game.GameImpl#addDelayedTriggeredAbility(mage.abilities.DelayedTriggeredAbility)
|
||||
*/
|
||||
public void newId();
|
||||
void newId();
|
||||
|
||||
/**
|
||||
* Assigns a new {@link java.util.UUID}
|
||||
|
|
@ -80,14 +80,14 @@ public interface Ability extends Controllable, Serializable {
|
|||
* @see mage.game.GameImpl#addTriggeredAbility(mage.abilities.TriggeredAbility)
|
||||
* @see mage.game.GameImpl#addDelayedTriggeredAbility(mage.abilities.DelayedTriggeredAbility)
|
||||
*/
|
||||
public void newOriginalId();
|
||||
void newOriginalId();
|
||||
|
||||
/**
|
||||
* Gets the {@link AbilityType} of this ability.
|
||||
*
|
||||
* @return The {@link AbilityType type} of this ability.
|
||||
*/
|
||||
public AbilityType getAbilityType();
|
||||
AbilityType getAbilityType();
|
||||
|
||||
/**
|
||||
* Gets the id of the player in control of this ability.
|
||||
|
|
@ -95,35 +95,35 @@ public interface Ability extends Controllable, Serializable {
|
|||
* @return The {@link java.util.UUID} of the controlling player.
|
||||
*/
|
||||
@Override
|
||||
public UUID getControllerId();
|
||||
UUID getControllerId();
|
||||
|
||||
/**
|
||||
* Sets the id of the controller of this ability.
|
||||
*
|
||||
* @param controllerId The {@link java.util.UUID} of the controller.
|
||||
*/
|
||||
public void setControllerId(UUID controllerId);
|
||||
void setControllerId(UUID controllerId);
|
||||
|
||||
/**
|
||||
* Gets the id of the object which put this ability in motion.
|
||||
*
|
||||
* @return The {@link java.util.UUID} of the object this ability is associated with.
|
||||
*/
|
||||
public UUID getSourceId();
|
||||
UUID getSourceId();
|
||||
|
||||
/**
|
||||
* Sets the id of the object which this ability orignates from.
|
||||
*
|
||||
* @param sourceID {@link java.util.UUID} the source id to set.
|
||||
*/
|
||||
public void setSourceId(UUID sourceID);
|
||||
void setSourceId(UUID sourceID);
|
||||
|
||||
/**
|
||||
* Gets all {@link Costs} associated with this ability.
|
||||
*
|
||||
* @return All {@link Costs} associated with this ability.
|
||||
*/
|
||||
public Costs<Cost> getCosts();
|
||||
Costs<Cost> getCosts();
|
||||
|
||||
/**
|
||||
* Adds a {@link Cost} to this ability that must be paid before this ability
|
||||
|
|
@ -131,7 +131,7 @@ public interface Ability extends Controllable, Serializable {
|
|||
*
|
||||
* @param cost The {@link Cost} to add.
|
||||
*/
|
||||
public void addCost(Cost cost);
|
||||
void addCost(Cost cost);
|
||||
|
||||
/**
|
||||
* Gets all {@link ManaCosts} associated with this ability. These returned
|
||||
|
|
@ -140,7 +140,7 @@ public interface Ability extends Controllable, Serializable {
|
|||
*
|
||||
* @return All {@link ManaCosts} that must be paid.
|
||||
*/
|
||||
public ManaCosts<ManaCost> getManaCosts();
|
||||
ManaCosts<ManaCost> getManaCosts();
|
||||
|
||||
/**
|
||||
* Gets all the {@link ManaCosts} that must be paid before activating this
|
||||
|
|
@ -149,7 +149,7 @@ public interface Ability extends Controllable, Serializable {
|
|||
*
|
||||
* @return All {@link ManaCosts} that must be paid.
|
||||
*/
|
||||
public ManaCosts<ManaCost> getManaCostsToPay();
|
||||
ManaCosts<ManaCost> getManaCostsToPay();
|
||||
|
||||
/**
|
||||
* Adds a {@link ManaCost} to this ability that must be paid before this
|
||||
|
|
@ -157,14 +157,14 @@ public interface Ability extends Controllable, Serializable {
|
|||
*
|
||||
* @param cost The {@link ManaCost} to add.
|
||||
*/
|
||||
public void addManaCost(ManaCost cost);
|
||||
void addManaCost(ManaCost cost);
|
||||
|
||||
/**
|
||||
* Gets all {@link AlternativeCost} associated with this ability.
|
||||
*
|
||||
* @return All {@link AlternativeCost}'s that can be paid instead of the {@link ManaCosts}
|
||||
*/
|
||||
public List<AlternativeCost> getAlternativeCosts();
|
||||
List<AlternativeCost> getAlternativeCosts();
|
||||
|
||||
/**
|
||||
* Adds an {@link AlternativeCost} this ability that may be paid instead of
|
||||
|
|
@ -172,7 +172,7 @@ public interface Ability extends Controllable, Serializable {
|
|||
*
|
||||
* @param cost The {@link AlternativeCost} to add.
|
||||
*/
|
||||
public void addAlternativeCost(AlternativeCost cost);
|
||||
void addAlternativeCost(AlternativeCost cost);
|
||||
|
||||
/**
|
||||
* TODO Method is unused, keep it around?
|
||||
|
|
@ -182,14 +182,14 @@ public interface Ability extends Controllable, Serializable {
|
|||
*
|
||||
* @return All {@link Costs} that can be paid above and beyond other costs.
|
||||
*/
|
||||
public Costs<Cost> getOptionalCosts();
|
||||
Costs<Cost> getOptionalCosts();
|
||||
|
||||
/**
|
||||
* Adds a {@link Cost} that is optional to this ability.
|
||||
*
|
||||
* @param cost The {@link Cost} to add to the optional costs.
|
||||
*/
|
||||
public void addOptionalCost(Cost cost);
|
||||
void addOptionalCost(Cost cost);
|
||||
|
||||
/**
|
||||
* Retrieves the effects that are put into the place by the resolution of this
|
||||
|
|
@ -198,7 +198,7 @@ public interface Ability extends Controllable, Serializable {
|
|||
* @return All {@link Effects} that will be put into place by the resolution
|
||||
* of this ability.
|
||||
*/
|
||||
public Effects getEffects();
|
||||
Effects getEffects();
|
||||
|
||||
/**
|
||||
* Retrieves the effects of the specified {@link EffectType type} that are
|
||||
|
|
@ -208,14 +208,14 @@ public interface Ability extends Controllable, Serializable {
|
|||
* @param effectType The {@link EffectType type} to search for.
|
||||
* @return All {@link Effects} of the given {@link EffectType}.
|
||||
*/
|
||||
public Effects getEffects(Game game, EffectType effectType);
|
||||
Effects getEffects(Game game, EffectType effectType);
|
||||
|
||||
/**
|
||||
* Adds an effect to this ability.
|
||||
*
|
||||
* @param effect The {@link Effect} to add.
|
||||
*/
|
||||
public void addEffect(Effect effect);
|
||||
void addEffect(Effect effect);
|
||||
|
||||
/**
|
||||
* Retrieves all targets that must be satisfied before this ability is
|
||||
|
|
@ -224,7 +224,7 @@ public interface Ability extends Controllable, Serializable {
|
|||
* @return All {@link Targets} that must be satisfied before this ability is put onto
|
||||
* the stack.
|
||||
*/
|
||||
public Targets getTargets();
|
||||
Targets getTargets();
|
||||
|
||||
/**
|
||||
* Retrieves the {@link Target} located at the 0th index in the {@link Targets}.
|
||||
|
|
@ -234,7 +234,7 @@ public interface Ability extends Controllable, Serializable {
|
|||
*
|
||||
* @see mage.target.Target
|
||||
*/
|
||||
public UUID getFirstTarget();
|
||||
UUID getFirstTarget();
|
||||
|
||||
/**
|
||||
* Adds a target to this ability that must be satisfied before this ability
|
||||
|
|
@ -242,35 +242,35 @@ public interface Ability extends Controllable, Serializable {
|
|||
*
|
||||
* @param target The {@link Target} to add.
|
||||
*/
|
||||
public void addTarget(Target target);
|
||||
void addTarget(Target target);
|
||||
|
||||
/**
|
||||
* Choices
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Choices getChoices();
|
||||
Choices getChoices();
|
||||
|
||||
/**
|
||||
* TODO: Javadoc me
|
||||
*
|
||||
* @param choice
|
||||
*/
|
||||
public void addChoice(Choice choice);
|
||||
void addChoice(Choice choice);
|
||||
|
||||
/**
|
||||
* Retrieves the {@link Zone} that this ability is active within.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Zone getZone();
|
||||
Zone getZone();
|
||||
|
||||
/**
|
||||
* Retrieves whether or not this abilities activation will use the stack.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isUsesStack();
|
||||
boolean isUsesStack();
|
||||
|
||||
/**
|
||||
* Retrieves a human readable string representing what the ability states it
|
||||
|
|
@ -279,7 +279,7 @@ public interface Ability extends Controllable, Serializable {
|
|||
* @return A human readable string representing what the ability states it
|
||||
* accomplishes
|
||||
*/
|
||||
public String getRule();
|
||||
String getRule();
|
||||
|
||||
/**
|
||||
* Retrieves a human readable string including any costs associated with this
|
||||
|
|
@ -289,7 +289,7 @@ public interface Ability extends Controllable, Serializable {
|
|||
* @param all True if costs are desired in the output, false otherwise.
|
||||
* @return
|
||||
*/
|
||||
public String getRule(boolean all);
|
||||
String getRule(boolean all);
|
||||
|
||||
/**
|
||||
* Retrieves the rule associated with the given source.
|
||||
|
|
@ -297,7 +297,7 @@ public interface Ability extends Controllable, Serializable {
|
|||
* @param source
|
||||
* @return
|
||||
*/
|
||||
public String getRule(String source);
|
||||
String getRule(String source);
|
||||
|
||||
/**
|
||||
* Activates this ability prompting the controller to pay any mandatory
|
||||
|
|
@ -311,7 +311,7 @@ public interface Ability extends Controllable, Serializable {
|
|||
* @see mage.players.PlayerImpl#playAbility(mage.abilities.ActivatedAbility, mage.game.Game)
|
||||
* @see mage.players.PlayerImpl#triggerAbility(mage.abilities.TriggeredAbility, mage.game.Game)
|
||||
*/
|
||||
public boolean activate(Game game, boolean noMana);
|
||||
boolean activate(Game game, boolean noMana);
|
||||
|
||||
/**
|
||||
* Resolves this ability and puts any effects it produces into play. This
|
||||
|
|
@ -324,14 +324,14 @@ public interface Ability extends Controllable, Serializable {
|
|||
* @see mage.players.PlayerImpl#playManaAbility(mage.abilities.mana.ManaAbility, mage.game.Game)
|
||||
* @see mage.players.PlayerImpl#specialAction(mage.abilities.SpecialAction, mage.game.Game)
|
||||
*/
|
||||
public boolean resolve(Game game);
|
||||
boolean resolve(Game game);
|
||||
|
||||
/**
|
||||
* Used to reset the state of this ability.
|
||||
*
|
||||
* @param game
|
||||
*/
|
||||
public void reset(Game game);
|
||||
void reset(Game game);
|
||||
|
||||
/**
|
||||
* Overridden by triggered abilities with intervening if clauses - rule 20110715 - 603.4
|
||||
|
|
@ -339,22 +339,22 @@ public interface Ability extends Controllable, Serializable {
|
|||
* @param game
|
||||
* @return Whether or not the intervening if clause is satisfied
|
||||
*/
|
||||
public boolean checkIfClause(Game game);
|
||||
boolean checkIfClause(Game game);
|
||||
|
||||
/**
|
||||
* Creates a fresh copy of this ability.
|
||||
*
|
||||
* @return A new copy of this ability.
|
||||
*/
|
||||
public Ability copy();
|
||||
Ability copy();
|
||||
|
||||
public boolean isModal();
|
||||
boolean isModal();
|
||||
|
||||
public void addMode(Mode mode);
|
||||
void addMode(Mode mode);
|
||||
|
||||
public Modes getModes();
|
||||
Modes getModes();
|
||||
|
||||
public boolean canChooseTarget(Game game);
|
||||
boolean canChooseTarget(Game game);
|
||||
|
||||
/**
|
||||
* Returns true if this abilities source is in the zone for the ability
|
||||
|
|
@ -363,20 +363,20 @@ public interface Ability extends Controllable, Serializable {
|
|||
* @param checkLKI
|
||||
* @return
|
||||
*/
|
||||
public boolean isInUseableZone(Game game, MageObject source, boolean checkLKI);
|
||||
boolean isInUseableZone(Game game, MageObject source, boolean checkLKI);
|
||||
|
||||
/**
|
||||
* Returns true if this ability has to be shown on top of the card.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean getRuleAtTheTop();
|
||||
boolean getRuleAtTheTop();
|
||||
|
||||
/**
|
||||
* Sets the value for the ruleAtTheTop attribute
|
||||
*
|
||||
* @param ruleAtTheTop
|
||||
*/
|
||||
public void setRuleAtTheTop(boolean ruleAtTheTop);
|
||||
void setRuleAtTheTop(boolean ruleAtTheTop);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ import mage.game.Game;
|
|||
*/
|
||||
public interface ActivatedAbility extends Ability {
|
||||
|
||||
public boolean canActivate(UUID playerId, Game game);
|
||||
public String getActivatedMessage(Game game);
|
||||
boolean canActivate(UUID playerId, Game game);
|
||||
String getActivatedMessage(Game game);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,10 +38,10 @@ import mage.game.events.GameEvent;
|
|||
*/
|
||||
public interface TriggeredAbility extends Ability {
|
||||
|
||||
public void trigger(Game game, UUID controllerId);
|
||||
public boolean checkTrigger(GameEvent event, Game game);
|
||||
public boolean checkInterveningIfClause(Game game);
|
||||
void trigger(Game game, UUID controllerId);
|
||||
boolean checkTrigger(GameEvent event, Game game);
|
||||
boolean checkInterveningIfClause(Game game);
|
||||
@Override
|
||||
public TriggeredAbility copy();
|
||||
TriggeredAbility copy();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,8 @@ import mage.game.Game;
|
|||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public interface AlternativeCost extends Cost {
|
||||
public boolean isAvailable(Game game, Ability source);
|
||||
|
||||
public String getName();
|
||||
boolean isAvailable(Game game, Ability source);
|
||||
|
||||
String getName();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,15 +37,15 @@ import mage.target.Targets;
|
|||
|
||||
public interface Cost extends Serializable {
|
||||
|
||||
public UUID getId();
|
||||
public String getText();
|
||||
public boolean canPay(UUID sourceId, UUID controllerId, Game game);
|
||||
public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana);
|
||||
public boolean isPaid();
|
||||
public void clearPaid();
|
||||
public void setPaid();
|
||||
public Targets getTargets();
|
||||
UUID getId();
|
||||
String getText();
|
||||
boolean canPay(UUID sourceId, UUID controllerId, Game game);
|
||||
boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana);
|
||||
boolean isPaid();
|
||||
void clearPaid();
|
||||
void setPaid();
|
||||
Targets getTargets();
|
||||
|
||||
public Cost copy();
|
||||
Cost copy();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@ import java.util.List;
|
|||
|
||||
public interface Costs<T extends Cost> extends List<T>, Cost {
|
||||
|
||||
public List<T> getUnpaid();
|
||||
public List<VariableCost> getVariableCosts();
|
||||
List<T> getUnpaid();
|
||||
List<VariableCost> getVariableCosts();
|
||||
@Override
|
||||
public Costs<T> copy();
|
||||
Costs<T> copy();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ package mage.abilities.costs;
|
|||
*/
|
||||
public interface OptionalAdditionalCost extends Cost {
|
||||
|
||||
public String getName();
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Returns the complete text for the addional coast or if onlyCost is true
|
||||
|
|
@ -42,14 +42,14 @@ public interface OptionalAdditionalCost extends Cost {
|
|||
* @param onlyCost
|
||||
* @return
|
||||
*/
|
||||
public String getText(boolean onlyCost);
|
||||
String getText(boolean onlyCost);
|
||||
|
||||
/**
|
||||
* Returns a reminder text, if the cost has one
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getReminderText();
|
||||
String getReminderText();
|
||||
|
||||
/**
|
||||
* Returns a text suffix for the game log, that can be added to
|
||||
|
|
@ -58,7 +58,7 @@ public interface OptionalAdditionalCost extends Cost {
|
|||
* @param position - if there are multiple costs, it's the postion the cost is set (starting with 0)
|
||||
* @return
|
||||
*/
|
||||
public String getCastSuffixMessage(int position);
|
||||
String getCastSuffixMessage(int position);
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -66,38 +66,38 @@ public interface OptionalAdditionalCost extends Cost {
|
|||
*
|
||||
* @param activated
|
||||
*/
|
||||
public void activate();
|
||||
void activate();
|
||||
|
||||
/**
|
||||
* Reset the activate and count information
|
||||
*
|
||||
*/
|
||||
public void reset();
|
||||
void reset();
|
||||
|
||||
/**
|
||||
* Set if the cost be multiple times activated
|
||||
*
|
||||
*/
|
||||
public void setRepeatable(boolean repeatable);
|
||||
void setRepeatable(boolean repeatable);
|
||||
|
||||
/**
|
||||
* Can the cost be multiple times activated
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isRepeatable();
|
||||
boolean isRepeatable();
|
||||
|
||||
/**
|
||||
* Returns if the cost was activated
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isActivated();
|
||||
boolean isActivated();
|
||||
|
||||
/**
|
||||
* Returns the number of times the cost was activated
|
||||
* @return
|
||||
*/
|
||||
public int getActivateCount();
|
||||
int getActivateCount();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ import mage.filter.FilterMana;
|
|||
*/
|
||||
public interface VariableCost {
|
||||
|
||||
public int getAmount();
|
||||
public void setAmount(int amount);
|
||||
public void setFilter(FilterMana filter);
|
||||
int getAmount();
|
||||
void setAmount(int amount);
|
||||
void setFilter(FilterMana filter);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,20 +38,21 @@ import mage.players.ManaPool;
|
|||
|
||||
public interface ManaCost extends Cost {
|
||||
|
||||
public int convertedManaCost();
|
||||
public Mana getMana();
|
||||
public Mana getPayment();
|
||||
public void assignPayment(Game game, Ability ability, ManaPool pool);
|
||||
public void setPayment(Mana mana);
|
||||
@Override
|
||||
public String getText();
|
||||
public ManaCost getUnpaid();
|
||||
public ManaOptions getOptions();
|
||||
public boolean testPay(Mana testMana);
|
||||
public Filter getSourceFilter();
|
||||
public void setSourceFilter(Filter filter);
|
||||
int convertedManaCost();
|
||||
Mana getMana();
|
||||
Mana getPayment();
|
||||
void assignPayment(Game game, Ability ability, ManaPool pool);
|
||||
void setPayment(Mana mana);
|
||||
ManaCost getUnpaid();
|
||||
ManaOptions getOptions();
|
||||
boolean testPay(Mana testMana);
|
||||
Filter getSourceFilter();
|
||||
void setSourceFilter(Filter filter);
|
||||
|
||||
@Override
|
||||
public ManaCost copy();
|
||||
String getText();
|
||||
|
||||
@Override
|
||||
ManaCost copy();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,17 +38,17 @@ import mage.abilities.costs.VariableCost;
|
|||
*/
|
||||
public interface ManaCosts<T extends ManaCost> extends List<T>, ManaCost {
|
||||
|
||||
public ManaCosts<T> getUnpaidVariableCosts();
|
||||
public List<VariableCost> getVariableCosts();
|
||||
public int getX();
|
||||
public void setX(int x);
|
||||
public void load(String mana);
|
||||
public List<String> getSymbols();
|
||||
ManaCosts<T> getUnpaidVariableCosts();
|
||||
List<VariableCost> getVariableCosts();
|
||||
int getX();
|
||||
void setX(int x);
|
||||
void load(String mana);
|
||||
List<String> getSymbols();
|
||||
|
||||
|
||||
@Override
|
||||
public Mana getMana();
|
||||
Mana getMana();
|
||||
|
||||
@Override
|
||||
public ManaCosts<T> copy();
|
||||
ManaCosts<T> copy();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ import mage.game.Game;
|
|||
*/
|
||||
public interface AsThoughEffect<T extends AsThoughEffect<T>> extends ContinuousEffect<T> {
|
||||
|
||||
public boolean applies(UUID sourceId, Ability source, Game game);
|
||||
public AsThoughEffectType getAsThoughEffectType();
|
||||
boolean applies(UUID sourceId, Ability source, Game game);
|
||||
AsThoughEffectType getAsThoughEffectType();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,19 +44,21 @@ import java.util.UUID;
|
|||
*/
|
||||
public interface ContinuousEffect<T extends ContinuousEffect<T>> extends Effect<T> {
|
||||
|
||||
public boolean isUsed();
|
||||
public boolean isDiscarded();
|
||||
public void discard();
|
||||
public Duration getDuration();
|
||||
public Date getTimestamp();
|
||||
public void setTimestamp();
|
||||
public void newId();
|
||||
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game);
|
||||
public boolean hasLayer(Layer layer);
|
||||
public boolean isInactive(Ability source, Game game);
|
||||
public void init(Ability source, Game game);
|
||||
public Layer getLayer();
|
||||
public SubLayer getSublayer();
|
||||
public void overrideRuleText(String text);
|
||||
public List<UUID> getAffectedObjects();
|
||||
boolean isUsed();
|
||||
boolean isDiscarded();
|
||||
void discard();
|
||||
Duration getDuration();
|
||||
Date getTimestamp();
|
||||
void setTimestamp();
|
||||
boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game);
|
||||
boolean hasLayer(Layer layer);
|
||||
boolean isInactive(Ability source, Game game);
|
||||
void init(Ability source, Game game);
|
||||
Layer getLayer();
|
||||
SubLayer getSublayer();
|
||||
void overrideRuleText(String text);
|
||||
List<UUID> getAffectedObjects();
|
||||
|
||||
@Override
|
||||
void newId();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ public interface CostModificationEffect<T extends CostModificationEffect<T>> ext
|
|||
* @param abilityToModify The {@link mage.abilities.SpellAbility} or {@link Ability} which should be modified.
|
||||
* @return
|
||||
*/
|
||||
public boolean apply ( Game game, Ability source, Ability abilityToModify );
|
||||
boolean apply ( Game game, Ability source, Ability abilityToModify );
|
||||
|
||||
/**
|
||||
* Called by the {@link ContinuousEffects#costModification(mage.abilities.Ability, mage.game.Game) ContinuousEffects.costModification}
|
||||
|
|
@ -63,5 +63,5 @@ public interface CostModificationEffect<T extends CostModificationEffect<T>> ext
|
|||
* @param game The game for which this effect shoul dbe applied.
|
||||
* @return
|
||||
*/
|
||||
public boolean applies(Ability abilityToModify, Ability source, Game game);
|
||||
boolean applies(Ability abilityToModify, Ability source, Game game);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,17 +43,17 @@ import mage.target.targetpointer.TargetPointer;
|
|||
*/
|
||||
public interface Effect<T extends Effect<T>> extends Serializable {
|
||||
|
||||
public UUID getId();
|
||||
public void newId();
|
||||
public String getText(Mode mode);
|
||||
public boolean apply(Game game, Ability source);
|
||||
public Outcome getOutcome();
|
||||
public EffectType getEffectType();
|
||||
public void setTargetPointer(TargetPointer targetPointer);
|
||||
public TargetPointer getTargetPointer();
|
||||
public void setValue(String key, Object value);
|
||||
public Object getValue(String key);
|
||||
UUID getId();
|
||||
void newId();
|
||||
String getText(Mode mode);
|
||||
boolean apply(Game game, Ability source);
|
||||
Outcome getOutcome();
|
||||
EffectType getEffectType();
|
||||
void setTargetPointer(TargetPointer targetPointer);
|
||||
TargetPointer getTargetPointer();
|
||||
void setValue(String key, Object value);
|
||||
Object getValue(String key);
|
||||
|
||||
public T copy();
|
||||
T copy();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ import mage.game.events.GameEvent;
|
|||
*/
|
||||
public interface ReplacementEffect<T extends ReplacementEffect<T>> extends ContinuousEffect<T> {
|
||||
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game);
|
||||
public boolean applies(GameEvent event, Ability source, Game game);
|
||||
boolean replaceEvent(GameEvent event, Ability source, Game game);
|
||||
boolean applies(GameEvent event, Ability source, Game game);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,5 +33,6 @@ import java.io.Serializable;
|
|||
* @author noxx
|
||||
*/
|
||||
public interface Builder<T> extends Serializable {
|
||||
public T build(Object... options);
|
||||
|
||||
T build(Object... options);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import mage.game.Game;
|
|||
* @author ayratn
|
||||
*/
|
||||
public interface ScoringSystem {
|
||||
public int getLoseGameScore(final Game game);
|
||||
public int getCardScore(final Card card);
|
||||
|
||||
int getLoseGameScore(final Game game);
|
||||
int getCardScore(final Card card);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,34 +42,34 @@ import mage.watchers.Watcher;
|
|||
|
||||
public interface Card extends MageObject {
|
||||
|
||||
public UUID getOwnerId();
|
||||
public int getCardNumber();
|
||||
public void setCardNumber(int cid);
|
||||
public Rarity getRarity();
|
||||
public void setRarity(Rarity rarity);
|
||||
public void setControllerId(UUID controllerId);
|
||||
public void setOwnerId(UUID ownerId);
|
||||
public void addAbility(Ability ability);
|
||||
public void addWatcher(Watcher watcher);
|
||||
public SpellAbility getSpellAbility();
|
||||
public List<String> getRules();
|
||||
public List<Watcher> getWatchers();
|
||||
public String getExpansionSetCode();
|
||||
public void setExpansionSetCode(String expansionSetCode);
|
||||
public void setFaceDown(boolean value);
|
||||
public boolean isFaceDown();
|
||||
public boolean isFlipCard();
|
||||
UUID getOwnerId();
|
||||
int getCardNumber();
|
||||
void setCardNumber(int cid);
|
||||
Rarity getRarity();
|
||||
void setRarity(Rarity rarity);
|
||||
void setControllerId(UUID controllerId);
|
||||
void setOwnerId(UUID ownerId);
|
||||
void addAbility(Ability ability);
|
||||
void addWatcher(Watcher watcher);
|
||||
SpellAbility getSpellAbility();
|
||||
List<String> getRules();
|
||||
List<Watcher> getWatchers();
|
||||
String getExpansionSetCode();
|
||||
void setExpansionSetCode(String expansionSetCode);
|
||||
void setFaceDown(boolean value);
|
||||
boolean isFaceDown();
|
||||
boolean isFlipCard();
|
||||
|
||||
public boolean canTransform();
|
||||
public Card getSecondCardFace();
|
||||
public void setSecondCardFace(Card card);
|
||||
public boolean isNightCard();
|
||||
boolean canTransform();
|
||||
Card getSecondCardFace();
|
||||
void setSecondCardFace(Card card);
|
||||
boolean isNightCard();
|
||||
|
||||
public void assignNewId();
|
||||
void assignNewId();
|
||||
|
||||
public int getZoneChangeCounter();
|
||||
int getZoneChangeCounter();
|
||||
|
||||
public void addInfo(String key, String value);
|
||||
void addInfo(String key, String value);
|
||||
|
||||
/**
|
||||
* Moves the card to the specified zone
|
||||
|
|
@ -84,9 +84,9 @@ public interface Card extends MageObject {
|
|||
* </ul>
|
||||
* @return true if card was moved to zone
|
||||
*/
|
||||
public boolean moveToZone(Zone zone, UUID sourceId, Game game, boolean flag);
|
||||
boolean moveToZone(Zone zone, UUID sourceId, Game game, boolean flag);
|
||||
|
||||
public boolean moveToZone(Zone zone, UUID sourceId, Game game, boolean flag, ArrayList<UUID> appliedEffects);
|
||||
boolean moveToZone(Zone zone, UUID sourceId, Game game, boolean flag, ArrayList<UUID> appliedEffects);
|
||||
|
||||
/**
|
||||
* Moves the card to an exile zone
|
||||
|
|
@ -96,24 +96,24 @@ public interface Card extends MageObject {
|
|||
* @param game
|
||||
* @return true if card was moved to zone
|
||||
*/
|
||||
public boolean moveToExile(UUID exileId, String name, UUID sourceId, Game game);
|
||||
boolean moveToExile(UUID exileId, String name, UUID sourceId, Game game);
|
||||
|
||||
public boolean moveToExile(UUID exileId, String name, UUID sourceId, Game game, ArrayList<UUID> appliedEffects);
|
||||
boolean moveToExile(UUID exileId, String name, UUID sourceId, Game game, ArrayList<UUID> appliedEffects);
|
||||
|
||||
|
||||
public boolean cast(Game game, Zone fromZone, SpellAbility ability, UUID controllerId);
|
||||
public boolean putOntoBattlefield(Game game, Zone fromZone, UUID sourceId, UUID controllerId);
|
||||
public List<Mana> getMana();
|
||||
boolean cast(Game game, Zone fromZone, SpellAbility ability, UUID controllerId);
|
||||
boolean putOntoBattlefield(Game game, Zone fromZone, UUID sourceId, UUID controllerId);
|
||||
List<Mana> getMana();
|
||||
|
||||
public void build();
|
||||
void build();
|
||||
|
||||
public void setUsesVariousArt(boolean usesVariousArt);
|
||||
void setUsesVariousArt(boolean usesVariousArt);
|
||||
/**
|
||||
*
|
||||
* @return true if there exists various art images for this card
|
||||
*/
|
||||
public boolean getUsesVariousArt();
|
||||
boolean getUsesVariousArt();
|
||||
|
||||
@Override
|
||||
public Card copy();
|
||||
Card copy();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,18 +38,18 @@ import mage.game.Game;
|
|||
|
||||
public interface Cards extends Set<UUID>, Serializable {
|
||||
|
||||
public void add(Card card);
|
||||
public Card get(UUID cardId, Game game);
|
||||
public void remove(Card card);
|
||||
public void setOwner(UUID ownerId, Game game);
|
||||
public void addAll(List<Card> createCards);
|
||||
public Set<Card> getCards(Game game);
|
||||
public Set<Card> getCards(FilterCard filter, Game game);
|
||||
public Collection<Card> getUniqueCards(Game game);
|
||||
public Card getRandom(Game game);
|
||||
public int count(FilterCard filter, Game game);
|
||||
public int count(FilterCard filter, UUID playerId, Game game);
|
||||
public int count(FilterCard filter, UUID sourceId, UUID playerId, Game game);
|
||||
void add(Card card);
|
||||
Card get(UUID cardId, Game game);
|
||||
void remove(Card card);
|
||||
void setOwner(UUID ownerId, Game game);
|
||||
void addAll(List<Card> createCards);
|
||||
Set<Card> getCards(Game game);
|
||||
Set<Card> getCards(FilterCard filter, Game game);
|
||||
Collection<Card> getUniqueCards(Game game);
|
||||
Card getRandom(Game game);
|
||||
int count(FilterCard filter, Game game);
|
||||
int count(FilterCard filter, UUID playerId, Game game);
|
||||
int count(FilterCard filter, UUID sourceId, UUID playerId, Game game);
|
||||
|
||||
public Cards copy();
|
||||
Cards copy();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ import java.util.Map;
|
|||
*/
|
||||
public interface DeckValidator extends Serializable {
|
||||
|
||||
public String getName();
|
||||
public boolean validate(Deck deck);
|
||||
public Map<String, String> getInvalid();
|
||||
String getName();
|
||||
boolean validate(Deck deck);
|
||||
Map<String, String> getInvalid();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,15 +36,15 @@ import java.util.Set;
|
|||
*/
|
||||
public interface Choice {
|
||||
|
||||
public boolean isChosen();
|
||||
public boolean isRequired();
|
||||
public void clearChoice();
|
||||
public String getMessage();
|
||||
public void setMessage(String message);
|
||||
public void setChoice(String choice);
|
||||
public Set<String> getChoices();
|
||||
public void setChoices(Set<String> choices);
|
||||
public String getChoice();
|
||||
boolean isChosen();
|
||||
boolean isRequired();
|
||||
void clearChoice();
|
||||
String getMessage();
|
||||
void setMessage(String message);
|
||||
void setChoice(String choice);
|
||||
Set<String> getChoices();
|
||||
void setChoices(Set<String> choices);
|
||||
String getChoice();
|
||||
|
||||
public Choice copy();
|
||||
Choice copy();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ import mage.game.Game;
|
|||
*/
|
||||
public interface Filter<E> extends Serializable {
|
||||
|
||||
public enum ComparisonType {
|
||||
enum ComparisonType {
|
||||
|
||||
GreaterThan(">"),
|
||||
Equal("=="),
|
||||
|
|
@ -57,16 +57,16 @@ public interface Filter<E> extends Serializable {
|
|||
}
|
||||
}
|
||||
|
||||
public enum ComparisonScope {
|
||||
enum ComparisonScope {
|
||||
Any, All
|
||||
}
|
||||
|
||||
public boolean match(E o, Game game);
|
||||
public void add(Predicate predicate);
|
||||
boolean match(E o, Game game);
|
||||
void add(Predicate predicate);
|
||||
|
||||
public String getMessage();
|
||||
public void setMessage(String message);
|
||||
String getMessage();
|
||||
void setMessage(String message);
|
||||
|
||||
public Filter<E> copy();
|
||||
Filter<E> copy();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,8 +38,8 @@ import mage.game.Game;
|
|||
*/
|
||||
public interface FilterInPlay<E> extends Filter<E> {
|
||||
|
||||
public boolean match(E o, UUID sourceId, UUID playerId, Game game);
|
||||
boolean match(E o, UUID sourceId, UUID playerId, Game game);
|
||||
@Override
|
||||
public FilterInPlay<E> copy();
|
||||
FilterInPlay<E> copy();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,106 +68,106 @@ import java.util.*;
|
|||
|
||||
public interface Game extends MageItem, Serializable {
|
||||
|
||||
public MatchType getGameType();
|
||||
public int getNumPlayers();
|
||||
public int getLife();
|
||||
public RangeOfInfluence getRangeOfInfluence();
|
||||
public MultiplayerAttackOption getAttackOption();
|
||||
MatchType getGameType();
|
||||
int getNumPlayers();
|
||||
int getLife();
|
||||
RangeOfInfluence getRangeOfInfluence();
|
||||
MultiplayerAttackOption getAttackOption();
|
||||
|
||||
//game data methods
|
||||
public void loadCards(Set<Card> cards, UUID ownerId);
|
||||
public Collection<Card> getCards();
|
||||
public Object getCustomData();
|
||||
public void setCustomData(Object data);
|
||||
public GameOptions getOptions();
|
||||
public MageObject getObject(UUID objectId);
|
||||
public MageObject getEmblem(UUID objectId);
|
||||
public UUID getControllerId(UUID objectId);
|
||||
public Permanent getPermanent(UUID permanentId);
|
||||
public Card getCard(UUID cardId);
|
||||
public Ability getAbility(UUID abilityId, UUID sourceId);
|
||||
public void setZone(UUID objectId, Zone zone);
|
||||
public void addPlayer(Player player, Deck deck) throws GameException;
|
||||
public Player getPlayer(UUID playerId);
|
||||
public Players getPlayers();
|
||||
public PlayerList getPlayerList();
|
||||
public Set<UUID> getOpponents(UUID playerId);
|
||||
public Turn getTurn();
|
||||
public Phase getPhase();
|
||||
public Step getStep();
|
||||
public int getTurnNum();
|
||||
public boolean isMainPhase();
|
||||
public boolean canPlaySorcery(UUID playerId);
|
||||
public UUID getActivePlayerId();
|
||||
public UUID getPriorityPlayerId();
|
||||
public void leave(UUID playerId);
|
||||
public boolean isGameOver();
|
||||
public Battlefield getBattlefield();
|
||||
public SpellStack getStack();
|
||||
public Exile getExile();
|
||||
public Combat getCombat();
|
||||
public GameState getState();
|
||||
public String getWinner();
|
||||
public ContinuousEffects getContinuousEffects();
|
||||
public GameStates getGameStates();
|
||||
public void loadGameStates(GameStates states);
|
||||
public Game copy();
|
||||
public boolean isSimulation();
|
||||
public void setSimulation(boolean simulation);
|
||||
public MageObject getLastKnownInformation(UUID objectId, Zone zone);
|
||||
public MageObject getShortLivingLKI(UUID objectId, Zone zone);
|
||||
public void rememberLKI(UUID objectId, Zone zone, MageObject object);
|
||||
public void resetLKI();
|
||||
public void resetShortLivingLKI();
|
||||
public void setLosingPlayer(Player player);
|
||||
public Player getLosingPlayer();
|
||||
public void setStateCheckRequired();
|
||||
public boolean getStateCheckRequired();
|
||||
public void resetForSourceId(UUID sourceId);
|
||||
void loadCards(Set<Card> cards, UUID ownerId);
|
||||
Collection<Card> getCards();
|
||||
Object getCustomData();
|
||||
void setCustomData(Object data);
|
||||
GameOptions getOptions();
|
||||
MageObject getObject(UUID objectId);
|
||||
MageObject getEmblem(UUID objectId);
|
||||
UUID getControllerId(UUID objectId);
|
||||
Permanent getPermanent(UUID permanentId);
|
||||
Card getCard(UUID cardId);
|
||||
Ability getAbility(UUID abilityId, UUID sourceId);
|
||||
void setZone(UUID objectId, Zone zone);
|
||||
void addPlayer(Player player, Deck deck) throws GameException;
|
||||
Player getPlayer(UUID playerId);
|
||||
Players getPlayers();
|
||||
PlayerList getPlayerList();
|
||||
Set<UUID> getOpponents(UUID playerId);
|
||||
Turn getTurn();
|
||||
Phase getPhase();
|
||||
Step getStep();
|
||||
int getTurnNum();
|
||||
boolean isMainPhase();
|
||||
boolean canPlaySorcery(UUID playerId);
|
||||
UUID getActivePlayerId();
|
||||
UUID getPriorityPlayerId();
|
||||
void leave(UUID playerId);
|
||||
boolean isGameOver();
|
||||
Battlefield getBattlefield();
|
||||
SpellStack getStack();
|
||||
Exile getExile();
|
||||
Combat getCombat();
|
||||
GameState getState();
|
||||
String getWinner();
|
||||
ContinuousEffects getContinuousEffects();
|
||||
GameStates getGameStates();
|
||||
void loadGameStates(GameStates states);
|
||||
Game copy();
|
||||
boolean isSimulation();
|
||||
void setSimulation(boolean simulation);
|
||||
MageObject getLastKnownInformation(UUID objectId, Zone zone);
|
||||
MageObject getShortLivingLKI(UUID objectId, Zone zone);
|
||||
void rememberLKI(UUID objectId, Zone zone, MageObject object);
|
||||
void resetLKI();
|
||||
void resetShortLivingLKI();
|
||||
void setLosingPlayer(Player player);
|
||||
Player getLosingPlayer();
|
||||
void setStateCheckRequired();
|
||||
boolean getStateCheckRequired();
|
||||
void resetForSourceId(UUID sourceId);
|
||||
|
||||
//client event methods
|
||||
public void addTableEventListener(Listener<TableEvent> listener);
|
||||
public void addPlayerQueryEventListener(Listener<PlayerQueryEvent> listener);
|
||||
public void fireAskPlayerEvent(UUID playerId, String message);
|
||||
public void fireChooseEvent(UUID playerId, Choice choice);
|
||||
public void fireSelectTargetEvent(UUID playerId, String message, Set<UUID> targets, boolean required, Map<String, Serializable> options);
|
||||
public void fireSelectTargetEvent(UUID playerId, String message, Cards cards, boolean required, Map<String, Serializable> options);
|
||||
public void fireSelectTargetEvent(UUID playerId, String message, List<TriggeredAbility> abilities);
|
||||
public void fireSelectTargetEvent(UUID playerId, String message, List<Permanent> perms, boolean required);
|
||||
public void fireSelectEvent(UUID playerId, String message);
|
||||
public void fireLookAtCardsEvent(UUID playerId, String message, Cards cards);
|
||||
public void firePriorityEvent(UUID playerId);
|
||||
public void firePlayManaEvent(UUID playerId, String message);
|
||||
public void firePlayXManaEvent(UUID playerId, String message);
|
||||
public void fireGetChoiceEvent(UUID playerId, String message, List<? extends ActivatedAbility> choices);
|
||||
public void fireGetModeEvent(UUID playerId, String message, Map<UUID, String> modes);
|
||||
public void fireGetAmountEvent(UUID playerId, String message, int min, int max);
|
||||
public void fireChoosePileEvent(UUID playerId, String message, List<? extends Card> pile1, List<? extends Card> pile2);
|
||||
public void fireInformEvent(String message);
|
||||
public void fireUpdatePlayersEvent();
|
||||
public void informPlayers(String message);
|
||||
public void informPlayer(Player player, String message);
|
||||
public void debugMessage(String message);
|
||||
public void fireErrorEvent(String message, Exception ex);
|
||||
void addTableEventListener(Listener<TableEvent> listener);
|
||||
void addPlayerQueryEventListener(Listener<PlayerQueryEvent> listener);
|
||||
void fireAskPlayerEvent(UUID playerId, String message);
|
||||
void fireChooseEvent(UUID playerId, Choice choice);
|
||||
void fireSelectTargetEvent(UUID playerId, String message, Set<UUID> targets, boolean required, Map<String, Serializable> options);
|
||||
void fireSelectTargetEvent(UUID playerId, String message, Cards cards, boolean required, Map<String, Serializable> options);
|
||||
void fireSelectTargetEvent(UUID playerId, String message, List<TriggeredAbility> abilities);
|
||||
void fireSelectTargetEvent(UUID playerId, String message, List<Permanent> perms, boolean required);
|
||||
void fireSelectEvent(UUID playerId, String message);
|
||||
void fireLookAtCardsEvent(UUID playerId, String message, Cards cards);
|
||||
void firePriorityEvent(UUID playerId);
|
||||
void firePlayManaEvent(UUID playerId, String message);
|
||||
void firePlayXManaEvent(UUID playerId, String message);
|
||||
void fireGetChoiceEvent(UUID playerId, String message, List<? extends ActivatedAbility> choices);
|
||||
void fireGetModeEvent(UUID playerId, String message, Map<UUID, String> modes);
|
||||
void fireGetAmountEvent(UUID playerId, String message, int min, int max);
|
||||
void fireChoosePileEvent(UUID playerId, String message, List<? extends Card> pile1, List<? extends Card> pile2);
|
||||
void fireInformEvent(String message);
|
||||
void fireUpdatePlayersEvent();
|
||||
void informPlayers(String message);
|
||||
void informPlayer(Player player, String message);
|
||||
void debugMessage(String message);
|
||||
void fireErrorEvent(String message, Exception ex);
|
||||
|
||||
//game event methods
|
||||
public void fireEvent(GameEvent event);
|
||||
public boolean replaceEvent(GameEvent event);
|
||||
void fireEvent(GameEvent event);
|
||||
boolean replaceEvent(GameEvent event);
|
||||
|
||||
//game play methods
|
||||
public void start(UUID choosingPlayerId);
|
||||
public void start(UUID choosingPlayerId, GameOptions options);
|
||||
public void resume();
|
||||
public void pause();
|
||||
public boolean isPaused();
|
||||
public void end();
|
||||
public void mulligan(UUID playerId);
|
||||
public void quit(UUID playerId);
|
||||
public void concede(UUID playerId);
|
||||
public void emptyManaPools();
|
||||
public void addEffect(ContinuousEffect continuousEffect, Ability source);
|
||||
public void addEmblem(Emblem emblem, Ability source);
|
||||
public void addPermanent(Permanent permanent);
|
||||
void start(UUID choosingPlayerId);
|
||||
void start(UUID choosingPlayerId, GameOptions options);
|
||||
void resume();
|
||||
void pause();
|
||||
boolean isPaused();
|
||||
void end();
|
||||
void mulligan(UUID playerId);
|
||||
void quit(UUID playerId);
|
||||
void concede(UUID playerId);
|
||||
void emptyManaPools();
|
||||
void addEffect(ContinuousEffect continuousEffect, Ability source);
|
||||
void addEmblem(Emblem emblem, Ability source);
|
||||
void addPermanent(Permanent permanent);
|
||||
|
||||
/**
|
||||
* This version supports copying of copies of any depth.
|
||||
|
|
@ -177,33 +177,33 @@ public interface Game extends MageItem, Serializable {
|
|||
* @param source
|
||||
* @param applier
|
||||
*/
|
||||
public void copyPermanent(Permanent copyFromPermanent, Permanent copyToPermanent, Ability source, ApplyToPermanent applier);
|
||||
void copyPermanent(Permanent copyFromPermanent, Permanent copyToPermanent, Ability source, ApplyToPermanent applier);
|
||||
|
||||
public Card copyCard(Card cardToCopy, Ability source, UUID newController);
|
||||
Card copyCard(Card cardToCopy, Ability source, UUID newController);
|
||||
|
||||
public void addTriggeredAbility(TriggeredAbility ability);
|
||||
public void addDelayedTriggeredAbility(DelayedTriggeredAbility delayedAbility);
|
||||
public void applyEffects();
|
||||
public boolean checkStateAndTriggered();
|
||||
public void playPriority(UUID activePlayerId, boolean resuming);
|
||||
public boolean endTurn(UUID playerId);
|
||||
void addTriggeredAbility(TriggeredAbility ability);
|
||||
void addDelayedTriggeredAbility(DelayedTriggeredAbility delayedAbility);
|
||||
void applyEffects();
|
||||
boolean checkStateAndTriggered();
|
||||
void playPriority(UUID activePlayerId, boolean resuming);
|
||||
boolean endTurn(UUID playerId);
|
||||
|
||||
public int doAction(MageAction action);
|
||||
int doAction(MageAction action);
|
||||
|
||||
//game transaction methods
|
||||
public void saveState();
|
||||
public int bookmarkState();
|
||||
public void restoreState(int bookmark);
|
||||
public void removeBookmark(int bookmark);
|
||||
void saveState();
|
||||
int bookmarkState();
|
||||
void restoreState(int bookmark);
|
||||
void removeBookmark(int bookmark);
|
||||
|
||||
// game options
|
||||
public void setGameOptions(GameOptions options);
|
||||
void setGameOptions(GameOptions options);
|
||||
|
||||
// game times
|
||||
public Date getStartTime();
|
||||
public Date getEndTime();
|
||||
Date getStartTime();
|
||||
Date getEndTime();
|
||||
|
||||
// game cheats (for tests only)
|
||||
public void cheat(UUID ownerId, Map<Zone, String> commands);
|
||||
public void cheat(UUID ownerId, List<Card> library, List<Card> hand, List<PermanentCard> battlefield, List<Card> graveyard);
|
||||
void cheat(UUID ownerId, Map<Zone, String> commands);
|
||||
void cheat(UUID ownerId, List<Card> library, List<Card> hand, List<PermanentCard> battlefield, List<Card> graveyard);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,11 +38,10 @@ import java.util.UUID;
|
|||
*/
|
||||
public interface CommandObject extends MageObject {
|
||||
|
||||
public UUID getSourceId();
|
||||
public UUID getControllerId();
|
||||
public void assignNewId();
|
||||
// public void checkTriggers(GameEvent event, Game game);
|
||||
UUID getSourceId();
|
||||
UUID getControllerId();
|
||||
void assignNewId();
|
||||
|
||||
@Override
|
||||
public CommandObject copy();
|
||||
CommandObject copy();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,22 +45,22 @@ import mage.players.Player;
|
|||
*/
|
||||
public interface Draft extends MageItem, Serializable {
|
||||
|
||||
public void addPlayer(Player player);
|
||||
public Collection<DraftPlayer> getPlayers();
|
||||
public DraftPlayer getPlayer(UUID playerId);
|
||||
public List<ExpansionSet> getSets();
|
||||
public int getBoosterNum();
|
||||
public int getCardNum();
|
||||
public boolean addPick(UUID playerId, UUID cardId);
|
||||
public void start();
|
||||
public boolean allJoined();
|
||||
public void leave(UUID playerId);
|
||||
public void autoPick(UUID playerId);
|
||||
void addPlayer(Player player);
|
||||
Collection<DraftPlayer> getPlayers();
|
||||
DraftPlayer getPlayer(UUID playerId);
|
||||
List<ExpansionSet> getSets();
|
||||
int getBoosterNum();
|
||||
int getCardNum();
|
||||
boolean addPick(UUID playerId, UUID cardId);
|
||||
void start();
|
||||
boolean allJoined();
|
||||
void leave(UUID playerId);
|
||||
void autoPick(UUID playerId);
|
||||
|
||||
public void addTableEventListener(Listener<TableEvent> listener);
|
||||
public void fireUpdatePlayersEvent();
|
||||
public void fireEndDraftEvent();
|
||||
public void addPlayerQueryEventListener(Listener<PlayerQueryEvent> listener);
|
||||
public void firePickCardEvent(UUID playerId);
|
||||
void addTableEventListener(Listener<TableEvent> listener);
|
||||
void fireUpdatePlayersEvent();
|
||||
void fireEndDraftEvent();
|
||||
void addPlayerQueryEventListener(Listener<PlayerQueryEvent> listener);
|
||||
void firePickCardEvent(UUID playerId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,29 +43,29 @@ import mage.players.Player;
|
|||
*/
|
||||
public interface Match {
|
||||
|
||||
public static final int SIDEBOARD_TIME = 180;
|
||||
int SIDEBOARD_TIME = 180;
|
||||
|
||||
public UUID getId();
|
||||
public String getName();
|
||||
public boolean isMatchOver();
|
||||
public List<MatchPlayer> getPlayers();
|
||||
public MatchPlayer getPlayer(UUID playerId);
|
||||
public void addPlayer(Player player, Deck deck);
|
||||
public void submitDeck(UUID playerId, Deck deck);
|
||||
public void updateDeck(UUID playerId, Deck deck);
|
||||
public void startMatch() throws GameException;
|
||||
public void startGame() throws GameException;
|
||||
public void sideboard();
|
||||
public void endGame();
|
||||
public Game getGame();
|
||||
public List<Game> getGames();
|
||||
public int getWinsNeeded();
|
||||
public int getNumGames();
|
||||
public boolean isDoneSideboarding();
|
||||
public UUID getChooser();
|
||||
public MatchOptions getOptions();
|
||||
UUID getId();
|
||||
String getName();
|
||||
boolean isMatchOver();
|
||||
List<MatchPlayer> getPlayers();
|
||||
MatchPlayer getPlayer(UUID playerId);
|
||||
void addPlayer(Player player, Deck deck);
|
||||
void submitDeck(UUID playerId, Deck deck);
|
||||
void updateDeck(UUID playerId, Deck deck);
|
||||
void startMatch() throws GameException;
|
||||
void startGame() throws GameException;
|
||||
void sideboard();
|
||||
void endGame();
|
||||
Game getGame();
|
||||
List<Game> getGames();
|
||||
int getWinsNeeded();
|
||||
int getNumGames();
|
||||
boolean isDoneSideboarding();
|
||||
UUID getChooser();
|
||||
MatchOptions getOptions();
|
||||
|
||||
public void addTableEventListener(Listener<TableEvent> listener);
|
||||
public void fireSideboardEvent(UUID playerId, Deck deck);
|
||||
void addTableEventListener(Listener<TableEvent> listener);
|
||||
void fireSideboardEvent(UUID playerId, Deck deck);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,9 +42,9 @@ import java.util.UUID;
|
|||
|
||||
public interface Permanent extends Card, Controllable {
|
||||
|
||||
public boolean isTapped();
|
||||
public boolean untap(Game game);
|
||||
public boolean tap(Game game);
|
||||
boolean isTapped();
|
||||
boolean untap(Game game);
|
||||
boolean tap(Game game);
|
||||
/**
|
||||
* use tap(game)
|
||||
* <p>setTapped doesn't trigger TAPPED event and should be used
|
||||
|
|
@ -54,39 +54,39 @@ public interface Permanent extends Card, Controllable {
|
|||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public void setTapped(boolean tapped);
|
||||
public boolean canTap();
|
||||
void setTapped(boolean tapped);
|
||||
boolean canTap();
|
||||
|
||||
public boolean isFlipped();
|
||||
public boolean unflip(Game game);
|
||||
public boolean flip(Game game);
|
||||
boolean isFlipped();
|
||||
boolean unflip(Game game);
|
||||
boolean flip(Game game);
|
||||
|
||||
public boolean transform(Game game);
|
||||
public boolean isTransformed();
|
||||
public void setTransformed(boolean value);
|
||||
boolean transform(Game game);
|
||||
boolean isTransformed();
|
||||
void setTransformed(boolean value);
|
||||
|
||||
public boolean isPhasedIn();
|
||||
public boolean phaseIn(Game game);
|
||||
public boolean phaseOut(Game game);
|
||||
boolean isPhasedIn();
|
||||
boolean phaseIn(Game game);
|
||||
boolean phaseOut(Game game);
|
||||
|
||||
public boolean isFaceUp();
|
||||
public boolean turnFaceUp(Game game);
|
||||
public boolean turnFaceDown(Game game);
|
||||
boolean isFaceUp();
|
||||
boolean turnFaceUp(Game game);
|
||||
boolean turnFaceDown(Game game);
|
||||
|
||||
public List<UUID> getAttachments();
|
||||
public UUID getAttachedTo();
|
||||
public void attachTo(UUID permanentId, Game game);
|
||||
public boolean addAttachment(UUID permanentId, Game game);
|
||||
public boolean removeAttachment(UUID permanentId, Game game);
|
||||
List<UUID> getAttachments();
|
||||
UUID getAttachedTo();
|
||||
void attachTo(UUID permanentId, Game game);
|
||||
boolean addAttachment(UUID permanentId, Game game);
|
||||
boolean removeAttachment(UUID permanentId, Game game);
|
||||
|
||||
public boolean changeControllerId(UUID controllerId, Game game);
|
||||
public boolean canBeTargetedBy(MageObject source, UUID controllerId, Game game);
|
||||
public boolean hasProtectionFrom(MageObject source, Game game);
|
||||
public boolean hasSummoningSickness();
|
||||
public int getDamage();
|
||||
public int damage(int damage, UUID sourceId, Game game, boolean preventable, boolean combat);
|
||||
boolean changeControllerId(UUID controllerId, Game game);
|
||||
boolean canBeTargetedBy(MageObject source, UUID controllerId, Game game);
|
||||
boolean hasProtectionFrom(MageObject source, Game game);
|
||||
boolean hasSummoningSickness();
|
||||
int getDamage();
|
||||
int damage(int damage, UUID sourceId, Game game, boolean preventable, boolean combat);
|
||||
|
||||
public int damage(int damage, UUID sourceId, Game game, boolean preventable, boolean combat, ArrayList<UUID> appliedEffects);
|
||||
int damage(int damage, UUID sourceId, Game game, boolean preventable, boolean combat, ArrayList<UUID> appliedEffects);
|
||||
|
||||
/**
|
||||
* used in combat only to deal damage at the same time
|
||||
|
|
@ -98,65 +98,65 @@ public interface Permanent extends Card, Controllable {
|
|||
* @param combat
|
||||
* @return
|
||||
*/
|
||||
public int markDamage(int damage, UUID sourceId, Game game, boolean preventable, boolean combat);
|
||||
public int applyDamage(Game game);
|
||||
int markDamage(int damage, UUID sourceId, Game game, boolean preventable, boolean combat);
|
||||
int applyDamage(Game game);
|
||||
|
||||
public void removeAllDamage(Game game);
|
||||
public Counters getCounters();
|
||||
void removeAllDamage(Game game);
|
||||
Counters getCounters();
|
||||
|
||||
public void addCounters(String name, int amount, Game game);
|
||||
public void addCounters(String name, int amount, Game game, ArrayList<UUID> appliedEffects);
|
||||
public void addCounters(Counter counter, Game game);
|
||||
public void addCounters(Counter counter, Game game, ArrayList<UUID> appliedEffects);
|
||||
void addCounters(String name, int amount, Game game);
|
||||
void addCounters(String name, int amount, Game game, ArrayList<UUID> appliedEffects);
|
||||
void addCounters(Counter counter, Game game);
|
||||
void addCounters(Counter counter, Game game, ArrayList<UUID> appliedEffects);
|
||||
|
||||
public void removeCounters(String name, int amount, Game game);
|
||||
public void removeCounters(Counter counter, Game game);
|
||||
public void reset(Game game);
|
||||
public boolean destroy(UUID sourceId, Game game, boolean noRegen);
|
||||
public boolean sacrifice(UUID sourceId, Game game);
|
||||
public boolean regenerate(UUID sourceId, Game game);
|
||||
public void entersBattlefield(UUID sourceId, Game game);
|
||||
public String getValue();
|
||||
void removeCounters(String name, int amount, Game game);
|
||||
void removeCounters(Counter counter, Game game);
|
||||
void reset(Game game);
|
||||
boolean destroy(UUID sourceId, Game game, boolean noRegen);
|
||||
boolean sacrifice(UUID sourceId, Game game);
|
||||
boolean regenerate(UUID sourceId, Game game);
|
||||
void entersBattlefield(UUID sourceId, Game game);
|
||||
String getValue();
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public void addAbility(Ability ability);
|
||||
void addAbility(Ability ability);
|
||||
@Deprecated
|
||||
public void addAbility(Ability ability, Game game);
|
||||
public void addAbility(Ability ability, UUID sourceId, Game game);
|
||||
void addAbility(Ability ability, Game game);
|
||||
void addAbility(Ability ability, UUID sourceId, Game game);
|
||||
|
||||
public void removeAllAbilities(UUID sourceId, Game game);
|
||||
void removeAllAbilities(UUID sourceId, Game game);
|
||||
|
||||
public void setLoyaltyUsed(boolean used);
|
||||
public boolean isLoyaltyUsed();
|
||||
void setLoyaltyUsed(boolean used);
|
||||
boolean isLoyaltyUsed();
|
||||
|
||||
public void beginningOfTurn(Game game);
|
||||
public void endOfTurn(Game game);
|
||||
public void checkControlChanged(Game game);
|
||||
public int getTurnsOnBattlefield();
|
||||
void beginningOfTurn(Game game);
|
||||
void endOfTurn(Game game);
|
||||
void checkControlChanged(Game game);
|
||||
int getTurnsOnBattlefield();
|
||||
|
||||
public void addPower(int power);
|
||||
public void addToughness(int toughness);
|
||||
void addPower(int power);
|
||||
void addToughness(int toughness);
|
||||
|
||||
public boolean isAttacking();
|
||||
public int getBlocking();
|
||||
public void setAttacking(boolean attacking);
|
||||
public void setBlocking(int blocking);
|
||||
public int getMaxBlocks();
|
||||
public void setMaxBlocks(int maxBlocks);
|
||||
public int getMinBlockedBy();
|
||||
public void setMinBlockedBy(int minBlockedBy);
|
||||
public boolean canAttack(Game game);
|
||||
public boolean canBlock(UUID attackerId, Game game);
|
||||
public boolean canBlockAny(Game game);
|
||||
public boolean removeFromCombat(Game game);
|
||||
public boolean isDeathtouched();
|
||||
boolean isAttacking();
|
||||
int getBlocking();
|
||||
void setAttacking(boolean attacking);
|
||||
void setBlocking(int blocking);
|
||||
int getMaxBlocks();
|
||||
void setMaxBlocks(int maxBlocks);
|
||||
int getMinBlockedBy();
|
||||
void setMinBlockedBy(int minBlockedBy);
|
||||
boolean canAttack(Game game);
|
||||
boolean canBlock(UUID attackerId, Game game);
|
||||
boolean canBlockAny(Game game);
|
||||
boolean removeFromCombat(Game game);
|
||||
boolean isDeathtouched();
|
||||
|
||||
/**
|
||||
* Returns the list of sources that dealt damage this turn to this permanent
|
||||
* @return
|
||||
*/
|
||||
public List<UUID> getDealtDamageByThisTurn();
|
||||
List<UUID> getDealtDamageByThisTurn();
|
||||
|
||||
/**
|
||||
* Imprint some other card to this one.
|
||||
|
|
@ -165,7 +165,7 @@ public interface Permanent extends Card, Controllable {
|
|||
* @param game
|
||||
* @return true if card was imprinted
|
||||
*/
|
||||
public boolean imprint(UUID imprintedCard, Game game);
|
||||
boolean imprint(UUID imprintedCard, Game game);
|
||||
|
||||
/**
|
||||
* Removes all imprinted cards from permanent.
|
||||
|
|
@ -173,7 +173,7 @@ public interface Permanent extends Card, Controllable {
|
|||
* @param game
|
||||
* @return
|
||||
*/
|
||||
public boolean clearImprinted(Game game);
|
||||
boolean clearImprinted(Game game);
|
||||
|
||||
/**
|
||||
* Get card that was imprinted on this one.
|
||||
|
|
@ -181,7 +181,7 @@ public interface Permanent extends Card, Controllable {
|
|||
* Can be null if no card was imprinted.
|
||||
* @return Imprinted card UUID.
|
||||
*/
|
||||
public List<UUID> getImprinted();
|
||||
List<UUID> getImprinted();
|
||||
|
||||
/**
|
||||
* Allows to connect any card to permanent.
|
||||
|
|
@ -190,40 +190,40 @@ public interface Permanent extends Card, Controllable {
|
|||
* @param key
|
||||
* @param connectedCard
|
||||
*/
|
||||
public void addConnectedCard(String key, UUID connectedCard);
|
||||
void addConnectedCard(String key, UUID connectedCard);
|
||||
|
||||
/**
|
||||
* Returns connected cards.
|
||||
* Very similar to Imprint except that it is for internal use only.
|
||||
* @return
|
||||
*/
|
||||
public List<UUID> getConnectedCards(String key);
|
||||
List<UUID> getConnectedCards(String key);
|
||||
|
||||
/**
|
||||
* Clear all connected cards.
|
||||
*/
|
||||
public void clearConnectedCards(String key);
|
||||
void clearConnectedCards(String key);
|
||||
|
||||
/**
|
||||
* Sets paired card.
|
||||
*
|
||||
* @param pairedCard
|
||||
*/
|
||||
public void setPairedCard(UUID pairedCard);
|
||||
void setPairedCard(UUID pairedCard);
|
||||
|
||||
/**
|
||||
* Gets paired card. Can return null.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public UUID getPairedCard();
|
||||
UUID getPairedCard();
|
||||
|
||||
/**
|
||||
* Makes permanent paired with no other permanent.
|
||||
*/
|
||||
public void clearPairedCard();
|
||||
void clearPairedCard();
|
||||
|
||||
@Override
|
||||
public Permanent copy();
|
||||
Permanent copy();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,11 +37,10 @@ import java.util.UUID;
|
|||
|
||||
public interface StackObject extends MageObject, Controllable {
|
||||
|
||||
// public Card getCard();
|
||||
public boolean resolve(Game game);
|
||||
public UUID getSourceId();
|
||||
public void counter(UUID sourceId, Game game);
|
||||
public Ability getStackAbility();
|
||||
boolean resolve(Game game);
|
||||
UUID getSourceId();
|
||||
void counter(UUID sourceId, Game game);
|
||||
Ability getStackAbility();
|
||||
@Override
|
||||
public StackObject copy();
|
||||
StackObject copy();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,22 +44,22 @@ import mage.players.Player;
|
|||
*/
|
||||
public interface Tournament {
|
||||
|
||||
public UUID getId();
|
||||
public void addPlayer(Player player, String playerType);
|
||||
public TournamentPlayer getPlayer(UUID playerId);
|
||||
public Collection<TournamentPlayer> getPlayers();
|
||||
public Collection<Round> getRounds();
|
||||
public List<ExpansionSet> getSets();
|
||||
public void submitDeck(UUID playerId, Deck deck);
|
||||
public void updateDeck(UUID playerId, Deck deck);
|
||||
public void autoSubmit(UUID playerId, Deck deck);
|
||||
public boolean allJoined();
|
||||
public boolean isDoneConstructing();
|
||||
public void leave(UUID playerId);
|
||||
public void nextStep();
|
||||
UUID getId();
|
||||
void addPlayer(Player player, String playerType);
|
||||
TournamentPlayer getPlayer(UUID playerId);
|
||||
Collection<TournamentPlayer> getPlayers();
|
||||
Collection<Round> getRounds();
|
||||
List<ExpansionSet> getSets();
|
||||
void submitDeck(UUID playerId, Deck deck);
|
||||
void updateDeck(UUID playerId, Deck deck);
|
||||
void autoSubmit(UUID playerId, Deck deck);
|
||||
boolean allJoined();
|
||||
boolean isDoneConstructing();
|
||||
void leave(UUID playerId);
|
||||
void nextStep();
|
||||
|
||||
public void addTableEventListener(Listener<TableEvent> listener);
|
||||
public void addPlayerQueryEventListener(Listener<PlayerQueryEvent> listener);
|
||||
public void fireConstructEvent(UUID playerId);
|
||||
void addTableEventListener(Listener<TableEvent> listener);
|
||||
void addPlayerQueryEventListener(Listener<PlayerQueryEvent> listener);
|
||||
void fireConstructEvent(UUID playerId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,52 +68,52 @@ import java.util.UUID;
|
|||
*/
|
||||
public interface Player extends MageItem, Copyable<Player> {
|
||||
|
||||
public boolean isHuman();
|
||||
public String getName();
|
||||
public RangeOfInfluence getRange();
|
||||
public Library getLibrary();
|
||||
public Cards getSideboard();
|
||||
public Cards getGraveyard();
|
||||
public Abilities<Ability> getAbilities();
|
||||
public void addAbility(Ability ability);
|
||||
public Counters getCounters();
|
||||
public int getLife();
|
||||
public void setLife(int life, Game game);
|
||||
public int loseLife(int amount, Game game);
|
||||
public boolean isCanLoseLife();
|
||||
public void setCanLoseLife(boolean canLoseLife);
|
||||
public int gainLife(int amount, Game game);
|
||||
public boolean isCanGainLife();
|
||||
public void setCanGainLife(boolean canGainLife);
|
||||
public boolean isLifeTotalCanChange();
|
||||
public void setCanPayLifeCost(boolean canPayLifeCost);
|
||||
public boolean canPayLifeCost();
|
||||
public void setCanPaySacrificeCost(boolean canPaySacrificeCost);
|
||||
public boolean canPaySacrificeCost();
|
||||
public void setLifeTotalCanChange(boolean lifeTotalCanChange);
|
||||
public int damage(int damage, UUID sourceId, Game game, boolean combatDamage, boolean preventable);
|
||||
public int damage(int damage, UUID sourceId, Game game, boolean combatDamage, boolean preventable, ArrayList<UUID> appliedEffects);
|
||||
public Cards getHand();
|
||||
public int getLandsPlayed();
|
||||
public int getLandsPerTurn();
|
||||
public void setLandsPerTurn(int landsPerTurn);
|
||||
public int getMaxHandSize();
|
||||
public void setMaxHandSize(int maxHandSize);
|
||||
public boolean isPassed();
|
||||
public boolean isEmptyDraw();
|
||||
public void pass();
|
||||
public void resetPassed();
|
||||
public boolean hasLost();
|
||||
public boolean hasWon();
|
||||
public boolean hasLeft();
|
||||
public ManaPool getManaPool();
|
||||
public Set<UUID> getInRange();
|
||||
public boolean isTopCardRevealed();
|
||||
public void setTopCardRevealed(boolean topCardRevealed);
|
||||
public UserData getUserData();
|
||||
public void setUserData(UserData userData);
|
||||
public boolean canLose(Game game);
|
||||
public boolean autoLoseGame();
|
||||
boolean isHuman();
|
||||
String getName();
|
||||
RangeOfInfluence getRange();
|
||||
Library getLibrary();
|
||||
Cards getSideboard();
|
||||
Cards getGraveyard();
|
||||
Abilities<Ability> getAbilities();
|
||||
void addAbility(Ability ability);
|
||||
Counters getCounters();
|
||||
int getLife();
|
||||
void setLife(int life, Game game);
|
||||
int loseLife(int amount, Game game);
|
||||
boolean isCanLoseLife();
|
||||
void setCanLoseLife(boolean canLoseLife);
|
||||
int gainLife(int amount, Game game);
|
||||
boolean isCanGainLife();
|
||||
void setCanGainLife(boolean canGainLife);
|
||||
boolean isLifeTotalCanChange();
|
||||
void setCanPayLifeCost(boolean canPayLifeCost);
|
||||
boolean canPayLifeCost();
|
||||
void setCanPaySacrificeCost(boolean canPaySacrificeCost);
|
||||
boolean canPaySacrificeCost();
|
||||
void setLifeTotalCanChange(boolean lifeTotalCanChange);
|
||||
int damage(int damage, UUID sourceId, Game game, boolean combatDamage, boolean preventable);
|
||||
int damage(int damage, UUID sourceId, Game game, boolean combatDamage, boolean preventable, ArrayList<UUID> appliedEffects);
|
||||
Cards getHand();
|
||||
int getLandsPlayed();
|
||||
int getLandsPerTurn();
|
||||
void setLandsPerTurn(int landsPerTurn);
|
||||
int getMaxHandSize();
|
||||
void setMaxHandSize(int maxHandSize);
|
||||
boolean isPassed();
|
||||
boolean isEmptyDraw();
|
||||
void pass();
|
||||
void resetPassed();
|
||||
boolean hasLost();
|
||||
boolean hasWon();
|
||||
boolean hasLeft();
|
||||
ManaPool getManaPool();
|
||||
Set<UUID> getInRange();
|
||||
boolean isTopCardRevealed();
|
||||
void setTopCardRevealed(boolean topCardRevealed);
|
||||
UserData getUserData();
|
||||
void setUserData(UserData userData);
|
||||
boolean canLose(Game game);
|
||||
boolean autoLoseGame();
|
||||
|
||||
/**
|
||||
* Returns a set of players which turns under you control.
|
||||
|
|
@ -121,27 +121,27 @@ public interface Player extends MageItem, Copyable<Player> {
|
|||
*
|
||||
* @return
|
||||
*/
|
||||
public Set<UUID> getPlayersUnderYourControl();
|
||||
Set<UUID> getPlayersUnderYourControl();
|
||||
|
||||
/**
|
||||
* Defines player whose turn this player controls at the moment.
|
||||
* @param playerId
|
||||
*/
|
||||
public void controlPlayersTurn(Game game, UUID playerId);
|
||||
void controlPlayersTurn(Game game, UUID playerId);
|
||||
|
||||
/**
|
||||
* Sets player {@link UUID} who controls this player's turn.
|
||||
*
|
||||
* @param playerId
|
||||
*/
|
||||
public void setTurnControlledBy(UUID playerId);
|
||||
void setTurnControlledBy(UUID playerId);
|
||||
|
||||
public UUID getTurnControlledBy();
|
||||
UUID getTurnControlledBy();
|
||||
|
||||
/**
|
||||
* Resets players whose turns you control at the moment.
|
||||
*/
|
||||
public void resetOtherTurnsControlled();
|
||||
void resetOtherTurnsControlled();
|
||||
|
||||
/**
|
||||
* Returns false in case player don't control the game.
|
||||
|
|
@ -150,7 +150,7 @@ public interface Player extends MageItem, Copyable<Player> {
|
|||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isGameUnderControl();
|
||||
boolean isGameUnderControl();
|
||||
|
||||
/**
|
||||
* Returns false in case you don't control the game.
|
||||
|
|
@ -159,27 +159,27 @@ public interface Player extends MageItem, Copyable<Player> {
|
|||
*
|
||||
* @param value
|
||||
*/
|
||||
public void setGameUnderYourControl(boolean value);
|
||||
void setGameUnderYourControl(boolean value);
|
||||
|
||||
public boolean isTestMode();
|
||||
public void setTestMode(boolean value);
|
||||
public void addAction(String action);
|
||||
public void setAllowBadMoves(boolean allowBadMoves);
|
||||
boolean isTestMode();
|
||||
void setTestMode(boolean value);
|
||||
void addAction(String action);
|
||||
void setAllowBadMoves(boolean allowBadMoves);
|
||||
|
||||
public void init(Game game);
|
||||
public void init(Game game, boolean testMode);
|
||||
public void useDeck(Deck deck, Game game);
|
||||
public void reset();
|
||||
public void shuffleLibrary(Game game);
|
||||
public int drawCards(int num, Game game);
|
||||
public boolean cast(SpellAbility ability, Game game, boolean noMana);
|
||||
public boolean putInHand(Card card, Game game);
|
||||
public boolean removeFromHand(Card card, Game game);
|
||||
public boolean removeFromBattlefield(Permanent permanent, Game game);
|
||||
public boolean putInGraveyard(Card card, Game game, boolean fromBattlefield);
|
||||
public boolean removeFromGraveyard(Card card, Game game);
|
||||
public boolean removeFromLibrary(Card card, Game game);
|
||||
public boolean searchLibrary(TargetCardInLibrary target, Game game);
|
||||
void init(Game game);
|
||||
void init(Game game, boolean testMode);
|
||||
void useDeck(Deck deck, Game game);
|
||||
void reset();
|
||||
void shuffleLibrary(Game game);
|
||||
int drawCards(int num, Game game);
|
||||
boolean cast(SpellAbility ability, Game game, boolean noMana);
|
||||
boolean putInHand(Card card, Game game);
|
||||
boolean removeFromHand(Card card, Game game);
|
||||
boolean removeFromBattlefield(Permanent permanent, Game game);
|
||||
boolean putInGraveyard(Card card, Game game, boolean fromBattlefield);
|
||||
boolean removeFromGraveyard(Card card, Game game);
|
||||
boolean removeFromLibrary(Card card, Game game);
|
||||
boolean searchLibrary(TargetCardInLibrary target, Game game);
|
||||
/**
|
||||
*
|
||||
* @param target
|
||||
|
|
@ -187,83 +187,83 @@ public interface Player extends MageItem, Copyable<Player> {
|
|||
* @param targetPlayerId player whose library will be searched
|
||||
* @return true if search was successful
|
||||
*/
|
||||
public boolean searchLibrary(TargetCardInLibrary target, Game game, UUID targetPlayerId);
|
||||
public boolean canPlayLand();
|
||||
public boolean playLand(Card card, Game game);
|
||||
public boolean activateAbility(ActivatedAbility ability, Game game);
|
||||
public boolean triggerAbility(TriggeredAbility ability, Game game);
|
||||
public boolean canBeTargetedBy(MageObject source, Game game);
|
||||
public boolean hasProtectionFrom(MageObject source, Game game);
|
||||
public boolean flipCoin(Game game);
|
||||
public void discard(int amount, Ability source, Game game);
|
||||
public void discardToMax(Game game);
|
||||
public boolean discard(Card card, Ability source, Game game);
|
||||
public void lost(Game game);
|
||||
public void won(Game game);
|
||||
public void leave();
|
||||
public void concede(Game game);
|
||||
public void abort();
|
||||
boolean searchLibrary(TargetCardInLibrary target, Game game, UUID targetPlayerId);
|
||||
boolean canPlayLand();
|
||||
boolean playLand(Card card, Game game);
|
||||
boolean activateAbility(ActivatedAbility ability, Game game);
|
||||
boolean triggerAbility(TriggeredAbility ability, Game game);
|
||||
boolean canBeTargetedBy(MageObject source, Game game);
|
||||
boolean hasProtectionFrom(MageObject source, Game game);
|
||||
boolean flipCoin(Game game);
|
||||
void discard(int amount, Ability source, Game game);
|
||||
void discardToMax(Game game);
|
||||
boolean discard(Card card, Ability source, Game game);
|
||||
void lost(Game game);
|
||||
void won(Game game);
|
||||
void leave();
|
||||
void concede(Game game);
|
||||
void abort();
|
||||
|
||||
public void revealCards(String name, Cards cards, Game game);
|
||||
public void lookAtCards(String name, Cards cards, Game game);
|
||||
void revealCards(String name, Cards cards, Game game);
|
||||
void lookAtCards(String name, Cards cards, Game game);
|
||||
|
||||
@Override
|
||||
public Player copy();
|
||||
public void restore(Player player);
|
||||
Player copy();
|
||||
void restore(Player player);
|
||||
|
||||
public void setResponseString(String responseString);
|
||||
public void setResponseUUID(UUID responseUUID);
|
||||
public void setResponseBoolean(Boolean responseBoolean);
|
||||
public void setResponseInteger(Integer data);
|
||||
void setResponseString(String responseString);
|
||||
void setResponseUUID(UUID responseUUID);
|
||||
void setResponseBoolean(Boolean responseBoolean);
|
||||
void setResponseInteger(Integer data);
|
||||
|
||||
public abstract boolean priority(Game game);
|
||||
public abstract boolean choose(Outcome outcome, Target target, UUID sourceId, Game game);
|
||||
public abstract boolean choose(Outcome outcome, Target target, UUID sourceId, Game game, Map<String, Serializable> options);
|
||||
public abstract boolean choose(Outcome outcome, Cards cards, TargetCard target, Game game);
|
||||
public abstract boolean chooseTarget(Outcome outcome, Target target, Ability source, Game game);
|
||||
public abstract boolean chooseTarget(Outcome outcome, Cards cards, TargetCard target, Ability source, Game game);
|
||||
public abstract boolean chooseTargetAmount(Outcome outcome, TargetAmount target, Ability source, Game game);
|
||||
public abstract boolean chooseMulligan(Game game);
|
||||
public abstract boolean chooseUse(Outcome outcome, String message, Game game);
|
||||
public abstract boolean choose(Outcome outcome, Choice choice, Game game);
|
||||
public abstract boolean choosePile(Outcome outcome, String message, List<? extends Card> pile1, List<? extends Card> pile2, Game game);
|
||||
public abstract boolean playMana(ManaCost unpaid, Game game);
|
||||
public abstract boolean playXMana(VariableManaCost cost, ManaCosts<ManaCost> costs, Game game);
|
||||
public abstract int chooseEffect(List<ReplacementEffect> rEffects, Game game);
|
||||
public abstract TriggeredAbility chooseTriggeredAbility(List<TriggeredAbility> abilities, Game game);
|
||||
public abstract Mode chooseMode(Modes modes, Ability source, Game game);
|
||||
public abstract void selectAttackers(Game game, UUID attackingPlayerId);
|
||||
public abstract void selectBlockers(Game game, UUID defendingPlayerId);
|
||||
public abstract UUID chooseAttackerOrder(List<Permanent> attacker, Game game);
|
||||
public abstract UUID chooseBlockerOrder(List<Permanent> blockers, Game game);
|
||||
public abstract void assignDamage(int damage, List<UUID> targets, String singleTargetName, UUID sourceId, Game game);
|
||||
public abstract int getAmount(int min, int max, String message, Game game);
|
||||
public abstract void sideboard(Match match, Deck deck);
|
||||
public abstract void construct(Tournament tournament, Deck deck);
|
||||
public abstract void pickCard(List<Card> cards, Deck deck, Draft draft);
|
||||
boolean priority(Game game);
|
||||
boolean choose(Outcome outcome, Target target, UUID sourceId, Game game);
|
||||
boolean choose(Outcome outcome, Target target, UUID sourceId, Game game, Map<String, Serializable> options);
|
||||
boolean choose(Outcome outcome, Cards cards, TargetCard target, Game game);
|
||||
boolean chooseTarget(Outcome outcome, Target target, Ability source, Game game);
|
||||
boolean chooseTarget(Outcome outcome, Cards cards, TargetCard target, Ability source, Game game);
|
||||
boolean chooseTargetAmount(Outcome outcome, TargetAmount target, Ability source, Game game);
|
||||
boolean chooseMulligan(Game game);
|
||||
boolean chooseUse(Outcome outcome, String message, Game game);
|
||||
boolean choose(Outcome outcome, Choice choice, Game game);
|
||||
boolean choosePile(Outcome outcome, String message, List<? extends Card> pile1, List<? extends Card> pile2, Game game);
|
||||
boolean playMana(ManaCost unpaid, Game game);
|
||||
boolean playXMana(VariableManaCost cost, ManaCosts<ManaCost> costs, Game game);
|
||||
int chooseEffect(List<ReplacementEffect> rEffects, Game game);
|
||||
TriggeredAbility chooseTriggeredAbility(List<TriggeredAbility> abilities, Game game);
|
||||
Mode chooseMode(Modes modes, Ability source, Game game);
|
||||
void selectAttackers(Game game, UUID attackingPlayerId);
|
||||
void selectBlockers(Game game, UUID defendingPlayerId);
|
||||
UUID chooseAttackerOrder(List<Permanent> attacker, Game game);
|
||||
UUID chooseBlockerOrder(List<Permanent> blockers, Game game);
|
||||
void assignDamage(int damage, List<UUID> targets, String singleTargetName, UUID sourceId, Game game);
|
||||
int getAmount(int min, int max, String message, Game game);
|
||||
void sideboard(Match match, Deck deck);
|
||||
void construct(Tournament tournament, Deck deck);
|
||||
void pickCard(List<Card> cards, Deck deck, Draft draft);
|
||||
|
||||
public void declareAttacker(UUID attackerId, UUID defenderId, Game game);
|
||||
public void declareBlocker(UUID blockerId, UUID attackerId, Game game);
|
||||
public List<Permanent> getAvailableAttackers(Game game);
|
||||
public List<Permanent> getAvailableBlockers(Game game);
|
||||
void declareAttacker(UUID attackerId, UUID defenderId, Game game);
|
||||
void declareBlocker(UUID blockerId, UUID attackerId, Game game);
|
||||
List<Permanent> getAvailableAttackers(Game game);
|
||||
List<Permanent> getAvailableBlockers(Game game);
|
||||
|
||||
public void beginTurn(Game game);
|
||||
public void endOfTurn(Game game);
|
||||
public void phasing(Game game);
|
||||
public void untap(Game game);
|
||||
void beginTurn(Game game);
|
||||
void endOfTurn(Game game);
|
||||
void phasing(Game game);
|
||||
void untap(Game game);
|
||||
|
||||
public List<Ability> getPlayable(Game game, boolean hidden);
|
||||
public List<Ability> getPlayableOptions(Ability ability, Game game);
|
||||
List<Ability> getPlayable(Game game, boolean hidden);
|
||||
List<Ability> getPlayableOptions(Ability ability, Game game);
|
||||
|
||||
public void addCounters(Counter counter, Game game);
|
||||
public List<UUID> getAttachments();
|
||||
public boolean addAttachment(UUID permanentId, Game game);
|
||||
public boolean removeAttachment(UUID permanentId, Game game);
|
||||
void addCounters(Counter counter, Game game);
|
||||
List<UUID> getAttachments();
|
||||
boolean addAttachment(UUID permanentId, Game game);
|
||||
boolean removeAttachment(UUID permanentId, Game game);
|
||||
|
||||
/**
|
||||
* Signals that the player becomes active player in this turn.
|
||||
*/
|
||||
public void becomesActivePlayer();
|
||||
void becomesActivePlayer();
|
||||
|
||||
public int getTurns();
|
||||
int getTurns();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,50 +45,49 @@ import java.util.UUID;
|
|||
*/
|
||||
public interface Target extends Serializable {
|
||||
|
||||
public boolean isChosen();
|
||||
public boolean doneChosing();
|
||||
public void clearChosen();
|
||||
public boolean isNotTarget();
|
||||
public void setNotTarget(boolean notTarget);
|
||||
boolean isChosen();
|
||||
boolean doneChosing();
|
||||
void clearChosen();
|
||||
boolean isNotTarget();
|
||||
void setNotTarget(boolean notTarget);
|
||||
|
||||
// methods for targets
|
||||
public boolean canChoose(UUID sourceId, UUID sourceControllerId, Game game);
|
||||
public Set<UUID> possibleTargets(UUID sourceId, UUID sourceControllerId, Game game);
|
||||
public boolean chooseTarget(Outcome outcome, UUID playerId, Ability source, Game game);
|
||||
public void addTarget(UUID id, Ability source, Game game);
|
||||
public void addTarget(UUID id, int amount, Ability source, Game game);
|
||||
public void addTarget(UUID id, Ability source, Game game, boolean skipEvent);
|
||||
public void addTarget(UUID id, int amount, Ability source, Game game, boolean skipEvent);
|
||||
public boolean canTarget(UUID id, Game game);
|
||||
public boolean canTarget(UUID id, Ability source, Game game);
|
||||
public boolean isLegal(Ability source, Game game);
|
||||
public List<? extends Target> getTargetOptions(Ability source, Game game);
|
||||
boolean canChoose(UUID sourceId, UUID sourceControllerId, Game game);
|
||||
Set<UUID> possibleTargets(UUID sourceId, UUID sourceControllerId, Game game);
|
||||
boolean chooseTarget(Outcome outcome, UUID playerId, Ability source, Game game);
|
||||
void addTarget(UUID id, Ability source, Game game);
|
||||
void addTarget(UUID id, int amount, Ability source, Game game);
|
||||
void addTarget(UUID id, Ability source, Game game, boolean skipEvent);
|
||||
void addTarget(UUID id, int amount, Ability source, Game game, boolean skipEvent);
|
||||
boolean canTarget(UUID id, Game game);
|
||||
boolean canTarget(UUID id, Ability source, Game game);
|
||||
boolean isLegal(Ability source, Game game);
|
||||
List<? extends Target> getTargetOptions(Ability source, Game game);
|
||||
|
||||
//methods for non-targets
|
||||
public boolean canChoose(UUID sourceControllerId, Game game);
|
||||
public Set<UUID> possibleTargets(UUID sourceControllerId, Game game);
|
||||
public boolean choose(Outcome outcome, UUID playerId, UUID sourceId, Game game);
|
||||
public void add(UUID id, Game game);
|
||||
public void remove(UUID targetId);
|
||||
public void updateTarget(UUID targetId, Game game);
|
||||
boolean canChoose(UUID sourceControllerId, Game game);
|
||||
Set<UUID> possibleTargets(UUID sourceControllerId, Game game);
|
||||
boolean choose(Outcome outcome, UUID playerId, UUID sourceId, Game game);
|
||||
void add(UUID id, Game game);
|
||||
void remove(UUID targetId);
|
||||
void updateTarget(UUID targetId, Game game);
|
||||
|
||||
public String getMessage();
|
||||
public String getTargetName();
|
||||
public void setTargetName(String name);
|
||||
public String getTargetedName(Game game);
|
||||
public Zone getZone();
|
||||
String getMessage();
|
||||
String getTargetName();
|
||||
void setTargetName(String name);
|
||||
String getTargetedName(Game game);
|
||||
Zone getZone();
|
||||
|
||||
public int getTargetAmount(UUID targetId);
|
||||
public int getNumberOfTargets();
|
||||
public int getMaxNumberOfTargets();
|
||||
public List<UUID> getTargets();
|
||||
public Filter getFilter();
|
||||
int getTargetAmount(UUID targetId);
|
||||
int getNumberOfTargets();
|
||||
int getMaxNumberOfTargets();
|
||||
List<UUID> getTargets();
|
||||
Filter getFilter();
|
||||
|
||||
public boolean isRequired();
|
||||
public void setRequired(boolean required);
|
||||
boolean isRequired();
|
||||
void setRequired(boolean required);
|
||||
|
||||
// public UUID getLastTarget();
|
||||
public UUID getFirstTarget();
|
||||
UUID getFirstTarget();
|
||||
|
||||
public Target copy();
|
||||
Target copy();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,5 +34,5 @@ package mage.util;
|
|||
*/
|
||||
public interface Copyable<T> {
|
||||
|
||||
public abstract T copy();
|
||||
T copy();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,5 +31,5 @@ package mage.util.functions;
|
|||
* @author nantuko
|
||||
*/
|
||||
public interface Function<X, Y> {
|
||||
public X apply(Y in);
|
||||
X apply(Y in);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,14 +39,14 @@ import mage.game.events.GameEvent;
|
|||
*/
|
||||
public interface Watcher<T extends Watcher<T>> extends Serializable {
|
||||
|
||||
public UUID getControllerId();
|
||||
public void setControllerId(UUID controllerId);
|
||||
public UUID getSourceId();
|
||||
public void setSourceId(UUID sourceId);
|
||||
public String getKey();
|
||||
public void watch(GameEvent event, Game game);
|
||||
public boolean conditionMet();
|
||||
public void reset();
|
||||
UUID getControllerId();
|
||||
void setControllerId(UUID controllerId);
|
||||
UUID getSourceId();
|
||||
void setSourceId(UUID sourceId);
|
||||
String getKey();
|
||||
void watch(GameEvent event, Game game);
|
||||
boolean conditionMet();
|
||||
void reset();
|
||||
|
||||
public abstract T copy();
|
||||
abstract T copy();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue