mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
[Desktop] Display which DeckZone the unplayable cards are from
This commit is contained in:
committed by
Michael Kamensky
parent
93f42be5ec
commit
2493b08093
@@ -2077,18 +2077,23 @@ public class AiController {
|
||||
return result;
|
||||
}
|
||||
|
||||
public Collection<? extends PaperCard> complainCardsCantPlayWell(Deck myDeck) {
|
||||
List<PaperCard> result = Lists.newArrayList();
|
||||
public Map<DeckSection, List<? extends PaperCard>> complainCardsCantPlayWell(Deck myDeck) {
|
||||
Map<DeckSection, List<? extends PaperCard>> complaints = new HashMap<>();
|
||||
// When using simulation, AI should be able to figure out most cards.
|
||||
if (!useSimulation) {
|
||||
for (Entry<DeckSection, CardPool> ds : myDeck) {
|
||||
List<PaperCard> result = Lists.newArrayList();
|
||||
for (Entry<PaperCard, Integer> cp : ds.getValue()) {
|
||||
if (cp.getKey().getRules().getAiHints().getRemAIDecks())
|
||||
if (cp.getKey().getRules().getAiHints().getRemAIDecks()) {
|
||||
result.add(cp.getKey());
|
||||
}
|
||||
}
|
||||
if (!result.isEmpty()) {
|
||||
complaints.put(ds.getKey(), result);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
return complaints;
|
||||
}
|
||||
|
||||
// this is where the computer cheats
|
||||
|
||||
@@ -28,6 +28,7 @@ import forge.card.MagicColor;
|
||||
import forge.card.mana.ManaCost;
|
||||
import forge.card.mana.ManaCostShard;
|
||||
import forge.deck.Deck;
|
||||
import forge.deck.DeckSection;
|
||||
import forge.game.Game;
|
||||
import forge.game.GameEntity;
|
||||
import forge.game.GameObject;
|
||||
@@ -1125,7 +1126,12 @@ public class PlayerControllerAi extends PlayerController {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<? extends PaperCard> complainCardsCantPlayWell(Deck myDeck) {
|
||||
public void revealAISkipCards(String message, Map<Player, Map<DeckSection, List<? extends PaperCard>>> deckCards) {
|
||||
// Ai won't understand that anyway
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<DeckSection, List<? extends PaperCard>> complainCardsCantPlayWell(Deck myDeck) {
|
||||
return brains.complainCardsCantPlayWell(myDeck);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user