- CheckStyle.

This commit is contained in:
Chris
2012-04-15 00:10:58 +00:00
parent 8542bcdf1b
commit 171de54bc4
3 changed files with 18 additions and 18 deletions

View File

@@ -179,7 +179,7 @@ public class AbilityFactoryStoreSVar {
*/
public static String storeSVarStackDescription(final AbilityFactory af, final SpellAbility sa) {
final HashMap<String, String> params = af.getMapParams();
final StringBuilder sb = new StringBuilder();
if (sa instanceof AbilitySub) {
@@ -187,7 +187,7 @@ public class AbilityFactoryStoreSVar {
} else {
sb.append(sa.getSourceCard().getName()).append(" - ");
}
if (params.containsKey("StackDescription")) {
sb.append(params.get("StackDescription"));
return sb.toString();
@@ -264,42 +264,42 @@ public class AbilityFactoryStoreSVar {
* a {@link forge.card.spellability.SpellAbility} object.
*/
public static void storeSVarResolve(final AbilityFactory af, final SpellAbility sa) {
//SVar$ OldToughness | Type$ Count | Expression$ CardToughness
//SVar$ OldToughness | Type$ Count | Expression$ CardToughness
final HashMap<String, String> params = af.getMapParams();
Card source = sa.getSourceCard();
String key = null;
String type = null;
String expr = null;
if (params.containsKey("SVar")) {
if (params.containsKey("SVar")) {
key = params.get("SVar");
}
if (params.containsKey("Type")) {
type = params.get("Type");
}
if (params.containsKey("Expression")) {
expr = params.get("Expression");
}
if (key == null || type == null || expr == null) {
System.out.println("SVar, Type and Expression paramaters required for StoreSVar. They are missing for " + source.getName());
return;
}
int value = 0;
if (type.equals("Count")) {
value = CardFactoryUtil.xCount(source, expr);
}
//TODO For other types call a different function
StringBuilder numBuilder = new StringBuilder();
numBuilder.append("Number$");
numBuilder.append(value);
source.setSVar(key, numBuilder.toString());
}

View File

@@ -42,7 +42,7 @@ public abstract class AbilityStatic extends Ability {
public AbilityStatic(final Card sourceCard, final String manaCost) {
super(sourceCard, manaCost);
}
public AbilityStatic(final Card sourceCard, final Cost abCost, final Target tgt) {
super(sourceCard, abCost.getTotalMana());
this.setManaCost(abCost.getTotalMana());

View File

@@ -134,7 +134,7 @@ public enum VHomeUI implements IVTopLevelUI {
pnlParent.setBackgroundTexture(FSkin.getIcon(FSkin.Backgrounds.BG_TEXTURE));
pnlParent.setLayout(null);
pnlParent.add(pnlLeft);
pnlParent.add(pnlRight);
pnlParent.add(pnlRight);
// Left pane holds scroller with menu panel.
pnlMenu.setLayout(new MigLayout("insets 0, gap 0, wrap, hidemode 3"));
@@ -162,7 +162,7 @@ public enum VHomeUI implements IVTopLevelUI {
allGroupPanels.get(e).setLayout(new MigLayout("insets 0, gap 0, wrap"));
allGroupPanels.get(e).setName(e.toString());
}
// For each item: Add to its group, and add to the card layout in right panel.
for (final IVSubmenu item : allSubmenus) {
allSubmenuLabels.put(EMenuItem.valueOf(item.getItemEnum()), makeItemLabel(item));
@@ -183,7 +183,7 @@ public enum VHomeUI implements IVTopLevelUI {
groupClick(e, allGroupLabels.get(e));
}
}
// Select previous
EMenuItem selected = null;
try {
@@ -218,7 +218,7 @@ public enum VHomeUI implements IVTopLevelUI {
@Override
public void populate() {
FView.SINGLETON_INSTANCE.getLpnDocument().add(pnlParent, JLayeredPane.DEFAULT_LAYER);
FView.SINGLETON_INSTANCE.getLpnDocument().add(pnlParent, JLayeredPane.DEFAULT_LAYER);
}
private void groupClick(final EMenuGroup e0, final JLabel lbl0) {