allow for -AffectedX and other variations

This commit is contained in:
Northmoc
2021-11-02 14:23:14 -04:00
parent ba94d8b589
commit 6949ce45fc
2 changed files with 6 additions and 6 deletions

View File

@@ -1746,12 +1746,12 @@ public class ComputerUtilCard {
int att = 0;
if (stAb.hasParam("AddPower")) {
String addP = stAb.getParam("AddPower");
att = AbilityUtils.calculateAmount(addP.startsWith("Affected") ? vCard : c, addP, stAb, true);
att = AbilityUtils.calculateAmount(addP.contains("Affected") ? vCard : c, addP, stAb, true);
}
int def = 0;
if (stAb.hasParam("AddToughness")) {
String addT = stAb.getParam("AddToughness");
def = AbilityUtils.calculateAmount(addT.startsWith("Affected") ? vCard : c, addT, stAb, true);
def = AbilityUtils.calculateAmount(addT.contains("Affected") ? vCard : c, addT, stAb, true);
}
vCard.addPTBoost(att, def, c.getTimestamp(), stAb.getId());
}

View File

@@ -684,10 +684,10 @@ public final class StaticAbilityContinuous {
if (layer == StaticAbilityLayer.SETPT) {
if ((setPower != null) || (setToughness != null)) {
// non CharacteristicDefining
if (setP.startsWith("Affected")) {
if (setP.contains("Affected")) {
setPower = AbilityUtils.calculateAmount(affectedCard, setP, stAb, true);
}
if (setT.startsWith("Affected")) {
if (setT.contains("Affected")) {
setToughness = AbilityUtils.calculateAmount(affectedCard, setT, stAb, true);
}
affectedCard.addNewPT(setPower, setToughness,
@@ -697,10 +697,10 @@ public final class StaticAbilityContinuous {
// add P/T bonus
if (layer == StaticAbilityLayer.MODIFYPT) {
if (addP.startsWith("Affected")) {
if (addP.contains("Affected")) {
powerBonus = AbilityUtils.calculateAmount(affectedCard, addP, stAb, true);
}
if (addT.startsWith("Affected")) {
if (addT.contains("Affected")) {
toughnessBonus = AbilityUtils.calculateAmount(affectedCard, addT, stAb, true);
}
affectedCard.addPTBoost(powerBonus, toughnessBonus, se.getTimestamp(), stAb.getId());