Reveal: also reveal cards for the AI too

This commit is contained in:
Hans Mackowiak
2020-10-24 10:42:03 +02:00
parent cee0ec6d5b
commit c0bb61b0b0
3 changed files with 5 additions and 20 deletions

View File

@@ -432,7 +432,7 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
final Player player = sa.getActivatingPlayer(); final Player player = sa.getActivatingPlayer();
final Card hostCard = sa.getHostCard(); final Card hostCard = sa.getHostCard();
final Game game = player.getGame(); final Game game = player.getGame();
final List<Card> commandCards = Lists.newArrayList(); final CardCollection commandCards = new CardCollection();
ZoneType destination = ZoneType.smartValueOf(sa.getParam("Destination")); ZoneType destination = ZoneType.smartValueOf(sa.getParam("Destination"));
final List<ZoneType> origin = Lists.newArrayList(); final List<ZoneType> origin = Lists.newArrayList();
@@ -719,11 +719,7 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
//reveal command cards that changes zone from command zone to player's hand //reveal command cards that changes zone from command zone to player's hand
if (!commandCards.isEmpty()) { if (!commandCards.isEmpty()) {
for (Player observer : game.getPlayers()){ game.getAction().reveal(commandCards, player, true, "Revealed cards in ");
if(!observer.isAI() && !observer.getController().isAI() && observer != player) {
observer.getController().reveal(new CardCollection(commandCards), player.getZone(ZoneType.Hand).getZoneType(), player, "Revealed cards in ");
}
}
} }
triggerList.triggerChangesZoneAll(game); triggerList.triggerChangesZoneAll(game);

View File

@@ -1,6 +1,5 @@
package forge.game.ability.effects; package forge.game.ability.effects;
import com.google.common.collect.Lists;
import forge.card.CardStateName; import forge.card.CardStateName;
import forge.game.Game; import forge.game.Game;
import forge.game.GameEntityCounterTable; import forge.game.GameEntityCounterTable;
@@ -59,7 +58,7 @@ public class SetStateEffect extends SpellAbilityEffect {
final boolean manifestUp = sa.hasParam("ManifestUp"); final boolean manifestUp = sa.hasParam("ManifestUp");
final boolean hiddenAgenda = sa.hasParam("HiddenAgenda"); final boolean hiddenAgenda = sa.hasParam("HiddenAgenda");
final boolean optional = sa.hasParam("Optional"); final boolean optional = sa.hasParam("Optional");
final List<Card> transformedCards = Lists.newArrayList(); final CardCollection transformedCards = new CardCollection();
GameEntityCounterTable table = new GameEntityCounterTable(); GameEntityCounterTable table = new GameEntityCounterTable();
@@ -137,12 +136,7 @@ public class SetStateEffect extends SpellAbilityEffect {
} }
table.triggerCountersPutAll(game); table.triggerCountersPutAll(game);
if (!transformedCards.isEmpty()) { if (!transformedCards.isEmpty()) {
//reveal transformed cards to human player/controller except activating player game.getAction().reveal(transformedCards, p, true, "Transformed cards in ");
for (Player observer : game.getPlayers()){
if(!observer.isAI() && !observer.getController().isAI() && observer != p) {
observer.getController().reveal(new CardCollection(transformedCards), p.getZone(ZoneType.Battlefield).getZoneType(), p, "Transformed cards in ");
}
}
} }
} }
} }

View File

@@ -4405,12 +4405,7 @@ public class CardFactoryUtil {
String sb = TextUtil.concatWithSpace(getActivatingPlayer().toString(),"has suspended", c.getName(), "with", String.valueOf(counters),"time counters on it."); String sb = TextUtil.concatWithSpace(getActivatingPlayer().toString(),"has suspended", c.getName(), "with", String.valueOf(counters),"time counters on it.");
game.getGameLog().add(GameLogEntryType.STACK_RESOLVE, sb); game.getGameLog().add(GameLogEntryType.STACK_RESOLVE, sb);
//reveal suspended card //reveal suspended card
for (Player p : game.getPlayers()){ game.getAction().reveal(new CardCollection(c), c.getOwner(), true, c.getName() + " is suspended with " + counters + " time counters in ");
if(!p.isAI() && !p.getController().isAI()) {
//reveal card to human player/controller only
p.getController().reveal(new CardCollection(c), c.getZone().getZoneType(), c.getOwner(), c.getName() + " is suspended with " + counters + " time counters in ");
}
}
} }
}; };
final StringBuilder sbDesc = new StringBuilder(); final StringBuilder sbDesc = new StringBuilder();