mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Most random card pools (quest shop, quest starting pool, sealed deck, booster draft) will now generate only one kind of Zendikar lands (full art or standard art) at a time instead of mixed art of both kinds.
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -625,6 +625,7 @@ forge-gui/CHANGES.txt -text
|
||||
forge-gui/LICENSE.txt -text
|
||||
forge-gui/README.txt -text
|
||||
forge-gui/forge.profile.properties.example -text
|
||||
forge-gui/nbactions.xml -text
|
||||
forge-gui/pom.xml -text
|
||||
forge-gui/res/ai/Default.ai -text
|
||||
forge-gui/res/ai/Reckless.ai -text
|
||||
|
||||
18
forge-gui/nbactions.xml
Normal file
18
forge-gui/nbactions.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<actions>
|
||||
<action>
|
||||
<actionName>debug</actionName>
|
||||
<packagings>
|
||||
<packaging>jar</packaging>
|
||||
</packagings>
|
||||
<goals>
|
||||
<goal>process-classes</goal>
|
||||
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
|
||||
</goals>
|
||||
<properties>
|
||||
<exec.args>-Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address} -classpath %classpath forge.view.Main</exec.args>
|
||||
<exec.executable>java</exec.executable>
|
||||
<jpda.listen>true</jpda.listen>
|
||||
</properties>
|
||||
</action>
|
||||
</actions>
|
||||
@@ -39,6 +39,7 @@ import forge.limited.BoosterDraft;
|
||||
import forge.limited.IBoosterDraft;
|
||||
import forge.properties.ForgePreferences.FPref;
|
||||
import forge.util.ItemPool;
|
||||
import forge.util.MyRandom;
|
||||
|
||||
/**
|
||||
* Updates the deck editor UI as necessary draft selection mode.
|
||||
@@ -157,13 +158,19 @@ public class CEditorDraftingProcess extends ACEditorBase<PaperCard, DeckGroup> {
|
||||
deck.getOrCreate(DeckSection.Sideboard).addAll(this.getDeckManager().getPool());
|
||||
|
||||
final String landSet = IBoosterDraft.LAND_SET_CODE[0].getCode();
|
||||
final boolean isZendikarSet = landSet.equals("ZEN"); // we want to generate one kind of Zendikar lands at a time only
|
||||
final boolean zendikarSetMode = MyRandom.getRandom().nextBoolean();
|
||||
|
||||
final int landsCount = 10;
|
||||
|
||||
for(String landName : MagicColor.Constant.BASIC_LANDS) {
|
||||
final int numArt = Singletons.getMagicDb().getCommonCards().getArtCount(landName, landSet);
|
||||
int numArt = Singletons.getMagicDb().getCommonCards().getArtCount(landName, landSet);
|
||||
int minArtIndex = isZendikarSet ? (zendikarSetMode ? 1 : 5) : 1;
|
||||
int maxArtIndex = isZendikarSet ? minArtIndex + 3 : numArt;
|
||||
|
||||
if (Singletons.getModel().getPreferences().getPrefBoolean(FPref.UI_RANDOM_ART_IN_POOLS)) {
|
||||
for (int i = 1; i <= numArt; i++) {
|
||||
|
||||
for (int i = minArtIndex; i <= maxArtIndex; i++) {
|
||||
deck.get(DeckSection.Sideboard).add(landName, landSet, i, numArt > 1 ? landsCount : 30);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -37,6 +37,7 @@ import forge.limited.SealedCardPoolGenerator;
|
||||
import forge.limited.SealedDeckBuilder;
|
||||
import forge.properties.ForgePreferences.FPref;
|
||||
import forge.util.ItemPool;
|
||||
import forge.util.MyRandom;
|
||||
import forge.util.storage.IStorage;
|
||||
|
||||
/**
|
||||
@@ -173,11 +174,18 @@ public enum CSubmenuSealed implements ICDoc {
|
||||
deck.getOrCreate(DeckSection.Sideboard).addAll(humanPool);
|
||||
|
||||
final int landsCount = 10;
|
||||
for (final String element : MagicColor.Constant.BASIC_LANDS) {
|
||||
final int numArt = Singletons.getMagicDb().getCommonCards().getArtCount(element, sd.getLandSetCode());
|
||||
|
||||
final boolean isZendikarSet = sd.getLandSetCode().equals("ZEN"); // we want to generate one kind of Zendikar lands at a time only
|
||||
final boolean zendikarSetMode = MyRandom.getRandom().nextBoolean();
|
||||
|
||||
for (final String element : MagicColor.Constant.BASIC_LANDS) {
|
||||
int numArt = Singletons.getMagicDb().getCommonCards().getArtCount(element, sd.getLandSetCode());
|
||||
int minArtIndex = isZendikarSet ? (zendikarSetMode ? 1 : 5) : 1;
|
||||
int maxArtIndex = isZendikarSet ? minArtIndex + 3 : numArt;
|
||||
|
||||
if (Singletons.getModel().getPreferences().getPrefBoolean(FPref.UI_RANDOM_ART_IN_POOLS)) {
|
||||
for (int i = 1; i <= numArt; i++) {
|
||||
|
||||
for (int i = minArtIndex; i <= maxArtIndex; i++) {
|
||||
deck.get(DeckSection.Sideboard).add(element, sd.getLandSetCode(), i, numArt > 1 ? landsCount : 30);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -124,14 +124,17 @@ public final class QuestUtilCards {
|
||||
landCode = "M10";
|
||||
}
|
||||
|
||||
final boolean isZendikarSet = landCode.equals("ZEN"); // we want to generate one kind of Zendikar lands at a time only
|
||||
final boolean zendikarSetMode = MyRandom.getRandom().nextBoolean();
|
||||
|
||||
for (String landName : MagicColor.Constant.BASIC_LANDS) {
|
||||
int artCount = db.getArtCount(landName, landCode);
|
||||
|
||||
if (Singletons.getModel().getPreferences().getPrefBoolean(FPref.UI_RANDOM_ART_IN_POOLS)) {
|
||||
int[] artGroups = MyRandom.splitIntoRandomGroups(nBasic, artCount);
|
||||
int[] artGroups = MyRandom.splitIntoRandomGroups(nBasic, isZendikarSet ? 4 : artCount);
|
||||
|
||||
for (int i = 1; i <= artGroups.length; i++) {
|
||||
pool.add(db.getCard(landName, landCode, i), artGroups[i - 1]);
|
||||
pool.add(db.getCard(landName, landCode, isZendikarSet ? (zendikarSetMode ? i : i + 4) : i), artGroups[i - 1]);
|
||||
}
|
||||
} else {
|
||||
pool.add(db.getCard(landName, landCode, artCount > 1 ? MyRandom.getRandom().nextInt(artCount) + 1 : 1), nBasic);
|
||||
|
||||
Reference in New Issue
Block a user