mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
add deprecated annotations, remove unused methods/params
clean javadoc boilerplate
This commit is contained in:
parent
cce9547efb
commit
277e4f4311
2 changed files with 6 additions and 70 deletions
|
|
@ -49,11 +49,6 @@ public class Battlefield implements Serializable {
|
|||
* Some filter predicates do not work here (e.g. AnotherPredicate() because
|
||||
* filter.match() is called without controllerId. To use this predicates you
|
||||
* can use count() instead of countAll()
|
||||
*
|
||||
* @param filter
|
||||
* @param controllerId
|
||||
* @param game
|
||||
* @return count
|
||||
*/
|
||||
public int countAll(FilterPermanent filter, UUID controllerId, Game game) {
|
||||
return (int) field.values()
|
||||
|
|
@ -68,12 +63,6 @@ public class Battlefield implements Serializable {
|
|||
/**
|
||||
* Returns a count of all {@link Permanent} that are within the range of
|
||||
* influence of the specified player id and that match the supplied filter.
|
||||
*
|
||||
* @param filter
|
||||
* @param sourcePlayerId
|
||||
* @param source
|
||||
* @param game
|
||||
* @return count
|
||||
*/
|
||||
public int count(FilterPermanent filter, UUID sourcePlayerId, Ability source, Game game) {
|
||||
if (game.getRangeOfInfluence() == RangeOfInfluence.ALL) {
|
||||
|
|
@ -101,12 +90,7 @@ public class Battlefield implements Serializable {
|
|||
* that matches the filter and is controlled by controllerId. This method
|
||||
* ignores the range of influence.
|
||||
*
|
||||
* @param filter
|
||||
* @param controllerId controller and source can be different (from different players)
|
||||
* @param source
|
||||
* @param game
|
||||
* @param num
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean containsControlled(FilterPermanent filter, UUID controllerId, Ability source, Game game, int num) {
|
||||
return field.values()
|
||||
|
|
@ -125,13 +109,6 @@ public class Battlefield implements Serializable {
|
|||
* Returns true if the battlefield contains num or more {@link Permanent}
|
||||
* that is within the range of influence of the specified player id and that
|
||||
* matches the supplied filter.
|
||||
*
|
||||
* @param filter
|
||||
* @param sourcePlayerId
|
||||
* @param source
|
||||
* @param game
|
||||
* @param num
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean contains(FilterPermanent filter, UUID sourcePlayerId, Ability source, Game game, int num) {
|
||||
if (game.getRangeOfInfluence() == RangeOfInfluence.ALL) {
|
||||
|
|
@ -185,7 +162,7 @@ public class Battlefield implements Serializable {
|
|||
}
|
||||
}
|
||||
|
||||
public void endOfTurn(UUID controllerId, Game game) {
|
||||
public void endOfTurn(Game game) {
|
||||
for (Permanent perm : field.values()) {
|
||||
perm.endOfTurn(game);
|
||||
}
|
||||
|
|
@ -195,10 +172,6 @@ public class Battlefield implements Serializable {
|
|||
return field.values();
|
||||
}
|
||||
|
||||
public Set<UUID> getAllPermanentIds() {
|
||||
return field.keySet();
|
||||
}
|
||||
|
||||
public List<Permanent> getAllActivePermanents() {
|
||||
return field.values()
|
||||
.stream()
|
||||
|
|
@ -209,10 +182,6 @@ public class Battlefield implements Serializable {
|
|||
/**
|
||||
* Returns all {@link Permanent} on the battlefield that are controlled by
|
||||
* the specified player id. The method ignores the range of influence.
|
||||
*
|
||||
* @param controllerId
|
||||
* @return a list of {@link Permanent}
|
||||
* @see Permanent
|
||||
*/
|
||||
public List<Permanent> getAllActivePermanents(UUID controllerId) {
|
||||
return field.values()
|
||||
|
|
@ -225,12 +194,9 @@ public class Battlefield implements Serializable {
|
|||
/**
|
||||
* Returns all {@link Permanent} on the battlefield that match the specified
|
||||
* {@link CardType}. This method ignores the range of influence.
|
||||
*
|
||||
* @param type
|
||||
* @param game
|
||||
* @return a list of {@link Permanent}
|
||||
* @see Permanent
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public List<Permanent> getAllActivePermanents(CardType type, Game game) {
|
||||
return field.values()
|
||||
.stream()
|
||||
|
|
@ -242,12 +208,9 @@ public class Battlefield implements Serializable {
|
|||
* Returns all {@link Permanent} on the battlefield that match the supplied
|
||||
* filter. This method ignores the range of influence and ignores
|
||||
* ObjectSourcePlayer predicates in the filter (e.g. controller predicates)
|
||||
*
|
||||
* @param filter
|
||||
* @param game
|
||||
* @return a list of {@link Permanent}
|
||||
* @see Permanent
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public List<Permanent> getAllActivePermanents(FilterPermanent filter, Game game) {
|
||||
return field.values()
|
||||
.stream()
|
||||
|
|
@ -259,12 +222,6 @@ public class Battlefield implements Serializable {
|
|||
* Returns all {@link Permanent} that match the filter and are controlled by
|
||||
* controllerId. This method ignores the range of influence and ignores
|
||||
* ObjectSourcePlayer predicates in the filter
|
||||
*
|
||||
* @param filter
|
||||
* @param controllerId
|
||||
* @param game
|
||||
* @return a list of {@link Permanent}
|
||||
* @see Permanent
|
||||
*/
|
||||
public List<Permanent> getAllActivePermanents(FilterPermanent filter, UUID controllerId, Game game) {
|
||||
return field.values()
|
||||
|
|
@ -276,12 +233,6 @@ public class Battlefield implements Serializable {
|
|||
/**
|
||||
* Returns all {@link Permanent} that are within the range of influence of
|
||||
* the specified player id and that match the supplied filter.
|
||||
*
|
||||
* @param filter
|
||||
* @param sourcePlayerId
|
||||
* @param game
|
||||
* @return a list of {@link Permanent}
|
||||
* @see Permanent
|
||||
*/
|
||||
public List<Permanent> getActivePermanents(FilterPermanent filter, UUID sourcePlayerId, Game game) {
|
||||
return getActivePermanents(filter, sourcePlayerId, null, game);
|
||||
|
|
@ -290,13 +241,6 @@ public class Battlefield implements Serializable {
|
|||
/**
|
||||
* Returns all {@link Permanent} that are within the range of influence of
|
||||
* the specified player id and that match the supplied filter.
|
||||
*
|
||||
* @param filter
|
||||
* @param sourcePlayerId
|
||||
* @param source
|
||||
* @param game
|
||||
* @return a list of {@link Permanent}
|
||||
* @see Permanent
|
||||
*/
|
||||
public List<Permanent> getActivePermanents(FilterPermanent filter, UUID sourcePlayerId, Ability source, Game game) {
|
||||
if (game.getRangeOfInfluence() == RangeOfInfluence.ALL) {
|
||||
|
|
@ -316,11 +260,6 @@ public class Battlefield implements Serializable {
|
|||
/**
|
||||
* Returns all {@link Permanent} that are within the range of influence of
|
||||
* the specified player id.
|
||||
*
|
||||
* @param sourcePlayerId
|
||||
* @param game
|
||||
* @return a list of {@link Permanent}
|
||||
* @see Permanent
|
||||
*/
|
||||
public List<Permanent> getActivePermanents(UUID sourcePlayerId, Game game) {
|
||||
if (game.getRangeOfInfluence() == RangeOfInfluence.ALL) {
|
||||
|
|
@ -364,9 +303,6 @@ public class Battlefield implements Serializable {
|
|||
* since control could change several times during applyEvents we only want
|
||||
* to fire control changed events after all control change effects have been
|
||||
* applied
|
||||
*
|
||||
* @param game
|
||||
* @return
|
||||
*/
|
||||
public boolean fireControlChangeEvents(Game game) {
|
||||
boolean controlChanged = false;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public class CleanupStep extends Step {
|
|||
activePlayer.discardToMax(game);
|
||||
}
|
||||
//20100423 - 514.2
|
||||
game.getBattlefield().endOfTurn(activePlayerId, game);
|
||||
game.getBattlefield().endOfTurn(game);
|
||||
game.getState().removeEotEffects(game);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue