mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Optimized "Return to hand" effect text
Signed-off-by: Andre Cabaca <andre.cabaca24@gmail.com>
This commit is contained in:
parent
0f6b8bbe9e
commit
36a3008f4c
1 changed files with 9 additions and 13 deletions
|
@ -90,21 +90,17 @@ public class ReturnToHandTargetEffect extends OneShotEffect {
|
|||
}
|
||||
Target target = mode.getTargets().get(0);
|
||||
StringBuilder sb = new StringBuilder("return ");
|
||||
if (target.getMinNumberOfTargets() == 0 && target.getMaxNumberOfTargets() > 0) {
|
||||
if (target.getMinNumberOfTargets() == 0 && target.getMaxNumberOfTargets() >= 1) {
|
||||
sb.append("up to ");
|
||||
sb.append(CardUtil.numberToText(target.getMaxNumberOfTargets()));
|
||||
if (!target.getTargetName().contains("target")) {
|
||||
sb.append(" target ");
|
||||
}
|
||||
sb.append(target.getTargetName());
|
||||
} else {
|
||||
if (target.getNumberOfTargets() > 1) {
|
||||
sb.append(CardUtil.numberToText(target.getNumberOfTargets())).append(' ');
|
||||
}
|
||||
if (!target.getTargetName().startsWith("another")) {
|
||||
sb.append("target ");
|
||||
}
|
||||
sb.append(CardUtil.numberToText(target.getMaxNumberOfTargets())).append(" ");
|
||||
}
|
||||
else if (!(target.getMinNumberOfTargets() == 1 || target.getMaxNumberOfTargets() == 1)) {
|
||||
sb.append(CardUtil.numberToText(target.getMaxNumberOfTargets())).append(" ");
|
||||
}
|
||||
if (!target.getTargetName().contains("target")) {
|
||||
sb.append("target ");
|
||||
}
|
||||
sb.append(target.getTargetName());
|
||||
if(target.getMaxNumberOfTargets() > 1) {
|
||||
sb.append(" to their owners' hand");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue