mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- CheckStyle.
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user