mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
*Added CheckThirdSVar and CheckFourthSVar and accompanying parameters to StaticAbility.
This commit is contained in:
@@ -469,6 +469,34 @@ public class StaticAbility {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.mapParams.containsKey("CheckThirdSVar")) {
|
||||||
|
final int sVar = AbilityFactory.calculateAmount(this.hostCard, this.mapParams.get("CheckThirdSVar"), null);
|
||||||
|
String comparator = "GE1";
|
||||||
|
if (this.mapParams.containsKey("ThirdSVarCompare")) {
|
||||||
|
comparator = this.mapParams.get("ThirdSVarCompare");
|
||||||
|
}
|
||||||
|
final String svarOperator = comparator.substring(0, 2);
|
||||||
|
final String svarOperand = comparator.substring(2);
|
||||||
|
final int operandValue = AbilityFactory.calculateAmount(this.hostCard, svarOperand, null);
|
||||||
|
if (!AllZoneUtil.compare(sVar, svarOperator, operandValue)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.mapParams.containsKey("CheckFourthSVar")) {
|
||||||
|
final int sVar = AbilityFactory.calculateAmount(this.hostCard, this.mapParams.get("CheckFourthSVar"), null);
|
||||||
|
String comparator = "GE1";
|
||||||
|
if (this.mapParams.containsKey("FourthSVarCompare")) {
|
||||||
|
comparator = this.mapParams.get("FourthSVarCompare");
|
||||||
|
}
|
||||||
|
final String svarOperator = comparator.substring(0, 2);
|
||||||
|
final String svarOperand = comparator.substring(2);
|
||||||
|
final int operandValue = AbilityFactory.calculateAmount(this.hostCard, svarOperand, null);
|
||||||
|
if (!AllZoneUtil.compare(sVar, svarOperator, operandValue)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user