mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 05:22:02 -08:00
[ALL] fixed text generation on "opponent chooses" cards
This commit is contained in:
parent
80f9fdfb79
commit
9f08fdda7f
2 changed files with 22 additions and 15 deletions
|
|
@ -473,20 +473,27 @@ public class Modes extends LinkedHashMap<UUID, Mode> {
|
|||
if (mayChooseNone) {
|
||||
sb.append("you may ");
|
||||
}
|
||||
if (this.chooseText != null) {
|
||||
sb.append(chooseText);
|
||||
} else if (this.getMinModes() == 0 && this.getMaxModes(null, null) == 1) {
|
||||
sb.append("choose up to one");
|
||||
} else if (this.getMinModes() == 0 && this.getMaxModes(null, null) > 2) {
|
||||
sb.append("choose any number");
|
||||
} else if (this.getMinModes() == 1 && this.getMaxModes(null, null) == 2) {
|
||||
sb.append("choose one or both");
|
||||
} else if (this.getMinModes() == 1 && this.getMaxModes(null, null) > 2) {
|
||||
sb.append("choose one or more");
|
||||
} else if (this.getMinModes() == this.getMaxModes(null, null)) {
|
||||
sb.append("choose " + CardUtil.numberToText(this.getMinModes()));
|
||||
if (this.chooseText == null) {
|
||||
if (modeChooser == TargetController.OPPONENT) {
|
||||
sb.append("an opponent chooses ");
|
||||
} else {
|
||||
sb.append("choose ");
|
||||
}
|
||||
if (this.getMinModes() == 0 && this.getMaxModes(null, null) == 1) {
|
||||
sb.append("up to one");
|
||||
} else if (this.getMinModes() == 0 && this.getMaxModes(null, null) > 2) {
|
||||
sb.append("any number");
|
||||
} else if (this.getMinModes() == 1 && this.getMaxModes(null, null) == 2) {
|
||||
sb.append("one or both");
|
||||
} else if (this.getMinModes() == 1 && this.getMaxModes(null, null) > 2) {
|
||||
sb.append("one or more");
|
||||
} else if (this.getMinModes() == this.getMaxModes(null, null)) {
|
||||
sb.append(CardUtil.numberToText(this.getMinModes()));
|
||||
} else {
|
||||
throw new UnsupportedOperationException("no text available for this selection of min and max modes");
|
||||
}
|
||||
} else {
|
||||
throw new UnsupportedOperationException("no text available for this selection of min and max modes");
|
||||
sb.append(chooseText);
|
||||
}
|
||||
|
||||
if (isEachModeOnlyOnce() && this.getMaxModesFilter() == null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue