mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
- CheckStyle.
This commit is contained in:
@@ -210,30 +210,30 @@ public abstract class Player extends GameEntity implements Comparable<Player> {
|
|||||||
public abstract boolean isComputer();
|
public abstract boolean isComputer();
|
||||||
public abstract PlayerType getType();
|
public abstract PlayerType getType();
|
||||||
|
|
||||||
public List<Card> getSchemeDeck()
|
public List<Card> getSchemeDeck() {
|
||||||
{
|
|
||||||
return schemeDeck;
|
return schemeDeck;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSchemeDeck(Iterable<Card> sd)
|
public void setSchemeDeck(Iterable<Card> sd) {
|
||||||
{
|
|
||||||
schemeDeck.clear();
|
schemeDeck.clear();
|
||||||
for(Card c : sd)
|
for (Card c : sd) {
|
||||||
{
|
|
||||||
schemeDeck.add(c);
|
schemeDeck.add(c);
|
||||||
c.setOwner(this);
|
c.setOwner(this);
|
||||||
}
|
}
|
||||||
CardLists.shuffle(schemeDeck);
|
CardLists.shuffle(schemeDeck);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isArchenemy()
|
public boolean isArchenemy() {
|
||||||
{
|
|
||||||
//Only the archenemy has schemes.
|
//Only the archenemy has schemes.
|
||||||
return schemeDeck.size() > 0;
|
return schemeDeck.size() > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSchemeInMotion()
|
public void setSchemeInMotion() {
|
||||||
{
|
|
||||||
// Replacement effects
|
// Replacement effects
|
||||||
final HashMap<String, Object> repRunParams = new HashMap<String, Object>();
|
final HashMap<String, Object> repRunParams = new HashMap<String, Object>();
|
||||||
repRunParams.put("Event", "SetInMotion");
|
repRunParams.put("Event", "SetInMotion");
|
||||||
|
|||||||
@@ -129,8 +129,8 @@ public class SEditorIO {
|
|||||||
// Confirm if overwrite
|
// Confirm if overwrite
|
||||||
else if (controller.fileExists(name)) {
|
else if (controller.fileExists(name)) {
|
||||||
final int m = JOptionPane.showConfirmDialog(null,
|
final int m = JOptionPane.showConfirmDialog(null,
|
||||||
limitedDeckMode ? "Would you like to save changes to your deck?" :
|
limitedDeckMode ? "Would you like to save changes to your deck?"
|
||||||
"There is already a deck named '" + name + "'. Overwrite?",
|
: "There is already a deck named '" + name + "'. Overwrite?",
|
||||||
limitedDeckMode ? "Save changes?" : "Overwrite Deck?",
|
limitedDeckMode ? "Save changes?" : "Overwrite Deck?",
|
||||||
JOptionPane.YES_NO_OPTION,
|
JOptionPane.YES_NO_OPTION,
|
||||||
JOptionPane.QUESTION_MESSAGE);
|
JOptionPane.QUESTION_MESSAGE);
|
||||||
|
|||||||
@@ -326,7 +326,7 @@ public final class EditorTableView<T extends InventoryItem> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* setWantUnique
|
* setWantUnique.
|
||||||
*
|
*
|
||||||
* @param unique if true, the editor will be set to the "unique card names only" mode.
|
* @param unique if true, the editor will be set to the "unique card names only" mode.
|
||||||
*/
|
*/
|
||||||
@@ -336,7 +336,7 @@ public final class EditorTableView<T extends InventoryItem> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* getAlwaysNonUnique
|
* getAlwaysNonUnique.
|
||||||
*
|
*
|
||||||
* @return if ture, this editor must always show non-unique cards (e.g. quest editor).
|
* @return if ture, this editor must always show non-unique cards (e.g. quest editor).
|
||||||
*/
|
*/
|
||||||
@@ -346,7 +346,7 @@ public final class EditorTableView<T extends InventoryItem> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* setAlwaysNonUnique
|
* setAlwaysNonUnique.
|
||||||
*
|
*
|
||||||
* @param nonUniqueOnly if true, this editor must always show non-unique cards (e.g. quest editor).
|
* @param nonUniqueOnly if true, this editor must always show non-unique cards (e.g. quest editor).
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -160,12 +160,11 @@ public enum CSubmenuArchenemy implements ICDoc {
|
|||||||
|
|
||||||
if (obj instanceof String) {
|
if (obj instanceof String) {
|
||||||
String sel = (String) obj;
|
String sel = (String) obj;
|
||||||
if(sel.equals("Random"))
|
if (sel.equals("Random")) {
|
||||||
{
|
|
||||||
schemes = Iterables.get(view.getAllSchemeDecks(), rnd.nextInt(Iterables.size(view.getAllSchemeDecks()))).getSchemes().toFlatList();
|
schemes = Iterables.get(view.getAllSchemeDecks(), rnd.nextInt(Iterables.size(view.getAllSchemeDecks()))).getSchemes().toFlatList();
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
//Generate
|
//Generate
|
||||||
schemes = DeckgenUtil.generateSchemeDeck().getSchemes().toFlatList();
|
schemes = DeckgenUtil.generateSchemeDeck().getSchemes().toFlatList();
|
||||||
}
|
}
|
||||||
@@ -189,13 +188,12 @@ public enum CSubmenuArchenemy implements ICDoc {
|
|||||||
for (int i = 0; i < view.getNumPlayers(); i++) {
|
for (int i = 0; i < view.getNumPlayers(); i++) {
|
||||||
LobbyPlayer player = lobby.findLocalPlayer(i == 0 ? PlayerType.HUMAN : PlayerType.COMPUTER);
|
LobbyPlayer player = lobby.findLocalPlayer(i == 0 ? PlayerType.HUMAN : PlayerType.COMPUTER);
|
||||||
|
|
||||||
if(i == 0)
|
if (i == 0) {
|
||||||
{
|
|
||||||
helper.addArchenemy(player, playerDecks.get(i), schemes);
|
helper.addArchenemy(player, playerDecks.get(i), schemes);
|
||||||
helper.getPlayerMap().get(player).setStartingLife(10 + (10 * (view.getNumPlayers() - 1)));
|
helper.getPlayerMap().get(player).setStartingLife(10 + (10 * (view.getNumPlayers() - 1)));
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
helper.addPlayer(player, playerDecks.get(i));
|
helper.addPlayer(player, playerDecks.get(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -133,8 +133,8 @@ public enum VSubmenuArchenemy implements IVSubmenu<CSubmenuArchenemy> {
|
|||||||
deckChoosers.add(tempChooser);
|
deckChoosers.add(tempChooser);
|
||||||
|
|
||||||
tempPanel.add(tempChooser, "span 1 2, w 44%!, gap 0 0 20px 20px, growy, pushy, wrap");
|
tempPanel.add(tempChooser, "span 1 2, w 44%!, gap 0 0 20px 20px, growy, pushy, wrap");
|
||||||
if(i == 0)
|
if (i == 0) {
|
||||||
{
|
|
||||||
tempPanel.add(new FLabel.Builder().text("Select Scheme deck:").build(), "flowy");
|
tempPanel.add(new FLabel.Builder().text("Select Scheme deck:").build(), "flowy");
|
||||||
|
|
||||||
Vector<Object> listData = new Vector<Object>();
|
Vector<Object> listData = new Vector<Object>();
|
||||||
|
|||||||
@@ -112,8 +112,9 @@ public class EventVisualizer {
|
|||||||
if (sa.isSpell()) {
|
if (sa.isSpell()) {
|
||||||
// if there's a specific effect for this particular card, play it and
|
// if there's a specific effect for this particular card, play it and
|
||||||
// we're done.
|
// we're done.
|
||||||
if (getSpecificCardEffect(source))
|
if (getSpecificCardEffect(source)) {
|
||||||
return SoundEffectType.ScriptedEffect;
|
return SoundEffectType.ScriptedEffect;
|
||||||
|
}
|
||||||
|
|
||||||
if (source.isCreature() && source.isArtifact()) {
|
if (source.isCreature() && source.isArtifact()) {
|
||||||
return SoundEffectType.ArtifactCreature;
|
return SoundEffectType.ArtifactCreature;
|
||||||
@@ -159,8 +160,9 @@ public class EventVisualizer {
|
|||||||
|
|
||||||
// if there's a specific effect for this particular card, play it and
|
// if there's a specific effect for this particular card, play it and
|
||||||
// we're done.
|
// we're done.
|
||||||
if (getSpecificCardEffect(land))
|
if (getSpecificCardEffect(land)) {
|
||||||
return SoundEffectType.ScriptedEffect;
|
return SoundEffectType.ScriptedEffect;
|
||||||
|
}
|
||||||
|
|
||||||
final List<SpellAbility> manaProduced = land.getManaAbility();
|
final List<SpellAbility> manaProduced = land.getManaAbility();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user