mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-12 08:48:39 +00:00
Merge branch 'stackDescs' into 'master'
some more getStackDescription improvements See merge request core-developers/forge!6281
This commit is contained in:
@@ -88,7 +88,7 @@ public class CountersPutEffect extends SpellAbilityEffect {
|
|||||||
stringBuilder.append(targetCard);
|
stringBuilder.append(targetCard);
|
||||||
Integer v = spellAbility.getDividedValue(targetCard);
|
Integer v = spellAbility.getDividedValue(targetCard);
|
||||||
if (v != null) // fix null counter stack description
|
if (v != null) // fix null counter stack description
|
||||||
stringBuilder.append(" (").append(v).append(" counter)");
|
stringBuilder.append(" (").append(v).append(v == 1 ? " counter)" : " counters)");
|
||||||
|
|
||||||
if(i == targetCards.size() - 2) {
|
if(i == targetCards.size() - 2) {
|
||||||
stringBuilder.append(" and ");
|
stringBuilder.append(" and ");
|
||||||
|
|||||||
@@ -182,16 +182,17 @@ public class PumpEffect extends SpellAbilityEffect {
|
|||||||
keywords.addAll(Arrays.asList(sa.getParam("KW").split(" & ")));
|
keywords.addAll(Arrays.asList(sa.getParam("KW").split(" & ")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sa instanceof AbilitySub & sa.getRootAbility().getTargets().containsAll(tgts)) {
|
||||||
|
//try to avoid having the same long list of targets twice in a StackDescription
|
||||||
|
sb.append(tgts.size() == 1 && tgts.get(0) instanceof Card ? "It " : "They ");
|
||||||
|
} else {
|
||||||
sb.append(Lang.joinHomogenous(tgts)).append(" ");
|
sb.append(Lang.joinHomogenous(tgts)).append(" ");
|
||||||
|
}
|
||||||
|
|
||||||
if (sa.hasParam("Radiance")) {
|
if (sa.hasParam("Radiance")) {
|
||||||
sb.append("and each other ").append(sa.getParam("ValidTgts"))
|
sb.append("and each other ").append(sa.getParam("ValidTgts"))
|
||||||
.append(" that shares a color with ");
|
.append(" that shares a color with ");
|
||||||
if (tgts.size() > 1) {
|
sb.append(tgts.size() > 1 ? "them " : "it ");
|
||||||
sb.append("them ");
|
|
||||||
} else {
|
|
||||||
sb.append("it ");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
final int atk = AbilityUtils.calculateAmount(sa.getHostCard(), sa.getParam("NumAtt"), sa, true);
|
final int atk = AbilityUtils.calculateAmount(sa.getHostCard(), sa.getParam("NumAtt"), sa, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user