mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
- Thanks for pointing out that Reveal was in GameAction Max.
This commit is contained in:
@@ -8,7 +8,6 @@ import java.util.Random;
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.base.Predicates;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import forge.Card;
|
||||
import forge.CardCharacteristicName;
|
||||
@@ -1345,9 +1344,8 @@ public class ChangeZoneAi extends SpellAbilityAi {
|
||||
if (((!ZoneType.Battlefield.equals(destination) && !"Card".equals(type) && !defined)
|
||||
|| (sa.hasParam("Reveal") && !fetched.isEmpty()))
|
||||
&& !sa.hasParam("NoReveal")) {
|
||||
final String picked = player + " picked:";
|
||||
|
||||
game.revealToPlayers(picked, fetched, destination, Lists.newArrayList(player));
|
||||
game.getAction().reveal(fetched, player);
|
||||
}
|
||||
} // end changeHiddenOriginResolveAI
|
||||
|
||||
|
||||
@@ -641,13 +641,4 @@ public class Game {
|
||||
public void setAge(GameAge value) {
|
||||
age = value;
|
||||
}
|
||||
|
||||
public void revealToPlayers(String string, Collection<Card> cards, ZoneType zone, List<Player> skipReveal) {
|
||||
List<Player> allPlayers = this.getPlayers();
|
||||
for (Player p : allPlayers) {
|
||||
if (skipReveal != null && !skipReveal.contains(p)) {
|
||||
p.getController().reveal(string, cards, zone, p);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1408,16 +1408,15 @@ public class GameAction {
|
||||
return true;
|
||||
} // sacrificeDestroy()
|
||||
|
||||
/**
|
||||
* TODO: Write javadoc for this method.
|
||||
* @param targetCard
|
||||
* @param activatingPlayer
|
||||
*/
|
||||
public void reveal(List<Card> cards, Player cardOwner) {
|
||||
ZoneType zt = cards.isEmpty() ? ZoneType.Hand : game.getZoneOf(cards.get(0)).getZoneType();
|
||||
ZoneType zt = cards.isEmpty() ? ZoneType.Hand : game.getZoneOf(cards.get(0)).getZoneType();
|
||||
reveal(cardOwner + " reveals card from " + zt, cards, zt, cardOwner, true);
|
||||
}
|
||||
|
||||
public void reveal(String message, List<Card> cards, ZoneType zt, Player cardOwner, boolean dontRevealToOwner) {
|
||||
for(Player p : game.getPlayers()) {
|
||||
if (cardOwner == p /* && zt.isKnown() */) continue;
|
||||
p.getController().reveal(cardOwner + " reveals card from " + zt, cards, zt, cardOwner);
|
||||
if (dontRevealToOwner && cardOwner == p) continue;
|
||||
p.getController().reveal(message, cards, zt, cardOwner);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ public final class GameActionUtil {
|
||||
|
||||
} // while
|
||||
|
||||
game.revealToPlayers("Revealed Cascade Cards:", revealed, ZoneType.Library, null);
|
||||
game.getAction().reveal("Revealed Cascade Cards:", revealed, ZoneType.Library, controller, false);
|
||||
|
||||
if (cascadedCard != null) {
|
||||
Player p = cascadedCard.getController();
|
||||
|
||||
Reference in New Issue
Block a user