SacrificeEffect: add (OPTIONAL) tag to StackDesc

This commit is contained in:
Northmoc
2022-04-09 11:35:48 -04:00
parent a6f636a51e
commit 94e395b4cd

View File

@@ -213,6 +213,10 @@ public class SacrificeEffect extends SpellAbilityEffect {
String valid = sa.getParamOrDefault("SacValid", "Self"); String valid = sa.getParamOrDefault("SacValid", "Self");
String num = sa.getParamOrDefault("Amount", "1"); String num = sa.getParamOrDefault("Amount", "1");
if (sa.hasParam("Optional")) { // TODO make boolean and handle verb reconjugation throughout
sb.append("(OPTIONAL) ");
}
final int amount = AbilityUtils.calculateAmount(sa.getHostCard(), num, sa); final int amount = AbilityUtils.calculateAmount(sa.getHostCard(), num, sa);
if (valid.equals("Self")) { if (valid.equals("Self")) {
@@ -228,9 +232,9 @@ public class SacrificeEffect extends SpellAbilityEffect {
msg = CardType.CoreType.isValidEnum(msg) ? msg.toLowerCase() : msg; msg = CardType.CoreType.isValidEnum(msg) ? msg.toLowerCase() : msg;
if (sa.hasParam("Destroy")) { if (sa.hasParam("Destroy")) {
sb.append(oneTgtP ? "destroys " : " destroys "); sb.append(oneTgtP ? "destroys " : " destroy ");
} else { } else {
sb.append(oneTgtP ? "sacrifices " : "sacrifices "); sb.append(oneTgtP ? "sacrifices " : "sacrifice ");
} }
sb.append(Lang.nounWithNumeralExceptOne(amount, msg)).append("."); sb.append(Lang.nounWithNumeralExceptOne(amount, msg)).append(".");
} }