mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
- CheckStyle.
This commit is contained in:
@@ -206,6 +206,7 @@ public final class CardEdition implements Comparable<CardEdition> { // immutable
|
|||||||
return Singletons.getModel().getFatPacks().contains(subject.getCode());
|
return Singletons.getModel().getFatPacks().contains(subject.getCode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if is legal in format.
|
* Checks if is legal in format.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public class FatPackData {
|
|||||||
private final int cntBoosters;
|
private final int cntBoosters;
|
||||||
private final int cntLands;
|
private final int cntLands;
|
||||||
|
|
||||||
public FatPackData(String edition0, String landsEdition0, int nBoosters, int nBasicLands )
|
public FatPackData(String edition0, String landsEdition0, int nBoosters, int nBasicLands)
|
||||||
{
|
{
|
||||||
cntBoosters = nBoosters;
|
cntBoosters = nBoosters;
|
||||||
cntLands = nBasicLands;
|
cntLands = nBasicLands;
|
||||||
|
|||||||
@@ -75,11 +75,11 @@ public class DeckGroup extends DeckBase {
|
|||||||
super.cloneFieldsTo(clone);
|
super.cloneFieldsTo(clone);
|
||||||
|
|
||||||
DeckGroup myClone = (DeckGroup) clone;
|
DeckGroup myClone = (DeckGroup) clone;
|
||||||
myClone.setHumanDeck((Deck)this.getHumanDeck().copyTo(this.getHumanDeck().getName()));
|
myClone.setHumanDeck((Deck) this.getHumanDeck().copyTo(this.getHumanDeck().getName()));
|
||||||
|
|
||||||
for(int i = 0; i < this.getAiDecks().size(); i++) {
|
for (int i = 0; i < this.getAiDecks().size(); i++) {
|
||||||
Deck src = this.getAiDecks().get(i);
|
Deck src = this.getAiDecks().get(i);
|
||||||
myClone.addAiDeck((Deck)src.copyTo(src.getName()));
|
myClone.addAiDeck((Deck) src.copyTo(src.getName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -157,8 +157,9 @@ public class DeckController<T extends DeckBase> implements IDeckController<T> {
|
|||||||
@Override
|
@Override
|
||||||
public void load(final String name) {
|
public void load(final String name) {
|
||||||
T newModel = this.folder.get(name);
|
T newModel = this.folder.get(name);
|
||||||
if (null != newModel)
|
if (null != newModel) {
|
||||||
this.setModel((T)newModel.copyTo(name), true);
|
this.setModel((T) newModel.copyTo(name), true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -325,7 +325,7 @@ public class DraftingProcess extends DeckEditorBase<CardPrinted, DeckGroup> {
|
|||||||
final Deck[] computer = this.boosterDraft.getDecks();
|
final Deck[] computer = this.boosterDraft.getDecks();
|
||||||
|
|
||||||
final DeckGroup finishedDraft = new DeckGroup("Draft " + s);
|
final DeckGroup finishedDraft = new DeckGroup("Draft " + s);
|
||||||
finishedDraft.setHumanDeck((Deck)this.getPlayersDeck().copyTo(s));
|
finishedDraft.setHumanDeck((Deck) this.getPlayersDeck().copyTo(s));
|
||||||
finishedDraft.addAiDecks(computer);
|
finishedDraft.addAiDecks(computer);
|
||||||
|
|
||||||
// DeckManager deckManager = new
|
// DeckManager deckManager = new
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ public class FatPack extends OpenablePack {
|
|||||||
|
|
||||||
protected List<CardPrinted> generate() {
|
protected List<CardPrinted> generate() {
|
||||||
List<CardPrinted> result = new ArrayList<CardPrinted>();
|
List<CardPrinted> result = new ArrayList<CardPrinted>();
|
||||||
for( int i = 0; i < fpData.getCntBoosters(); i++ ) {
|
for (int i = 0; i < fpData.getCntBoosters(); i++) {
|
||||||
result.addAll(super.generate());
|
result.addAll(super.generate());
|
||||||
}
|
}
|
||||||
CardEdition landEdition = Singletons.getModel().getEditions().get(fpData.getLandsEdition());
|
CardEdition landEdition = Singletons.getModel().getEditions().get(fpData.getLandsEdition());
|
||||||
@@ -91,7 +91,7 @@ public class FatPack extends OpenablePack {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getTotalCards(){
|
public int getTotalCards() {
|
||||||
return super.getTotalCards() * fpData.getCntBoosters() + fpData.getCntLands();
|
return super.getTotalCards() * fpData.getCntBoosters() + fpData.getCntLands();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ public abstract class OpenablePack implements InventoryItemFromSet {
|
|||||||
this.name = name0;
|
this.name = name0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final String getName() {
|
public final String getName() {
|
||||||
return this.name + " " + this.getType();
|
return this.name + " " + this.getType();
|
||||||
@@ -104,7 +103,7 @@ public abstract class OpenablePack implements InventoryItemFromSet {
|
|||||||
|
|
||||||
|
|
||||||
protected List<CardPrinted> generate() {
|
protected List<CardPrinted> generate() {
|
||||||
if ( null == generator ) {
|
if (null == generator) {
|
||||||
generator = new BoosterGenerator(this.contents.getEditionFilter());
|
generator = new BoosterGenerator(this.contents.getEditionFilter());
|
||||||
}
|
}
|
||||||
List<CardPrinted> myCards = generator.getBoosterPack(this.contents);
|
List<CardPrinted> myCards = generator.getBoosterPack(this.contents);
|
||||||
|
|||||||
@@ -210,7 +210,6 @@ public final class QuestUtilCards {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Buy precon deck.
|
* Buy precon deck.
|
||||||
*
|
*
|
||||||
@@ -358,12 +357,12 @@ public final class QuestUtilCards {
|
|||||||
*/
|
*/
|
||||||
public void generateTournamentsInShop(final int count) {
|
public void generateTournamentsInShop(final int count) {
|
||||||
Predicate<CardEdition> hasTournament = CardEdition.Predicates.HAS_TOURNAMENT_PACK;
|
Predicate<CardEdition> hasTournament = CardEdition.Predicates.HAS_TOURNAMENT_PACK;
|
||||||
this.q.getShopList().addAllFlat( hasTournament.random(Singletons.getModel().getEditions(), count, TournamentPack.FN_FROM_SET));
|
this.q.getShopList().addAllFlat(hasTournament.random(Singletons.getModel().getEditions(), count, TournamentPack.FN_FROM_SET));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void generateFatPacksInShop(final int count) {
|
public void generateFatPacksInShop(final int count) {
|
||||||
Predicate<CardEdition> hasPack = CardEdition.Predicates.HAS_FAT_PACK;
|
Predicate<CardEdition> hasPack = CardEdition.Predicates.HAS_FAT_PACK;
|
||||||
this.q.getShopList().addAllFlat( hasPack.random(Singletons.getModel().getEditions(), count, FatPack.FN_FROM_SET));
|
this.q.getShopList().addAllFlat(hasPack.random(Singletons.getModel().getEditions(), count, FatPack.FN_FROM_SET));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user