mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- A better fix for ComputerUtilCard.applyStaticContPT()
This commit is contained in:
@@ -1136,24 +1136,22 @@ public class ComputerUtilCard {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (params.containsKey("AddPower")) {
|
if (params.containsKey("AddPower")) {
|
||||||
|
String addP = params.get("AddPower");
|
||||||
int att = 0;
|
int att = 0;
|
||||||
if (params.get("AddPower").equals("X")) {
|
if (addP.equals("AffectedX")) {
|
||||||
att = CardFactoryUtil.xCount(c, c.getSVar("X"));
|
att = CardFactoryUtil.xCount(vCard, AbilityUtils.getSVar(stAb, addP));
|
||||||
} else if (params.get("AddPower").equals("Y")) {
|
|
||||||
att = CardFactoryUtil.xCount(c, c.getSVar("Y"));
|
|
||||||
} else {
|
} else {
|
||||||
att = AbilityUtils.calculateAmount(c, params.get("AddPower"), stAb);
|
att = AbilityUtils.calculateAmount(c, addP, stAb);
|
||||||
}
|
}
|
||||||
vCard.addTempAttackBoost(att);
|
vCard.addTempAttackBoost(att);
|
||||||
}
|
}
|
||||||
if (params.containsKey("AddToughness")) {
|
if (params.containsKey("AddToughness")) {
|
||||||
|
String addT = params.get("AddToughness");
|
||||||
int def = 0;
|
int def = 0;
|
||||||
if (params.get("AddToughness").equals("X")) {
|
if (addT.equals("AffectedY")) {
|
||||||
def = CardFactoryUtil.xCount(c, c.getSVar("X"));
|
def = CardFactoryUtil.xCount(vCard, AbilityUtils.getSVar(stAb, addT));
|
||||||
} else if (params.get("AddToughness").equals("Y")) {
|
|
||||||
def = CardFactoryUtil.xCount(c, c.getSVar("Y"));
|
|
||||||
} else {
|
} else {
|
||||||
def = AbilityUtils.calculateAmount(c, params.get("AddToughness"), stAb);
|
def = AbilityUtils.calculateAmount(c, addT, stAb);
|
||||||
}
|
}
|
||||||
vCard.addTempDefenseBoost(def);
|
vCard.addTempDefenseBoost(def);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user