mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
- Conspiracy: allow the player to look at his own face-down conspiracies. Properly hide the opponent's conspiracies (including the chosen name). Make the AI properly add drafted conspiracies to the [Conspiracy] section of the deck.
This commit is contained in:
@@ -72,12 +72,12 @@ public class RestartGameEffect extends SpellAbilityEffect {
|
|||||||
player.setLandsPlayedLastTurn(0);
|
player.setLandsPlayedLastTurn(0);
|
||||||
player.resetLandsPlayedThisTurn();
|
player.resetLandsPlayedThisTurn();
|
||||||
player.resetInvestigatedThisTurn();
|
player.resetInvestigatedThisTurn();
|
||||||
player.initVariantsZones(psc);
|
|
||||||
|
|
||||||
List<Card> newLibrary = playerLibraries.get(player);
|
List<Card> newLibrary = playerLibraries.get(player);
|
||||||
for (Card c : newLibrary) {
|
for (Card c : newLibrary) {
|
||||||
action.moveToLibrary(c, 0, sa);
|
action.moveToLibrary(c, 0, sa);
|
||||||
}
|
}
|
||||||
|
player.initVariantsZones(psc);
|
||||||
|
|
||||||
player.shuffle(null);
|
player.shuffle(null);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ public class CardFactoryUtil {
|
|||||||
|
|
||||||
card.setNamedCard(name);
|
card.setNamedCard(name);
|
||||||
card.turnFaceDown();
|
card.turnFaceDown();
|
||||||
// Hopefully face down also hides the named card?
|
card.setMayLookAt(player, true);
|
||||||
card.addSpellAbility(abilityRevealHiddenAgenda(card));
|
card.addSpellAbility(abilityRevealHiddenAgenda(card));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -424,12 +424,16 @@ public class CardDetailUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// named card
|
// named card
|
||||||
if (!card.getNamedCard().isEmpty() && !card.isFaceDown()) {
|
if (!card.getNamedCard().isEmpty()) {
|
||||||
if (area.length() != 0) {
|
if (area.length() != 0) {
|
||||||
area.append("\n");
|
area.append("\n");
|
||||||
}
|
}
|
||||||
area.append("(named card: ");
|
area.append("(named card: ");
|
||||||
area.append(card.getNamedCard());
|
if (card.isFaceDown() && state.getState() == CardStateName.FaceDown) {
|
||||||
|
area.append("Hidden");
|
||||||
|
} else {
|
||||||
|
area.append(card.getNamedCard());
|
||||||
|
}
|
||||||
area.append(")");
|
area.append(")");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ public class LimitedDeckBuilder extends DeckGeneratorBase {
|
|||||||
protected final List<PaperCard> deckList = new ArrayList<PaperCard>();
|
protected final List<PaperCard> deckList = new ArrayList<PaperCard>();
|
||||||
protected final List<String> setsWithBasicLands = new ArrayList<String>();
|
protected final List<String> setsWithBasicLands = new ArrayList<String>();
|
||||||
protected List<PaperCard> rankedColorList;
|
protected List<PaperCard> rankedColorList;
|
||||||
|
protected final List<PaperCard> draftedConspiracies;
|
||||||
|
|
||||||
// Views for aiPlayable
|
// Views for aiPlayable
|
||||||
private Iterable<PaperCard> onColorCreatures;
|
private Iterable<PaperCard> onColorCreatures;
|
||||||
@@ -87,6 +88,11 @@ public class LimitedDeckBuilder extends DeckGeneratorBase {
|
|||||||
this.aiPlayables = Lists.newArrayList(playables);
|
this.aiPlayables = Lists.newArrayList(playables);
|
||||||
this.availableList.removeAll(aiPlayables);
|
this.availableList.removeAll(aiPlayables);
|
||||||
|
|
||||||
|
// keep Conspiracies in a separate list
|
||||||
|
final Iterable<PaperCard> conspiracies = Iterables.filter(aiPlayables,
|
||||||
|
Predicates.compose(CardRulesPredicates.coreType(true, "Conspiracy"), PaperCard.FN_GET_RULES));
|
||||||
|
this.draftedConspiracies = Lists.newArrayList(conspiracies);
|
||||||
|
|
||||||
findBasicLandSets();
|
findBasicLandSets();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -200,11 +206,18 @@ public class LimitedDeckBuilder extends DeckGeneratorBase {
|
|||||||
fixDeckSize(clrCnts, landSetCode);
|
fixDeckSize(clrCnts, landSetCode);
|
||||||
|
|
||||||
if (deckList.size() == 40) {
|
if (deckList.size() == 40) {
|
||||||
|
// add the main deck cards
|
||||||
final Deck result = new Deck(generateName());
|
final Deck result = new Deck(generateName());
|
||||||
result.getMain().add(deckList);
|
result.getMain().add(deckList);
|
||||||
|
// create the sideboard
|
||||||
final CardPool cp = result.getOrCreate(DeckSection.Sideboard);
|
final CardPool cp = result.getOrCreate(DeckSection.Sideboard);
|
||||||
cp.add(aiPlayables);
|
cp.add(aiPlayables);
|
||||||
cp.add(availableList);
|
cp.add(availableList);
|
||||||
|
// add conspiracies, if any were drafted
|
||||||
|
if (!draftedConspiracies.isEmpty()) {
|
||||||
|
final CardPool cpConsp = result.getOrCreate(DeckSection.Conspiracy);
|
||||||
|
cpConsp.add(draftedConspiracies);
|
||||||
|
}
|
||||||
if (logToConsole) {
|
if (logToConsole) {
|
||||||
debugFinalDeck();
|
debugFinalDeck();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user