mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
add questevent decks for chaos mode
- add dumpEnemyDeckList command
This commit is contained in:
@@ -45,6 +45,6 @@ public class EnemyData {
|
||||
}
|
||||
|
||||
public Deck generateDeck(boolean isFantasyMode) {
|
||||
return CardUtil.getDeck(deck, true, isFantasyMode, colors, life > 15 && life < 19);
|
||||
return CardUtil.getDeck(deck, true, isFantasyMode, colors, life > 15);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,6 +209,16 @@ public class ConsoleCommandInterpreter {
|
||||
}
|
||||
return "Enemy deck color list dumped to stdout.";
|
||||
});
|
||||
registerCommand(new String[]{"dumpEnemyDeckList"}, s -> {
|
||||
for(EnemyData E : new Array.ArrayIterator<>(WorldData.getAllEnemies())){
|
||||
Deck D = E.generateDeck(Current.player().isFantasyMode());
|
||||
DeckProxy DP = new DeckProxy(D, "Constructed", GameType.Constructed, null);
|
||||
ColorSet colorSet = DP.getColor();
|
||||
System.out.printf("Deck: %s\n%s\n\n", D.getName(), DP.getDeck().getMain().toCardList("\n")
|
||||
);
|
||||
}
|
||||
return "Enemy deck list dumped to stdout.";
|
||||
});
|
||||
registerCommand(new String[]{"heal", "amount"}, s -> {
|
||||
if(s.length<1) return "Command needs 1 parameter";
|
||||
int N = 0;
|
||||
|
||||
@@ -12,6 +12,7 @@ import forge.game.GameFormat;
|
||||
import forge.game.GameType;
|
||||
import forge.gamemodes.quest.QuestController;
|
||||
import forge.gamemodes.quest.QuestEvent;
|
||||
import forge.gamemodes.quest.QuestEventDifficulty;
|
||||
import forge.item.InventoryItem;
|
||||
import forge.item.PaperCard;
|
||||
import forge.item.PreconDeck;
|
||||
@@ -562,6 +563,21 @@ public class DeckProxy implements InventoryItem {
|
||||
return decks;
|
||||
}
|
||||
|
||||
public static List<DeckProxy> getNonEasyQuestDuelDecks() {
|
||||
final List<DeckProxy> decks = new ArrayList<>();
|
||||
final QuestController quest = FModel.getQuest();
|
||||
for (final QuestEvent e : quest.getDuelsManager().getDuels(QuestEventDifficulty.MEDIUM)) {
|
||||
decks.add(new DeckProxy(e.getEventDeck(), "Quest Event", null, null));
|
||||
}
|
||||
for (final QuestEvent e : quest.getDuelsManager().getDuels(QuestEventDifficulty.HARD)) {
|
||||
decks.add(new DeckProxy(e.getEventDeck(), "Quest Event", null, null));
|
||||
}
|
||||
for (final QuestEvent e : quest.getDuelsManager().getDuels(QuestEventDifficulty.EXPERT)) {
|
||||
decks.add(new DeckProxy(e.getEventDeck(), "Quest Event", null, null));
|
||||
}
|
||||
return decks;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static List<DeckProxy> getAllSealedDecks() {
|
||||
final List<DeckProxy> humanDecks = new ArrayList<>();
|
||||
|
||||
@@ -454,9 +454,15 @@ public class DeckgenUtil {
|
||||
//monocolor
|
||||
if (selection.size() == 1) {
|
||||
if (isTheme) {
|
||||
allDecks = DeckProxy.getAllThemeDecks().parallelStream()
|
||||
//duels and theme
|
||||
allDecks = Stream.concat(DeckProxy.getAllThemeDecks().parallelStream()
|
||||
.filter(deckProxy -> deckProxy.getMainSize() <= 60)
|
||||
.filter(deckProxy -> deckProxy.getColor() != null && deckProxy.getColor().isMonoColor() && deckProxy.getColor().hasExactlyColor(ColorSet.fromNames(selection).getColor()))
|
||||
.filter(deckProxy -> deckProxy.getColor() != null && deckProxy.getColor().isMonoColor()
|
||||
&& deckProxy.getColor().hasExactlyColor(ColorSet.fromNames(selection).getColor())),
|
||||
DeckProxy.getNonEasyQuestDuelDecks().parallelStream()
|
||||
.filter(deckProxy -> deckProxy.getMainSize() <= 60)
|
||||
.filter(deckProxy -> deckProxy.getColor() != null && deckProxy.getColor().isMonoColor()
|
||||
&& deckProxy.getColor().hasExactlyColor(ColorSet.fromNames(selection).getColor())))
|
||||
.collect(Collectors.toList());
|
||||
} else {
|
||||
allDecks = DeckProxy.getAllPreconstructedDecks(QuestController.getPrecons()).parallelStream()
|
||||
@@ -466,11 +472,11 @@ public class DeckgenUtil {
|
||||
}
|
||||
} else {
|
||||
if (isTheme) {
|
||||
//include both theme and precons
|
||||
//duels and theme
|
||||
allDecks = Stream.concat(DeckProxy.getAllThemeDecks().parallelStream()
|
||||
.filter(deckProxy -> deckProxy.getMainSize() <= 60)
|
||||
.filter(deckProxy -> deckProxy.getColor() != null && deckProxy.getColor().hasAllColors(ColorSet.fromNames(selection).getColor())),
|
||||
DeckProxy.getAllPreconstructedDecks(QuestController.getPrecons()).parallelStream()
|
||||
DeckProxy.getNonEasyQuestDuelDecks().parallelStream()
|
||||
.filter(deckProxy -> deckProxy.getMainSize() <= 60)
|
||||
.filter(deckProxy -> deckProxy.getColor() != null && deckProxy.getColor().hasAllColors(ColorSet.fromNames(selection).getColor())))
|
||||
.collect(Collectors.toList());
|
||||
@@ -484,10 +490,10 @@ public class DeckgenUtil {
|
||||
} else {
|
||||
//no specific colors
|
||||
if (isTheme) {
|
||||
//include both theme and precons
|
||||
//duels and theme
|
||||
allDecks = Stream.concat(DeckProxy.getAllThemeDecks().parallelStream()
|
||||
.filter(deckProxy -> deckProxy.getMainSize() <= 60),
|
||||
DeckProxy.getAllPreconstructedDecks(QuestController.getPrecons()).parallelStream()
|
||||
DeckProxy.getNonEasyQuestDuelDecks().parallelStream()
|
||||
.filter(deckProxy -> deckProxy.getMainSize() <= 60))
|
||||
.collect(Collectors.toList());
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user