mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Reverting r30101 (breaks Echo).
This commit is contained in:
@@ -155,7 +155,7 @@ public final class CardUtil {
|
|||||||
* @return a CardCollection that matches the given criteria
|
* @return a CardCollection that matches the given criteria
|
||||||
*/
|
*/
|
||||||
public static CardCollection getThisTurnEntered(final ZoneType to, final ZoneType from, final String valid, final Card src) {
|
public static CardCollection getThisTurnEntered(final ZoneType to, final ZoneType from, final String valid, final Card src) {
|
||||||
return getThisTurnEntered(to, from, valid, src, true);
|
return getThisTurnEntered(to, from, valid, src, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -193,29 +193,15 @@ public final class CardUtil {
|
|||||||
* @return a CardCollection that matches the given criteria
|
* @return a CardCollection that matches the given criteria
|
||||||
*/
|
*/
|
||||||
public static CardCollection getLastTurnEntered(final ZoneType to, final ZoneType from, final String valid, final Card src) {
|
public static CardCollection getLastTurnEntered(final ZoneType to, final ZoneType from, final String valid, final Card src) {
|
||||||
return getLastTurnEntered(to, from, valid, src, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* getLastTurnEntered.
|
|
||||||
*
|
|
||||||
* @param to zone going to
|
|
||||||
* @param from zone coming from
|
|
||||||
* @param valid a isValid expression
|
|
||||||
* @param src a Card object
|
|
||||||
* @param checkLatestState a boolean, true if the latest state of the card as it left the original zone needs to be checked
|
|
||||||
* @return a CardCollection that matches the given criteria
|
|
||||||
*/
|
|
||||||
public static CardCollection getLastTurnEntered(final ZoneType to, final ZoneType from, final String valid, final Card src, final boolean checkLatestState) {
|
|
||||||
CardCollection res = new CardCollection();
|
CardCollection res = new CardCollection();
|
||||||
final Game game = src.getGame();
|
final Game game = src.getGame();
|
||||||
if (to != ZoneType.Stack) {
|
if (to != ZoneType.Stack) {
|
||||||
for (Player p : game.getPlayers()) {
|
for (Player p : game.getPlayers()) {
|
||||||
res.addAll(p.getZone(to).getCardsAddedLastTurn(from, checkLatestState));
|
res.addAll(p.getZone(to).getCardsAddedLastTurn(from));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
res.addAll(game.getStackZone().getCardsAddedLastTurn(from, checkLatestState));
|
res.addAll(game.getStackZone().getCardsAddedLastTurn(from));
|
||||||
}
|
}
|
||||||
res = CardLists.getValidCards(res, valid, src.getController(), src);
|
res = CardLists.getValidCards(res, valid, src.getController(), src);
|
||||||
return res;
|
return res;
|
||||||
|
|||||||
Reference in New Issue
Block a user