mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28: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) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user