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