This commit is contained in:
Northmoc
2023-02-09 23:02:06 -05:00
parent 8fa12e7ceb
commit 9765fe4a03

View File

@@ -82,7 +82,7 @@ public abstract class SpellAbilityEffect {
String stackDesc = params.get("StackDescription"); String stackDesc = params.get("StackDescription");
if (stackDesc != null) { if (stackDesc != null) {
String[] reps = null; String[] reps = null;
if (stackDesc.startsWith("REP")) { if (stackDesc.startsWith("REP") && Lang.getInstance() instanceof LangEnglish) {
reps = stackDesc.substring(4).split(" & "); reps = stackDesc.substring(4).split(" & ");
stackDesc = "SpellDescription"; stackDesc = "SpellDescription";
} }
@@ -91,19 +91,17 @@ public abstract class SpellAbilityEffect {
if (params.get("SpellDescription") != null) { if (params.get("SpellDescription") != null) {
String spellDesc = CardTranslation.translateSingleDescriptionText(params.get("SpellDescription"), String spellDesc = CardTranslation.translateSingleDescriptionText(params.get("SpellDescription"),
sa.getHostCard().getName()); sa.getHostCard().getName());
if (Lang.getInstance() instanceof LangEnglish && reps != null) { if (spellDesc.contains("(")) { //trim reminder text from StackDesc
spellDesc = spellDesc.substring(0, spellDesc.indexOf("(") - 1);
}
if (reps != null) {
for (String s : reps) { for (String s : reps) {
String[] rep = s.split("_",2); String[] rep = s.split("_",2);
spellDesc = spellDesc.replaceFirst(rep[0], rep[1]); spellDesc = spellDesc.replaceFirst(rep[0], rep[1]);
} }
}
if (spellDesc.contains("(")) { //trim reminder text from StackDesc
spellDesc = spellDesc.substring(0, spellDesc.indexOf("(") - 1);
}
if (reps == null) {
sb.append(spellDesc);
} else {
tokenizeString(sa, sb, spellDesc); tokenizeString(sa, sb, spellDesc);
} else {
sb.append(spellDesc);
} }
} }
if (sa.getTargets() != null && !sa.getTargets().isEmpty() && reps == null) { if (sa.getTargets() != null && !sa.getTargets().isEmpty() && reps == null) {