Fixed BarrinTolarianArchmage oracle in #6643

Fixed all the "return up to one (...) to **their** owners and" to "return up to one (...) to **its** owners and" found in cards like Teferi Time Raveler or Barrin Tolarian Archmage

Signed-off-by: Andre Cabaca <andre.cabaca24@gmail.com>
This commit is contained in:
Andre Cabaca 2020-08-21 12:41:27 +01:00
parent 57dba8c02a
commit 219cfdc583
2 changed files with 9 additions and 6 deletions

View file

@ -29,7 +29,7 @@ import java.util.UUID;
public final class BarrinTolarianArchmage extends CardImpl {
private static final FilterCreatureOrPlaneswalkerPermanent filter
= new FilterCreatureOrPlaneswalkerPermanent("other target creature or planeswalker");
= new FilterCreatureOrPlaneswalkerPermanent(" other target creature or planeswalker");
static {
filter.add(AnotherPredicate.instance);

View file

@ -90,15 +90,13 @@ public class ReturnToHandTargetEffect extends OneShotEffect {
}
Target target = mode.getTargets().get(0);
StringBuilder sb = new StringBuilder("return ");
if (target.getNumberOfTargets() == 0 && target.getMaxNumberOfTargets() > 0) {
if (target.getMinNumberOfTargets() == 0 && target.getMaxNumberOfTargets() > 0) {
sb.append("up to ");
sb.append(CardUtil.numberToText(target.getMaxNumberOfTargets()));
if (!target.getTargetName().contains("target")) {
sb.append(" target ");
}
sb.append(target.getTargetName());
sb.append(" to their owners' hand");
return sb.toString();
} else {
if (target.getNumberOfTargets() > 1) {
sb.append(CardUtil.numberToText(target.getNumberOfTargets())).append(' ');
@ -106,9 +104,14 @@ public class ReturnToHandTargetEffect extends OneShotEffect {
if (!target.getTargetName().startsWith("another")) {
sb.append("target ");
}
sb.append(target.getTargetName()).append(" to its owner's hand");
return sb.toString();
}
if(target.getMaxNumberOfTargets() > 1) {
sb.append(" to their owners' hand");
}
else {
sb.append(target.getTargetName()).append(" to its owner's hand");
}
return sb.toString();
}
}