mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-14 09:48:02 +00:00
allow for -AffectedX and other variations
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user