- CheckStyle.

This commit is contained in:
Chris
2012-02-17 14:39:06 +00:00
parent 9309487b32
commit 4bf610b677

View File

@@ -52,20 +52,20 @@ public abstract class ReplacementEffect extends TriggerReplacementBase {
} }
public final boolean aiShouldRun(final SpellAbility sa) { public final boolean aiShouldRun(final SpellAbility sa) {
if(mapParams.containsKey("AICheckSVar")) { if (mapParams.containsKey("AICheckSVar")) {
String svarToCheck = mapParams.get("AICheckSVar"); String svarToCheck = mapParams.get("AICheckSVar");
String comparator = "GE"; String comparator = "GE";
int compareTo = 1; int compareTo = 1;
if(mapParams.containsKey("AISVarCompare")) { if (mapParams.containsKey("AISVarCompare")) {
String fullCmp = mapParams.get("AISVarCompare"); String fullCmp = mapParams.get("AISVarCompare");
comparator = fullCmp.substring(0,2); comparator = fullCmp.substring(0, 2);
String strCmpTo = fullCmp.substring(2); String strCmpTo = fullCmp.substring(2);
try { try {
compareTo = Integer.parseInt(strCmpTo); compareTo = Integer.parseInt(strCmpTo);
} }
catch(Exception ignored) { catch (Exception ignored) {
if(sa == null) { if (sa == null) {
compareTo = CardFactoryUtil.xCount(hostCard, hostCard.getSVar(strCmpTo)); compareTo = CardFactoryUtil.xCount(hostCard, hostCard.getSVar(strCmpTo));
} else { } else {
compareTo = AbilityFactory.calculateAmount(hostCard, hostCard.getSVar(strCmpTo), sa); compareTo = AbilityFactory.calculateAmount(hostCard, hostCard.getSVar(strCmpTo), sa);
@@ -75,13 +75,13 @@ public abstract class ReplacementEffect extends TriggerReplacementBase {
int left = 0; int left = 0;
if(sa == null) { if (sa == null) {
left = CardFactoryUtil.xCount(hostCard, hostCard.getSVar(svarToCheck)); left = CardFactoryUtil.xCount(hostCard, hostCard.getSVar(svarToCheck));
} else { } else {
left = AbilityFactory.calculateAmount(hostCard, hostCard.getSVar(svarToCheck), sa); left = AbilityFactory.calculateAmount(hostCard, hostCard.getSVar(svarToCheck), sa);
} }
if(AllZoneUtil.compare(left, comparator, compareTo)) { if (AllZoneUtil.compare(left, comparator, compareTo)) {
return true; return true;
} }