mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
- Fixed a bug with AddToughness.
This commit is contained in:
@@ -68,13 +68,9 @@ public class StaticAbilityContinuous {
|
||||
se.setSource(hostCard);
|
||||
Singletons.getModel().getGame().getStaticEffects().addStaticEffect(se);
|
||||
|
||||
String addP = "";
|
||||
int powerBonus = 0;
|
||||
String addT = "";
|
||||
int toughnessBonus = 0;
|
||||
String setP = "";
|
||||
int setPower = -1;
|
||||
String setT = "";
|
||||
int setToughness = -1;
|
||||
int keywordMultiplier = 1;
|
||||
|
||||
@@ -101,19 +97,19 @@ public class StaticAbilityContinuous {
|
||||
}
|
||||
|
||||
if (params.containsKey("SetPower")) {
|
||||
setP = params.get("SetPower");
|
||||
String setP = params.get("SetPower");
|
||||
setPower = setP.matches("[0-9][0-9]?") ? Integer.parseInt(setP)
|
||||
: AbilityFactory.calculateAmount(hostCard, setP, null);
|
||||
}
|
||||
|
||||
if (params.containsKey("SetToughness")) {
|
||||
setT = params.get("SetToughness");
|
||||
String setT = params.get("SetToughness");
|
||||
setToughness = setT.matches("[0-9][0-9]?") ? Integer.parseInt(setT)
|
||||
: AbilityFactory.calculateAmount(hostCard, setT, null);
|
||||
}
|
||||
|
||||
if (params.containsKey("AddPower")) {
|
||||
addP = params.get("AddPower");
|
||||
String addP = params.get("AddPower");
|
||||
powerBonus = addP.matches("[0-9][0-9]?") ? Integer.parseInt(addP)
|
||||
: AbilityFactory.calculateAmount(hostCard, addP, null);
|
||||
if (!addP.matches("[0-9][0-9]?") && !addP.equals("AffectedX")) {
|
||||
@@ -122,11 +118,11 @@ public class StaticAbilityContinuous {
|
||||
}
|
||||
|
||||
if (params.containsKey("AddToughness")) {
|
||||
addT = params.get("AddToughness");
|
||||
String addT = params.get("AddToughness");
|
||||
toughnessBonus = addT.matches("[0-9][0-9]?") ? Integer.parseInt(addT)
|
||||
: AbilityFactory.calculateAmount(hostCard, addT, null);
|
||||
if (!addT.matches("[0-9][0-9]?") && !addT.equals("AffectedX")) {
|
||||
se.setXValue(powerBonus);
|
||||
se.setXValue(toughnessBonus);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user