- CheckStyle.

This commit is contained in:
Chris
2012-11-30 01:34:20 +00:00
parent 0e2a1d461a
commit f21f7b7738
10 changed files with 23 additions and 25 deletions

View File

@@ -7962,7 +7962,7 @@ public class Card extends GameEntity implements Comparable<Card> {
return 0; return 0;
} }
if (source.isCreature() && Singletons.getModel().getGame().isCardInPlay("Well-Laid Plans") if (source.isCreature() && Singletons.getModel().getGame().isCardInPlay("Well-Laid Plans")
&& source.sharesColorWith(this)) { && source.sharesColorWith(this)) {
return 0; return 0;
} }

View File

@@ -46,7 +46,7 @@ public final class CardRules {
private String toughness = null; private String toughness = null;
private String loyalty = null; private String loyalty = null;
//Vanguard avatar modifiers //Vanguard avatar modifiers
private Integer life = null; private Integer life = null;
private Integer hand = null; private Integer hand = null;
@@ -267,8 +267,8 @@ public final class CardRules {
if (slashPos == -1) { if (slashPos == -1) {
throw new RuntimeException(String.format("Vanguard '%s' has bad hand/life stats", this.getName())); throw new RuntimeException(String.format("Vanguard '%s' has bad hand/life stats", this.getName()));
} }
this.hand = Integer.parseInt(pt.substring(0,pt.indexOf('/')).replace("+", "")); this.hand = Integer.parseInt(pt.substring(0, pt.indexOf('/')).replace("+", ""));
this.life = Integer.parseInt(pt.substring(pt.indexOf('/')+1).replace("+", "")); this.life = Integer.parseInt(pt.substring(pt.indexOf('/') + 1).replace("+", ""));
} }
if (this.characteristics.getSetsData().isEmpty()) { if (this.characteristics.getSetsData().isEmpty()) {
@@ -416,5 +416,3 @@ public final class CardRules {
} }

View File

@@ -111,9 +111,9 @@ public class CardRulesReader {
this.characteristics[this.curCharacteristics].setDeckNeeds(CardRulesReader.getValueAfterKey(line, "DeckNeeds:")); this.characteristics[this.curCharacteristics].setDeckNeeds(CardRulesReader.getValueAfterKey(line, "DeckNeeds:"));
} }
break; break;
case 'H': case 'H':
if(line.startsWith("HandLifeModifier:")) { if (line.startsWith("HandLifeModifier:")) {
this.characteristics[this.curCharacteristics].setPtLine(CardRulesReader.getValueAfterKey(line, "HandLifeModifier:")); this.characteristics[this.curCharacteristics].setPtLine(CardRulesReader.getValueAfterKey(line, "HandLifeModifier:"));
} }
break; break;

View File

@@ -203,7 +203,7 @@ public final class CardType implements Comparable<CardType> {
public boolean isSorcery() { public boolean isSorcery() {
return this.coreType.contains(CardCoreType.Sorcery); return this.coreType.contains(CardCoreType.Sorcery);
} }
/** /**
* Checks if is vanguard. * Checks if is vanguard.
* *

View File

@@ -1647,9 +1647,9 @@ public class AbilityFactory {
} }
} }
} }
// AI will only pay when it's not already payed and only opponents abilities // AI will only pay when it's not already payed and only opponents abilities
if (paid || (payers.size() > 1 if (paid || (payers.size() > 1
&& (sa.getActivatingPlayer().equals(payer) && !"OnlyOwn".equals(sa.getParam("UnlessAI"))))) { && (sa.getActivatingPlayer().equals(payer) && !"OnlyOwn".equals(sa.getParam("UnlessAI"))))) {
continue; continue;
} }

View File

@@ -168,7 +168,7 @@ public class DamageAllAi extends SpellAiLogic {
final List<Card> humanList = this.getKillableCreatures(sa, enemy, dmg); final List<Card> humanList = this.getKillableCreatures(sa, enemy, dmg);
List<Card> computerList = this.getKillableCreatures(sa, ai, dmg); List<Card> computerList = this.getKillableCreatures(sa, ai, dmg);
final Target tgt = sa.getTarget(); final Target tgt = sa.getTarget();
if (tgt != null && sa.canTarget(enemy)) { if (tgt != null && sa.canTarget(enemy)) {
tgt.resetTargets(); tgt.resetTargets();
sa.getTarget().addTarget(enemy); sa.getTarget().addTarget(enemy);

View File

@@ -3189,7 +3189,7 @@ public class CardFactoryUtil {
Singletons.getModel().getGame().getAction().moveToPlay(temp); Singletons.getModel().getGame().getAction().moveToPlay(temp);
list.add(temp); list.add(temp);
} }
Singletons.getModel().getGame().getEvents().post(new TokenCreatedEvent()); Singletons.getModel().getGame().getEvents().post(new TokenCreatedEvent());
return list; return list;

View File

@@ -674,7 +674,7 @@ public class Target {
*/ */
public final boolean canTgtCreature() { public final boolean canTgtCreature() {
for (final String s : this.validTgts) { for (final String s : this.validTgts) {
if ((s.contains("Creature") || CardUtil.isACreatureType(s) || s.startsWith("Permanent")) if ((s.contains("Creature") || CardUtil.isACreatureType(s) || s.startsWith("Permanent"))
&& !s.contains("nonCreature")) { && !s.contains("nonCreature")) {
return true; return true;
} }

View File

@@ -494,7 +494,7 @@ public class StaticAbility {
return false; return false;
} }
} }
if (params.containsKey("Condition")) { if (params.containsKey("Condition")) {
if (params.get("Condition").equals("Threshold")) { if (params.get("Condition").equals("Threshold")) {
if (!controller.hasThreshold()) { if (!controller.hasThreshold()) {

View File

@@ -107,8 +107,8 @@ public abstract class Player extends GameEntity implements Comparable<Player> {
/** The max hand size. */ /** The max hand size. */
private int maxHandSize = 7; private int maxHandSize = 7;
/** Starting hand size */ /** Starting hand size. */
private int startingHandSize = 7; private int startingHandSize = 7;
/** The unlimited hand size. */ /** The unlimited hand size. */
@@ -2539,7 +2539,7 @@ public abstract class Player extends GameEntity implements Comparable<Player> {
public void setUnlimitedHandSize(boolean unlimited) { public void setUnlimitedHandSize(boolean unlimited) {
this.unlimitedHandSize = unlimited; this.unlimitedHandSize = unlimited;
} }
/** /**
* <p> * <p>
@@ -3022,15 +3022,15 @@ public abstract class Player extends GameEntity implements Comparable<Player> {
return other.getType() != this.getType(); return other.getType() != this.getType();
} }
public int getStartingHandSize() public int getStartingHandSize() {
{
return this.startingHandSize; return this.startingHandSize;
} }
public void setStartingHandSize(int shs) public void setStartingHandSize(int shs) {
{
this.startingHandSize = shs; this.startingHandSize = shs;
} }