- A better fix for ComputerUtilCard.applyStaticContPT()

This commit is contained in:
swordshine
2014-10-04 12:31:09 +00:00
parent f7e8d51701
commit 2428a6b0b1

View File

@@ -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);
} }